
/* std::messages<wchar_t>::~messages() */

void __thiscall std::messages<wchar_t>::~messages(messages<wchar_t> *this)

{
  void *pvVar1;
  void *pvVar2;
  
  pvVar1 = *(void **)(this + 0x18);
  *(undefined ***)this = &PTR__messages_004b7ff8;
  pvVar2 = (void *)locale::facet::_S_get_c_name();
  if ((pvVar1 != pvVar2) && (pvVar1 != (void *)0x0)) {
    operator_delete__(pvVar1);
  }
  locale::facet::_S_destroy_c_locale((__locale_struct **)(this + 0x10));
  locale::facet::~facet((facet *)this);
  return;
}



void FUN_00383060(undefined8 *param_1)

{
  long lVar1;
  long lVar2;
  
  lVar1 = param_1[3];
  *param_1 = &PTR_FUN_004b7ff8;
  lVar2 = FUN_0033ada0();
  if ((lVar1 != lVar2) && (lVar1 != 0)) {
    thunk_FUN_00338a50(lVar1);
  }
  FUN_00379950(param_1 + 2);
  FUN_0033a780(param_1);
  return;
}


PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
LEA RAX,[0x4b7fe8]
MOV RBP,qword ptr [RDI + 0x18]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
CALL 0x0033ada0
CMP RBP,RAX
JZ 0x00383092
TEST RBP,RBP
JZ 0x00383092
MOV RDI,RBP
CALL 0x00338a20
LEA RDI,[RBX + 0x10]
CALL 0x00379950
ADD RSP,0x8
MOV RDI,RBX
POP RBX
POP RBP
JMP 0x0033a780
(translation_unit "void FUN_00383060(undefined8 *param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = param_1[3];\n  *param_1 = &PTR_FUN_004b7ff8;\n  lVar2 = FUN_0033ada0();\n  if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }\n  FUN_00379950(param_1 + 2);\n  FUN_0033a780(param_1);\n  return;\n}\n\n" (function_definition "void FUN_00383060(undefined8 *param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = param_1[3];\n  *param_1 = &PTR_FUN_004b7ff8;\n  lVar2 = FUN_0033ada0();\n  if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }\n  FUN_00379950(param_1 + 2);\n  FUN_0033a780(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_00383060(undefined8 *param_1)" identifier (parameter_list "(undefined8 *param_1)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = param_1[3];\n  *param_1 = &PTR_FUN_004b7ff8;\n  lVar2 = FUN_0033ada0();\n  if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }\n  FUN_00379950(param_1 + 2);\n  FUN_0033a780(param_1);\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar1 = param_1[3];" (assignment_expression "lVar1 = param_1[3]" identifier = (subscript_expression "param_1[3]" identifier [ number_literal ])) ;) (expression_statement "*param_1 = &PTR_FUN_004b7ff8;" (assignment_expression "*param_1 = &PTR_FUN_004b7ff8" (pointer_expression "*param_1" * identifier) = (pointer_expression "&PTR_FUN_004b7ff8" & identifier)) ;) (expression_statement "lVar2 = FUN_0033ada0();" (assignment_expression "lVar2 = FUN_0033ada0()" identifier = (call_expression "FUN_0033ada0()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }" if (parenthesized_expression "((lVar1 != lVar2) && (lVar1 != 0))" ( (binary_expression "(lVar1 != lVar2) && (lVar1 != 0)" (parenthesized_expression "(lVar1 != lVar2)" ( (binary_expression "lVar1 != lVar2" identifier != identifier) )) && (parenthesized_expression "(lVar1 != 0)" ( (binary_expression "lVar1 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    thunk_FUN_00338a50(lVar1);\n  }" { (expression_statement "thunk_FUN_00338a50(lVar1);" (call_expression "thunk_FUN_00338a50(lVar1)" identifier (argument_list "(lVar1)" ( identifier ))) ;) })) (expression_statement "FUN_00379950(param_1 + 2);" (call_expression "FUN_00379950(param_1 + 2)" identifier (argument_list "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) ))) ;) (expression_statement "FUN_0033a780(param_1);" (call_expression "FUN_0033a780(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* std::messages<wchar_t>::~messages() */\n\nvoid __thiscall std::messages<wchar_t>::~messages(messages<wchar_t> *this)\n\n{\n  void *pvVar1;\n  void *pvVar2;\n  \n  pvVar1 = *(void **)(this + 0x18);\n  *(undefined ***)this = &PTR__messages_004b7ff8;\n  pvVar2 = (void *)locale::facet::_S_get_c_name();\n  if ((pvVar1 != pvVar2) && (pvVar1 != (void *)0x0)) {\n    operator_delete__(pvVar1);\n  }\n  locale::facet::_S_destroy_c_locale((__locale_struct **)(this + 0x10));\n  locale::facet::~facet((facet *)this);\n  return;\n}\n\n" comment (function_definition "void __thiscall std::messages<wchar_t>::~messages(messages<wchar_t> *this)\n\n{\n  void *pvVar1;\n  void *pvVar2;\n  \n  pvVar1 = *(void **)(this + 0x18);\n  *(undefined ***)this = &PTR__messages_004b7ff8;\n  pvVar2 = (void *)locale::facet::_S_get_c_name();\n  if ((pvVar1 != pvVar2) && (pvVar1 != (void *)0x0)) {\n    operator_delete__(pvVar1);\n  }\n  locale::facet::_S_destroy_c_locale((__locale_struct **)(this + 0x10));\n  locale::facet::~facet((facet *)this);\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::messages<wchar_t>::~" identifier : : identifier < identifier > : : ~) (function_declarator "messages(messages<wchar_t> *this)" identifier (parameter_list "(messages<wchar_t> *this)" ( (parameter_declaration "messages<wchar_t> *this" type_identifier (ERROR "<wchar_t>" < identifier >) (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  void *pvVar1;\n  void *pvVar2;\n  \n  pvVar1 = *(void **)(this + 0x18);\n  *(undefined ***)this = &PTR__messages_004b7ff8;\n  pvVar2 = (void *)locale::facet::_S_get_c_name();\n  if ((pvVar1 != pvVar2) && (pvVar1 != (void *)0x0)) {\n    operator_delete__(pvVar1);\n  }\n  locale::facet::_S_destroy_c_locale((__locale_struct **)(this + 0x10));\n  locale::facet::~facet((facet *)this);\n  return;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (expression_statement "pvVar1 = *(void **)(this + 0x18);" (assignment_expression "pvVar1 = *(void **)(this + 0x18)" identifier = (pointer_expression "*(void **)(this + 0x18)" * (cast_expression "(void **)(this + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) ))))) ;) (expression_statement "*(undefined ***)this = &PTR__messages_004b7ff8;" (assignment_expression "*(undefined ***)this = &PTR__messages_004b7ff8" (pointer_expression "*(undefined ***)this" * (cast_expression "(undefined ***)this" ( (type_descriptor "undefined ***" type_identifier (abstract_pointer_declarator "***" * (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *)))) ) identifier)) = (pointer_expression "&PTR__messages_004b7ff8" & identifier)) ;) (ERROR "pvVar2 = (void *)locale::" (assignment_expression "pvVar2 = (void *)locale" identifier = (cast_expression "(void *)locale" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) : :) (labeled_statement "facet::_S_get_c_name();" statement_identifier : (ERROR ":" :) (expression_statement "_S_get_c_name();" (call_expression "_S_get_c_name()" identifier (argument_list "()" ( ))) ;)) (if_statement "if ((pvVar1 != pvVar2) && (pvVar1 != (void *)0x0)) {\n    operator_delete__(pvVar1);\n  }" if (parenthesized_expression "((pvVar1 != pvVar2) && (pvVar1 != (void *)0x0))" ( (binary_expression "(pvVar1 != pvVar2) && (pvVar1 != (void *)0x0)" (parenthesized_expression "(pvVar1 != pvVar2)" ( (binary_expression "pvVar1 != pvVar2" identifier != identifier) )) && (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    operator_delete__(pvVar1);\n  }" { (expression_statement "operator_delete__(pvVar1);" (call_expression "operator_delete__(pvVar1)" identifier (argument_list "(pvVar1)" ( identifier ))) ;) })) (labeled_statement "locale::facet::_S_destroy_c_locale((__locale_struct **)(this + 0x10));" statement_identifier : (ERROR ":" :) (labeled_statement "facet::_S_destroy_c_locale((__locale_struct **)(this + 0x10));" statement_identifier : (ERROR ":" :) (expression_statement "_S_destroy_c_locale((__locale_struct **)(this + 0x10));" (call_expression "_S_destroy_c_locale((__locale_struct **)(this + 0x10))" identifier (argument_list "((__locale_struct **)(this + 0x10))" ( (cast_expression "(__locale_struct **)(this + 0x10)" ( (type_descriptor "__locale_struct **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) ))) ))) ;))) (labeled_statement "locale::facet::~facet((facet *)this);" statement_identifier : (ERROR ":" :) (labeled_statement "facet::~facet((facet *)this);" statement_identifier : (ERROR ":" :) (expression_statement "~facet((facet *)this);" (unary_expression "~facet((facet *)this)" ~ (call_expression "facet((facet *)this)" identifier (argument_list "((facet *)this)" ( (cast_expression "(facet *)this" ( (type_descriptor "facet *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;))) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00383060(undefined8 *param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = param_1[3];\n  *param_1 = &PTR_FUN_004b7ff8;\n  lVar2 = FUN_0033ada0();\n  if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }\n  FUN_00379950(param_1 + 2);\n  FUN_0033a780(param_1);\n  return;\n}\n\n" (function_definition "void FUN_00383060(undefined8 *param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = param_1[3];\n  *param_1 = &PTR_FUN_004b7ff8;\n  lVar2 = FUN_0033ada0();\n  if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }\n  FUN_00379950(param_1 + 2);\n  FUN_0033a780(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_00383060(undefined8 *param_1)" identifier (parameter_list "(undefined8 *param_1)" ( (parameter_declaration "undefined8 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = param_1[3];\n  *param_1 = &PTR_FUN_004b7ff8;\n  lVar2 = FUN_0033ada0();\n  if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }\n  FUN_00379950(param_1 + 2);\n  FUN_0033a780(param_1);\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar1 = param_1[3];" (assignment_expression "lVar1 = param_1[3]" identifier = (subscript_expression "param_1[3]" identifier [ number_literal ])) ;) (expression_statement "*param_1 = &PTR_FUN_004b7ff8;" (assignment_expression "*param_1 = &PTR_FUN_004b7ff8" (pointer_expression "*param_1" * identifier) = (pointer_expression "&PTR_FUN_004b7ff8" & identifier)) ;) (expression_statement "lVar2 = FUN_0033ada0();" (assignment_expression "lVar2 = FUN_0033ada0()" identifier = (call_expression "FUN_0033ada0()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }" if (parenthesized_expression "((lVar1 != lVar2) && (lVar1 != 0))" ( (binary_expression "(lVar1 != lVar2) && (lVar1 != 0)" (parenthesized_expression "(lVar1 != lVar2)" ( (binary_expression "lVar1 != lVar2" identifier != identifier) )) && (parenthesized_expression "(lVar1 != 0)" ( (binary_expression "lVar1 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    thunk_FUN_00338a50(lVar1);\n  }" { (expression_statement "thunk_FUN_00338a50(lVar1);" (call_expression "thunk_FUN_00338a50(lVar1)" identifier (argument_list "(lVar1)" ( identifier ))) ;) })) (expression_statement "FUN_00379950(param_1 + 2);" (call_expression "FUN_00379950(param_1 + 2)" identifier (argument_list "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) ))) ;) (expression_statement "FUN_0033a780(param_1);" (call_expression "FUN_0033a780(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != IDENT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00383060(undefined8 *param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = param_1[3];\n  *param_1 = &PTR_FUN_004b7ff8;\n  lVar2 = FUN_0033ada0();\n  if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }\n  FUN_00379950(param_1 + 2);\n  FUN_0033a780(param_1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00383060(undefined8 *param_1)" (identifier "FUN_00383060") (parameter_list "(undefined8 *param_1)" (( "(") (parameter_declaration "undefined8 *param_1" (type_identifier "undefined8") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  \n  lVar1 = param_1[3];\n  *param_1 = &PTR_FUN_004b7ff8;\n  lVar2 = FUN_0033ada0();\n  if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }\n  FUN_00379950(param_1 + 2);\n  FUN_0033a780(param_1);\n  return;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (expression_statement "lVar1 = param_1[3];" (assignment_expression "lVar1 = param_1[3]" (identifier "lVar1") (= "=") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]"))) (; ";")) (expression_statement "*param_1 = &PTR_FUN_004b7ff8;" (assignment_expression "*param_1 = &PTR_FUN_004b7ff8" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (pointer_expression "&PTR_FUN_004b7ff8" (& "&") (identifier "PTR_FUN_004b7ff8"))) (; ";")) (expression_statement "lVar2 = FUN_0033ada0();" (assignment_expression "lVar2 = FUN_0033ada0()" (identifier "lVar2") (= "=") (call_expression "FUN_0033ada0()" (identifier "FUN_0033ada0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((lVar1 != lVar2) && (lVar1 != 0)) {\n    thunk_FUN_00338a50(lVar1);\n  }" (if "if") (parenthesized_expression "((lVar1 != lVar2) && (lVar1 != 0))" (( "(") (binary_expression "(lVar1 != lVar2) && (lVar1 != 0)" (parenthesized_expression "(lVar1 != lVar2)" (( "(") (binary_expression "lVar1 != lVar2" (identifier "lVar1") (!= "!=") (identifier "lVar2")) () ")")) (&& "&&") (parenthesized_expression "(lVar1 != 0)" (( "(") (binary_expression "lVar1 != 0" (identifier "lVar1") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    thunk_FUN_00338a50(lVar1);\n  }" ({ "{") (expression_statement "thunk_FUN_00338a50(lVar1);" (call_expression "thunk_FUN_00338a50(lVar1)" (identifier "thunk_FUN_00338a50") (argument_list "(lVar1)" (( "(") (identifier "lVar1") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_00379950(param_1 + 2);" (call_expression "FUN_00379950(param_1 + 2)" (identifier "FUN_00379950") (argument_list "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")"))) (; ";")) (expression_statement "FUN_0033a780(param_1);" (call_expression "FUN_0033a780(param_1)" (identifier "FUN_0033a780") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* std::messages<wchar_t>::~messages() */

void __thiscall std::function_1<wchar_t>::~function_1(function_1<wchar_t> *var_1)

{
  void *var_3;
  void *var_4;
  
  var_3 = *(void **)(var_1 + 0x18);
  *(type_1 ***)var_1 = &PTR__messages_004b7ff8;
  var_4 = (void *)locale::facet::var_2();
  if ((var_3 != var_4) && (var_3 != (void *)0x0)) {
    var_5(var_3);
  }
  locale::facet::var_6((type_2 **)(var_1 + 0x10));
  locale::facet::~var_7((var_7 *)var_1);
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))

void MASKED(undefined8 *param_1)

{
  long lVar1;
  long lVar2;
  
  lVar1 = param_1[3];
  *param_1 = &PTR_FUN_004b7ff8;
  lVar2 = FUN_0033ada0();
  if ((lVar1 != lVar2) && (lVar1 != 0)) {
    thunk_FUN_00338a50(lVar1);
  }
  FUN_00379950(param_1 + 2);
  FUN_0033a780(param_1);
  return;
}

