============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined newtScrollbarSet() PUSH R12 MOV ECX,EDX PUSH RBP MOV RBP,RDI PUSH RBX MOV R12,qword ptr [RDI + 0x40] MOV EBX,dword ptr [RDI] MOV EAX,dword ptr [R12 + 0xc] TEST EAX,EAX JZ LAB_00109170 SUB EBX,0x3 IMUL EBX,ESI TEST EDX,EDX JNZ LAB_001091b0 LAB_00109162: ADD EBX,0x1 LAB_00109165: CMP dword ptr [R12],EBX JNZ LAB_00109187 LAB_0010916b: POP RBX POP RBP POP R12 RET LAB_00109170: SUB EBX,0x1 IMUL EBX,ESI TEST EDX,EDX JZ LAB_00109165 MOV EAX,EBX CDQ IDIV ECX MOV EBX,EAX CMP dword ptr [R12],EBX JZ LAB_0010916b LAB_00109187: MOV RDI,RBP XOR ESI,ESI CALL sbDrawThumb ;undefined sbDrawThumb() MOV dword ptr [R12],EBX MOV RDI,RBP POP RBX MOV ESI,0x1 POP RBP POP R12 JMP sbDrawThumb ;undefined sbDrawThumb() ?? 66h f ?? 2Eh . ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_001091b0: MOV EAX,EBX CDQ IDIV ECX MOV EBX,EAX JMP LAB_00109162 ?? 0Fh Actual src: void newtScrollbarSet(newtComponent co, int where, int total) { struct scrollbar * sb = co->data; int new; if (sb->arrows) new = (where * (co->height - 3)) / (total? total : 1) + 1; else new = (where * (co->height - 1)) / (total? total : 1); if (new!= sb->curr) { sbDrawThumb(co, 0); sb->curr = new; sbDrawThumb(co, 1); } } Predicted src: static void _init (const char *name, const char *name) { int i; int i; int i; for (i = 0; i < n; i++) { for (i = 0; i < n; i++) { for (i = 0; i < i++) { if (i) { if (i = 0; } { { if (i = 0; } } } } else { { if (i) { if (i) { { { { if (i = 0; { { } } } } } } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined get_9p_stats_trans() ;local_20 undefined8 -20 ;local_a8 undefined1 -a8 ;local_f8 undefined1 -f8 ;local_100 undefined8 -100 PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI MOV RDI,RSI SUB RSP,0xf0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_20+0x108],RAX LEA RAX,[.rodata:DAT_00259fb7] ;= 4Fh O LEA R12=>local_f8,[RSP + 0x10] LEA R13=>local_a8,[RSP + 0x60] MOV RSI,R12 MOV qword ptr [RSP + local_100+0x108],RAX=>.rodata:DAT_00259fb7 ;= 4Fh O CALL .plt:::dbus_message_iter_init_append ;undefined dbus_message_iter_init_app... LEA RDX=>local_100,[RSP + 0x8] MOV RSI,R13 MOV RDI,RBP CALL arg_ipaddr ;undefined arg_ipaddr() TEST AL,AL JZ LAB_001559d0 MOV ESI,0x1 MOV RDI,R13 CALL get_gsh_client ;undefined get_gsh_client() MOV RBP,RAX TEST RAX,RAX JZ LAB_001559f0 CMP qword ptr [RAX + -0x20],0x0 JZ LAB_001559b8 MOV RDX=>.rodata:DAT_00259fb7,qword ptr [RSP + 0x8] ;= 4Fh O MOV ESI,0x1 MOV RDI,R12 CALL .plt:gsh_dbus_status_reply ;undefined gsh_dbus_status_reply() MOV RDI,qword ptr [RBP + -0x20] MOV RSI,R12 CALL server_dbus_9p_transstats ;undefined server_dbus_9p_transstats() LAB_00155987: MOV RDI,RBP CALL put_gsh_client ;undefined put_gsh_client() LAB_0015598f: MOV RAX,qword ptr [RSP + local_20+0x108] SUB RAX,qword ptr FS:[0x28] JNZ LAB_001559f9 ADD RSP,0xf0 MOV EAX,0x1 POP RBP POP R12 POP R13 RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_001559b8: LEA RDX,[.rodata:s_Client_does_not_have_any_9p_acti_00248578] ;= "Client does not have any 9p activ... XOR ESI,ESI MOV RDI,R12 CALL .plt:gsh_dbus_status_reply ;undefined gsh_dbus_status_reply() JMP LAB_00155987 ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001559d0: MOV RDX=>.rodata:DAT_00259fb7,qword ptr [RSP + 0x8] ;= 4Fh O TEST RDX,RDX JZ LAB_001559f0 LAB_001559da: XOR ESI,ESI MOV RDI,R12 CALL .plt:gsh_dbus_status_reply ;undefined gsh_dbus_status_reply() JMP LAB_0015598f ?? 66h f ?? 2Eh . ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_001559f0: LEA RDX,[.rodata:s_Client_IP_address_not_found_002482c7] ;= "Client IP address not found" JMP LAB_001559da LAB_001559f9: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP Actual src: static bool get_9p_stats_trans(DBusMessageIter *args, DBusMessage *reply, DBusError *error) { struct gsh_client *client = NULL; struct server_stats *server_st = NULL; bool success = true; char *errormsg = "OK"; DBusMessageIter iter; dbus_message_iter_init_append(reply, &iter); client = lookup_client(args, &errormsg); if (client == NULL) { success = false; if (errormsg == NULL) errormsg = "Client IP address not found"; } else { server_st = container_of(client, struct server_stats, client); if (server_st->st._9p == NULL) { success = false; errormsg = "Client does not have any 9p activity"; } } gsh_dbus_status_reply(&iter, success, errormsg); if (success) server_dbus_9p_transstats(server_st->st._9p, &iter); if (client!= NULL) put_gsh_client(client); return true; } Predicted src: static void _init (void) { g_return_if_fail (G_IS_data (data), NULL); g_return_if_fail (data!= NULL); g_return_if_if_fail (data!= NULL); } ============================== Sample 3 ============================== 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: const std::string &staticMetaObject() const { return d->m_ptr; } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* SurfaceGui::TaskGeomFillSurface::accept() * ;************************************************************************************************************************************************************ ;undefined accept(void) MOV RDI,qword ptr [RDI + 0x58] JMP .plt:LAB_00129b10 ?? 90h Actual src: bool TaskGeomFillSurface::accept() { return widget->accept(); } Predicted src: void vtkSetSetMacro(void) { } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined ffmax() MOV EDX,0x6 JMP ave ;undefined ave() ?? 66h f Actual src: gaint ffmax (struct gafunc *pfc, struct gastat *pst) { gaint rc; rc = ave (pfc, pst, 6); return (rc); } Predicted src: static void cb(void) { int i; if (i) return; }