{"name": "read_persistent_state", "code": "__int64 __fastcall read_persistent_state ( _QWORD * @@a1@@ , const char * @@a2@@ , int @@a3@@ ) { int * v3 ; char * v4 ; unsigned int @@v7@@ ; __int64 @@v8@@ ; __int64 @@v9@@ ; struct stat64 @@v10@@ ; unsigned __int64 @@v11@@ ; @@v11@@ = __readfsqword ( Number ) ; @@v9@@ = Number L ; @@v8@@ = Number L ; @@v7@@ = Number ; if ( ! @@a1@@ ) g_assertion_message_expr ( Number L , String , Number L , String , String ) ; if ( stat64 ( @@a2@@ , & @@v10@@ ) == Number ) { if ( * _errno_location ( ) == Number ) { set_persistent_state_defaults ( @@a1@@ ) ; if ( @@a3@@ || ( unsigned int ) write_persistent_state ( @@a1@@ , @@a2@@ ) ) { @@v7@@ = Number ; } else { g_log ( Number L , Number L , String , @@a2@@ ) ; @@v7@@ = Number ; } } else { v3 = _errno_location ( ) ; v4 = strerror ( * v3 ) ; g_log ( Number L , Number L , String , @@a2@@ , v4 ) ; @@v7@@ = Number ; } } else { @@v9@@ = g_key_file_new ( ) ; g_key_file_load_from_file ( @@v9@@ , @@a2@@ , Number L , & @@v8@@ ) ; if ( @@v8@@ ) { g_log ( Number L , Number L , String , @@a2@@ , * ( const char * * ) ( @@v8@@ + Number ) ) ; @@v7@@ = Number ; } else { persistent_state_from_keyfile ( @@a1@@ , @@v9@@ ) ; } } if ( @@v9@@ ) g_key_file_free ( @@v9@@ ) ; if ( @@v8@@ ) g_error_free ( @@v8@@ ) ; return @@v7@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "_QWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "const char"}, "location": "r64"}, {"n": "v10", "t": {"T": 6, "n": "struct stat64", "l": [{"T": 4, "n": "st_dev", "t": "__dev_t", "s": 8}, {"T": 4, "n": "st_ino", "t": "__ino64_t", "s": 8}, {"T": 4, "n": "st_nlink", "t": "__nlink_t", "s": 8}, {"T": 4, "n": "st_mode", "t": "__mode_t", "s": 4}, {"T": 4, "n": "st_uid", "t": "__uid_t", "s": 4}, {"T": 4, "n": "st_gid", "t": "__gid_t", "s": 4}, {"T": 4, "n": "__pad0", "t": "int", "s": 4}, {"T": 4, "n": "st_rdev", "t": "__dev_t", "s": 8}, {"T": 4, "n": "st_size", "t": "__off_t", "s": 8}, {"T": 4, "n": "st_blksize", "t": "__blksize_t", "s": 8}, {"T": 4, "n": "st_blocks", "t": "__blkcnt64_t", "s": 8}, {"T": 4, "n": "st_atim", "t": "timespec", "s": 16}, {"T": 4, "n": "st_mtim", "t": "timespec", "s": 16}, {"T": 4, "n": "st_ctim", "t": "timespec", "s": 16}, {"T": 4, "n": "__unused", "t": "__syscall_slong_t[3]", "s": 24}]}, "location": "s160"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s168"}, {"n": "v8", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s176"}, {"n": "v7", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s180"}, {"n": "v11", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}
{"name": "set_persistent_state_defaults", "code": "_QWORD * __fastcall set_persistent_state_defaults ( _QWORD * @@a1@@ ) { _QWORD * @@result@@ ; if ( ! @@a1@@ ) g_assertion_message_expr ( Number L , String , Number L , String , String ) ; @@result@@ = @@a1@@ ; * @@a1@@ = Number L ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_QWORD"}, "location": "r56"}, {"n": "result", "t": {"T": 3, "t": "_QWORD"}, "location": "r8"}]} {"name": "persistent_state_from_keyfile", "code": "__int64 __fastcall persistent_state_from_keyfile ( _QWORD * @@a1@@ , __int64 @@a2@@ ) { __int64 @@result@@ ; __int64 @@v3@@ ; if ( ! @@a1@@ ) g_assertion_message_expr ( Number L , String , Number L , String , String ) ; if ( ! @@a2@@ ) g_assertion_message_expr ( Number L , String , Number L , String , String ) ; set_persistent_state_defaults ( @@a1@@ ) ; @@result@@ = g_key_file_has_key ( @@a2@@ , String , String , Number L ) ; if ( ( _DWORD ) @@result@@ ) { @@v3@@ = ( int ) g_key_file_get_integer ( @@a2@@ , String , String , Number L ) ; @@result@@ = ( __int64 ) @@a1@@ ; * @@a1@@ = @@v3@@ ; } return @@result@@ ; }", "source": [{"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r16"}, {"n": "a1", "t": {"T": 3, "t": "_QWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}]} {"name": "write_persistent_state", "code": "__int64 __fastcall write_persistent_state ( _QWORD * @@a1@@ , const char * @@a2@@ ) { unsigned int @@v3@@ ; __int64 @@v4@@ ; __int64 @@v5@@ ; __int64 @@v6@@ ; __int64 @@v7@@ ; unsigned __int64 @@v8@@ ; @@v8@@ = __readfsqword ( Number ) ; @@v6@@ = g_key_file_new ( ) ; @@v4@@ = Number L ; @@v3@@ = Number ; @@v7@@ = Number L ; if ( ! @@a1@@ ) g_assertion_message_expr ( Number L , String , Number L , String , String ) ; persistent_state_to_keyfile ( @@a1@@ , @@v6@@ ) ; @@v7@@ = g_key_file_to_data ( @@v6@@ , & @@v5@@ , & @@v4@@ ) ; if ( @@v4@@ ) { g_log ( Number L , Number L , String , * ( const char * * ) ( @@v4@@ + Number ) ) ; @@v3@@ = Number ; } else { g_file_set_contents ( @@a2@@ , @@v7@@ , @@v5@@ , & @@v4@@ ) ; if ( @@v4@@ ) { g_log ( Number L , Number L , String , @@a2@@ , * ( const char * * ) ( @@v4@@ + Number ) ) ; @@v3@@ = Number ; } } if ( @@v4@@ ) g_error_free ( @@v4@@ ) ; if ( @@v6@@ ) g_key_file_free ( @@v6@@ ) ; g_free ( @@v7@@ ) ; return @@v3@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_QWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "const char"}, "location": "r64"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v5", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s40"}, {"n": "v3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s44"}, {"n": "v8", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"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"}]}