============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* opencl_device::KernelLauncher::AccumulateFactorsAutoScaling(_cl_mem*, _cl_mem*, _cl_mem*, unsigned int, unsigned int, unsigned int) * ;************************************************************************************************************************************************************ ;undefined AccumulateFactorsAutoScaling(KernelLauncher * this, _cl_mem * param_1, _cl_mem * param_2, _cl_mem * param_3, uint param_4, uint param_5, uint param_6) ;this KernelLaunc... RDI ;param_1 _cl_mem * RSI ;param_2 _cl_mem * RDX ;param_3 _cl_mem * RCX ;param_4 uint R8D ;param_5 uint R9D ;param_6 uint 8 PUSH R12 MOV EAX,dword ptr [RSP + param_6+0x8] MOV R10,param_1 MOV R11,param_2 MOV R12,param_3 MOV param_2,qword ptr [this + 0x228] MOV param_3,dword ptr [this + 0x230] MOV param_1,qword ptr [this + 0x130] PUSH RAX XOR EAX,EAX PUSH param_5 PUSH param_4 PUSH R12 PUSH R11 PUSH R10 PUSH 0x6 PUSH 0x3 MOV param_4,qword ptr [this + 0x234] MOV param_5,dword ptr [this + 0x23c] MOV this,qword ptr [this] CALL .plt:opencl_device::GPUInterface::LaunchKernel ;undefined LaunchKernel(_cl_kernel *... ADD RSP,0x40 POP R12 RET ?? 90h Actual src: void KernelLauncher::AccumulateFactorsAutoScaling(GPUPtr dScalingFactors, GPUPtr dNodePtrQueue, GPUPtr dRootScalingFactors, unsigned int nodeCount, unsigned int patternCount, unsigned int scaleBufferSize) { #ifdef BEAGLE_DEBUG_FLOW fprintf(stderr, "\t\tEntering KernelLauncher::AccumulateFactorsAutoScaling\n"); #endif int parameterCountV = 3; int totalParameterCount = 6; gpu->LaunchKernel(fAccumulateFactorsAutoScaling, bgAccumulateBlock, bgAccumulateGrid, parameterCountV, totalParameterCount, dScalingFactors, dNodePtrQueue, dRootScalingFactors, nodeCount, patternCount, scaleBufferSize); #ifdef BEAGLE_DEBUG_FLOW fprintf(stderr, "\t\tLeaving KernelLauncher::AccumulateFactorsAutoScaling\n"); #endif } Predicted src: int32_t device_device_device_device_device(device_device_device_t *device, int32_t offset, int32_t offset, int32_t offset, int32_t offset, int32_t offset, int32_t offset, int32_t offset) { return _device_device_device_device_device(device, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset, offset offset, offset, offset, offset offset, offset, offset offset, offset, offset offset, offset offset, offset offset, offset offset, offset offset, offset offset, offset offset offset, offset offset offset, offset offset offset offset, offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offset offse ============================== Sample 2 ============================== 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 node_node_set_node (GObject *object, GParamSpec *pspec, gpointer user_data) { Node *node; Node *node; node = node_node_get_node (object); if (!node) return; node = node_node_get_node (node); if (node) node_set_node (node, node); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined cpl_table_find_column_() PUSH R13 PUSH R12 PUSH RBP PUSH RBX SUB RSP,0x8 TEST RSI,RSI JZ LAB_001c03e0 MOV R12,RDI MOV R13,RSI TEST RDI,RDI JZ LAB_001c03a0 CMP qword ptr [RDI],0x0 MOV RBX,qword ptr [RDI + 0x10] JLE LAB_001c0360 XOR EBP,EBP JMP LAB_001c032e LAB_001c0320: ADD RBP,0x1 ADD RBX,0x8 CMP RBP,qword ptr [R12] JGE LAB_001c0360 LAB_001c032e: MOV RDI,qword ptr [RBX] CALL .plt:cpl_column_get_name ;undefined cpl_column_get_name() MOV RDI,R13 MOV RSI,RAX CALL .plt:::strcmp ;int strcmp(char * __s1, char * __s2) TEST EAX,EAX JNZ LAB_001c0320 MOV RAX,qword ptr [RBX] TEST RAX,RAX JZ LAB_001c0360 LAB_001c034d: ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 RET ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_001c0360: MOV R9,R13 MOV ECX,0x226 MOV ESI,0xa XOR EAX,EAX LEA R8,[.rodata:s_name='%s'_00238aa0+15] ;= "name='%s'" LEA RDX,[.rodata:s_cpl_table.c_00238a7f+1] ;= "cpl_table.c" LEA RDI,[.rodata:__func__.186] ;= "cpl_table_find_column_" CALL .plt:cpl_error_set_message_macro ;undefined cpl_error_set_message_macr... ADD RSP,0x8 XOR EAX,EAX POP RBX POP RBP POP R12 POP R13 RET ?? 66h f ?? 2Eh . ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_001c03a0: MOV R9,RSI LEA R8,[.rodata:s_table_is_NULL,_name='%s'_00238aa0] ;= "table is NULL, name='%s'" XOR EAX,EAX MOV ECX,0x21f LEA RDX,[.rodata:s_cpl_table.c_00238a7f+1] ;= "cpl_table.c" MOV ESI,0xc LEA RDI,[.rodata:__func__.186] ;= "cpl_table_find_column_" CALL .plt:cpl_error_set_message_macro ;undefined cpl_error_set_message_macr... ADD RSP,0x8 XOR EAX,EAX POP RBX POP RBP POP R12 POP R13 RET ?? 66h f ?? 2Eh . ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_001c03e0: LEA R8,[.rodata:s_name_is_NULL_00238a93] ;= "name is NULL" MOV ECX,0x21d XOR EAX,EAX MOV ESI,0xc LEA RDX,[.rodata:s_cpl_table.c_00238a7f+1] ;= "cpl_table.c" LEA RDI,[.rodata:__func__.186] ;= "cpl_table_find_column_" CALL .plt:cpl_error_set_message_macro ;undefined cpl_error_set_message_macr... XOR EAX,EAX JMP LAB_001c034d ?? 0Fh Actual src: static cpl_column *cpl_table_find_column_(cpl_table *table, const char *name) { cpl_column *column = NULL; if (name == NULL) { (void)cpl_error_set_message_(CPL_ERROR_NULL_INPUT, "name is NULL"); } else if (table == NULL) { (void)cpl_error_set_message_(CPL_ERROR_NULL_INPUT, "table is NULL, " "name='%s'", name); } else { column = cpl_table_find_column(table, name); if (!column) { (void)cpl_error_set_message_(CPL_ERROR_DATA_NOT_FOUND, "name='%s'", name); } } return column; } Predicted src: const char * cpl_table_get_column_name(const cpl_table *table, const char *name) { const char *name = NULL; const char *name = NULL; const char *name = NULL; const char *name = NULL; if (!table) return NULL; name = cpl_table_get_name(table, name); if (!name) return NULL; name = cpl_table_get_name(table, name); if (!name) return NULL; name = cpl_table_get_name(table, name); if (!name) return NULL; name = cpl_table_get_name(table, name); if (!name) return NULL; return name; } ============================== Sample 4 ============================== 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: int main(int argc, char **argv, char **argv) { if (!argc) return 0; if (!strcmp(argv, "r")) return 0; if (!strcmp(argv, "r")) return 0; if (!strcmp(argv, "r")) return 0; if (!strcmp(argv, "r")) return 0; if (!strcmp(argv, "r")) return 0; if (!strcmp(argv, "r")) return 0; else return 0; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined sc_insert() ;local_30 undefined8 -30 ;local_38 undefined8 -38 PUSH R14 PUSH R13 MOV R13,RDI PUSH R12 XOR R12D,R12D PUSH RBP MOV RBP,RSI PUSH RBX SUB RSP,0x10 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_30+0x38],RAX XOR EAX,EAX CALL .plt:::document_get_current ;undefined document_get_current() TEST RAX,RAX JZ LAB_001058fb MOV RBX,RAX MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RAX + 0x8] CALL .plt:::sci_get_current_position ;undefined sci_get_current_position() MOV EDX,0x1 MOV RCX,RSP MOV RSI,RBP MOV R14D,EAX MOV R8D,0xffffffff MOV RDI,R13 XOR EAX,EAX CALL .plt:::gtk_tree_model_get ;undefined gtk_tree_model_get() MOV RDX,qword ptr [RSP]=>local_38 TEST RDX,RDX JZ LAB_001058fb CMP byte ptr [RDX],0x0 JNZ LAB_00105920 LAB_001058fb: MOV RAX,qword ptr [RSP + local_30+0x38] SUB RAX,qword ptr FS:[0x28] JNZ LAB_00105941 ADD RSP,0x10 MOV EAX,R12D POP RBX POP RBP POP R12 POP R13 POP R14 RET ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_00105920: MOV RAX,qword ptr [RBX + 0x28] MOV ESI,R14D MOV R12D,0x1 MOV RDI,qword ptr [RAX + 0x8] CALL .plt:::sci_insert_text ;undefined sci_insert_text() MOV RDI,qword ptr [RSP]=>local_38 CALL .plt:::g_free ;undefined g_free() JMP LAB_001058fb LAB_00105941: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP word ptr CS:[RAX + RAX*0x1] Actual src: static gboolean sc_insert(GtkTreeModel *model, GtkTreeIter *iter) { GeanyDocument *doc = document_get_current(); gboolean result = FALSE; if (doc!= NULL) { gchar *str; gint pos = sci_get_current_position(doc->editor->sci); gtk_tree_model_get(model, iter, COLUMN_HTML_NAME, &str, -1); if (!EMPTY(str)) { sci_insert_text(doc->editor->sci, pos, str); g_free(str); result = TRUE; } } return result; } Predicted src: static void get_current_selected (GtkTreeModel *model, gpointer user_data) { GtkTreeModel *model; GtkTreeModel *model; GtkTreeModel *model; GtkTreeModel *model; GtkTreeModel *model; GtkTreeModel *model; GtkTreeModel *model; GtkTreeModel *model; model = gtk_tree_model_get_model (model, &model, NULL); model = gtk_tree_model_get_model (model, &model, -1); if (model == NULL) return; model = gtk_tree_model_get_model (model, &model, -1); if (model == NULL) return; model = gtk_tree_model_get_model (model, &model, -1); if (model == NULL) return; g_free (model); }