{"name": "show_perf_probe_event", "code": "__int64 __fastcall show_perf_probe_event ( __int64 @@a1@@ ) { __int64 v1 ; __int64 @@v3@@ ; __int64 v4 ; int @@i@@ ; int @@v6@@ ; char * @@ptr@@ ; char @@v8@@ [ Number ] ; unsigned __int64 @@v9@@ ; @@v9@@ = __readfsqword ( Number ) ; @@ptr@@ = synthesize_perf_probe_point ( @@a1@@ + Number ) ; if ( ! @@ptr@@ ) return Number L ; @@v6@@ = e_snprintf ( @@v8@@ , Number , String , * ( _QWORD * ) ( @@a1@@ + Number ) , * ( _QWORD * ) @@a1@@ , v1 ) ; if ( @@v6@@ < Number ) return ( unsigned int ) @@v6@@ ; printf ( String , @@v8@@ , @@ptr@@ ) ; if ( * ( int * ) ( @@a1@@ + Number ) > Number ) { printf ( String ) ; for ( @@i@@ = Number ; @@i@@ < * ( _DWORD * ) ( @@a1@@ + Number ) ; ++ @@i@@ ) { @@v6@@ = synthesize_perf_probe_arg ( ( __int64 * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L * @@i@@ ) , @@v8@@ , Number , * ( _QWORD * ) ( @@a1@@ + Number ) + Number L * @@i@@ , @@v3@@ , v4 ) ; if ( @@v6@@ < Number ) break ; printf ( String , @@v8@@ ) ; } } puts ( String ) ; free ( @@ptr@@ ) ; return ( unsigned int ) @@v6@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r72"}, {"n": "v8", "t": {"T": 2, "n": 136, "s": 1, "t": "char"}, "location": "s144"}, {"n": "ptr", "t": {"T": 3, "t": "char"}, "location": "s152"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s156"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s160"}, {"n": "v9", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}
{"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_perf_probe_arg", "code": "signed __int64 __fastcall synthesize_perf_probe_arg ( __int64 * @@a1@@ , char * @@a2@@ , size_t @@a3@@ , __int64 @@a4@@ , __int64 @@a5@@ , __int64 @@a6@@ ) { __int64 v6 ; __int64 v7 ; __int64 v8 ; const char * v9 ; char * v11 ; size_t @@v13@@ ; int @@v14@@ ; __int64 @@v15@@ ; char * @@v16@@ ; @@v15@@ = @@a1@@ [ Number ] ; if ( * @@a1@@ && @@a1@@ [ Number ] ) { @@v14@@ = e_snprintf ( @@a2@@ , @@a3@@ , String , * @@a1@@ , @@a1@@ [ Number ] , @@a6@@ ) ; } else { if ( * @@a1@@ ) v8 = * @@a1@@ ; else v8 = @@a1@@ [ Number ] ; @@v14@@ = e_snprintf ( @@a2@@ , @@a3@@ , String , v8 , @@a5@@ , @@a6@@ ) ; } if ( @@v14@@ > Number ) { @@v16@@ = & @@a2@@ [ @@v14@@ ] ; @@v13@@ = @@a3@@ - @@v14@@ ; while ( @@v15@@ ) { if ( * * ( _BYTE * * ) ( @@v15@@ + Number ) == Number ) { @@v14@@ = e_snprintf ( @@v16@@ , @@v13@@ , String , * ( _QWORD * ) ( @@v15@@ + Number ) , v6 , v7 ) ; } else { if ( * ( _BYTE * ) ( @@v15@@ + Number ) ) v9 = String ; else v9 = String ; @@v14@@ = e_snprintf ( @@v16@@ , @@v13@@ , String , ( __int64 ) v9 , * ( _QWORD * ) ( @@v15@@ + Number ) , v7 ) ; } if ( @@v14@@ <= Number ) goto LABEL_23 ; @@v16@@ += @@v14@@ ; @@v13@@ -= @@v14@@ ; @@v15@@ = * ( _QWORD * ) @@v15@@ ; } if ( ! @@a1@@ [ Number ] ) return @@v16@@ - @@a2@@ ; @@v14@@ = e_snprintf ( @@v16@@ , @@v13@@ , String , @@a1@@ [ Number ] , v6 , v7 ) ; if ( @@v14@@ > Number ) { @@v16@@ += @@v14@@ ; return @@v16@@ - @@a2@@ ; } } LABEL_23 : v11 = strerror ( - @@v14@@ ) ; eprintf ( Number L , String , v11 ) ; return ( unsigned int ) @@v14@@ ; }", "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": "v16", "t": {"T": 3, "t": "char"}, "location": "s16"}, {"n": "v15", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v14", "t": {"T": 1, "n": "int", "s": 4}, "location": "s28"}, {"n": "v13", "t": {"T": 1, "n": "size_t", "s": 8}, "location": "s56"}]} {"name": "synthesize_perf_probe_point", "code": "char * __fastcall synthesize_perf_probe_point ( __int64 @@a1@@ ) { __int64 v1 ; __int64 v2 ; __int64 v3 ; __int64 v4 ; __int64 v5 ; unsigned int v6 ; char * v8 ; int @@v9@@ ; int @@v10@@ ; char * s ; char * sa ; char * @@ptr@@ ; __int64 @@v14@@ [ Number ] ; __int64 @@v15@@ [ Number ] ; __int64 @@v16@@ [ Number ] ; @@v16@@ [ Number ] = __readfsqword ( Number ) ; @@v14@@ [ Number ] = Number L ; @@v14@@ [ Number ] = Number L ; @@v14@@ [ Number ] = Number L ; @@v14@@ [ Number ] = Number L ; @@v15@@ [ Number ] = Number L ; @@v15@@ [ Number ] = Number L ; @@v15@@ [ Number ] = Number L ; @@v15@@ [ Number ] = Number L ; @@v16@@ [ Number ] = Number L ; @@v16@@ [ Number ] = Number L ; @@v16@@ [ Number ] = Number L ; @@v16@@ [ Number ] = Number L ; @@ptr@@ = ( char * ) zalloc ( Number ) ; if ( @@ptr@@ ) { if ( ! * ( _QWORD * ) ( @@a1@@ + Number ) || ( @@v9@@ = e_snprintf ( ( char * ) @@v14@@ , Number , String , * ( _QWORD * ) ( @@a1@@ + Number ) , v1 , v2 ) , @@v9@@ > Number ) ) { if ( ! * ( _DWORD * ) ( @@a1@@ + Number ) || ( @@v9@@ = e_snprintf ( ( char * ) @@v15@@ , Number , String , * ( unsigned int * ) ( @@a1@@ + Number ) , v1 , v2 ) , @@v9@@ > Number ) ) { if ( ! * ( _QWORD * ) @@a1@@ ) goto LABEL_14 ; s = * ( char * * ) @@a1@@ ; @@v10@@ = strlen ( * ( const char * * ) @@a1@@ ) ; if ( @@v10@@ > Number ) { sa = strchr ( ( const char * ) ( @@v10@@ - Number L + * ( _QWORD * ) @@a1@@ ) , Number ) ; if ( sa ) v5 = ( __int64 ) ( sa + Number ) ; else v5 = @@v10@@ - Number L + * ( _QWORD * ) @@a1@@ ; s = ( char * ) v5 ; } @@v9@@ = e_snprintf ( ( char * ) @@v16@@ , Number , String , ( __int64 ) s , v3 , v4 ) ; if ( @@v9@@ > Number ) { LABEL_14 : if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) { v6 = * ( _BYTE * ) ( @@a1@@ + Number ) ? ( unsigned int ) e_snprintf ( @@ptr@@ , Number , String , * ( _QWORD * ) ( @@a1@@ + Number ) , ( __int64 ) @@v14@@ , ( __int64 ) String , @@v15@@ , @@v16@@ ) : ( unsigned int ) e_snprintf ( @@ptr@@ , Number , String , * ( _QWORD * ) ( @@a1@@ + Number ) , ( __int64 ) @@v14@@ , ( __int64 ) & unk_5925 , @@v15@@ , @@v16@@ ) ; @@v9@@ = v6 ; } else { @@v9@@ = e_snprintf ( @@ptr@@ , Number , String , ( __int64 ) @@v16@@ , ( __int64 ) @@v15@@ , v2 ) ; } if ( @@v9@@ > Number ) return @@ptr@@ ; } } } } else { @@v9@@ = Number ; } v8 = strerror ( - @@v9@@ ) ; eprintf ( Number L , String , v8 ) ; if ( @@ptr@@ ) free ( @@ptr@@ ) ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v14", "t": {"T": 2, "n": 4, "s": 8, "t": "__int64"}, "location": "s112"}, {"n": "ptr", "t": {"T": 3, "t": "char"}, "location": "s120"}, {"n": "v10", "t": {"T": 1, "n": "int", "s": 4}, "location": "s132"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s136"}, {"n": "v16", "t": {"T": 2, "n": 6, "s": 8, "t": "__int64"}, "location": "s48"}, {"n": "v15", "t": {"T": 2, "n": 4, "s": 8, "t": "__int64"}, "location": "s80"}]} {"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": "__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"}]}