============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined ensure_postgres_service_is_running_as_subprocess() PUSH RBP LEA RSI,[RDI + 0x478] MOV RBP,RSP PUSH R12 MOV R12,RDI ADD RDI,0x878 PUSH RBX CALL pg_is_running ;undefined pg_is_running() LEA RSI,[R12 + 0xa808] LEA RDI,[R12 + 0xac08] MOV EBX,EAX CALL keeper_set_postgres_state_running_as_subprocess ;undefined keeper_set_postgres_state_... TEST AL,AL JZ LAB_00163780 TEST BL,BL JNZ LAB_00163760 POP RBX MOV RDI,R12 POP R12 POP RBP JMP local_postgres_wait_until_ready ;undefined local_postgres_wait_until_... ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00163760: MOV EDI,0x1 CALL .plt:::sleep ;uint sleep(uint __seconds) POP RBX MOV RDI,R12 POP R12 POP RBP JMP local_postgres_wait_until_ready ;undefined local_postgres_wait_until_... ?? 66h f ?? 2Eh . ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00163780: POP RBX XOR EAX,EAX POP R12 POP RBP RET ?? 66h f Actual src: bool ensure_postgres_service_is_running_as_subprocess(LocalPostgresServer *postgres) { PostgresSetup *pgSetup = &(postgres->postgresSetup); LocalExpectedPostgresStatus *pgStatus = &(postgres->expectedPgStatus); bool pgIsRunning = pg_is_running(pgSetup->pg_ctl, pgSetup->pgdata); /* update our data structure in-memory, then on-disk */ if (!keeper_set_postgres_state_running_as_subprocess(&(pgStatus->state), pgStatus->pgStatusPath)) { /* errors have already been logged */ return false; } /* * If Postgres was already running before we wrote a new expected status * file, then the Postgres controller might be up to stop and then restart * Postgres. This happens when the already running Postgres is not a * subprocess of this pg_autoctl process, and only the controller has the * right information to check that (child process pid for "postgres"). * * Because we are lacking information, we just wait for some time before * checking if Postgres is running (again) */ if (pgIsRunning) { sleep(PG_AUTOCTL_KEEPER_SLEEP_TIME); } return local_postgres_wait_until_ready(postgres); } Predicted src: static int is_state_is_state(void *user_data) { struct rte_dev *dev = user_data; struct rte_dev *dev = user_data; struct rte_dev *dev = user_data; if (dev->state == NULL) return 0; if (is_state_is_state(dev)) return 0; if (is_state_is_state(dev)) return 0; if (is_state_is_state(dev)) return 0; return 0; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined Perl_parse_arithexpr() PUSH RBP MOV RBP,RDI PUSH RBX SUB RSP,0x8 TEST ESI,0xfffffffe JNZ LAB_001a9ade MOV EBX,ESI MOV EDX,0xa MOV ESI,0x103 CALL S_parse_recdescent_for_op ;undefined S_parse_recdescent_for_op() TEST RAX,RAX JZ LAB_001a9a90 LAB_001a9a87: ADD RSP,0x8 POP RBX POP RBP RET ?? 66h f ?? 90h LAB_001a9a90: TEST EBX,EBX JNZ LAB_001a9a87 MOV RAX,qword ptr [RBP + 0x200] CMP byte ptr [RAX + 0xff],0x0 JZ LAB_001a9ac0 LAB_001a9aa4: ADD RSP,0x8 MOV RDI,RBP XOR EDX,EDX XOR ESI,ESI POP RBX POP RBP JMP .plt:Perl_newOP ;undefined Perl_newOP() ?? 66h f ?? 2Eh . ?? 0Fh ?? 1Fh ?? 84h ?? 00h ?? 00h ?? 00h ?? 00h ?? 00h LAB_001a9ac0: MOV RDI,RBP LEA RSI,[.rodata:s_Parse_error_002d58bc] ;= "Parse error" XOR EAX,EAX CALL .plt:Perl_mess ;undefined Perl_mess(undefined param_... MOV RDI,RBP MOV RSI,RAX CALL .plt:Perl_qerror ;undefined Perl_qerror() JMP LAB_001a9aa4 LAB_001a9ade: LEA RDX,[.rodata:s_parse_expr_002d6081] ;= "parse_expr" LEA RSI,[.rodata:s_Parsing_code_internal_error_(%s)_002d7450] ;= "Parsing code internal error (%s)" XOR EAX,EAX CALL .plt:Perl_croak ;undefined Perl_croak(undefined param... NOP dword ptr CS:[RAX + RAX*0x1] Actual src: OP * Perl_parse_arithexpr(pTHX_ U32 flags) { return parse_expr(LEX_FAKEEOF_COMPARE, flags); } Predicted src: void op_opop_opop(opop *op) { op_opop_op(op); op_op_op(op); } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined eog_metadata_sidebar_init() PUSH R12 MOV R12,RDI PUSH RBX SUB RSP,0x8 MOVSXD RBX,dword ptr [.bss:EogMetadataSidebar_private_offset] ;=?? ADD RBX,RDI MOV qword ptr [RDI + 0x38],RBX CALL .plt:::gtk_widget_get_type ;undefined gtk_widget_get_type() MOV RDI,R12 MOV RSI,RAX CALL .plt:::g_type_check_instance_cast ;undefined g_type_check_instance_cast() MOV RDI,RAX CALL .plt:::gtk_widget_init_template ;undefined gtk_widget_init_template() MOV RDI,qword ptr [RBX + 0x38] ADD RSP,0x8 MOV RCX,R12 POP RBX XOR R9D,R9D XOR R8D,R8D POP R12 LEA RDX,[_folder_label_clicked_cb] LEA RSI,[.rodata:s_activate-link_0015f079] ;= "activate-link" JMP .plt:::g_signal_connect_data ;undefined g_signal_connect_data() ?? 66h f Actual src: static void eog_metadata_sidebar_init (EogMetadataSidebar *sidebar) { EogMetadataSidebarPrivate *priv; priv = sidebar->priv = eog_metadata_sidebar_get_instance_private (sidebar); gtk_widget_init_template (GTK_WIDGET (sidebar)); g_signal_connect (priv->folder_label, "activate-link", G_CALLBACK (_folder_label_clicked_cb), sidebar); #ifndef HAVE_EXIF { /* Remove the lower 8 lines as they are empty without libexif*/ guint i; for (i = 11; i > 3; i--) { gtk_grid_remove_row (GTK_GRID (priv->metadata_grid), i); } } #endif /*!HAVE_EXIF */ } Predicted src: static void gtk_widget_init (GtkWidget *widget) { gtk_widget_init_template (GTK_WIDGET (widget)); gtk_widget_init_template (GTK_WIDGET (widget)); } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined get_cursor_from_program() ;local_48 undefined1 -48 ;local_4c undefined4 -4c PUSH R13 PUSH R12 PUSH RBP MOV RBP,RDI PUSH RBX MOV RBX,RSI SUB RSP,0x38 MOV RAX,qword ptr [.bss:cobglobptr] ;=?? MOV RAX,qword ptr [RAX + 0x8] TEST RAX,RAX JZ LAB_001451d8 MOV R12,qword ptr [RAX + 0x48] TEST R12,R12 JZ LAB_001451d8 MOV RAX,qword ptr [R12 + 0x10] TEST byte ptr [RAX],0x10 JNZ LAB_001451f0 MOV R13,qword ptr [R12] MOV EAX,R13D AND EAX,0xfffffffd CMP EAX,0x4 JNZ LAB_00145228 MOV RSI,qword ptr [R12 + 0x8] MOVSXD RDX,R13D LEA RDI=>local_48,[RSP + 0x10] MOV ECX,0x20 ADD R13D,0x1 CALL .plt:::__memcpy_chk ;undefined __memcpy_chk() MOVSXD R13,R13D LEA RDX=>local_4c,[RSP + 0xc] LEA RSI,[.rodata:s_%d_0014e6af+17] ;= "%d" MOV RDI,RAX XOR EAX,EAX MOV byte ptr [RSP + R13*0x1 + 0x10],0x0 CALL .plt:::__isoc99_sscanf ;undefined __isoc99_sscanf() TEST EAX,EAX JZ LAB_00145228 MOV EAX,dword ptr [RSP + local_4c+0x58] CMP qword ptr [R12],0x4 MOVSXD RDX,EAX JZ LAB_00145202 LAB_001451a2: IMUL RDX,RDX,0x10624dd3 MOV ECX,EAX SAR ECX,0x1f SAR RDX,0x26 SUB EDX,ECX LEA ECX,[RDX + -0x1] IMUL EDX,EDX,0x3e8 SUB EAX,EDX SUB EAX,0x1 LAB_001451c2: MOV dword ptr [RBP],ECX MOV dword ptr [RBX],EAX ADD RSP,0x38 POP RBX POP RBP POP R12 POP R13 RET ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001451d8: MOV dword ptr [RBP],0xffffffff MOV dword ptr [RBX],0xffffffff ADD RSP,0x38 POP RBX POP RBP POP R12 POP R13 RET LAB_001451f0: MOV RDI,R12 CALL .plt:cob_get_int ;undefined cob_get_int() CMP qword ptr [R12],0x4 MOVSXD RDX,EAX JNZ LAB_001451a2 LAB_00145202: IMUL RDX,RDX,0x51eb851f MOV ECX,EAX SAR ECX,0x1f SAR RDX,0x25 SUB EDX,ECX LEA ECX,[RDX + -0x1] IMUL EDX,EDX,0x64 SUB EAX,EDX SUB EAX,0x1 JMP LAB_001451c2 ?? 0Fh ?? 1Fh ?? 80h ?? 00h ?? 00h ?? 00h ?? 00h LAB_00145228: MOV EDI,0x3 CALL .plt:cob_fatal_error ;undefined cob_fatal_error() NOP dword ptr CS:[RAX + RAX*0x1] Actual src: static void get_cursor_from_program (int *line, int *column) { if (COB_MODULE_PTR && COB_MODULE_PTR->cursor_pos) { cob_field *cursor_field = COB_MODULE_PTR->cursor_pos; int cursor_pos; if (COB_FIELD_IS_NUMERIC (cursor_field)) { cursor_pos = cob_get_int (cursor_field); } else { char buff[32]; int maxsize = cursor_field->size; /* LCOV_EXCL_START */ if (unlikely (maxsize!= 4 && maxsize!= 6)) { cob_fatal_error (COB_FERROR_CODEGEN); } /* LCOV_EXCL_STOP */ memcpy (buff, cursor_field->data, maxsize); buff[maxsize + 1] = 0; if (unlikely (!sscanf (buff, "%d", &cursor_pos))) { cob_fatal_error (COB_FERROR_CODEGEN); } } if (cursor_field->size == 4) { *line = (cursor_pos / 100) - 1; *column = (cursor_pos % 100) - 1; } else { *line = (cursor_pos / 1000) - 1; *column = (cursor_pos % 1000) - 1; } } else { *column = *line = -1; } } Predicted src: static int get_cursor_from_from_cursor (int *cursor, int *cursor, int *cursor, int *cursor) { int *cursor = get_cursor (cursor); int *cursor = get_cursor_from_cursor (cursor); int *cursor = get_cursor_cursor (cursor); int *cursor = get_cursor_cursor (cursor); int *cursor = get_cursor_cursor (cursor); int *cursor = get_cursor_cursor (cursor); int *cursor = get_cursor_cursor (cursor); int *cursor = get_cursor_cursor (cursor); int *cursor = get_cursor_cursor (cursor); if (cursor) *cursor = get_cursor_cursor_from_cursor (cursor); else *cursor = get_cursor_cursor_from_cursor (cursor); else *cursor = get_cursor_cursor_from_cursor (cursor); if (cursor) *cursor = get_cursor_cursor_from_cursor (cursor); else *cursor = get_cursor_cursor_from_cursor (cursor); return 0; } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined shortcuts_activate_get_info_cb() PUSH R13 MOV R13,RSI PUSH R12 MOV R12,RDI PUSH RBP MOV RBP,RCX PUSH RBX MOV RBX,RDX SUB RSP,0x8 CALL .plt:::g_cancellable_is_cancelled ;undefined g_cancellable_is_cancelled() MOV RDI,qword ptr [RBP] CMP qword ptr [RDI + 0x260],R12 JZ LAB_001e3600 LAB_001e35d8: CALL .plt.got:::g_object_unref ;undefined g_object_unref() MOV RDI,qword ptr [RBP + 0x8] CALL .plt.got:::g_object_unref ;undefined g_object_unref() MOV RDI,RBP CALL .plt.got:::g_free ;undefined g_free() ADD RSP,0x8 MOV RDI,R12 POP RBX POP RBP POP R12 POP R13 JMP .plt.got:::g_object_unref ;undefined g_object_unref() LAB_001e3600: MOV qword ptr [RDI + 0x260],0x0 TEST EAX,EAX JNZ LAB_001e35d8 TEST RBX,RBX JZ LAB_001e3628 LAB_001e3614: MOV RSI,qword ptr [RBP + 0x8] XOR EDX,EDX CALL gtk_file_chooser_default_select_file ;undefined gtk_file_chooser_default_s... MOV RDI,qword ptr [RBP] JMP LAB_001e35d8 ?? 0Fh ?? 1Fh ?? 00h LAB_001e3628: MOV RDI,R13 CALL _gtk_file_info_consider_as_directory ;undefined _gtk_file_info_consider_as... TEST EAX,EAX JNZ LAB_001e3640 MOV RDI,qword ptr [RBP] JMP LAB_001e3614 ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001e3640: MOV RDI,qword ptr [RBP] MOV RSI,qword ptr [RBP + 0x8] XOR EDX,EDX CALL change_folder_and_display_error ;undefined change_folder_and_display_... MOV RDI,qword ptr [RBP] JMP LAB_001e35d8 ?? 66h f Actual src: static void shortcuts_activate_get_info_cb (GCancellable *cancellable, GFileInfo *info, const GError *error, gpointer user_data) { gboolean cancelled = g_cancellable_is_cancelled (cancellable); struct ShortcutsActivateData *data = user_data; if (cancellable!= data->impl->shortcuts_activate_iter_cancellable) goto out; data->impl->shortcuts_activate_iter_cancellable = NULL; if (cancelled) goto out; if (!error && _gtk_file_info_consider_as_directory (info)) change_folder_and_display_error (data->impl, data->file, FALSE); else gtk_file_chooser_default_select_file (GTK_FILE_CHOOSER (data->impl), data->file, NULL); out: g_object_unref (data->impl); g_object_unref (data->file); g_free (data); g_object_unref (cancellable); } Predicted src: static void _gtk_file_chooser_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) { gboolean result = FALSE; gboolean result = FALSE; g_return_if_fail (source_object!= NULL); g_return_if_fail (result!= NULL); result = _gtk_file_chooser_get_uri (source_object); g_return_if_fail (result!= NULL); result = _gtk_file_chooser_get_uri (source_object); _g_free (result); }