============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined nm_setting_match_get_path() PUSH RBP MOV EBP,ESI PUSH RBX MOV RBX,RDI SUB RSP,0x8 CALL .plt:nm_setting_match_get_type ;undefined nm_setting_match_get_type() TEST RBX,RBX JZ LAB_001ae810 MOV RSI,RAX MOV RAX,qword ptr [RBX] TEST RAX,RAX JZ LAB_001ae7d5 CMP qword ptr [RAX],RSI JZ LAB_001ae7e1 LAB_001ae7d5: MOV RDI,RBX CALL .plt:::g_type_check_instance_is_a ;undefined g_type_check_instance_is_a() TEST EAX,EAX JZ LAB_001ae810 LAB_001ae7e1: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ LAB_001ae800 CMP dword ptr [RAX + 0x8],EBP JBE LAB_001ae800 MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + RBP*0x8] LAB_001ae7f6: ADD RSP,0x8 POP RBX POP RBP RET ?? 0Fh ?? 1Fh ?? 00h LAB_001ae800: MOV EDI,0x1f7 CALL _nm_g_return_if_fail_warning.constprop.0 ;undefined _nm_g_return_if_fail_warni... XOR EAX,EAX JMP LAB_001ae7f6 ?? 66h f ?? 90h LAB_001ae810: MOV EDI,0x1f5 CALL _nm_g_return_if_fail_warning.constprop.0 ;undefined _nm_g_return_if_fail_warni... ADD RSP,0x8 XOR EAX,EAX POP RBX POP RBP RET ?? 66h f Actual src: const char * nm_setting_match_get_path(NMSettingMatch *setting, guint idx) { g_return_val_if_fail(NM_IS_SETTING_MATCH(setting), NULL); g_return_val_if_fail(setting->path && idx < setting->path->len, NULL); return nm_strvarray_get_idx(setting->path, idx); } Predicted src: const char * nm_setting_setting_get_setting_path(NMSetting *setting) { g_return_val_if_fail(NM_IS_SETTING_SETTING_SETTING(setting), NULL); return NM_SETTING_SETTING_SETTING_SETTING_GET_PRIVATE(setting)->setting_path; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* LAMMPS_NS::Modify::delete_fix(int) * ;************************************************************************************************************************************************************ ;undefined delete_fix(Modify * this, int param_1) ;this Modify * RDI ;param_1 int ESI PUSH R13 MOVSXD RAX,param_1 PUSH R12 LEA R13,[RAX*0x8] MOV R12,RAX PUSH RBP MOV RBP,this PUSH RBX SUB RSP,0x8 MOV RDX,qword ptr [this + 0x130] MOV this,qword ptr [RDX + RAX*0x8] TEST this,this JZ LAB_008fe0a1 MOV RAX,qword ptr [this] CALL qword ptr [RAX + 0x8] LAB_008fe0a1: MOV RAX,qword ptr [RBP + 0x30] MOV param_1,R12D LEA EBX,[R12 + 0x1] MOV this,qword ptr [RAX] CALL .plt:LAMMPS_NS::Atom::update_callback ;undefined update_callback(Atom * thi... MOV EAX,dword ptr [RBP + 0x124] CMP EBX,EAX JGE LAB_008fe105 MOV this,qword ptr [RBP + 0x130] SUB EAX,R12D MOVSXD RBX,EBX SUB EAX,0x2 LEA RDX,[0x8 + RAX*0x8] LEA param_1,[this + R13*0x1 + 0x8] ADD this,R13 CALL .plt:::memmove ;void * memmove(void * __dest, void *... MOV RDX,qword ptr [RBP + 0x138] NOP dword ptr [RAX + RAX*0x1] LAB_008fe0f0: MOV EAX,dword ptr [RDX + RBX*0x4] MOV dword ptr [RDX + RBX*0x4 + -0x4],EAX MOV EAX,dword ptr [RBP + 0x124] ADD RBX,0x1 CMP EAX,EBX JG LAB_008fe0f0 LAB_008fe105: SUB EAX,0x1 MOV dword ptr [RBP + 0x124],EAX ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 RET ?? 90h Actual src: void Modify::delete_fix(int ifix) { if (fix[ifix]) delete fix[ifix]; atom->update_callback(ifix); // move other Fixes and fmask down in list one slot for (int i = ifix+1; i < nfix; i++) fix[i-1] = fix[i]; for (int i = ifix+1; i < nfix; i++) fmask[i-1] = fmask[i]; nfix--; } Predicted src: void update_callback(int n) { int i; for (i = 0; i < n; i++) n[i] = n; n[i] = n; n[i] = n; n[i] = n; n[i] = n; } ============================== Sample 3 ============================== 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_changed (GtkWidget *widget, gpointer user_data) { gtk_combo_box_set_active (GTK_COMBO_BOX (user_data), GTK_COMBO_BOX (user_data)); } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined smime_free_privacydata() PUSH RBP MOV RBP,RDI MOV RDI,qword ptr [RDI + 0x18] CALL .plt:::gpgme_release ;undefined gpgme_release() MOV RDI,RBP POP RBP JMP .plt:::g_free ;undefined g_free() ?? 66h f Actual src: static void smime_free_privacydata(PrivacyData *_data) { PrivacyDataPGP *data = (PrivacyDataPGP *) _data; gpgme_release(data->ctx); g_free(data); } Predicted src: static void free_data (gpointer user_data) { g_free (user_data); g_free (user_data); } ============================== Sample 5 ============================== 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 q_init(q_t *q, q_t *q) { int i; for (i = 0; i < q->n; i++) q->n[i] = q->n[i]; q->n[i] = q->n[i]; q->n[i] = q->n[i]; }