{"name": "main", "code": "int __cdecl main ( int @@argc@@ , const char * * @@argv@@ , const char * * @@envp@@ ) { __int64 v3 ; int @@v5@@ ; __int64 @@v6@@ ; __int64 @@v7@@ ; @@v5@@ = Number ; @@v6@@ = g_malloc0_n ( Number L , Number L , @@envp@@ ) ; @@v7@@ = g_malloc0_n ( Number L , Number L , v3 ) ; * ( _DWORD * ) ( @@v7@@ + Number ) = Number ; module_call_init ( Number L ) ; init_dfl_pathnames ( ) ; config_load ( @@v7@@ ) ; config_parse ( @@v7@@ , @@argc@@ , ( char * const * ) @@argv@@ ) ; if ( ! * ( _QWORD * ) ( @@v7@@ + Number ) ) * ( _QWORD * ) ( @@v7@@ + Number ) = g_strdup ( qword_3018 ) ; if ( ! * ( _QWORD * ) ( @@v7@@ + Number ) ) * ( _QWORD * ) ( @@v7@@ + Number ) = g_strdup ( dfl_pathnames ) ; if ( ! * ( _QWORD * ) ( @@v7@@ + Number ) ) * ( _QWORD * ) ( @@v7@@ + Number ) = g_strdup ( String ) ; if ( ! * ( _QWORD * ) @@v7@@ ) { if ( ! strcmp ( * ( const char * * ) ( @@v7@@ + Number ) , String ) ) { * ( _QWORD * ) @@v7@@ = g_strdup ( String ) ; } else { if ( strcmp ( * ( const char * * ) ( @@v7@@ + Number ) , String ) ) { g_log ( Number L , Number L , String ) ; @@v5@@ = Number ; goto LABEL_16 ; } * ( _QWORD * ) @@v7@@ = g_strdup ( String ) ; } } * ( _DWORD * ) ( @@v6@@ + Number ) = * ( _DWORD * ) ( @@v7@@ + Number ) ; * ( _QWORD * ) ( @@v6@@ + Number ) = stderr ; * ( _QWORD * ) ( @@v6@@ + Number ) = * ( _QWORD * ) ( @@v7@@ + Number ) ; * ( _QWORD * ) ( @@v6@@ + Number ) = g_strdup_printf ( String , * ( const char * * ) ( @@v7@@ + Number ) ) ; * ( _QWORD * ) ( @@v6@@ + Number ) = g_strdup_printf ( String , * ( const char * * ) ( @@v7@@ + Number ) ) ; * ( _BYTE * ) ( @@v6@@ + Number ) = check_is_frozen ( @@v6@@ ) ; if ( * ( _DWORD * ) ( @@v7@@ + Number ) ) config_dump ( @@v7@@ ) ; else @@v5@@ = run_agent ( @@v6@@ , @@v7@@ ) ; LABEL_16 : if ( * ( _QWORD * ) ( @@v6@@ + Number ) ) { ga_command_state_cleanup_all ( * ( _QWORD * ) ( @@v6@@ + Number ) ) ; ga_command_state_free ( * ( _QWORD * ) ( @@v6@@ + Number ) ) ; json_message_parser_destroy ( @@v6@@ ) ; } if ( * ( _QWORD * ) ( @@v6@@ + Number ) ) ga_channel_free ( * ( _QWORD * ) ( @@v6@@ + Number ) ) ; g_free ( * ( _QWORD * ) ( @@v6@@ + Number ) ) ; g_free ( * ( _QWORD * ) ( @@v6@@ + Number ) ) ; if ( * ( _DWORD * ) ( @@v7@@ + Number ) ) unlink ( * ( const char * * ) ( @@v7@@ + Number ) ) ; config_free ( ( _QWORD * ) @@v7@@ ) ; if ( * ( _QWORD * ) ( @@v6@@ + Number ) ) g_main_loop_unref ( * ( _QWORD * ) ( @@v6@@ + Number ) ) ; g_free ( @@v6@@ ) ; return @@v5@@ ; }", "source": [{"n": "envp", "t": {"T": 3, "t": "const char *"}, "location": "r16"}, {"n": "argc", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "argv", "t": {"T": 3, "t": "const char *"}, "location": "r64"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v5", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s8"}]}
{"name": "init_dfl_pathnames", "code": "__int64 init_dfl_pathnames ( ) { __int64 @@result@@ ; if ( dfl_pathnames ) g_assertion_message_expr ( Number L , String , Number L , String , String ) ; if ( qword_3018 ) g_assertion_message_expr ( Number L , String , Number L , String , String ) ; dfl_pathnames = qemu_get_local_state_pathname ( String ) ; @@result@@ = qemu_get_local_state_pathname ( String ) ; qword_3018 = @@result@@ ; return @@result@@ ; }", "source": [{"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}]} {"name": "quit_handler", "code": "__int64 __fastcall quit_handler ( unsigned int @@a1@@ ) { __int64 @@result@@ ; @@result@@ = ga_is_frozen ( ga_state ) ; if ( ! ( _BYTE ) @@result@@ ) { g_log ( Number L , Number L , String , @@a1@@ ) ; @@result@@ = g_main_loop_is_running ( * ( _QWORD * ) ( ga_state + Number ) ) ; if ( ( _DWORD ) @@result@@ ) @@result@@ = g_main_loop_quit ( * ( _QWORD * ) ( ga_state + Number ) ) ; } return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}]} {"name": "config_load", "code": "unsigned __int64 __fastcall config_load ( __int64 @@a1@@ ) { const char * v1 ; __int64 v2 ; unsigned int @@v3@@ ; unsigned int * @@v5@@ ; const char * @@v6@@ ; __int64 @@v7@@ ; unsigned __int64 @@v8@@ ; @@v8@@ = __readfsqword ( Number ) ; @@v5@@ = Number L ; v1 = ( const char * ) g_getenv ( String ) ; if ( ! v1 ) v1 = String ; @@v6@@ = v1 ; @@v7@@ = g_key_file_new ( ) ; if ( ( unsigned int ) g_key_file_load_from_file ( @@v7@@ , @@v6@@ , Number L , & @@v5@@ ) ) { if ( ( unsigned int ) g_key_file_has_key ( @@v7@@ , String , String , Number L ) ) * ( _DWORD * ) ( @@a1@@ + Number ) = g_key_file_get_boolean ( @@v7@@ , String , String , & @@v5@@ ) ; if ( ( unsigned int ) g_key_file_has_key ( @@v7@@ , String , String , Number L ) ) * ( _QWORD * ) ( @@a1@@ + Number ) = g_key_file_get_string ( @@v7@@ , String , String , & @@v5@@ ) ; if ( ( unsigned int ) g_key_file_has_key ( @@v7@@ , String , String , Number L ) ) * ( _QWORD * ) @@a1@@ = g_key_file_get_string ( @@v7@@ , String , String , & @@v5@@ ) ; if ( ( unsigned int ) g_key_file_has_key ( @@v7@@ , String , String , Number L ) ) * ( _QWORD * ) ( @@a1@@ + Number ) = g_key_file_get_string ( @@v7@@ , String , String , & @@v5@@ ) ; if ( ( unsigned int ) g_key_file_has_key ( @@v7@@ , String , String , Number L ) ) * ( _QWORD * ) ( @@a1@@ + Number ) = g_key_file_get_string ( @@v7@@ , String , String , & @@v5@@ ) ; if ( ( unsigned int ) g_key_file_has_key ( @@v7@@ , String , String , Number L ) ) * ( _QWORD * ) ( @@a1@@ + Number ) = g_key_file_get_string ( @@v7@@ , String , String , & @@v5@@ ) ; if ( ( unsigned int ) g_key_file_has_key ( @@v7@@ , String , String , Number L ) ) * ( _QWORD * ) ( @@a1@@ + Number ) = g_key_file_get_string ( @@v7@@ , String , String , & @@v5@@ ) ; if ( ( unsigned int ) g_key_file_has_key ( @@v7@@ , String , String , Number L ) && ( unsigned int ) g_key_file_get_boolean ( @@v7@@ , String , String , & @@v5@@ ) ) { * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; } if ( ( unsigned int ) g_key_file_has_key ( @@v7@@ , String , String , Number L ) ) { * ( _QWORD * ) ( @@a1@@ + Number ) = g_key_file_get_string ( @@v7@@ , String , String , & @@v5@@ ) ; v2 = split_list ( * ( _QWORD * ) ( @@a1@@ + Number ) , ( __int64 ) String ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = g_list_concat ( * ( _QWORD * ) ( @@a1@@ + Number ) , v2 ) ; } } g_key_file_free ( @@v7@@ ) ; if ( @@v5@@ ) { @@v3@@ = * @@v5@@ ; if ( __PAIR64__ ( @@v5@@ [ Number ] , @@v3@@ ) != ( ( unsigned int ) g_file_error_quark ( ) | Number ) ) { g_log ( Number L , Number L , String , String , * ( ( const char * * ) @@v5@@ + Number ) ) ; exit ( Number ) ; } } g_clear_error ( & @@v5@@ ) ; return __readfsqword ( Number ) ^ @@v8@@ ; }", "source": [{"n": "v3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r32"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v8", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s24"}, {"n": "v7", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v6", "t": {"T": 3, "t": "const char"}, "location": "s40"}, {"n": "v5", "t": {"T": 3, "t": "unsigned int"}, "location": "s48"}]} {"name": "config_dump", "code": "unsigned __int64 __fastcall config_dump ( __int64 @@a1@@ ) { __int64 @@v2@@ ; __int64 @@v3@@ ; const char * @@v4@@ ; unsigned __int64 @@v5@@ ; @@v5@@ = __readfsqword ( Number ) ; @@v2@@ = Number L ; @@v3@@ = g_key_file_new ( ) ; if ( ! @@v3@@ ) g_assertion_message_expr ( Number L , String , Number L , String , String ) ; g_key_file_set_boolean ( @@v3@@ , String , String , * ( unsigned int * ) ( @@a1@@ + Number ) ) ; g_key_file_set_string ( @@v3@@ , String , String , * ( _QWORD * ) ( @@a1@@ + Number ) ) ; g_key_file_set_string ( @@v3@@ , String , String , * ( _QWORD * ) @@a1@@ ) ; if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) g_key_file_set_string ( @@v3@@ , String , String , * ( _QWORD * ) ( @@a1@@ + Number ) ) ; g_key_file_set_string ( @@v3@@ , String , String , * ( _QWORD * ) ( @@a1@@ + Number ) ) ; if ( * ( _QWORD * ) ( @@a1@@ + Number ) ) g_key_file_set_string ( @@v3@@ , String , String , * ( _QWORD * ) ( @@a1@@ + Number ) ) ; g_key_file_set_string ( @@v3@@ , String , String , * ( _QWORD * ) ( @@a1@@ + Number ) ) ; g_key_file_set_boolean ( @@v3@@ , String , String , * ( _DWORD * ) ( @@a1@@ + Number ) == Number ) ; @@v4@@ = ( const char * ) list_join ( * ( _QWORD * * ) ( @@a1@@ + Number ) , Number ) ; g_key_file_set_string ( @@v3@@ , String , String , @@v4@@ ) ; g_free ( @@v4@@ ) ; @@v4@@ = ( const char * ) g_key_file_to_data ( @@v3@@ , Number L , & @@v2@@ ) ; printf ( String , @@v4@@ ) ; g_free ( @@v4@@ ) ; g_key_file_free ( @@v3@@ ) ; return __readfsqword ( Number ) ^ @@v5@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v4", "t": {"T": 3, "t": "const char"}, "location": "s16"}, {"n": "v3", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s24"}, {"n": "v2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v5", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "config_parse", "code": "unsigned __int64 __fastcall config_parse ( __int64 @@a1@@ , int @@a2@@ , char * const * @@a3@@ ) { char * v3 ; __int64 v4 ; int @@longind@@ ; int @@v8@@ ; char * @@shortopts@@ ; struct option @@longopts@@ [ Number ] ; unsigned __int64 @@v11@@ ; @@v11@@ = __readfsqword ( Number ) ; @@shortopts@@ = String ; @@longind@@ = Number ; qmemcpy ( @@longopts@@ , & off_2E60 , sizeof ( @@longopts@@ ) ) ; while ( Number ) { @@v8@@ = getopt_long ( @@a2@@ , @@a3@@ , @@shortopts@@ , @@longopts@@ , & @@longind@@ ) ; if ( @@v8@@ == Number ) return __readfsqword ( Number ) ^ @@v11@@ ; switch ( @@v8@@ ) { case String : g_print ( String , * ( const char * * ) @@a3@@ ) ; exit ( Number ) ; case String : * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; break ; case String : g_free ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; v3 = optarg ; if ( ! optarg ) v3 = String ; * ( _QWORD * ) ( @@a1@@ + Number ) = g_strdup ( v3 ) ; break ; case String : printf ( String , String ) ; exit ( Number ) ; case String : if ( is_help_option ( optarg ) ) { qmp_for_each_command ( ga_print_cmd , Number L ) ; exit ( Number ) ; } v4 = split_list ( ( __int64 ) optarg , ( __int64 ) String ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = g_list_concat ( * ( _QWORD * ) ( @@a1@@ + Number ) , v4 ) ; break ; case String : * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; break ; case String : g_free ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = g_strdup ( optarg ) ; break ; case String : usage ( * ( const char * * ) @@a3@@ ) ; exit ( Number ) ; case String : g_free ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = g_strdup ( optarg ) ; break ; case String : g_free ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = g_strdup ( optarg ) ; break ; case String : g_free ( * ( _QWORD * ) @@a1@@ ) ; * ( _QWORD * ) @@a1@@ = g_strdup ( optarg ) ; break ; case String : g_free ( * ( _QWORD * ) ( @@a1@@ + Number ) ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = g_strdup ( optarg ) ; break ; case String : * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; break ; default : continue ; } } }", "source": [{"n": "a3", "t": {"T": 3, "t": "char *const"}, "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": "longopts", "t": {"T": 2, "n": 13, "s": 32, "t": "struct option"}, "location": "s432"}, {"n": "shortopts", "t": {"T": 3, "t": "char"}, "location": "s440"}, {"n": "v8", "t": {"T": 1, "n": "int", "s": 4}, "location": "s444"}, {"n": "longind", "t": {"T": 1, "n": "int", "s": 4}, "location": "s448"}, {"n": "v11", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "config_free", "code": "__int64 __fastcall config_free ( _QWORD * @@a1@@ ) { g_free ( @@a1@@ [ Number ] ) ; g_free ( @@a1@@ [ Number ] ) ; g_free ( @@a1@@ [ Number ] ) ; g_free ( @@a1@@ [ Number ] ) ; g_free ( * @@a1@@ ) ; g_free ( @@a1@@ [ Number ] ) ; g_free ( @@a1@@ [ Number ] ) ; g_list_free_full ( @@a1@@ [ Number ] , & g_free ) ; return g_free ( @@a1@@ ) ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_QWORD"}, "location": "r56"}]} {"name": "check_is_frozen", "code": "__int64 __fastcall check_is_frozen ( __int64 @@a1@@ ) { int * v1 ; char * v2 ; __int64 result ; struct stat64 @@v4@@ ; unsigned __int64 @@v5@@ ; @@v5@@ = __readfsqword ( Number ) ; if ( stat64 ( * ( const char * * ) ( @@a1@@ + Number ) , & @@v4@@ ) == Number ) { if ( * _errno_location ( ) == Number ) { result = Number L ; } else { v1 = _errno_location ( ) ; v2 = strerror ( * v1 ) ; g_log ( Number L , Number L , String , * ( const char * * ) ( @@a1@@ + Number ) , v2 ) ; result = Number L ; } } else { g_log ( Number L , Number L , String String , * ( const char * * ) ( @@a1@@ + Number ) ) ; result = Number L ; } return result ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v4", "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": "v5", "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"}]}