{"name": "try_to_find_probe_trace_events", "code": "__int64 __fastcall try_to_find_probe_trace_events ( __int64 @@a1@@ , __int64 * @@a2@@ , unsigned int @@a3@@ , const char * @@a4@@ ) { __int64 result ; const char * v5 ; unsigned __int8 @@v8@@ ; int @@v9@@ ; unsigned int @@v10@@ ; __int64 @@v11@@ ; @@v8@@ = perf_probe_event_need_dwarf ( @@a1@@ ) ; @@v11@@ = open_debuginfo ( @@a4@@ ) ; @@v9@@ = Number ; if ( @@v11@@ ) { @@v10@@ = debuginfo__find_trace_events ( @@v11@@ , @@a1@@ , @@a2@@ , @@a3@@ ) ; debuginfo__delete ( @@v11@@ ) ; if ( ( int ) @@v10@@ <= Number ) { if ( @@v10@@ ) { eprintf ( Number L , String , @@v10@@ ) ; if ( @@v10@@ == Number && ( eprintf ( Number L , String ) , @@v8@@ ^ Number ) ) { eprintf ( Number L , String ) ; result = Number L ; } else { result = @@v10@@ ; } } else { v5 = ( const char * ) synthesize_perf_probe_point ( @@a1@@ + Number ) ; eprintf ( Number L , String , v5 ) ; result = Number L ; } } else { eprintf ( Number L , String , @@v10@@ ) ; if ( @@a4@@ ) @@v9@@ = add_module_to_probe_trace_events ( * @@a2@@ , @@v10@@ , @@a4@@ ) ; if ( @@v9@@ >= Number ) result = @@v10@@ ; else result = ( unsigned int ) @@v9@@ ; } } else if ( @@v8@@ ) { eprintf ( Number L , String ) ; result = Number L ; } else { eprintf ( Number L , String ) ; result = Number L ; } return result ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 3, "t": "const char"}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "__int64"}, "location": "r64"}, {"n": "v11", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v10", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s20"}, {"n": "v9", "t": {"T": 1, "n": "int", "s": 4}, "location": "s24"}, {"n": "v8", "t": {"T": 1, "n": "unsigned __int8", "s": 1}, "location": "s25"}]}
{"name": "open_debuginfo", "code": "__int64 __fastcall open_debuginfo ( const char * @@a1@@ ) { const char * @@v2@@ ; __int64 @@v3@@ ; if ( @@a1@@ && strchr ( @@a1@@ , Number ) ) return debuginfo__new ( @@a1@@ ) ; @@v3@@ = kernel_get_module_path ( @@a1@@ ) ; if ( @@v3@@ ) return debuginfo__new ( @@v3@@ ) ; @@v2@@ = @@a1@@ ; if ( ! @@a1@@ ) @@v2@@ = String ; eprintf ( Number L , String , @@v2@@ ) ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "const char"}, "location": "r56"}, {"n": "v2", "t": {"T": 3, "t": "const char"}, "location": "r8"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}]} {"name": "add_module_to_probe_trace_events", "code": "__int64 __fastcall add_module_to_probe_trace_events ( __int64 @@a1@@ , int @@a2@@ , const char * @@a3@@ ) { const char * @@s@@ ; int @@i@@ ; unsigned int @@v6@@ ; char * ptr ; char * ptra ; @@s@@ = @@a3@@ ; @@v6@@ = Number ; if ( ! @@a3@@ ) return Number L ; ptr = strrchr ( @@a3@@ , Number ) ; if ( ptr ) { @@s@@ = strdup ( ptr + Number ) ; if ( ! @@s@@ ) return Number L ; ptra = strchr ( @@s@@ , Number ) ; if ( ptra ) * ptra = Number ; ptr = ( char * ) @@s@@ ; } for ( @@i@@ = Number ; @@i@@ < @@a2@@ ; ++ @@i@@ ) { * ( _QWORD * ) ( ( ( __int64 ) @@i@@ << Number ) + @@a1@@ + Number ) = strdup ( @@s@@ ) ; if ( ! * ( _QWORD * ) ( ( ( __int64 ) @@i@@ << Number ) + @@a1@@ + Number ) ) { @@v6@@ = Number ; break ; } } if ( ptr ) free ( ptr ) ; return @@v6@@ ; }", "source": [{"n": "a3", "t": {"T": 3, "t": "const char"}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v6", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s36"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s40"}, {"n": "s", "t": {"T": 3, "t": "const char"}, "location": "s72"}]} {"name": "perf_probe_event_need_dwarf", "code": "__int64 __fastcall perf_probe_event_need_dwarf ( __int64 @@a1@@ ) { int @@i@@ ; if ( * ( _QWORD * ) ( @@a1@@ + Number ) || * ( _DWORD * ) ( @@a1@@ + Number ) || * ( _QWORD * ) ( @@a1@@ + Number ) ) return Number L ; for ( @@i@@ = Number ; @@i@@ < * ( _DWORD * ) ( @@a1@@ + Number ) ; ++ @@i@@ ) { if ( is_c_varname ( * ( _BYTE * * ) ( Number L * @@i@@ + * ( _QWORD * ) ( @@a1@@ + Number ) + Number ) ) ) return Number L ; } return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s12"}]} {"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": "convert_to_probe_trace_events", "code": "__int64 __fastcall convert_to_probe_trace_events ( __int64 @@a1@@ , __int64 * @@a2@@ , unsigned int @@a3@@ , const char * @@a4@@ ) { char * * v5 ; __int64 v6 ; __int64 v7 ; unsigned int v9 ; unsigned int v10 ; int @@i@@ ; _QWORD * @@ptr@@ ; __int64 @@v13@@ ; v9 = try_to_find_probe_trace_events ( @@a1@@ , @@a2@@ , @@a3@@ , @@a4@@ ) ; if ( v9 ) return v9 ; * @@a2@@ = ( __int64 ) zalloc ( Number ) ; @@ptr@@ = ( _QWORD * ) * @@a2@@ ; if ( ! * @@a2@@ ) return Number L ; @@ptr@@ [ Number ] = strdup ( * ( const char * * ) ( @@a1@@ + Number ) ) ; if ( @@ptr@@ [ Number ] ) { if ( ! @@a4@@ || ( @@ptr@@ [ Number ] = strdup ( @@a4@@ ) ) != Number L ) { @@ptr@@ [ Number ] = * ( _QWORD * ) ( @@a1@@ + Number ) ; * ( ( _BYTE * ) @@ptr@@ + Number ) = * ( _BYTE * ) ( @@a1@@ + Number ) ; * ( ( _DWORD * ) @@ptr@@ + Number ) = * ( _DWORD * ) ( @@a1@@ + Number ) ; if ( * ( ( _DWORD * ) @@ptr@@ + Number ) ) { @@ptr@@ [ Number ] = zalloc ( Number L * * ( ( int * ) @@ptr@@ + Number ) ) ; if ( ! @@ptr@@ [ Number ] ) { v10 = Number ; goto LABEL_29 ; } for ( @@i@@ = Number ; @@i@@ < * ( ( _DWORD * ) @@ptr@@ + Number ) ; ++ @@i@@ ) { if ( * ( _QWORD * ) ( Number L * @@i@@ + * ( _QWORD * ) ( @@a1@@ + Number ) ) ) { v5 = ( char * * ) ( @@ptr@@ [ Number ] + Number L * @@i@@ ) ; * v5 = strdup ( * ( const char * * ) ( Number L * @@i@@ + * ( _QWORD * ) ( @@a1@@ + Number ) ) ) ; if ( ! * ( _QWORD * ) ( Number L * @@i@@ + @@ptr@@ [ Number ] ) ) { v10 = Number ; goto LABEL_29 ; } } v6 = @@ptr@@ [ Number ] + Number L * @@i@@ ; * ( _QWORD * ) ( v6 + Number ) = strdup ( * ( const char * * ) ( Number L * @@i@@ + * ( _QWORD * ) ( @@a1@@ + Number ) + Number ) ) ; if ( ! * ( _QWORD * ) ( Number L * @@i@@ + @@ptr@@ [ Number ] + Number ) ) { v10 = Number ; goto LABEL_29 ; } if ( * ( _QWORD * ) ( Number L * @@i@@ + * ( _QWORD * ) ( @@a1@@ + Number ) + Number ) ) { v7 = @@ptr@@ [ Number ] + Number L * @@i@@ ; * ( _QWORD * ) ( v7 + Number ) = strdup ( * ( const char * * ) ( Number L * @@i@@ + * ( _QWORD * ) ( @@a1@@ + Number ) + Number ) ) ; if ( ! * ( _QWORD * ) ( Number L * @@i@@ + @@ptr@@ [ Number ] + Number ) ) { v10 = Number ; goto LABEL_29 ; } } } } @@v13@@ = _find_kernel_function_by_name ( @@ptr@@ [ Number ] , Number L ) ; if ( @@v13@@ ) { if ( @@ptr@@ [ Number ] <= * ( _QWORD * ) ( @@v13@@ + Number ) - * ( _QWORD * ) ( @@v13@@ + Number ) ) return Number L ; eprintf ( Number L , String , ( const char * ) @@ptr@@ [ Number ] ) ; v10 = Number ; } else { eprintf ( Number L , String , ( const char * ) @@ptr@@ [ Number ] ) ; v10 = Number ; } } else { v10 = Number ; } } else { v10 = Number ; } LABEL_29 : clear_probe_trace_event ( ( __int64 ) @@ptr@@ ) ; free ( @@ptr@@ ) ; * @@a2@@ = Number L ; return v10 ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 3, "t": "const char"}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "__int64"}, "location": "r64"}, {"n": "v13", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "ptr", "t": {"T": 3, "t": "_QWORD"}, "location": "s40"}, {"n": "i", "t": {"T": 1, "n": "int", "s": 4}, "location": "s44"}]}