{"name": "ga_log", "code": "unsigned __int64 __fastcall ga_log ( __int64 @@a1@@ , int @@a2@@ , const char * @@a3@@ , __int64 @@a4@@ ) { const char * @@v7@@ ; __int64 @@v8@@ [ Number ] ; unsigned __int64 @@v9@@ ; @@v9@@ = __readfsqword ( Number ) ; @@v7@@ = ga_log_level_str ( @@a2@@ ) ; if ( ( unsigned __int8 ) ga_logging_enabled ( @@a4@@ ) == Number ) { if ( ( unsigned int ) g_strcmp0 ( @@a1@@ , String ) ) { if ( ( @@a2@@ & Number & * ( _DWORD * ) ( @@a4@@ + Number ) ) != Number ) { g_get_current_time ( @@v8@@ ) ; fprintf ( * ( FILE * * ) ( @@a4@@ + Number ) , String , @@v8@@ [ Number ] , @@v8@@ [ Number ] , @@v7@@ , @@a3@@ ) ; fflush ( * ( FILE * * ) ( @@a4@@ + Number ) ) ; } } else { syslog ( Number , String , @@v7@@ , @@a3@@ ) ; } } return __readfsqword ( Number ) ^ @@v9@@ ; }", "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": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v8", "t": {"T": 2, "n": 3, "s": 8, "t": "__int64"}, "location": "s32"}, {"n": "v7", "t": {"T": 3, "t": "const char"}, "location": "s40"}, {"n": "v9", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}
{"name": "ga_log_level_str", "code": "const char * __fastcall ga_log_level_str ( int @@a1@@ ) { signed int @@v1@@ ; @@v1@@ = @@a1@@ & Number ; if ( ( @@a1@@ & Number ) == Number ) return String ; if ( @@v1@@ <= Number ) { if ( @@v1@@ == Number ) return String ; if ( @@v1@@ <= Number ) { if ( @@v1@@ == Number ) return String ; if ( @@v1@@ <= Number ) { if ( @@v1@@ == Number ) return String ; if ( @@v1@@ <= Number ) { if ( @@v1@@ == Number ) return String ; if ( @@v1@@ == Number ) return String ; } } } } return String ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "v1", "t": {"T": 1, "n": "signed int", "s": 4}, "location": "r8"}]} {"name": "ga_logging_enabled", "code": "__int64 __fastcall ga_logging_enabled ( __int64 @@a1@@ ) { return * ( unsigned __int8 * ) ( @@a1@@ + Number ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}]} {"name": "run_agent", "code": "__int64 __fastcall run_agent ( __int64 @@a1@@ , __int64 @@a2@@ ) { int * v2 ; char * v3 ; __int64 result ; unsigned __int8 v5 ; const char * * v6 ; const char * * @@v7@@ ; FILE * @@v8@@ ; ga_state = @@a1@@ ; g_log_set_default_handler ( ga_log , @@a1@@ ) ; g_log_set_fatal_mask ( Number L , Number L ) ; ga_enable_logging ( @@a1@@ ) ; if ( ( unsigned __int8 ) ga_is_frozen ( @@a1@@ ) ) { if ( * ( _DWORD * ) ( @@a2@@ + Number ) ) { * ( _QWORD * ) ( @@a1@@ + Number ) = * ( _QWORD * ) ( @@a2@@ + Number ) ; become_daemon ( Number L ) ; } if ( * ( _QWORD * ) ( @@a2@@ + Number ) ) * ( _QWORD * ) ( @@a1@@ + Number ) = * ( _QWORD * ) ( @@a2@@ + Number ) ; ga_disable_logging ( @@a1@@ ) ; qmp_for_each_command ( ga_disable_non_whitelisted , Number L ) ; } else { if ( * ( _DWORD * ) ( @@a2@@ + Number ) ) become_daemon ( * ( const char * * ) ( @@a2@@ + Number ) ) ; if ( * ( _QWORD * ) ( @@a2@@ + Number ) ) { @@v8@@ = ga_open_logfile ( * ( const char * * ) ( @@a2@@ + Number ) ) ; if ( ! @@v8@@ ) { v2 = _errno_location ( ) ; v3 = strerror ( * v2 ) ; g_log ( Number L , Number L , String , v3 ) ; return Number L ; } * ( _QWORD * ) ( @@a1@@ + Number ) = @@v8@@ ; } } v5 = ga_is_frozen ( @@a1@@ ) ; if ( ( unsigned int ) read_persistent_state ( ( _QWORD * ) ( @@a1@@ + Number ) , * ( const char * * ) ( @@a1@@ + Number ) , v5 ) ) { * ( _QWORD * ) ( @@a2@@ + Number ) = ga_command_blacklist_init ( * ( _QWORD * ) ( @@a2@@ + Number ) ) ; if ( * ( _QWORD * ) ( @@a2@@ + Number ) ) { @@v7@@ = * ( const char * * * ) ( @@a2@@ + Number ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = @@v7@@ ; do { g_log ( Number L , Number L , String , * @@v7@@ ) ; qmp_disable_command ( * @@v7@@ ) ; if ( @@v7@@ ) v6 = ( const char * * ) @@v7@@ [ Number ] ; else v6 = Number L ; @@v7@@ = v6 ; } while ( v6 ) ; } * ( _QWORD * ) ( @@a1@@ + Number ) = ga_command_state_new ( ) ; ga_command_state_init ( @@a1@@ , * ( _QWORD * ) ( @@a1@@ + Number ) ) ; ga_command_state_init_all ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; json_message_parser_init ( @@a1@@ , process_event ) ; ga_state = @@a1@@ ; if ( ( unsigned int ) register_signal_handlers ( ) ) { * ( _QWORD * ) ( @@a1@@ + Number ) = g_main_loop_new ( Number L , Number L ) ; if ( ( unsigned int ) channel_init ( ga_state , * ( const char * * ) ( @@a2@@ + Number ) , * ( _QWORD * ) @@a2@@ ) ) { g_main_loop_run ( * ( _QWORD * ) ( ga_state + Number ) ) ; result = Number L ; } else { g_log ( Number L , Number L , String ) ; result = Number L ; } } else { g_log ( Number L , Number L , String ) ; result = Number L ; } } else { g_log ( Number L , Number L , String ) ; result = Number L ; } return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v7", "t": {"T": 3, "t": "const char *"}, "location": "s16"}, {"n": "v8", "t": {"T": 3, "t": "FILE"}, "location": "s8"}]}