============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined lw_srvchan_close() PUSH RBP MOV RBP,RDI CALL lw_sock_close ;undefined lw_sock_close() MOV RDI,qword ptr [RBP + 0x30] TEST RDI,RDI JZ LAB_00107c0f CALL .plt:::free ;void free(void * __ptr) MOV qword ptr [RBP + 0x30],0x0 LAB_00107c0f: MOV RDI,RBP POP RBP JMP reset ;undefined reset() ?? 0Fh Actual src: void lw_srvchan_close (LW_SRVCHAN * chan) { lw_sock_close (&(chan->sock)); if (chan->map!= NULL) { free (chan->map); chan->map = NULL; } reset (chan); } Predicted src: static void handle_close(void *arg) { struct handle *handle = arg; if (handle->fd!= NULL) { close(handle->fd); handle->fd = NULL; } free(handle); } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined rowind_set_cb() PUSH R12 MOV R12,RDI PUSH RBP MOV RBP,RSI SUB RSP,0x8 CALL .plt:::gtk_combo_box_get_type ;undefined gtk_combo_box_get_type() MOV RDI,R12 MOV RSI,RAX CALL .plt:::g_type_check_instance_cast ;undefined g_type_check_instance_cast() MOV RDI,RAX CALL .plt:::gtk_combo_box_get_active ;undefined gtk_combo_box_get_active() ADD RSP,0x8 MOV RSI,RBP MOV EDI,EAX POP RBP POP R12 JMP .plt:LAB_0012c340 ?? 66h f Actual src: static void rowind_set_cb (GtkWidget *w, ggobid *gg) { rowind_set (gtk_combo_box_get_active(GTK_COMBO_BOX(w)), gg); } Predicted src: static void set_combo_box_cb (GtkComboBox *combo_box, gpointer data) { gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), GTK_COMBO_BOX (combo_box)); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined mp_rshd() TEST ESI,ESI JLE LAB_00191b00 PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 MOV R9D,dword ptr [RDI] CMP R9D,ESI JLE LAB_00191b08 MOV RDI,qword ptr [RDI + 0x10] MOV EBX,R9D MOVSXD RAX,ESI SUB EBX,ESI LEA R8,[RDI + RAX*0x8] TEST EBX,EBX JLE LAB_00191b18 MOVSXD RCX,EBX XOR EAX,EAX NOP LAB_00191ab0: MOV RDX,qword ptr [R8 + RAX*0x8] MOV qword ptr [RDI + RAX*0x8],RDX ADD RAX,0x1 CMP RCX,RAX JNZ LAB_00191ab0 LEA RDI,[RDI + RCX*0x8] CMP R9D,EBX JLE LAB_00191af0 MOV EAX,EBX LAB_00191acc: LEA EDX,[R9 + -0x1] SUB EDX,EAX ADD EAX,0x1 CMP R9D,EAX LEA RDX,[0x8 + RDX*0x8] MOV EAX,0x8 CMOVL RDX,RAX XOR ESI,ESI CALL .plt:::memset ;void * memset(void * __s, int __c, s... LAB_00191af0: MOV dword ptr [RBP],EBX ADD RSP,0x8 POP RBX POP RBP RET ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00191b00: RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00191b08: ADD RSP,0x8 POP RBX POP RBP JMP .plt:mp_zero ;undefined mp_zero() ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00191b18: XOR EAX,EAX JMP LAB_00191acc ?? 0Fh Actual src: void mp_rshd (mp_int * a, int b) { int x; /* if b <= 0 then ignore it */ if (b <= 0) { return; } /* if b > used then simply zero it and return */ if (a->used <= b) { mp_zero (a); return; } { mp_digit *bottom, *top; /* shift the digits down */ /* bottom */ bottom = a->dp; /* top [offset into digits] */ top = a->dp + b; /* this is implemented as a sliding window where * the window is b-digits long and digits from * the top of the window are copied to the bottom * * e.g. b-2 | b-1 | b0 | b1 | b2 |... | bb | ----> /\ | ----> \-------------------/ ----> */ for (x = 0; x < (a->used - b); x++) { *bottom++ = *top++; } /* zero the top digits */ for (; x < a->used; x++) { *bottom++ = 0; } } /* remove excess digits */ a->used -= b; } Predicted src: void mp_zero(mp_int *a, mp_int *b) { int i; for (i = 0; i < a->n; i++) if (a->x[i] > b->x[i]) a->x[i] = a->x[i]; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* QCA::CRLEntry::time() const * ;************************************************************************************************************************************************************ ;undefined time(void) PUSH R12 ADD RSI,0x8 MOV R12,RDI CALL .plt:::QDateTime::QDateTime ;undefined QDateTime(QDateTime * this... MOV RAX,R12 POP R12 RET ?? 66h f Actual src: QDateTime CRLEntry::time() const { return _time; } Predicted src: QDate QDate QDate::time() const { return m_time; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* v8_inspector::protocol::Profiler::ScriptCoverage::clone() const * ;************************************************************************************************************************************************************ ;undefined clone(ScriptCoverage * this) ;this ScriptCover... RDI ;local_58 undefined1 -58 ;local_60 undefined8 -60 PUSH RBP MOV RBP,RSP PUSH R14 MOV R14,RSI PUSH R13 LEA R13=>local_58,[RBP + -0x50] PUSH R12 MOV R12,this MOV this,R13 SUB RSP,0x48 CALL .plt:v8_inspector::protocol::ErrorSupport::ErrorSupport ;undefined ErrorSupport(ErrorSupport... LEA this=>local_60,[RBP + -0x58] MOV RSI,R14 CALL .plt:v8_inspector::protocol::Profiler::ScriptCoverage::toValue ;undefined toValue(void) MOV RSI,qword ptr [RBP + local_60+0x8] MOV this,R12 MOV RDX,R13 CALL .plt:v8_inspector::protocol::Profiler::ScriptCoverage::fromValue ;undefined fromValue(ScriptCoverage *... MOV this,qword ptr [RBP + local_60+0x8] TEST this,this JZ LAB_01229bba MOV RAX,qword ptr [this] CALL qword ptr [RAX + 0x18] LAB_01229bba: MOV this,R13 CALL .plt:v8_inspector::protocol::ErrorSupport::~ErrorSupport ;undefined ~ErrorSupport(ErrorSupport... ADD RSP,0x48 MOV RAX,R12 POP R12 POP R13 POP R14 POP RBP RET ?? 66h f Actual src: std::unique_ptr ScriptCoverage::clone() const { ErrorSupport errors; return fromValue(toValue().get(), &errors); } Predicted src: std::unique_ptr Value::clone() const { return m_value.clone(); }