============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined go_conf_set_bool() PUSH R12 MOV R12D,EDX PUSH RBP SUB RSP,0x8 CALL .plt:go_conf_get_node ;undefined go_conf_get_node() TEST RAX,RAX JZ LAB_00164620 MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RAX + 0x10] MOV EDX,R12D MOV RBP,RAX CALL .plt:::g_settings_set_boolean ;undefined g_settings_set_boolean() ADD RSP,0x8 MOV RDI,RBP POP RBP POP R12 JMP .plt.got:go_conf_free_node ;undefined go_conf_free_node() ?? 66h f ?? 2Eh . ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00164620: ADD RSP,0x8 POP RBP POP R12 RET ?? 0Fh Actual src: void go_conf_set_bool (GOConfNode *node, gchar const *key, gboolean val) { GOConfNode *real_node = go_conf_get_node (node, key); if (!real_node) { d (g_warning ("Unable to set key '%s'", key)); return; } g_settings_set_boolean (real_node->settings, real_node->key, val); go_conf_free_node (real_node); } Predicted src: static void conf_set_bool_set_bool (conf_t *conf, const char *value) { conf_conf_set_bool (conf->priv->conf, value); } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined setting_int_action_left_default() ;local_10 undefined8 -10 ;local_18 undefined8 -18 PUSH R12 SUB RSP,0x10 TEST RDI,RDI JZ LAB_0016afea MOV RAX,qword ptr [RDI + 0xe0] PXOR XMM0,XMM0 XOR R12D,R12D CMP byte ptr [RDI + 0x11],0x0 MOVSD XMM1,qword ptr [RDI + 0x38] CVTSI2SS XMM0,dword ptr [RAX] SUBSS XMM0,dword ptr [RDI + 0x20] CVTTSS2SI EDX,XMM0 MOV dword ptr [RAX],EDX JZ LAB_0016af85 PXOR XMM0,XMM0 CVTSI2SD XMM0,EDX COMISD XMM1,XMM0 JA LAB_0016af90 LAB_0016af85: ADD RSP,0x10 MOV EAX,R12D POP R12 RET ?? 90h LAB_0016af90: MOV qword ptr [RSP + local_10+0x18],RDI MOVSD qword ptr [RSP]=>local_18,XMM1 CALL config_get_ptr ;undefined config_get_ptr() MOV RDI,qword ptr [RSP + local_10+0x18] MOVSD XMM1,qword ptr [RSP]=>local_18 TEST RAX,RAX MOVSD XMM0,qword ptr [RDI + 0x40] JZ LAB_0016afd0 CMP byte ptr [RAX + 0x3a],0x0 JZ LAB_0016afd0 CVTTSD2SI EDX,XMM0 MOV RAX,qword ptr [RDI + 0xe0] MOV dword ptr [RAX],EDX JMP LAB_0016af85 ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_0016afd0: CVTTSD2SI EDX,XMM1 MOV RAX,qword ptr [RDI + 0xe0] XOR R12D,R12D MOV dword ptr [RAX],EDX ADD RSP,0x10 MOV EAX,R12D POP R12 RET LAB_0016afea: MOV R12D,0xffffffff JMP LAB_0016af85 ?? 66h f Actual src: static int setting_int_action_left_default(void *data, bool wraparound) { rarch_setting_t *setting = (rarch_setting_t*)data; double min = 0.0f; if (!setting) return -1; min = setting->min; (void)wraparound; /* TODO/FIXME - handle this */ *setting->value.target.integer = *setting->value.target.integer - setting->step; if (setting->enforce_minrange) { if (*setting->value.target.integer < min) { settings_t *settings = config_get_ptr(); #ifdef HAVE_MENU double max = setting->max; if (settings && settings->bools.menu_navigation_wraparound_enable) *setting->value.target.integer = max; else #endif *setting->value.target.integer = min; } } return 0; } Predicted src: int action_get_default_default(struct action *action, int value) { struct action *action; if (!action ||!action->action) return -1; action = action_get_default_action(action); if (!action) return -1; action->default = action->default; if (action->default) action->default = action->default; else action->default = action->default; else action->default = action->default; return 0; } ============================== Sample 3 ============================== 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 _attr_set_compare(struct attr *attr, struct attr *attr) { struct attr *attr; struct attr *attr; attr = attr_dup(attr->attr); if (!attr) return -1; attr->attr = attr_dup(attr->attr); attr->attr = attr_dup(attr->attr, attr->attr); attr->attr = attr_dup(attr->attr, attr->attr); attr->attr = attr_dup(attr->attr, attr->attr); attr->attr = attr_dup(attr->attr, attr->attr); attr_free(attr); return 0; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined usage() PUSH RBP LEA R9,[.rodata:s_[-h_home]_[-P_password]_[-t_btre_001055c0] ;= "[-h home] [-P password] [-t btree... MOV ESI,0x1 XOR EAX,EAX PUSH RBX LEA R8,[.rodata:s_[-nTV]_[-c_name=value]_[-f_file]_00105608] ;= "[-nTV] [-c name=value] [-f file]" LEA RDX,[.rodata:s_usage:_%s_%s_%s_001051c6] ;= "usage: %s %s\n\t%s\n" SUB RSP,0x8 LEA RBP,[.bss:progname] ;=?? MOV RBX,qword ptr [->stderr] ;= 00108120 MOV RCX,qword ptr [RBP]=>.bss:progname ;=?? MOV RDI,qword ptr [RBX]=>EXTERNAL:stderr ;=?? CALL .plt:::__fprintf_chk ;undefined __fprintf_chk() MOV RCX,qword ptr [RBP]=>.bss:progname ;=?? MOV RDI,qword ptr [RBX]=>EXTERNAL:stderr ;=?? XOR EAX,EAX LEA R8,[.rodata:s_-r_lsn_|_fileid_[-h_home]_[-P_pa_00105630] ;= "-r lsn | fileid [-h home] [-P pas... LEA RDX,[.rodata:s_usage:_%s_%s_001051d8] ;= "usage: %s %s\n" MOV ESI,0x1 CALL .plt:::__fprintf_chk ;undefined __fprintf_chk() ADD RSP,0x8 MOV EAX,0x1 POP RBX POP RBP RET ?? 0Fh Actual src: int usage() { (void)fprintf(stderr, "usage: %s %s\n\t%s\n", progname, "[-nTV] [-c name=value] [-f file]", "[-h home] [-P password] [-t btree | hash | recno | queue] db_file"); (void)fprintf(stderr, "usage: %s %s\n", progname, "-r lsn | fileid [-h home] [-P password] db_file"); return (EXIT_FAILURE); } Predicted src: static void usage(void) { fprintf(stderr, "usage: %s [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f] [-f [-f] [-f] [-f] [-f [-f] [-f] [-f [-f] [-f [-f] [-f [-f] [-f] [-f] [-f] [-f] [-f [-f] [-f [-f [-f] [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [-f [- ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined files_load_ticket() ;local_20 undefined8 -20 ;local_78 undefined1 -78 ;local_80 undefined8 -80 ;local_82 undefined2 -82 PUSH R13 PUSH R12 PUSH RBP SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_20+0x88],RAX XOR EAX,EAX MOV EAX,0x4c MOV word ptr [RSP + local_82+0x88],AX TEST RDI,RDI JZ LAB_00137334 LEA RBP=>local_78,[RSP + 0x10] MOV R13,RSI LEA RDX=>local_82,[RSP + 0x6] MOV RSI,RBP CALL files_load_bytes_from_path.part.0 ;undefined files_load_bytes_from_path... MOV R12D,EAX TEST AL,AL JNZ LAB_00137358 LAB_00137334: XOR R12D,R12D LAB_00137337: MOV RAX,qword ptr [RSP + local_20+0x88] SUB RAX,qword ptr FS:[0x28] JNZ LAB_001373b9 ADD RSP,0x70 MOV EAX,R12D POP RBP POP R12 POP R13 RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_00137358: MOVZX ESI,word ptr [RSP + local_82+0x88] LEA RDX=>local_80,[RSP + 0x8] MOV RCX,R13 MOV RDI,RBP MOV qword ptr [RSP + local_80+0x88],0x0 CALL .plt:::Tss2_MU_TPMT_TK_VERIFIED_Unmarshal ;undefined Tss2_MU_TPMT_TK_VERIFIED_U... TEST EAX,EAX JZ LAB_00137337 LEA RBP,[.rodata:s_lib/files.c_00160723] ;= "lib/files.c" MOV R8D,EAX XOR EDI,EDI XOR EAX,EAX MOV RSI=>.rodata:s_lib/files.c_00160723,RBP ;= "lib/files.c" LEA RCX,[.rodata:s_Error_deserializing_ticket_struc_00160ec0] ;= "Error deserializing ticket struct... MOV EDX,0x2f4 CALL _log ;double _log(double __x) LEA RCX,[.rodata:s_The_input_file_needs_to_be_a_val_00160ef0] ;= "The input file needs to be a vali... XOR EDI,EDI XOR EAX,EAX MOV EDX,0x2f4 MOV RSI=>.rodata:s_lib/files.c_00160723,RBP ;= "lib/files.c" CALL _log ;double _log(double __x) JMP LAB_00137334 LAB_001373b9: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP Actual src: LOAD_TYPE(TPMT_TK_VERIFIED, ticket) Predicted src: static PyObject * _load_from_file(PyObject *self, PyObject *args) { PyObject *return_value = NULL; char *filename = NULL; if (!PyArg_ParseTuple(args, "s:load_from_file", &filename, &filename)) return NULL; Py_RETURN_NONE; }