============================== Sample 1 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined files_load_ticket() ;local_20 undefined8 -20 ;local_78 undefined1 -78 ;local_80 undefined8 -80 ;local_82 undefined2 -82 PUSH R13 PUSH R12 PUSH RBP SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RSP + local_20+0x88],RAX XOR EAX,EAX MOV EAX,0x4c MOV word ptr [RSP + local_82+0x88],AX TEST RDI,RDI JZ LAB_00137334 LEA RBP=>local_78,[RSP + 0x10] MOV R13,RSI LEA RDX=>local_82,[RSP + 0x6] MOV RSI,RBP CALL files_load_bytes_from_path.part.0 ;undefined files_load_bytes_from_path... MOV R12D,EAX TEST AL,AL JNZ LAB_00137358 LAB_00137334: XOR R12D,R12D LAB_00137337: MOV RAX,qword ptr [RSP + local_20+0x88] SUB RAX,qword ptr FS:[0x28] JNZ LAB_001373b9 ADD RSP,0x70 MOV EAX,R12D POP RBP POP R12 POP R13 RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_00137358: MOVZX ESI,word ptr [RSP + local_82+0x88] LEA RDX=>local_80,[RSP + 0x8] MOV RCX,R13 MOV RDI,RBP MOV qword ptr [RSP + local_80+0x88],0x0 CALL .plt:::Tss2_MU_TPMT_TK_VERIFIED_Unmarshal ;undefined Tss2_MU_TPMT_TK_VERIFIED_U... TEST EAX,EAX JZ LAB_00137337 LEA RBP,[.rodata:s_lib/files.c_00160723] ;= "lib/files.c" MOV R8D,EAX XOR EDI,EDI XOR EAX,EAX MOV RSI=>.rodata:s_lib/files.c_00160723,RBP ;= "lib/files.c" LEA RCX,[.rodata:s_Error_deserializing_ticket_struc_00160ec0] ;= "Error deserializing ticket struct... MOV EDX,0x2f4 CALL _log ;double _log(double __x) LEA RCX,[.rodata:s_The_input_file_needs_to_be_a_val_00160ef0] ;= "The input file needs to be a vali... XOR EDI,EDI XOR EAX,EAX MOV EDX,0x2f4 MOV RSI=>.rodata:s_lib/files.c_00160723,RBP ;= "lib/files.c" CALL _log ;double _log(double __x) JMP LAB_00137334 LAB_001373b9: CALL .plt:::__stack_chk_fail ;undefined __stack_chk_fail() NOP Actual src: LOAD_TYPE(TPMT_TK_VERIFIED, ticket) Predicted src: static int file_load_from_path(const char *path, const char *path) { char *path = NULL; char *path = NULL; char *path = NULL; if ((path = file_from_path(path, path, path, &path)) == NULL) { fprintf(stderr, "%s: %s\n", path); return 0; } return 0; } ============================== Sample 2 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined enteringPodNotify() MOV byte ptr [RDI + 0x51],0x1 RET ?? 66h f Actual src: static void enteringPodNotify (perlSubparser *perl) { struct FParamsSubparser *fparams = (struct FParamsSubparser *)perl; fparams->inPod = true; } Predicted src: static void set(Widget w, XEvent *event) { w->flags &= ~1; } ============================== Sample 3 ============================== ASM: ;************************************************************************************************************************************************************ ;* KDL::Path_RoundedComposite::GetLengthToEndOfSegment(int) * ;************************************************************************************************************************************************************ ;undefined GetLengthToEndOfSegment(int param_1) ;param_1 int EDI MOV param_1,qword ptr [param_1 + 0x8] MOV RAX,qword ptr [param_1] JMP qword ptr [RAX + 0x60] ?? 66h f Actual src: double Path_RoundedComposite::GetLengthToEndOfSegment(int i) { return comp->GetLengthToEndOfSegment(i); } Predicted src: void vtkPath::PathPathPath(int index) { this->PathPath->PathPathPath(index); } ============================== Sample 4 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined device_added() PUSH R13 MOV RDI,RSI PUSH R12 MOV R12,RDX PUSH RBP MOV RBP,RSI CALL .plt:::nm_device_get_iface ;undefined nm_device_get_iface() LEA RSI,[.rodata:s_%s:_device_created_0019389e] ;= "%s: device created\n" LEA RDI,[.rodata:s_NetworkManager_0018910e] ;= "NetworkManager" MOV R13,RAX CALL .plt:::g_dgettext ;undefined g_dgettext() MOV RSI,R13 MOV RDI,RAX XOR EAX,EAX CALL .plt:::g_print ;undefined g_print() MOV RCX,R12 MOV RDI,RBP XOR R9D,R9D ADD dword ptr [R12 + 0x38],0x1 XOR R8D,R8D LEA RDX,[device_state] LEA RSI,[.rodata:s_notify::state_0018b29c] ;= "notify::state" CALL .plt:::g_signal_connect_data ;undefined g_signal_connect_data() MOV RCX,R12 MOV RDI,RBP XOR R9D,R9D POP RBP XOR R8D,R8D POP R12 LEA RDX,[device_ac] LEA RSI,[.rodata:s_notify::active-connection_001938b2] ;= "notify::active-connection" POP R13 JMP .plt:::g_signal_connect_data ;undefined g_signal_connect_data() ?? 90h Actual src: static void device_added(NMClient *client, NMDevice *device, NmCli *nmc) { g_print(_("%s: device created\n"), nm_device_get_iface(device)); device_watch(nmc, NM_DEVICE(device)); } Predicted src: static void on_device_notify_cb (gpointer user_data) { g_signal_by_data (G_OBJECT (user_data), "state"); g_signal_connect (G_OBJECT (user_data), "notify"); g_signal_connect (G_OBJECT (user_data), "notify"); } ============================== Sample 5 ============================== ASM: ;************************************************************************************************************************************************************ ;* FUNCTION * ;************************************************************************************************************************************************************ ;undefined astSetPutErr_() PUSH R13 PUSH R12 PUSH RBP MOV RBP,RSI PUSH RBX MOV RBX,RDI SUB RSP,0x8 MOV RSI=>astGlobalsCreateKey_,qword ptr [->astGlobalsCreateKey_] ;= 001e0a80 MOV RDI=>.bss:starlink_ast_globals_initialised,qword ptr [->starlink_ast_globals_initialised] ;= 006e2228 ;=?? CALL .plt:::pthread_once ;int pthread_once(pthread_once_t * __... TEST EAX,EAX JZ LAB_00173760 MOV RAX,qword ptr [->stderr] ;= 006e4518 MOV EDX,0x2b MOV ESI,0x1 XOR R12D,R12D LEA RDI,[.rodata:s_Starlink_AST_package_initialisat_006211f8] ;= "Starlink AST package initialisati... MOV RCX,qword ptr [RAX]=>EXTERNAL:stderr ;=?? CALL .plt:::fwrite ;size_t fwrite(void * __ptr, size_t _... LAB_0017374a: MOV EAX,dword ptr [RBP] TEST EAX,EAX JZ LAB_001737b8 ADD RSP,0x8 POP RBX POP RBP POP R12 POP R13 RET ?? 0Fh ?? 1Fh ?? 40h @ ?? 00h LAB_00173760: MOV R13,qword ptr [->starlink_ast_globals_key] ;= 006e2224 MOV EDI,dword ptr [R13]=>.bss:starlink_ast_globals_key ;=?? CALL .plt:::pthread_getspecific ;void * pthread_getspecific(pthread_k... MOV R12,RAX TEST RAX,RAX JNZ LAB_0017374a CALL .plt:astGlobalsInit_ ;undefined astGlobalsInit_() MOV EDI,dword ptr [R13]=>.bss:starlink_ast_globals_key ;=?? MOV RSI,RAX MOV R12,RAX CALL .plt:::pthread_setspecific ;int pthread_setspecific(pthread_key_... TEST EAX,EAX JZ LAB_0017374a MOV RAX,qword ptr [->stderr] ;= 006e4518 MOV EDX,0x3a MOV ESI,0x1 LEA RDI,[.rodata:s_Starlink_AST_failed_to_store_Thr_00621228] ;= "Starlink AST failed to store Thre... MOV RCX,qword ptr [RAX]=>EXTERNAL:stderr ;=?? CALL .plt:::fwrite ;size_t fwrite(void * __ptr, size_t _... JMP LAB_0017374a ?? 66h f ?? 0Fh ?? 1Fh ?? 44h D ?? 00h ?? 00h LAB_001737b8: MOV qword ptr [R12 + DAT_000009a0],RBX ADD RSP,0x8 MOV RSI,RBP LEA RDI,[CPutErrWrapper] POP RBX POP RBP POP R12 POP R13 JMP .plt:astSetPutErrWrapper_ ;undefined astSetPutErrWrapper_() ?? 0Fh Actual src: void astSetPutErr_( AstPutErrFun fun, int *status ){ /* *++ * Name: c astSetPutErr f AST_SETPUTERR * Purpose: c Register an error handling function for use by the AST error model f Register an error handling routine for use by the AST error model * Type: * Public function. * Synopsis: c #include "error.h" c void astSetPutErr( void (*fun)(int,const char*) ) f CALL AST_GRFSET( FUN, STATUS ) * Description: * This function can be used to register an external function to be * used to deliver an error message and (optionally) an accompanying * status value to the user. * * If this function is not called prior to the first error occuring * within AST, then the external error handling function selected at * link-time (using the ast_link command) will be used. To use an * alternative error handler, call this function before using any other * AST functions, specifying the external error handling function to be * used. This will register the function for future use. * Parameters: c fun f FUN = INTEGER FUNCTION (Given) c A Pointer to the function to be used to handle errors. The interface c for this function is described below. f The name of the routine to be used to handle errors (the name f should also appear in a Fortran EXTERNAL statement in the f routine which invokes AST_SETPUTERR). c Once a function has been provided, a NULL pointer can be supplied c in a subsequent call to astSetPutErr to reset the function to the c corresponding function selected at link-time. f Once a routine has been provided, the "null" routine AST_NULL can f be supplied in a subsequent call to astSetPutErr to reset the routine f to the corresponding routine selected at link-time. AST_NULL is f defined in the AST_PAR include file. f STATUS = INTEGER (Given and Returned) f The global status. * Function Interface: * The supplied external function should deliver the supplied error message * and (optionally) the supplied status value to the user or to some * underlying error system. It requires the following interface: * c void PutErr( int status_value, const char *message ) f SUBROUTINE PUTERR( STATUS_VALUE, MESSAGE ) * c - status_value - f - STATUS_VALUE = INTEGER (Given) - * The error status value. c - message - Pointer to a null-terminated character string containing c the error message to be delivered. f - MESSAGE = CHARACTER * ( * ) (Given) - The error message to be delivered. *-- */ /* Local Variables: */ astDECLARE_GLOBALS /* Pointer to thread-specific global data */ /* Ensure that the thread-specific status block has been created and initialised. */ astGET_GLOBALS(NULL); /* Check the global error status. */ if (!astOK ) return; /* Store the pointer. */ puterr = fun; /* In general, the interface to the PutErr function will differ for different languages. So we need a wrapper function with a known fixed interface which can be used to invoke the actual function with an interface suited to the language in use. Call astPutErrWrapper to store a wrapper to a suitable function which can invoke the supplied function. Here, we assume that the supplied function has a C interface, so we set up a C wrapper. If this function is being called from another language, then the interface for this function within that language should set up an appropriate wrapper after calling this function, thus over-riding the C wrapper set up here. */ astSetPutErrWrapper( CPutErrWrapper ); } Predicted src: int main(int argc, char **argv, char **argv) { if (argc!= 1) { fprintf(stderr, "Error: %s\n", argv[0]); return 0; } if (argc!= 1) { fprintf(stderr, "Error: %s\n", argv[0]); return 0; } return 0; }