{"name": "get_probe_trace_event_names", "code": "__int64 __fastcall get_probe_trace_event_names ( int @@a1@@ , char @@a2@@ ) { __int64 @@v2@@ ; int @@v4@@ ; __int64 @@i@@ ; __int64 @@v6@@ ; __int64 @@v7@@ ; __int64 @@s@@ [ Number ] ; char @@v9@@ [ Number ] ; unsigned __int64 @@v10@@ ; @@v10@@ = __readfsqword ( Number ) ; @@v4@@ = Number ; memset ( @@s@@ , Number , sizeof ( @@s@@ ) ) ; @@v6@@ = get_probe_trace_command_rawlist ( @@a1@@ ) ; @@v7@@ = strlist__new ( Number L , Number L ) ; for ( @@i@@ = strlist__first ( @@v6@@ ) ; @@i@@ ; @@i@@ = strlist__next ( @@i@@ ) ) { @@v4@@ = parse_probe_trace_command ( * ( const char * * ) ( @@i@@ + Number ) , ( __int64 ) @@s@@ ) ; if ( @@v4@@ < Number ) break ; if ( @@a2@@ ) { @@v4@@ = e_snprintf ( @@v9@@ , Number , String , @@s@@ [ Number ] , @@s@@ [ Number ] , @@v2@@ ) ; if ( @@v4@@ >= Number ) @@v4@@ = strlist__add ( @@v7@@ , @@v9@@ ) ; } else { @@v4@@ = strlist__add ( @@v7@@ , @@s@@ [ Number ] ) ; } clear_probe_trace_event ( ( __int64 ) @@s@@ ) ; if ( @@v4@@ < Number ) break ; } strlist__delete ( @@v6@@ ) ; if ( @@v4@@ >= Number ) return @@v7@@ ; strlist__delete ( @@v7@@ ) ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "char", "s": 1}, "location": "r64"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "v9", "t": {"T": 2, "n": 136, "s": 1, "t": "char"}, "location": "s144"}, {"n": "s", "t": {"T": 2, "n": 8, "s": 8, "t": "__int64"}, "location": "s208"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s216"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s224"}, {"n": "i", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s232"}, {"n": "v4", "t": {"T": 1, "n": "int", "s": 4}, "location": "s236"}, {"n": "v10", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}
{"name": "strlist__first", "code": "__int64 __fastcall strlist__first ( __int64 @@a1@@ ) { __int64 @@result@@ ; __int64 @@v2@@ ; @@v2@@ = rb_first ( @@a1@@ ) ; if ( @@v2@@ ) @@result@@ = @@v2@@ ; else @@result@@ = Number L ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}]} {"name": "strlist__next", "code": "__int64 __fastcall strlist__next ( __int64 @@a1@@ ) { __int64 @@result@@ ; __int64 @@v2@@ ; if ( ! @@a1@@ ) return Number L ; @@v2@@ = rb_next ( @@a1@@ ) ; if ( @@v2@@ ) @@result@@ = @@v2@@ ; else @@result@@ = Number L ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}]} {"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": "parse_probe_trace_command", "code": "__int64 __fastcall parse_probe_trace_command ( const char * @@a1@@ , __int64 @@a2@@ ) { __int64 result ; char * v3 ; char * v4 ; char * * v5 ; __int64 v6 ; char @@v7@@ ; int @@v8@@ ; unsigned int @@v9@@ ; int @@i@@ ; char * @@s@@ ; __int64 @@v12@@ ; const char * * @@v13@@ ; unsigned __int64 @@v14@@ ; @@v14@@ = __readfsqword ( Number ) ; @@v12@@ = @@a2@@ + Number ; eprintf ( Number L , String , @@a1@@ ) ; @@v13@@ = ( const char * * ) argv_split ( @@a1@@ , & @@v8@@ ) ; if ( @@v13@@ ) { if ( @@v8@@ > Number ) { @@v9@@ = sscanf ( * @@v13@@ , String , & @@v7@@ , @@a2@@ + Number , @@a2@@ ) ; if ( @@v9@@ == Number ) { eprintf ( Number L , String , * ( const char * * ) ( @@a2@@ + Number ) , * ( const char * * ) @@a2@@ , ( unsigned int ) @@v7@@ ) ; * ( _BYTE * ) ( @@v12@@ + Number ) = @@v7@@ == Number ; @@s@@ = strchr ( @@v13@@ [ Number ] , Number ) ; if ( @@s@@ ) { v3 = strndup ( @@v13@@ [ Number ] , @@s@@ - @@v13@@ [ Number ] ) ; * ( _QWORD * ) ( @@v12@@ + Number ) = v3 ; ++ @@s@@ ; } else { @@s@@ = ( char * ) @@v13@@ [ Number ] ; } @@v9@@ = sscanf ( @@s@@ , String , @@v12@@ , @@v12@@ + Number ) ; if ( @@v9@@ == Number ) * ( _QWORD * ) ( @@v12@@ + Number ) = Number L ; * ( _DWORD * ) ( @@a2@@ + Number ) = @@v8@@ - Number ; * ( _QWORD * ) ( @@a2@@ + Number ) = zalloc ( Number L * * ( int * ) ( @@a2@@ + Number ) ) ; if ( * ( _QWORD * ) ( @@a2@@ + Number ) ) { for ( @@i@@ = Number ; @@i@@ < * ( _DWORD * ) ( @@a2@@ + Number ) ; ++ @@i@@ ) { @@s@@ = strchr ( @@v13@@ [ @@i@@ + Number ] , Number ) ; if ( @@s@@ ) { v4 = @@s@@ ++ ; * v4 = Number ; } else { @@s@@ = ( char * ) @@v13@@ [ @@i@@ + Number ] ; } v5 = ( char * * ) ( * ( _QWORD * ) ( @@a2@@ + Number ) + Number L * @@i@@ ) ; * v5 = strdup ( @@v13@@ [ @@i@@ + Number ] ) ; v6 = * ( _QWORD * ) ( @@a2@@ + Number ) + Number L * @@i@@ ; * ( _QWORD * ) ( v6 + Number ) = strdup ( @@s@@ ) ; if ( ! * ( _QWORD * ) ( Number L * @@i@@ + * ( _QWORD * ) ( @@a2@@ + Number ) ) || ! * ( _QWORD * ) ( Number L * @@i@@ + * ( _QWORD * ) ( @@a2@@ + Number ) + Number ) ) { @@v9@@ = Number ; goto LABEL_24 ; } } @@v9@@ = Number ; } else { @@v9@@ = Number ; } } else { eprintf ( Number L , String , * @@v13@@ ) ; @@v9@@ = Number ; } } else { eprintf ( Number L , String ) ; @@v9@@ = Number ; } LABEL_24 : argv_free ( @@v13@@ ) ; result = @@v9@@ ; } else { eprintf ( Number L , String ) ; result = Number L ; } return result ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "const char"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v14", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s24"}, {"n": "v13", "t": {"T": 3, "t": "const char *"}, "location": "s32"}, {"n": "v12", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "s", "t": {"T": 3, "t": "char"}, "location": "s48"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s52"}, {"n": "v9", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s56"}, {"n": "v8", "t": {"T": 1, "n": "int", "s": 4}, "location": "s60"}, {"n": "v7", "t": {"T": 1, "n": "char", "s": 1}, "location": "s61"}]} {"name": "clear_probe_trace_event", "code": "unsigned __int64 __fastcall clear_probe_trace_event ( __int64 @@a1@@ ) { __int64 @@v2@@ ; _QWORD * @@i@@ ; _QWORD * @@v4@@ ; unsigned __int64 @@v5@@ ; @@v5@@ = __readfsqword ( Number ) ; if ( * ( _QWORD * ) @@a1@@ ) free ( * ( void * * ) @@a1@@ ) ; if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) free ( * ( void * * ) ( @@a1@@ + Number ) ) ; if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) free ( * ( void * * ) ( @@a1@@ + Number ) ) ; if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) free ( * ( void * * ) ( @@a1@@ + Number ) ) ; LODWORD ( @@v2@@ ) = Number ; while ( ( int ) @@v2@@ < * ( _DWORD * ) ( @@a1@@ + Number ) ) { if ( * ( _QWORD * ) ( Number L * ( int ) @@v2@@ + * ( _QWORD * ) ( @@a1@@ + Number ) ) ) free ( * ( void * * ) ( Number L * ( int ) @@v2@@ + * ( _QWORD * ) ( @@a1@@ + Number ) ) ) ; if ( * ( _QWORD * ) ( Number L * ( int ) @@v2@@ + * ( _QWORD * ) ( @@a1@@ + Number ) + Number ) ) free ( * ( void * * ) ( Number L * ( int ) @@v2@@ + * ( _QWORD * ) ( @@a1@@ + Number ) + Number ) ) ; if ( * ( _QWORD * ) ( Number L * ( int ) @@v2@@ + * ( _QWORD * ) ( @@a1@@ + Number ) + Number ) ) free ( * ( void * * ) ( Number L * ( int ) @@v2@@ + * ( _QWORD * ) ( @@a1@@ + Number ) + Number ) ) ; for ( @@i@@ = * ( _QWORD * * ) ( Number L * ( int ) @@v2@@ + * ( _QWORD * ) ( @@a1@@ + Number ) + Number ) ; @@i@@ ; @@i@@ = @@v4@@ ) { @@v4@@ = ( _QWORD * ) * @@i@@ ; free ( @@i@@ ) ; } @@v2@@ = ( unsigned int ) ( @@v2@@ + Number ) ; } if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) free ( * ( void * * ) ( @@a1@@ + Number ) ) ; memset ( ( void * ) @@a1@@ , Number , Number ) ; return __readfsqword ( Number ) ^ @@v5@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v4", "t": {"T": 3, "t": "_QWORD"}, "location": "s16"}, {"n": "i", "t": {"T": 3, "t": "_QWORD"}, "location": "s24"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s28"}, {"n": "v5", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "get_probe_trace_command_rawlist", "code": "__int64 __fastcall get_probe_trace_command_rawlist ( int @@a1@@ ) { int v1 ; int i ; char * v3 ; int @@v5@@ ; int @@v6@@ ; __int64 @@v7@@ ; FILE * @@stream@@ ; const char * @@v9@@ ; char @@s@@ [ Number ] ; unsigned __int64 @@v11@@ ; @@v11@@ = __readfsqword ( Number ) ; @@v7@@ = strlist__new ( Number L , Number L ) ; v1 = dup ( @@a1@@ ) ; @@stream@@ = fdopen ( v1 , String ) ; for ( i = feof ( @@stream@@ ) ; ! i ; i = feof ( @@stream@@ ) ) { @@v9@@ = fgets ( @@s@@ , Number , @@stream@@ ) ; if ( ! @@v9@@ ) break ; @@v5@@ = strlen ( @@v9@@ ) - Number ; if ( @@v9@@ [ @@v5@@ ] == Number ) @@v9@@ [ @@v5@@ ] = Number ; @@v6@@ = strlist__add ( @@v7@@ , @@s@@ ) ; if ( @@v6@@ < Number ) { v3 = strerror ( - @@v6@@ ) ; eprintf ( Number L , String , v3 ) ; strlist__delete ( @@v7@@ ) ; return Number L ; } } fclose ( @@stream@@ ) ; return @@v7@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "s", "t": {"T": 2, "n": 264, "s": 1, "t": "char"}, "location": "s272"}, {"n": "v9", "t": {"T": 3, "t": "const char"}, "location": "s280"}, {"n": "stream", "t": {"T": 3, "t": "FILE"}, "location": "s288"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s296"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s300"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "s304"}, {"n": "v11", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"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"}]} {"name": "del_perf_probe_events", "code": "__int64 __fastcall del_perf_probe_events ( __int64 @@a1@@ ) { __int64 @@v2@@ ; __int64 @@v3@@ ; int @@v4@@ ; int @@fd@@ ; const char * @@v6@@ ; __int64 @@v7@@ ; __int64 @@i@@ ; __int64 @@v9@@ ; char * @@s@@ ; char * @@v11@@ ; @@v4@@ = Number ; @@fd@@ = open_kprobe_events ( Number ) ; if ( @@fd@@ < Number ) return ( unsigned int ) @@fd@@ ; @@v9@@ = get_probe_trace_event_names ( @@fd@@ , Number ) ; if ( ! @@v9@@ ) return Number L ; for ( @@i@@ = strlist__first ( @@a1@@ ) ; @@i@@ ; @@i@@ = strlist__next ( @@i@@ ) ) { @@s@@ = strdup ( * ( const char * * ) ( @@i@@ + Number ) ) ; if ( ! @@s@@ ) { @@v4@@ = Number ; break ; } eprintf ( Number L , String , @@s@@ ) ; @@v11@@ = strchr ( @@s@@ , Number ) ; if ( @@v11@@ ) { @@v6@@ = @@s@@ ; * @@v11@@ = Number ; @@v7@@ = ( __int64 ) ( @@v11@@ + Number ) ; eprintf ( Number L , String , @@s@@ , @@v11@@ + Number ) ; } else { @@v6@@ = String ; @@v7@@ = ( __int64 ) @@s@@ ; eprintf ( Number L , String , String , @@s@@ ) ; } @@v4@@ = del_trace_probe_event ( @@fd@@ , ( __int64 ) @@v6@@ , @@v7@@ , @@v9@@ , @@v2@@ , @@v3@@ ) ; free ( @@s@@ ) ; if ( @@v4@@ < Number ) break ; } strlist__delete ( @@v9@@ ) ; close ( @@fd@@ ) ; return ( unsigned int ) @@v4@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r72"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r80"}, {"n": "v11", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "s", "t": {"T": 3, "t": "char"}, "location": "s24"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "i", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s48"}, {"n": "v6", "t": {"T": 3, "t": "const char"}, "location": "s56"}, {"n": "fd", "t": {"T": 1, "n": "int", "s": 4}, "location": "s60"}, {"n": "v4", "t": {"T": 1, "n": "int", "s": 4}, "location": "s64"}]}