============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* idLBCache::Reset() * ;************************************************************************************************************************************************************ ;undefined Reset(idLBCache * this) ;this idLBCache * RDI PUSH R15 LEA R15,[this + 0xcc] PUSH R14 MOV R14,this PUSH R13 PUSH R12 PUSH RBP LEA RBP,[this + 0x4] PUSH RBX SUB RSP,0x8 LAB_0080c80c: MOV R13,qword ptr [RBP + 0x14] MOV dword ptr [RBP],0x0 TEST R13,R13 JZ LAB_0080c85c MOV EAX,dword ptr [RBP + 0x8] TEST EAX,EAX JLE LAB_0080c854 SUB EAX,0x1 LEA RBX,[R13 + 0x10] LEA RAX,[RAX + RAX*0x2] SHL RAX,0x6 LEA R12,[R13 + RAX*0x1 + 0xd0] NOP word ptr [RAX + RAX*0x1] LAB_0080c840: MOV this,RBX ADD RBX,0xc0 CALL idStr::FreeData ;undefined FreeData(idStr * this) CMP RBX,R12 JNZ LAB_0080c840 LAB_0080c854: MOV this,R13 LAB_0080c857: CALL Mem_Free16 ;undefined Mem_Free16(void * param_1) LAB_0080c85c: MOV qword ptr [RBP + 0x14],0x0 ADD RBP,0x28 MOV dword ptr [RBP + -0x24],0x0 MOV dword ptr [RBP + -0x20],0x0 CMP RBP,R15 JNZ LAB_0080c80c MOV qword ptr [R14 + 0xc8],0x0 XOR EAX,EAX MOV dword ptr [R14 + 0xd0],0x0 MOV qword ptr [R14 + 0xe8],0x0 MOV dword ptr [R14 + 0xf0],0x0 MOV qword ptr [R14 + 0xd8],0x0 MOV dword ptr [R14 + 0xe0],0x0 MOV word ptr [R14 + 0xe4],AX ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 POP R14 POP R15 RET ?? 66h f Actual src: void idLBCache::Reset() { for( int i = 0; i < NUM_ROW_BLOCKS; i++ ) { rowBlocks[i].startIndex = 0; rowBlocks[i].rows.Clear(); } def = NULL; filter = DEFAULT_LEADERBOARD_FILTER; pendingDef = NULL; pendingFilter = DEFAULT_LEADERBOARD_FILTER; rowOffset = 0; requestingRows = false; numRowsInLeaderboard = 0; entryIndex = 0; loadingNewLeaderboard = false; } Predicted src: void idCache::Reset() { int i; for (i = 0; i < num_nodes; i++) { m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; m_nodes[i] = 0; } } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined f_11826() ;local_30 undefined8 -30 ;local_40 undefined8 -40 ;local_48 undefined8 -48 ;local_50 undefined8 -50 PUSH RBP MOV RBP,RSP PUSH R14 PUSH R13 PUSH R12 MOV R12,RSI PUSH RBX MOV RBX,RDI SUB RSP,0x10 MOV RDX=>EXTERNAL:C_timer_interrupt_counter,qword ptr [->C_timer_interrupt_counter] ;= 001c62a8 ;=?? MOV R14,qword ptr [RSI] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + local_30+0x8],RAX XOR EAX,EAX MOV R13,qword ptr [RSI + 0x8] MOV RAX,qword ptr [RDX]=>EXTERNAL:C_timer_interrupt_counter ;=?? SUB RAX,0x1 MOV qword ptr [RDX]=>EXTERNAL:C_timer_interrupt_counter,RAX ;=?? TEST RAX,RAX JLE LAB_00149201 LAB_001491a1: MOV RAX,qword ptr [->C_stack_limit] ;= 001c6148 MOV RDX,qword ptr [->C_scratch_usage] ;= 001c6298 MOV RCX,RSP SUB RCX,qword ptr [RAX]=>EXTERNAL:C_stack_limit ;=?? MOV RDX=>EXTERNAL:C_scratch_usage,qword ptr [RDX] ;=?? MOV RAX,RCX XOR ECX,ECX SAR RAX,0x3 CMP RBX,0x2 SETL CL LEA RDX,[RCX + RDX*0x1 + 0x3] CMP RAX,RDX JLE LAB_0014920d SUB RSP,0x20 MOV RDI,qword ptr [R14 + 0x10] MOV RAX,0x300000000000002 LEA RSI=>local_50+0x7,[RSP + 0xf] AND RSI,-0x10 MOV qword ptr [RSI]=>local_50,RAX MOV qword ptr [RSI + local_48+0x50],R13 MOV qword ptr [RSI + local_40+0x50],0xe CALL f_11757 ;undefined f_11757() LAB_00149201: MOV EDI,0xff CALL .plt:::C_raise_interrupt ;undefined C_raise_interrupt() JMP LAB_001491a1 LAB_0014920d: MOV RDX,R12 MOV ESI,EBX LEA RDI,[f_11826] CALL .plt:::C_save_and_reclaim ;undefined C_save_and_reclaim() NOP Actual src: static void C_ccall f_11826(C_word c,C_word *av){ C_word tmp; C_word t0=av[0]; C_word t1=av[1]; C_word t2; C_word *a; C_check_for_interrupt; if(C_unlikely(!C_demand(C_calculate_demand(3,c,1)))){ C_save_and_reclaim((void *)f_11826,c,av);} a=C_alloc(3); t2=((C_word*)t0)[2]; f_11757(t2,C_a_i_list1(&a,1,t1));} Predicted src: static void C_ccall f_1218(C_word c,C_word *av){ C_word tmp; C_word t0=av[0]; C_word t1=av[1]; C_word t2; C_word *a; C_check_for_interrupt; if(C_unlikely(!C_demand(C_calculate_demand(0,c,2)))){ C_save_and_reclaim((void *)f_1218,c,av);} /* irregex-core.scm: ##sys#print */ t2=*((C_word*)lf[33]+1);{ C_word *av2; if(c >= 3) { av2=av; } else { av2=C_alloc(3); } av2[0]=t2; av2[1]=((C_word*)t0)[2]; av2[2]=t1; ((C_proc)(void*)(*((C_word*)t2+1)))(3,av2);}} ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined e_attachment_bar_interface_init() LEA RAX,[attachment_bar_get_private] MOV qword ptr [RDI + 0x10],RAX=>attachment_bar_get_private LEA RAX,[attachment_bar_get_store] MOV qword ptr [RDI + 0x18],RAX=>attachment_bar_get_store LEA RAX,[attachment_bar_get_path_at_pos] MOV qword ptr [RDI + 0x20],RAX=>attachment_bar_get_path_at_pos LEA RAX,[attachment_bar_get_selected_paths] MOV qword ptr [RDI + 0x28],RAX=>attachment_bar_get_selected_paths LEA RAX,[attachment_bar_path_is_selected] MOV qword ptr [RDI + 0x30],RAX=>attachment_bar_path_is_selected LEA RAX,[attachment_bar_select_path] MOV qword ptr [RDI + 0x38],RAX=>attachment_bar_select_path LEA RAX,[attachment_bar_unselect_path] MOV qword ptr [RDI + 0x40],RAX=>attachment_bar_unselect_path LEA RAX,[attachment_bar_select_all] MOV qword ptr [RDI + 0x48],RAX=>attachment_bar_select_all LEA RAX,[attachment_bar_unselect_all] MOV qword ptr [RDI + 0x50],RAX=>attachment_bar_unselect_all LEA RAX,[attachment_bar_update_actions] MOV qword ptr [RDI + 0x78],RAX=>attachment_bar_update_actions RET ?? 90h Actual src: static void e_attachment_bar_interface_init (EAttachmentViewInterface *iface) { iface->get_private = attachment_bar_get_private; iface->get_store = attachment_bar_get_store; iface->get_path_at_pos = attachment_bar_get_path_at_pos; iface->get_selected_paths = attachment_bar_get_selected_paths; iface->path_is_selected = attachment_bar_path_is_selected; iface->select_path = attachment_bar_select_path; iface->unselect_path = attachment_bar_unselect_path; iface->select_all = attachment_bar_select_all; iface->unselect_all = attachment_bar_unselect_all; iface->update_actions = attachment_bar_update_actions; } Predicted src: static void e_mail_bar_interface_init (EMailbarIface *iface) { iface->get_selected = e_mail_bar_get_selected; iface->get_selected = e_mail_bar_get_selected; iface->get_selected = e_mail_bar_get_selected; iface->get_selected = e_mail_bar_get_selected; iface->get_selected = e_mail_bar_get_selected; iface->get_selected = e_mail_bar_get_selected; iface->get_selected = e_mail_bar_get_selected; iface->get_selected = e_mail_bar_get_selected; } ============================== Sample 4 ============================== 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++) a[i] = a[i]; for (i = 0; i < a->n; i++) a[i] = a[i]; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined CG_CreateBlend() ;local_3c undefined4 -3c PUSH R15 XOR EAX,EAX PUSH R14 PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x18 CALL .plt:getCaliValue ;undefined getCaliValue() MOV EBP,EAX XOR EAX,EAX CALL .plt:getCaliValue ;undefined getCaliValue() MOV R12D,EAX XOR EAX,EAX CALL .plt:getCaliValue ;undefined getCaliValue() MOV R13D,EAX XOR EAX,EAX CALL .plt:getCaliValue ;undefined getCaliValue() MOV R14D,EAX XOR EAX,EAX CALL .plt:getCaliValue ;undefined getCaliValue() MOV EBX,EAX XOR EAX,EAX CALL .plt:getCaliValue ;undefined getCaliValue() MOV R15D,EAX MOV RAX,qword ptr [->sys_nextdebuglv] ;= 0034e0c8 MOV dword ptr [RAX]=>EXTERNAL:sys_nextdebuglv,0x2 ;=?? XOR EAX,EAX CALL .plt:sl_getIndex ;undefined sl_getIndex() MOV dword ptr [RSP + local_3c+0x48],EAX XOR EAX,EAX CALL .plt:sl_getPage ;undefined sl_getPage() MOV EDX,dword ptr [RSP + local_3c+0x48] LEA RDI,[.rodata:s_%d,%x:_0011c03b] ;= "%d,%x: " MOV ESI,EAX XOR EAX,EAX CALL .plt:sys_message ;undefined sys_message() SUB RSP,0x8 MOV R9D,EBX MOV R8D,R14D PUSH R15 MOV ECX,R13D MOV EDX,R12D MOV ESI,EBP LEA RDI,[.rodata:s_SACT.CG_CreateBlend_%d,%d,%d,%d,_0011cae0] ;= "SACT.CG_CreateBlend %d,%d,%d,%d,%... XOR EAX,EAX CALL .plt:sys_message ;undefined sys_message() ADD RSP,0x28 MOV R9D,R15D MOV R8D,EBX MOV ECX,R14D POP RBX MOV EDX,R13D MOV ESI,R12D MOV EDI,EBP POP RBP POP R12 POP R13 POP R14 POP R15 JMP .plt:LAB_00107970 ?? 66h f Actual src: void CG_CreateBlend() { int wNumDstCG = getCaliValue(); int wNumBaseCG = getCaliValue(); int wX = getCaliValue(); int wY = getCaliValue(); int wNumBlendCG = getCaliValue(); int wAlphaMapMode = getCaliValue(); DEBUG_COMMAND_YET("SACT.CG_CreateBlend %d,%d,%d,%d,%d,%d:\n", wNumDstCG, wNumBaseCG, wX, wY, wNumBlendCG, wAlphaMapMode); scg_create_blend(wNumDstCG, wNumBaseCG, wX, wY, wNumBlendCG, wAlphaMapMode); } Predicted src: void f4_message() { int p1 = getCaliValue(); int p2 = getCaliValue(); int p3 = getCaliValue(); int p4 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); int p5 = getCaliValue(); }