============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* tesseract::ColPartition::SpecialBlobsDensity(BlobSpecialTextType) const * ;************************************************************************************************************************************************************ ;undefined SpecialBlobsDensity(ColPartition * this, BlobSpecialTextType param_1) ;this ColPartition * RDI ;param_1 BlobSpecial... ESI PUSH RBP MOV RBP,this PUSH RBX MOVSXD RBX,param_1 SUB RSP,0x8 CMP EBX,0x5 JG LAB_00229bc8 MOVSS XMM0,dword ptr [RBP + RBX*0x4 + 0xc0] ADD RSP,0x8 POP RBX POP RBP RET ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00229bc8: MOV R9D,0x22d LEA R8,[.rodata:s_colpartition.cpp_0038e832] ;= "colpartition.cpp" XOR EAX,EAX MOV EDX,0x2 LEA RCX,[.rodata:s_in_file_%s,_line_%d_00384012] ;= "in file %s, line %d" LEA param_1,[.rodata:s_type_<_BSTT_COUNT_0038e878] ;= "type < BSTT_COUNT" LEA this,[.data.rel.ro:ASSERT_FAILED] ;= 00384276 CALL .plt:ERRCODE::error ;undefined error(char * param_1, Tess... MOVSS XMM0,dword ptr [RBP + RBX*0x4 + 0xc0] ADD RSP,0x8 POP RBX POP RBP RET ?? 66h f Actual src: float ColPartition::SpecialBlobsDensity(const BlobSpecialTextType type) const { ASSERT_HOST(type < BSTT_COUNT); return special_blobs_densities_[type]; } Predicted src: const char *Text::text(TextType type) const { switch (type) { case type: return "Text"; case type: return "Text"; case type: return "Text"; case type: return "Text"; case type: return "Text"; case type: return "Text"; case type: return "Text"; default: return "Text"; } } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined vncRandRGetOutputName() PUSH R12 MOVSXD RDI,EDI PUSH RBP SUB RSP,0x8 MOV RSI,qword ptr [.bss:randrGlueContext[8]] MOV RAX,qword ptr [RSI + 0x28] MOV RDX,qword ptr [RAX + RDI*0x8] MOV RDI,qword ptr [.bss:randrGlueContext] CALL .plt:::XRRGetOutputInfo ;undefined XRRGetOutputInfo() TEST RAX,RAX JZ LAB_00139f60 MOV RDI,qword ptr [RAX + 0x10] MOV RBP,RAX CALL .plt:::strdup ;char * strdup(char * __s) MOV RDI,RBP MOV R12,RAX CALL .plt:::XRRFreeOutputInfo ;undefined XRRFreeOutputInfo() ADD RSP,0x8 MOV RAX,R12 POP RBP POP R12 RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_00139f60: ADD RSP,0x8 LEA RDI,[.rodata:s__00173901+14] ;= "" POP RBP POP R12 JMP .plt:::strdup ;char * strdup(char * __s) ?? 66h f Actual src: char *vncRandRGetOutputName(int outputIdx) { vncGlueContext *ctx = &randrGlueContext; XRROutputInfo *output = XRRGetOutputInfo(ctx->dpy, ctx->res, ctx->res->outputs[outputIdx]); if (!output) { return strdup(""); } char *ret = strdup(output->name); XRRFreeOutputInfo(output); return ret; } Predicted src: static char *ContextName(int argc, char **argv) { char *s; s = GetContextName(argc, argv[1]); if (s == NULL) return NULL; s = GetContextContext(s); if (s == NULL) return NULL; return s[0]; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined soup_request_get_type_once() ;local_10 undefined8 -10 ;local_18 undefined8 -18 ;local_20 undefined8 -20 ;local_28 undefined8 -28 PUSH R12 LEA RDI,[.rodata:s_SoupRequest_0017a106] ;= "SoupRequest" SUB RSP,0x20 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_10+0x28],RAX XOR EAX,EAX CALL .plt:::g_intern_static_string ;undefined g_intern_static_string() SUB RSP,0x8 LEA R9,[soup_request_init] MOV R8D,0x20 PUSH 0x0 MOV EDX,0xc0 MOV RSI,RAX MOV EDI,0x50 LEA RCX,[soup_request_class_intern_init] CALL .plt:::g_type_register_static_simple ;undefined g_type_register_static_sim... MOV ESI,0x10 MOV RDI,RAX MOV R12,RAX CALL .plt:::g_type_add_instance_private ;undefined g_type_add_instance_private() MOV qword ptr [RSP + local_20+0x38],0x0 MOV dword ptr [.bss:SoupRequest_private_offset],EAX ;=?? LEA RAX,[soup_request_initable_interface_init] MOV qword ptr [RSP + local_28+0x38],RAX=>soup_request_initable_interface_init MOV qword ptr [RSP + local_18+0x38],0x0 CALL .plt:::g_initable_get_type ;undefined g_initable_get_type() LEA RDX=>local_28,[RSP + 0x10] MOV RDI,R12 MOV RSI,RAX CALL .plt:::g_type_add_interface_static ;undefined g_type_add_interface_static() POP RAX POP RDX MOV RAX,qword ptr [RSP + local_10+0x28] SUB RAX,qword ptr FS:[0x28] JNZ LAB_0014f153 ADD RSP,0x20 MOV RAX,R12 POP R12 RET LAB_0014f153: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP dword ptr [RAX + RAX*0x1] Actual src: G_DEFINE_TYPE_WITH_CODE (SoupRequest, soup_request, G_TYPE_OBJECT, G_ADD_PRIVATE (SoupRequest) G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, soup_request_initable_interface_init)) Predicted src: G_DEFINE_TYPE_WITH_PRIVATE ( GRequestRequest, request_request, G_TYPE_OBJECT, G_ADD_PRIVATE (GRequest) G_IMPLEMENT_INTERFACE (G_TYPE_TYPE_Request, G_ADD_PRIVATE (GRequest)) ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined lex_get_error(undefined param_1, undefined param_2, undefined param_3, undefined param_4, undefined param_5, undefined param_6, undefined1 param_7) ;param_1 undefined DIL ;param_2 undefined SIL ;param_3 undefined DL ;param_4 undefined CL ;param_5 undefined R8B ;param_6 undefined R9B ;param_7 undefined1 8 ;local_18 undefined1[16] -18 ;local_28 undefined1[16] -28 ;local_38 undefined1[16] -38 ;local_48 undefined1[16] -48 ;local_58 undefined1[16] -58 ;local_68 undefined1[16] -68 ;local_78 undefined1[16] -78 ;local_88 undefined1[16] -88 ;local_90 undefined8 -90 ;local_98 undefined8 -98 ;local_a0 undefined8 -a0 ;local_a8 undefined8 -a8 ;local_b8 undefined1 -b8 ;local_c0 undefined8 -c0 ;local_c8 undefined8 -c8 ;local_d0 undefined8 -d0 ;local_d4 undefined4 -d4 ;local_d8 undefined4 -d8 PUSH RBP MOV R10,param_2 MOV RBP,param_1 SUB RSP,0xd0 MOV qword ptr [RSP + local_a8+0xd8],param_3 MOV qword ptr [RSP + local_a0+0xd8],param_4 MOV qword ptr [RSP + local_98+0xd8],param_5 MOV qword ptr [RSP + local_90+0xd8],param_6 TEST AL,AL JZ LAB_0014aefd MOVAPS xmmword ptr [RSP + local_88[0]+0xd8],XMM0 MOVAPS xmmword ptr [RSP + local_78[0]+0xd8],XMM1 MOVAPS xmmword ptr [RSP + local_68[0]+0xd8],XMM2 MOVAPS xmmword ptr [RSP + local_58[0]+0xd8],XMM3 MOVAPS xmmword ptr [RSP + local_48[0]+0xd8],XMM4 MOVAPS xmmword ptr [RSP + local_38[0]+0xd8],XMM5 MOVAPS xmmword ptr [RSP + local_28[0]+0xd8],XMM6 MOVAPS xmmword ptr [RSP + local_18[0]+0xd8],XMM7 LAB_0014aefd: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_c0+0xd8],RAX XOR EAX,EAX LEA RAX=>param_7,[RSP + 0xe0] MOV param_1,RBP MOV param_5,RSP MOV qword ptr [RSP + local_d0+0xd8],RAX LEA RAX=>local_b8,[RSP + 0x20] MOV param_4,R10 MOV qword ptr [RSP + local_c8+0xd8],RAX MOV RAX,qword ptr [RBP + 0x68] SUB RAX,qword ptr [RBP + 0x70] MOV dword ptr [RSP]=>local_d8,0x10 LEA param_2,[RAX + -0x1] MOV dword ptr [RSP + local_d4+0xd8],0x30 MOV param_3,param_2 CALL lex_source_error_valist ;undefined lex_source_error_valist() MOV param_1,RBP CALL lex_source_pop_front ;undefined lex_source_pop_front() MOV RAX,qword ptr [RSP + local_c0+0xd8] SUB RAX,qword ptr FS:[0x28] JNZ LAB_0014af6f ADD RSP,0xd0 POP RBP RET LAB_0014af6f: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP dword ptr CS:[RAX + RAX*0x1] Actual src: static void PRINTF_FORMAT (2, 3) lex_get_error (struct lex_source *src, const char *format,...) { va_list args; int n; va_start (args, format); n = deque_count (&src->deque) - 1; lex_source_error_valist (src, n, n, format, args); lex_source_pop_front (src); va_end (args); } Predicted src: void g_source_pop_error (g_source_t *source, const char *fmt,...) { va_list args; va_start (args, fmt); g_source_pop_error (source, fmt, args); va_end (args); } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined lex_get_error(undefined param_1, undefined param_2, undefined param_3, undefined param_4, undefined param_5, undefined param_6, undefined1 param_7) ;param_1 undefined DIL ;param_2 undefined SIL ;param_3 undefined DL ;param_4 undefined CL ;param_5 undefined R8B ;param_6 undefined R9B ;param_7 undefined1 8 ;local_18 undefined1[16] -18 ;local_28 undefined1[16] -28 ;local_38 undefined1[16] -38 ;local_48 undefined1[16] -48 ;local_58 undefined1[16] -58 ;local_68 undefined1[16] -68 ;local_78 undefined1[16] -78 ;local_88 undefined1[16] -88 ;local_90 undefined8 -90 ;local_98 undefined8 -98 ;local_a0 undefined8 -a0 ;local_a8 undefined8 -a8 ;local_b8 undefined1 -b8 ;local_c0 undefined8 -c0 ;local_c8 undefined8 -c8 ;local_d0 undefined8 -d0 ;local_d4 undefined4 -d4 ;local_d8 undefined4 -d8 PUSH RBP MOV R10,param_2 MOV RBP,param_1 SUB RSP,0xd0 MOV qword ptr [RSP + local_a8+0xd8],param_3 MOV qword ptr [RSP + local_a0+0xd8],param_4 MOV qword ptr [RSP + local_98+0xd8],param_5 MOV qword ptr [RSP + local_90+0xd8],param_6 TEST AL,AL JZ LAB_0014aefd MOVAPS xmmword ptr [RSP + local_88[0]+0xd8],XMM0 MOVAPS xmmword ptr [RSP + local_78[0]+0xd8],XMM1 MOVAPS xmmword ptr [RSP + local_68[0]+0xd8],XMM2 MOVAPS xmmword ptr [RSP + local_58[0]+0xd8],XMM3 MOVAPS xmmword ptr [RSP + local_48[0]+0xd8],XMM4 MOVAPS xmmword ptr [RSP + local_38[0]+0xd8],XMM5 MOVAPS xmmword ptr [RSP + local_28[0]+0xd8],XMM6 MOVAPS xmmword ptr [RSP + local_18[0]+0xd8],XMM7 LAB_0014aefd: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_c0+0xd8],RAX XOR EAX,EAX LEA RAX=>param_7,[RSP + 0xe0] MOV param_1,RBP MOV param_5,RSP MOV qword ptr [RSP + local_d0+0xd8],RAX LEA RAX=>local_b8,[RSP + 0x20] MOV param_4,R10 MOV qword ptr [RSP + local_c8+0xd8],RAX MOV RAX,qword ptr [RBP + 0x68] SUB RAX,qword ptr [RBP + 0x70] MOV dword ptr [RSP]=>local_d8,0x10 LEA param_2,[RAX + -0x1] MOV dword ptr [RSP + local_d4+0xd8],0x30 MOV param_3,param_2 CALL lex_source_error_valist ;undefined lex_source_error_valist() MOV param_1,RBP CALL lex_source_pop_front ;undefined lex_source_pop_front() MOV RAX,qword ptr [RSP + local_c0+0xd8] SUB RAX,qword ptr FS:[0x28] JNZ LAB_0014af6f ADD RSP,0xd0 POP RBP RET LAB_0014af6f: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP dword ptr CS:[RAX + RAX*0x1] Actual src: static void PRINTF_FORMAT (2, 3) lex_get_error (struct lex_source *src, const char *format,...) { va_list args; int n; va_start (args, format); n = deque_count (&src->deque) - 1; lex_source_error_valist (src, n, n, format, args); lex_source_pop_front (src); va_end (args); } Predicted src: void g_source_pop_error (GSource *source, const char *fmt,...) { va_list args; va_start (args, fmt); g_source_pop_error (source, fmt, args); va_end (args); }