{"name": "synthesize_probe_trace_command", "code": "char * __fastcall synthesize_probe_trace_command ( __int64 @@a1@@ ) { char * result ; const char * @@v2@@ ; void * v3 ; unsigned int @@v4@@ ; __int64 @@v5@@ ; __int64 @@v6@@ ; __int64 * v7 ; int @@i@@ ; int @@v10@@ ; int @@v11@@ ; char * @@ptr@@ ; @@ptr@@ = ( char * ) zalloc ( Number ) ; if ( ! @@ptr@@ ) return Number L ; if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) @@v2@@ = String ; else @@v2@@ = ( const char * ) & unk_5925 ; v3 = * ( void * * ) ( @@a1@@ + Number ) ; if ( ! v3 ) v3 = & unk_5925 ; if ( * ( _BYTE * ) ( @@a1@@ + Number ) ) @@v4@@ = Number ; else @@v4@@ = Number ; @@v10@@ = e_snprintf ( @@ptr@@ , Number , String , @@v4@@ , * ( _QWORD * ) ( @@a1@@ + Number ) , * ( _QWORD * ) @@a1@@ , v3 , @@v2@@ , * ( _QWORD * ) ( @@a1@@ + Number ) , * ( _QWORD * ) ( @@a1@@ + Number ) ) ; if ( @@v10@@ <= Number ) { LABEL_17 : free ( @@ptr@@ ) ; result = Number L ; } else { for ( @@i@@ = Number ; @@i@@ < * ( _DWORD * ) ( @@a1@@ + Number ) ; ++ @@i@@ ) { v7 = ( __int64 * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L * @@i@@ ) ; @@v11@@ = ( unsigned int ) synthesize_probe_trace_arg ( v7 , & @@ptr@@ [ @@v10@@ ] , Number - @@v10@@ , ( __int64 ) v7 , @@v5@@ , @@v6@@ ) ; if ( @@v11@@ <= Number ) goto LABEL_17 ; @@v10@@ += @@v11@@ ; } result = @@ptr@@ ; } return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v4", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r64"}, {"n": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r72"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "v2", "t": {"T": 3, "t": "const char"}, "location": "r88"}, {"n": "ptr", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "v11", "t": {"T": 1, "n": "int", "s": 4}, "location": "s28"}, {"n": "v10", "t": {"T": 1, "n": "int", "s": 4}, "location": "s32"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s36"}]}
{"name": "zalloc", "code": "void * __fastcall zalloc ( size_t @@a1@@ ) { return calloc ( Number , @@a1@@ ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "r56"}]} {"name": "e_snprintf", "code": "__int64 e_snprintf ( char * @@a1@@ , size_t @@a2@@ , const char * @@a3@@ , __int64 @@a4@@ , __int64 @@a5@@ , __int64 @@a6@@ , ... ) { int @@v7@@ ; gcc_va_list @@arg@@ ; unsigned __int64 @@v9@@ ; __int64 @@v10@@ ; __int64 @@v11@@ ; __int64 @@v12@@ ; va_start ( @@arg@@ , @@a6@@ ) ; @@v10@@ = @@a4@@ ; @@v11@@ = @@a5@@ ; @@v12@@ = @@a6@@ ; @@v9@@ = __readfsqword ( Number ) ; @@arg@@ [ Number ] . gp_offset = Number ; @@v7@@ = vsnprintf ( @@a1@@ , @@a2@@ , @@a3@@ , @@arg@@ ) ; if ( @@v7@@ >= ( int ) @@a2@@ ) @@v7@@ = Number ; return ( unsigned int ) @@v7@@ ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "const char"}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r24"}, {"n": "a1", "t": {"T": 3, "t": "char"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r72"}, {"n": "a6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "v12", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s136"}, {"n": "v11", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s144"}, {"n": "v10", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s152"}, {"n": "v9", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s184"}, {"n": "arg", "t": {"T": 2, "n": 1, "s": 24, "t": "__va_list_tag"}, "location": "s208"}, {"n": "v7", "t": {"T": 1, "n": "int", "s": 4}, "location": "s212"}]} {"name": "synthesize_probe_trace_arg", "code": "char * __fastcall synthesize_probe_trace_arg ( __int64 * @@a1@@ , char * @@a2@@ , size_t @@a3@@ , __int64 @@a4@@ , __int64 @@a5@@ , __int64 @@a6@@ ) { __int64 v6 ; __int64 v7 ; __int64 v9 ; __int64 v10 ; size_t @@v12@@ ; char * @@v13@@ ; __int64 * @@v14@@ ; unsigned int @@v15@@ ; unsigned int @@v16@@ ; _QWORD * @@v17@@ ; char * @@v18@@ ; unsigned __int64 @@v19@@ ; @@v14@@ = @@a1@@ ; @@v13@@ = @@a2@@ ; @@v12@@ = @@a3@@ ; @@v19@@ = __readfsqword ( Number ) ; @@v17@@ = ( _QWORD * ) @@a1@@ [ Number ] ; @@v16@@ = Number ; @@v18@@ = @@a2@@ ; if ( * @@a1@@ ) @@v15@@ = e_snprintf ( @@v13@@ , @@v12@@ , String , * @@v14@@ , @@a5@@ , @@a6@@ ) ; else @@v15@@ = e_snprintf ( @@v13@@ , @@v12@@ , String , @@v12@@ , @@a5@@ , @@a6@@ ) ; if ( ( @@v15@@ & Number ) != Number ) return ( char * ) @@v15@@ ; @@v13@@ += ( int ) @@v15@@ ; @@v12@@ -= ( int ) @@v15@@ ; if ( * ( _BYTE * ) @@v14@@ [ Number ] == Number && @@v14@@ [ Number ] ) @@v17@@ = ( _QWORD * ) * @@v17@@ ; if ( @@v17@@ ) { @@v16@@ = _synthesize_probe_trace_arg_ref ( @@v17@@ , & @@v13@@ , & @@v12@@ , Number , v6 , v7 ) ; if ( ( @@v16@@ & Number ) != Number ) return ( char * ) @@v16@@ ; } if ( * ( _BYTE * ) @@v14@@ [ Number ] == Number && @@v14@@ [ Number ] ) @@v15@@ = e_snprintf ( @@v13@@ , @@v12@@ , String , @@v14@@ [ Number ] , * ( _QWORD * ) ( @@v14@@ [ Number ] + Number ) , v7 ) ; else @@v15@@ = e_snprintf ( @@v13@@ , @@v12@@ , String , @@v14@@ [ Number ] , v6 , v7 ) ; if ( ( @@v15@@ & Number ) != Number ) return ( char * ) @@v15@@ ; @@v13@@ += ( int ) @@v15@@ ; for ( @@v12@@ -= ( int ) @@v15@@ ; @@v16@@ -- ; @@v12@@ -= ( int ) @@v15@@ ) { @@v15@@ = e_snprintf ( @@v13@@ , @@v12@@ , String , @@v12@@ , v9 , v10 ) ; if ( ( @@v15@@ & Number ) != Number ) return ( char * ) @@v15@@ ; @@v13@@ += ( int ) @@v15@@ ; } if ( @@v14@@ [ Number ] ) { @@v15@@ = e_snprintf ( @@v13@@ , @@v12@@ , String , @@v14@@ [ Number ] , v9 , v10 ) ; if ( ( int ) @@v15@@ <= Number ) return ( char * ) @@v15@@ ; @@v13@@ += ( int ) @@v15@@ ; } return ( char * ) ( @@v13@@ - @@v18@@ ) ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r24"}, {"n": "a1", "t": {"T": 3, "t": "__int64"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "char"}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r72"}, {"n": "a6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "v18", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "v17", "t": {"T": 3, "t": "_QWORD"}, "location": "s24"}, {"n": "v16", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s28"}, {"n": "v15", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s32"}, {"n": "v14", "t": {"T": 3, "t": "__int64"}, "location": "s40"}, {"n": "v13", "t": {"T": 3, "t": "char"}, "location": "s48"}, {"n": "v12", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "s56"}, {"n": "v19", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "write_probe_trace_event", "code": "__int64 __fastcall write_probe_trace_event ( int @@a1@@ , __int64 @@a2@@ ) { __int64 result ; size_t v3 ; int * v4 ; char * v5 ; int @@v6@@ ; char * @@s@@ ; @@v6@@ = Number ; @@s@@ = synthesize_probe_trace_command ( @@a2@@ ) ; if ( @@s@@ ) { eprintf ( Number L , String , @@s@@ ) ; if ( probe_event_dry_run != Number ) { v3 = strlen ( @@s@@ ) ; @@v6@@ = write ( @@a1@@ , @@s@@ , v3 ) ; if ( @@v6@@ <= Number ) { v4 = _errno_location ( ) ; v5 = strerror ( * v4 ) ; eprintf ( Number L , String , v5 ) ; } } free ( @@s@@ ) ; result = ( unsigned int ) @@v6@@ ; } else { eprintf ( Number L , String ) ; result = Number L ; } return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "s", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}]}