============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined sigbus_hook() MOV ESI,0x13 JMP generic_hook.constprop.0 ;undefined generic_hook.constprop.0() ?? 66h f Actual src: static void sigbus_hook(lua_State *L, lua_Debug *ar) { generic_hook(L, ar, 19); } Predicted src: static void do_hook(lua_State *L) { do_hook(L, 1); } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined _deliver_in_sess() PUSH RBP MOV RBP,RDX PUSH RBX MOV RBX,RSI SUB RSP,0x8 MOV R8,qword ptr [RDX + 0x30] MOV RDI,qword ptr [RSI + 0x10] TEST R8,R8 JZ LAB_001011ea MOV RSI,RDI MOV RDI,R8 CALL .plt:jid_compare_user ;undefined jid_compare_user() TEST EAX,EAX JZ LAB_00101238 LAB_001011d8: MOV RDI,qword ptr [RBP + 0x30] TEST RDI,RDI JZ LAB_001011e6 CALL .plt:jid_free ;undefined jid_free() LAB_001011e6: MOV RDI,qword ptr [RBX + 0x10] LAB_001011ea: CALL .plt:jid_dup ;undefined jid_dup() MOV qword ptr [RBP + 0x30],RAX MOV RDI,RAX CALL .plt:jid_full ;undefined jid_full() MOV RDI,qword ptr [RBP + 0x40] XOR R9D,R9D LEA RCX,[.rodata:DAT_00102000] ;= 66h f MOV R8,RAX MOV EDX,0xffffffff MOV ESI,0x1 CALL .plt:nad_set_attr ;undefined nad_set_attr() LAB_0010121b: CMP qword ptr [RBP + 0x28],0x0 JZ LAB_00101258 LAB_00101222: MOV RDI,RBP CALL .plt:pkt_router ;undefined pkt_router() XOR EAX,EAX LAB_0010122c: ADD RSP,0x8 POP RBX POP RBP RET ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00101238: TEST byte ptr [RBP + 0x24],0x60 JNZ LAB_0010121b MOV RSI,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RBP + 0x30] CALL .plt:jid_compare_full ;undefined jid_compare_full() TEST EAX,EAX JNZ LAB_001011d8 JMP LAB_0010121b ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00101258: MOV EDX,dword ptr [RBP + 0x24] CMP EDX,0x82 JZ LAB_001012b0 AND EDX,0x80 MOV EAX,0xffffff9a JNZ LAB_0010122c MOV RDI,qword ptr [RBX + 0x10] CALL .plt:jid_dup ;undefined jid_dup() MOV qword ptr [RBP + 0x28],RAX MOV RDI,RAX CALL .plt:jid_full ;undefined jid_full() MOV RDI,qword ptr [RBP + 0x40] XOR R9D,R9D LEA RCX,[.rodata:DAT_00102005] ;= 74h t MOV R8,RAX MOV EDX,0xffffffff MOV ESI,0x1 CALL .plt:nad_set_attr ;undefined nad_set_attr() JMP LAB_00101222 ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001012b0: MOV RDI,RBP CALL .plt:pkt_free ;undefined pkt_free() XOR EAX,EAX JMP LAB_0010122c ?? 90h Actual src: static mod_ret_t _deliver_in_sess(mod_instance_t mi, sess_t sess, pkt_t pkt) { /* ensure from is set correctly if not already by client */ if(pkt->from == NULL || jid_compare_user(pkt->from, sess->jid)!= 0 || (!(pkt->type & pkt_PRESENCE) &&!(pkt->type & pkt_S10N) && jid_compare_full(pkt->from, sess->jid)!= 0)) { if(pkt->from!= NULL) jid_free(pkt->from); pkt->from = jid_dup(sess->jid); nad_set_attr(pkt->nad, 1, -1, "from", jid_full(pkt->from), 0); } /* no to address means its to us */ if(pkt->to == NULL) { /* drop iq-result packets */ /* user client is confirming all iq-set, but we usually do not track these * confirmations and we need to drop it here, not loop back to client */ if(pkt->type == pkt_IQ_RESULT) { pkt_free(pkt); return mod_HANDLED; } /* iq packets without to should have been already handled by modules */ if(pkt->type & pkt_IQ) { return -stanza_err_FEATURE_NOT_IMPLEMENTED; } /* supplant user jid as 'to' */ pkt->to = jid_dup(sess->jid); nad_set_attr(pkt->nad, 1, -1, "to", jid_full(pkt->to), 0); } /* let it go on the wire */ pkt_router(pkt); return mod_HANDLED; } Predicted src: static int _set_compare(void *data, const char *key, const char *value) { const char *value = data; if (value == NULL) return -1; if (value == NULL) return -1; if (value == NULL) return -1; if (value == NULL) return -1; if (value == NULL) return -1; if (strcmp(value, value) == 0) return -1; if (strcmp(value, value) == 0) return -1; if (strcmp(value, value) == 0) return -1; if (strcmp(value, value) == 0) return -1; if (strcmp(value, value) == 0) return -1; if (strcmp(value, value) == 0) return -1; if (strcmp(value, value) == 0) return -1; if (strcmp(value, value) == 0) return -1; if (strcmp(value, value) == 0) return -1; return 0; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined sc_insert() ;local_30 undefined8 -30 ;local_38 undefined8 -38 PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 XOR R12D,R12D PUSH RBP MOV RBP,RSI PUSH RBX SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_30+0x38],RAX XOR EAX,EAX CALL .plt:::document_get_current ;undefined document_get_current() TEST RAX,RAX JZ LAB_001058fb MOV RBX,RAX MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RAX + 0x8] CALL .plt:::sci_get_current_position ;undefined sci_get_current_position() MOV EDX,0x1 MOV RCX,RSP MOV RSI,RBP MOV R14D,EAX MOV R8D,0xffffffff MOV RDI,R13 XOR EAX,EAX CALL .plt:::gtk_tree_model_get ;undefined gtk_tree_model_get() MOV RDX,qword ptr [RSP]=>local_38 TEST RDX,RDX JZ LAB_001058fb CMP byte ptr [RDX],0x0 JNZ LAB_00105920 LAB_001058fb: MOV RAX,qword ptr [RSP + local_30+0x38] SUB RAX,qword ptr FS:[0x28] JNZ LAB_00105941 ADD RSP,0x10 MOV EAX,R12D POP RBX POP RBP POP R12 POP R13 POP R14 RET ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00105920: MOV RAX,qword ptr [RBX + 0x28] MOV ESI,R14D MOV R12D,0x1 MOV RDI,qword ptr [RAX + 0x8] CALL .plt:::sci_insert_text ;undefined sci_insert_text() MOV RDI,qword ptr [RSP]=>local_38 CALL .plt:::g_free ;undefined g_free() JMP LAB_001058fb LAB_00105941: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP word ptr CS:[RAX + RAX*0x1] Actual src: static gboolean sc_insert(GtkTreeModel *model, GtkTreeIter *iter) { GeanyDocument *doc = document_get_current(); gboolean result = FALSE; if (doc!= NULL) { gchar *str; gint pos = sci_get_current_position(doc->editor->sci); gtk_tree_model_get(model, iter, COLUMN_HTML_NAME, &str, -1); if (!EMPTY(str)) { sci_insert_text(doc->editor->sci, pos, str); g_free(str); result = TRUE; } } return result; } Predicted src: static void get_current_selected (GtkTreeModel *model, GtkTreePath *path) { GtkTreeModel *model; GtkTreeModel *model; GtkTreeModel *model; GtkTreeModel *model; GtkTreeIter iter; model = gtk_tree_model_get_model (model, path); if (model == NULL) return; model = gtk_tree_model_get_iter (model); if (model == NULL) { return; } model = gtk_tree_model_get_iter (model); if (model == NULL) { return; } model = gtk_tree_model_get_iter (model); if (model == NULL) { return; } gtk_tree_model_get (model, path, &iter, -1); gtk_tree_model_get (model, &iter, -1); g_free (model); } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined fileAddComplexValue() TEST ESI,ESI JZ LAB_001f4080 MOV RAX,qword ptr [.bss:column] ;=?? MOV RDX,qword ptr [.bss:rowbuf] ;=?? LEA RCX,[RAX + 0x2] MOVSD qword ptr [RDX + RAX*0x8],XMM0 MOV qword ptr [.bss:column],RCX ;=?? MOVSD qword ptr [RDX + RAX*0x8 + 0x8],XMM1 RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_001f4080: MOV ECX,0xf MOV EDX,0xf MOV EAX,0x2 LEA RSI,[.rodata:s__%.*e,%.*e_00712740] ;= "\t%.*e,%.*e\n" JMP sh_fprintf ;undefined sh_fprintf(undefined param... ?? 0Fh Actual src: static void fileAddComplexValue(FILE *fp, bool bin, IFcomplex value) { if (bin) { rowbuf[column++] = value.real; rowbuf[column++] = value.imag; } else { fprintf(fp, "\t%.*e,%.*e\n", DOUBLE_PRECISION, value.real, DOUBLE_PRECISION, value.imag); } } Predicted src: void file_row(char *file, int line, char *file, int line) { if (file == NULL) { file = file; file = file; file = file; } else { file = file; file = file; file = file; file = file; file = file; } } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* wrapNewlineChunksize(libscols_column const*, char const*, void*) * ;************************************************************************************************************************************************************ ;undefined wrapNewlineChunksize(libscols_column * param_1, char * param_2, void * param_3) ;param_1 libscols_co... RDI ;param_2 char * RSI ;param_3 void * RDX JMP .plt:::scols_wrapnl_chunksize ?? 66h f Actual src: size_t wrapNewlineChunksize(const struct libscols_column *column, const char *data, void *userdata) { return scols_wrapnl_chunksize(column, data, userdata); } Predicted src: static void *size_column(const char *s, size_t size, void *data) { return (void *)data; }