============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined razer_string_to_bool() ;local_20 undefined8 -20 ;local_1010 undefined8 -1010 ;local_1048 undefined8 -1048 PUSH RBP PUSH RBX SUB RSP,0x1000 OR qword ptr [RSP]=>local_1010,0x0 SUB RSP,0x38 OR qword ptr [RSP]=>local_1048,0x0 ADD RSP,0x1020 MOV RBP,RSI LEA RSI,[.rodata:DAT_0011926e] ;= 79h y MOV RBX,RDI CALL .plt:::strcasecmp ;int strcasecmp(char * __s1, char * _... TEST EAX,EAX JZ LAB_0010b250 LEA RSI,[.rodata:DAT_00119272] ;= 74h t MOV RDI,RBX CALL .plt:::strcasecmp ;int strcasecmp(char * __s1, char * _... TEST EAX,EAX JZ LAB_0010b250 LEA RSI,[.rodata:s_on_0011817d+5] ;= "on" MOV RDI,RBX CALL .plt:::strcasecmp ;int strcasecmp(char * __s1, char * _... TEST EAX,EAX JZ LAB_0010b250 LEA RSI,[.rodata:DAT_00119277] ;= 6Eh n MOV RDI,RBX CALL .plt:::strcasecmp ;int strcasecmp(char * __s1, char * _... TEST EAX,EAX JZ LAB_0010b260 LEA RSI,[.rodata:s_false_0011927a] ;= "false" MOV RDI,RBX CALL .plt:::strcasecmp ;int strcasecmp(char * __s1, char * _... TEST EAX,EAX JZ LAB_0010b260 LEA RSI,[.rodata:DAT_00119280] ;= 6Fh o MOV RDI,RBX CALL .plt:::strcasecmp ;int strcasecmp(char * __s1, char * _... TEST EAX,EAX JZ LAB_0010b260 XOR EDX,EDX LEA RSI=>local_20,[RSP + 0x8] MOV RDI,RBX CALL .plt:::strtol ;long strtol(char * __nptr, char * *... MOV RDX,qword ptr [RSP + local_20+0x28] CMP RBX,RDX JZ LAB_0010b26d CMP byte ptr [RDX],0x0 JNZ LAB_0010b26d TEST EAX,EAX SETNZ byte ptr [RBP] XOR EAX,EAX JMP LAB_0010b256 ?? 90h LAB_0010b250: MOV byte ptr [RBP],0x1 XOR EAX,EAX LAB_0010b256: ADD RSP,0x18 POP RBX POP RBP RET ?? 0Fh ?? 1Fh ?? 00h LAB_0010b260: MOV byte ptr [RBP],0x0 ADD RSP,0x18 XOR EAX,EAX POP RBX POP RBP RET LAB_0010b26d: MOV EAX,0xffffffea JMP LAB_0010b256 ?? 66h f Actual src: int razer_string_to_bool(const char *string, bool *b) { int i; if (strcasecmp(string, "yes") == 0 || strcasecmp(string, "true") == 0 || strcasecmp(string, "on") == 0) { *b = 1; return 0; } if (strcasecmp(string, "no") == 0 || strcasecmp(string, "false") == 0 || strcasecmp(string, "off") == 0) { *b = 0; return 0; } if (!razer_string_to_int(string, &i)) { *b =!!i; return 0; } return -EINVAL; } Predicted src: static int string_to_bool(const char *key, const char *value, const char *value) { if (!value ||!value ||!value ||!value ||!value ||!value ||!value ||!value) return 0; if (!strcasecmp(value, "bool") ||!strcasecmp(value, "bool") ||!strcasecmp(value, "bool") ||!strcasecmp(value, "bool") ||!strcasecmp(value, "bool") ||!strcasecmp(value, "bool") ||!strcasecmp(value, "bool") ||!strcasecmp(value, "bool") ||!strcasecmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value) || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value) || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value) || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value) || strcmp(value, "bool") || strcmp(value, "bool")") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool")") || strcmp(value, "bool") || strcmp(value) || strcmp(value, "bool") || strcmp(value, "bool")") || strcmp(value, "bool")") || strcmp(value, "bool")") || strcmp(value, "bool") || strcmp(value, "bool")") || strcmp(value, "bool") || strcmp(value, "bool")") || strcmp(value, "bool") || strcmp(value, "bool") || strcmp(value, "bool")") | ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* padcon_standard_initialize_homotopy(int, int) * ;************************************************************************************************************************************************************ ;undefined padcon_standard_initialize_homotopy(int param_1, int param_2) ;param_1 int EDI ;param_2 int ESI ;local_10 undefined8 -10 ;local_14 undefined4 -14 ;local_18 undefined4 -18 ;local_1c undefined4 -1c SUB RSP,0x28 XOR R8D,R8D XOR ECX,ECX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_10+0x28],RAX XOR EAX,EAX LEA RDX=>local_18,[RSP + 0x10] MOV dword ptr [RSP + local_18+0x28],param_1 MOV param_1,0x35c MOV dword ptr [RSP + local_14+0x28],param_2 LEA param_2=>local_1c,[RSP + 0xc] MOV dword ptr [RSP + local_1c+0x28],0x0 CALL .plt:_ada_use_c2phc4c ;undefined _ada_use_c2phc4c() MOV RDX,qword ptr [RSP + local_10+0x28] SUB RDX,qword ptr FS:[0x28] JNZ LAB_00f9cf32 ADD RSP,0x28 RET LAB_00f9cf32: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP word ptr [RAX + RAX*0x1] Actual src: int padcon_standard_initialize_homotopy ( int verbose, int homo ) { int fail; int precision = 0; int pars[2]; double *c; pars[0] = verbose; pars[1] = homo; fail = _ada_use_c2phc4c(860,&precision,pars,c,0); return fail; } Predicted src: int syscon_initialize_bdobl_system ( int n, int *c ) { int fail; int fail; double *c; fail = _ada_use_c2phc4c(n,c,c,0); fail = _ada_use_c2phc4c(n,c,c,0); return fail; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined gfal2_bring_online_poll_list() PUSH R14 MOV R14,RCX PUSH R13 MOV R13D,ESI MOV RSI,R8 PUSH R12 MOV R12,RDX PUSH RBP MOV RBP,RDI PUSH RBX MOV RBX,R8 CALL .plt:gfal2_start_scope_cancel ;undefined gfal2_start_scope_cancel() TEST EAX,EAX JS LAB_0011121e TEST R12,R12 JZ LAB_001111c8 CMP qword ptr [R12],0x0 JZ LAB_001111c8 TEST RBP,RBP JZ LAB_001111c8 MOV RDX,R12 MOV R8,RBX MOV RCX,R14 MOV ESI,R13D MOV RDI,RBP CALL .plt:gfal_plugin_bring_online_poll_listG ;undefined gfal_plugin_bring_online_p... MOV R12D,EAX JMP LAB_0011120a ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_001111c8: TEST R13D,R13D JLE LAB_00111204 LEA EAX,[R13 + -0x1] LEA R12,[.rodata:s_context_or/and_urls_are_incorrec_00117e00] ;= "context or/and urls are incorrect... LEA R13,[RBX + RAX*0x8 + 0x8] NOP dword ptr [RAX] LAB_001111e0: XOR EAX,EAX CALL .plt:gfal2_get_core_quark ;undefined gfal2_get_core_quark() MOV RDI,RBX MOV RCX=>.rodata:s_context_or/and_urls_are_incorrec_00117e00,R12 ;= "context or/and urls are incorrect... MOV EDX,0xe MOV ESI,EAX ADD RBX,0x8 XOR EAX,EAX CALL .plt:::g_set_error ;undefined g_set_error() CMP RBX,R13 JNZ LAB_001111e0 LAB_00111204: MOV R12D,0xffffffff LAB_0011120a: MOV RDI,RBP CALL .plt:gfal2_end_scope_cancel ;undefined gfal2_end_scope_cancel() LAB_00111212: POP RBX MOV EAX,R12D POP RBP POP R12 POP R13 POP R14 RET LAB_0011121e: MOV R12D,0xffffffff JMP LAB_00111212 ?? 66h f Actual src: int gfal2_bring_online_poll_list(gfal2_context_t context, int nbfiles, const char *const *urls, const char *token, GError **errors) { int res = -1; GFAL2_BEGIN_SCOPE_CANCEL(context, -1, errors); if (urls == NULL || *urls == NULL || context == NULL) { int i; for (i = 0; i < nbfiles; ++i) { g_set_error(&errors[i], gfal2_get_core_quark(), EFAULT, "context or/and urls are incorrect arguments"); } res = -1; } else { res = gfal_plugin_bring_online_poll_listG(context, nbfiles, urls, token, errors); } GFAL2_END_SCOPE_CANCEL(context); return res; } Predicted src: static gboolean plugin_context_cancel (gpointer user_data, GError **error) { g_autoptr(GError) error = user_data; if (!plugin_context_list_start (plugin_context_list, error)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_VALUE); return FALSE; } if (plugin_context_list_start (plugin_context_list, error)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_VALUE); return FALSE; } return TRUE; } ============================== Sample 4 ============================== ASM: MOV word ptr [RBP + local_3f0+0x8],AX LEA param_3=>local_3f0,[RBP + -0x3e8] LEA RAX=>local_3ee,[RBP + -0x3e6] MOV param_2,param_3 MOV param_1,RAX CALL poly_int<1u,unsigned_short>::poly_int ;undefined poly_int(p... MOVZX EAX,word ptr [RBP + local_3ee+0x8] MOV word ptr [RBP + local_3f2+0x8],AX LEA param_3=>local_3f8,[RBP + -0x3f0] LEA RAX=>local_3f2,[RBP + -0x3ea] MOV param_2,param_3 MOV param_1,RAX CALL operator* ;poly_int operator*(poly_int_pod * pa... MOV qword ptr [RBP + local_400+0x8],RAX LEA param_3=>local_400,[RBP + -0x3f8] LEA RAX=>local_402,[RBP + -0x3fa] MOV param_2,param_3 Actual src: scope_kind innermost_scope_kind (void) { return current_binding_level->kind; } Predicted src: void visit(Type *e) { visit((Type *)e); } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined ply_progress_bar_new() SUB RSP,0x8 MOV ESI,0x40 MOV EDI,0x1 CALL .plt:::calloc ;void * calloc(size_t __nmemb, size_t... MOV RDX,0x1000000ffffffff OR byte ptr [RAX + 0x38],0x1 MOV qword ptr [RAX + 0x28],RDX MOV qword ptr [RAX + 0x30],0x0 ADD RSP,0x8 RET ?? 66h f Actual src: ply_progress_bar_t * ply_progress_bar_new (void) { ply_progress_bar_t *progress_bar; progress_bar = calloc (1, sizeof(ply_progress_bar_t)); progress_bar->is_hidden = true; progress_bar->fg_color = 0xffffffff; /* Solid white */ progress_bar->bg_color = 0x01000000; /* Transparent */ progress_bar->fraction_done = 0.0; return progress_bar; } Predicted src: GtkWidget * progress_bar_progress_new (void) { progress_bar_progress_t *progress_bar; progress_bar = malloc (sizeof (progress_bar_progress_t)); progress_bar->progress = NULL; progress_bar->progress = NULL; progress_bar->progress = NULL; progress_bar->progress = NULL; progress_bar->progress = NULL; progress_bar->progress = NULL; progress_bar->progress = NULL; return (progress_bar); }