{"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": "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": "show_perf_probe_events", "code": "__int64 show_perf_probe_events ( ) { int @@v1@@ ; int @@fd@@ ; __int64 @@i@@ ; __int64 @@v4@@ ; char @@s@@ [ Number ] ; char @@v6@@ [ Number ] ; unsigned __int64 @@v7@@ ; @@v7@@ = __readfsqword ( Number ) ; setup_pager ( ) ; @@v1@@ = init_vmlinux ( ) ; if ( @@v1@@ < Number ) return ( unsigned int ) @@v1@@ ; memset ( @@s@@ , Number , sizeof ( @@s@@ ) ) ; memset ( @@v6@@ , Number , sizeof ( @@v6@@ ) ) ; @@fd@@ = open_kprobe_events ( Number ) ; if ( @@fd@@ < Number ) return ( unsigned int ) @@fd@@ ; @@v4@@ = get_probe_trace_command_rawlist ( @@fd@@ ) ; close ( @@fd@@ ) ; if ( ! @@v4@@ ) return Number L ; for ( @@i@@ = strlist__first ( @@v4@@ ) ; @@i@@ ; @@i@@ = strlist__next ( @@i@@ ) ) { @@v1@@ = parse_probe_trace_command ( * ( const char * * ) ( @@i@@ + Number ) , ( __int64 ) @@s@@ ) ; if ( @@v1@@ >= Number ) { @@v1@@ = convert_to_perf_probe_event ( ( __int64 ) @@s@@ , ( __int64 ) @@v6@@ ) ; if ( @@v1@@ >= Number ) @@v1@@ = show_perf_probe_event ( ( __int64 ) @@v6@@ ) ; } clear_perf_probe_event ( ( __int64 ) @@v6@@ ) ; clear_probe_trace_event ( ( __int64 ) @@s@@ ) ; if ( @@v1@@ < Number ) break ; } strlist__delete ( @@v4@@ ) ; return ( unsigned int ) @@v1@@ ; }", "source": [{"n": "s", "t": {"T": 2, "n": 64, "s": 1, "t": "char"}, "location": "s144"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s152"}, {"n": "i", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s160"}, {"n": "fd", "t": {"T": 1, "n": "int", "s": 4}, "location": "s164"}, {"n": "v1", "t": {"T": 1, "n": "int", "s": 4}, "location": "s168"}, {"n": "v7", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}, {"n": "v6", "t": {"T": 2, "n": 72, "s": 1, "t": "char"}, "location": "s80"}]} {"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"}]}