{"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"}]}
{"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": "__add_probe_trace_events", "code": "__int64 __fastcall _add_probe_trace_events ( char * * @@a1@@ , __int64 @@a2@@ , int @@a3@@ , unsigned __int8 @@a4@@ ) { __int64 result ; const char * v5 ; __int64 @@v6@@ ; int @@i@@ ; int @@v10@@ ; _BYTE @@fd@@ [ Number ] ; char * s ; char * sa ; char * v14 ; char * v15 ; __int64 @@v16@@ ; char @@v17@@ [ Number ] ; unsigned __int64 @@v18@@ ; @@v18@@ = __readfsqword ( Number ) ; * ( _DWORD * ) & @@fd@@ [ Number ] = Number ; * ( _QWORD * ) @@fd@@ = ( unsigned int ) open_kprobe_events ( Number ) ; if ( * ( int * ) @@fd@@ < Number ) return * ( unsigned int * ) @@fd@@ ; @@v16@@ = get_probe_trace_event_names ( * ( int * ) @@fd@@ , Number ) ; if ( @@v16@@ ) { @@v10@@ = Number ; if ( @@a3@@ <= Number ) v5 = String ; else v5 = String ; printf ( String , v5 ) ; for ( @@i@@ = Number ; @@i@@ < @@a3@@ ; ++ @@i@@ ) { * ( _QWORD * ) & @@fd@@ [ Number ] = ( ( __int64 ) @@i@@ << Number ) + @@a2@@ ; if ( * @@a1@@ ) s = * @@a1@@ ; else s = @@a1@@ [ Number ] ? @@a1@@ [ Number ] : * ( _QWORD * ) ( * ( _QWORD * ) & @@fd@@ [ Number ] + Number L ) ; v14 = @@a1@@ [ Number ] ? @@a1@@ [ Number ] : String ; @@v10@@ = get_new_event_name ( @@v17@@ , Number , s , @@v16@@ , @@a4@@ , @@v6@@ ) ; if ( @@v10@@ < Number ) break ; * * ( _QWORD * * ) & @@fd@@ [ Number ] = strdup ( @@v17@@ ) ; * ( _QWORD * ) ( * ( _QWORD * ) & @@fd@@ [ Number ] + Number L ) = strdup ( v14 ) ; if ( ! * * ( _QWORD * * ) & @@fd@@ [ Number ] || ! * ( _QWORD * ) ( * ( _QWORD * ) & @@fd@@ [ Number ] + Number L ) ) { @@v10@@ = Number ; break ; } @@v10@@ = write_probe_trace_event ( * ( int * ) @@fd@@ , * ( __int64 * ) & @@fd@@ [ Number ] ) ; if ( @@v10@@ < Number ) break ; strlist__add ( @@v16@@ , @@v17@@ ) ; sa = * @@a1@@ ; v15 = @@a1@@ [ Number ] ; * @@a1@@ = * * ( char * * * ) & @@fd@@ [ Number ] ; @@a1@@ [ Number ] = * ( char * * ) ( * ( _QWORD * ) & @@fd@@ [ Number ] + Number L ) ; show_perf_probe_event ( ( __int64 ) @@a1@@ ) ; * @@a1@@ = sa ; @@a1@@ [ Number ] = v15 ; @@a4@@ = Number ; } if ( @@v10@@ >= Number ) { puts ( String ) ; printf ( String , * ( const char * * ) ( * ( _QWORD * ) & @@fd@@ [ Number ] + Number L ) , * * ( const char * * * ) & @@fd@@ [ Number ] ) ; } strlist__delete ( @@v16@@ ) ; close ( * ( int * ) @@fd@@ ) ; result = ( unsigned int ) @@v10@@ ; } else { eprintf ( Number L , String ) ; result = Number L ; } return result ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "r24"}, {"n": "a1", "t": {"T": 3, "t": "char *"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "fd", "t": {"T": 2, "n": 12, "s": 1, "t": "_BYTE"}, "location": "s116"}, {"n": "v10", "t": {"T": 1, "n": "int", "s": 4}, "location": "s120"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s124"}, {"n": "v18", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}, {"n": "v17", "t": {"T": 2, "n": 72, "s": 1, "t": "char"}, "location": "s80"}, {"n": "v16", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s88"}]}