
/* int std::__facet_shims::__messages_open<wchar_t>(std::integral_constant<bool, true>,
   std::locale::facet const*, char const*, unsigned long, std::locale const&) */

int std::__facet_shims::__messages_open<wchar_t>
              (long *param_1,long param_2,long param_3,undefined8 param_4)

{
  int iVar1;
  basic_string<char,_std::char_traits<char>,_std::allocator<char>_> local_38;
  
  local_38._M_dataplus._M_p = (pointer)&local_38.field_2;
  __cxx11::basic_string<char,_std::char_traits<char>,_std::allocator<char>_>::
  _M_construct<char_const*>(&local_38,param_2,param_3 + param_2);
                    /* try { // try from 003127f1 to 003127f3 has its CatchHandler @ 00312813 */
  iVar1 = (**(code **)(*param_1 + 0x10))(param_1,&local_38,param_4);
  if ((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9
       *)local_38._M_dataplus._M_p != &local_38.field_2) {
    operator_delete(local_38._M_dataplus._M_p);
  }
  return iVar1;
}



undefined4 FUN_003127c0(long *param_1,long param_2,long param_3,undefined8 param_4)

{
  undefined4 uVar1;
  undefined1 *local_38 [2];
  undefined1 local_28 [16];
  
  local_38[0] = local_28;
  FUN_001665c0(local_38,param_2,param_3 + param_2);
                    /* try { // try from 003127f1 to 003127f3 has its CatchHandler @ 00312813 */
  uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);
  if (local_38[0] != local_28) {
    FUN_002dac70();
  }
  return uVar1;
}


PUSH R12
ADD RDX,RSI
MOV R12,RCX
PUSH RBP
MOV RBP,RDI
PUSH RBX
SUB RSP,0x20
MOV RBX,RSP
LEA RAX,[RBX + 0x10]
MOV RDI,RBX
MOV qword ptr [RSP],RAX
CALL 0x001665c0
MOV RAX,qword ptr [RBP]
MOV RDX,R12
MOV RSI,RBX
MOV RDI,RBP
CALL qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RSP]
ADD RBX,0x10
MOV EBP,EAX
CMP RDI,RBX
JZ 0x00312808
CALL 0x002dac70
ADD RSP,0x20
MOV EAX,EBP
POP RBX
POP RBP
POP R12
RET
(translation_unit "undefined4 FUN_003127c0(long *param_1,long param_2,long param_3,undefined8 param_4)\n\n{\n  undefined4 uVar1;\n  undefined1 *local_38 [2];\n  undefined1 local_28 [16];\n  \n  local_38[0] = local_28;\n  FUN_001665c0(local_38,param_2,param_3 + param_2);\n                    /* try { // try from 003127f1 to 003127f3 has its CatchHandler @ 00312813 */\n  uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);\n  if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined4 FUN_003127c0(long *param_1,long param_2,long param_3,undefined8 param_4)\n\n{\n  undefined4 uVar1;\n  undefined1 *local_38 [2];\n  undefined1 local_28 [16];\n  \n  local_38[0] = local_28;\n  FUN_001665c0(local_38,param_2,param_3 + param_2);\n                    /* try { // try from 003127f1 to 003127f3 has its CatchHandler @ 00312813 */\n  uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);\n  if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_003127c0(long *param_1,long param_2,long param_3,undefined8 param_4)" identifier (parameter_list "(long *param_1,long param_2,long param_3,undefined8 param_4)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined1 *local_38 [2];\n  undefined1 local_28 [16];\n  \n  local_38[0] = local_28;\n  FUN_001665c0(local_38,param_2,param_3 + param_2);\n                    /* try { // try from 003127f1 to 003127f3 has its CatchHandler @ 00312813 */\n  uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);\n  if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined1 *local_38 [2];" type_identifier (pointer_declarator "*local_38 [2]" * (array_declarator "local_38 [2]" identifier [ number_literal ])) ;) (declaration "undefined1 local_28 [16];" type_identifier (array_declarator "local_28 [16]" identifier [ number_literal ]) ;) (expression_statement "local_38[0] = local_28;" (assignment_expression "local_38[0] = local_28" (subscript_expression "local_38[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_001665c0(local_38,param_2,param_3 + param_2);" (call_expression "FUN_001665c0(local_38,param_2,param_3 + param_2)" identifier (argument_list "(local_38,param_2,param_3 + param_2)" ( identifier , identifier , (binary_expression "param_3 + param_2" identifier + identifier) ))) ;) comment (expression_statement "uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);" (assignment_expression "uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4)" identifier = (call_expression "(**(code **)(*param_1 + 0x10))(param_1,local_38,param_4)" (parenthesized_expression "(**(code **)(*param_1 + 0x10))" ( (pointer_expression "**(code **)(*param_1 + 0x10)" * (pointer_expression "*(code **)(*param_1 + 0x10)" * (cast_expression "(code **)(*param_1 + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x10)" ( (binary_expression "*param_1 + 0x10" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,local_38,param_4)" ( identifier , identifier , identifier )))) ;) (if_statement "if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }" if (parenthesized_expression "(local_38[0] != local_28)" ( (binary_expression "local_38[0] != local_28" (subscript_expression "local_38[0]" identifier [ number_literal ]) != identifier) )) (compound_statement "{\n    FUN_002dac70();\n  }" { (expression_statement "FUN_002dac70();" (call_expression "FUN_002dac70()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* int std::__facet_shims::__messages_open<wchar_t>(std::integral_constant<bool, true>,\n   std::locale::facet const*, char const*, unsigned long, std::locale const&) */\n\nint std::__facet_shims::__messages_open<wchar_t>\n              (long *param_1,long param_2,long param_3,undefined8 param_4)\n\n{\n  int iVar1;\n  basic_string<char,_std::char_traits<char>,_std::allocator<char>_> local_38;\n  \n  local_38._M_dataplus._M_p = (pointer)&local_38.field_2;\n  __cxx11::basic_string<char,_std::char_traits<char>,_std::allocator<char>_>::\n  _M_construct<char_const*>(&local_38,param_2,param_3 + param_2);\n                    /* try { // try from 003127f1 to 003127f3 has its CatchHandler @ 00312813 */\n  iVar1 = (**(code **)(*param_1 + 0x10))(param_1,&local_38,param_4);\n  if ((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)local_38._M_dataplus._M_p != &local_38.field_2) {\n    operator_delete(local_38._M_dataplus._M_p);\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int std::__facet_shims::__messages_open<wchar_t>\n              (long *param_1,long param_2,long param_3,undefined8 param_4)\n\n{\n  int iVar1;\n  basic_string<char,_std::char_traits<char>,_std::allocator<char>_> local_38;\n  \n  local_38._M_dataplus._M_p = (pointer)&local_38.field_2;\n  __cxx11::basic_string<char,_std::char_traits<char>,_std::allocator<char>_>::\n  _M_construct<char_const*>(&local_38,param_2,param_3 + param_2);\n                    /* try { // try from 003127f1 to 003127f3 has its CatchHandler @ 00312813 */\n  iVar1 = (**(code **)(*param_1 + 0x10))(param_1,&local_38,param_4);\n  if ((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)local_38._M_dataplus._M_p != &local_38.field_2) {\n    operator_delete(local_38._M_dataplus._M_p);\n  }\n  return iVar1;\n}" primitive_type (ERROR "std::__facet_shims::__messages_open<" identifier : : identifier : : identifier <) (function_declarator "wchar_t>\n              (long *param_1,long param_2,long param_3,undefined8 param_4)" identifier (ERROR ">" >) (parameter_list "(long *param_1,long param_2,long param_3,undefined8 param_4)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  basic_string<char,_std::char_traits<char>,_std::allocator<char>_> local_38;\n  \n  local_38._M_dataplus._M_p = (pointer)&local_38.field_2;\n  __cxx11::basic_string<char,_std::char_traits<char>,_std::allocator<char>_>::\n  _M_construct<char_const*>(&local_38,param_2,param_3 + param_2);\n                    /* try { // try from 003127f1 to 003127f3 has its CatchHandler @ 00312813 */\n  iVar1 = (**(code **)(*param_1 + 0x10))(param_1,&local_38,param_4);\n  if ((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)local_38._M_dataplus._M_p != &local_38.field_2) {\n    operator_delete(local_38._M_dataplus._M_p);\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (ERROR "basic_string<char,_std::char_traits<char>,_std::" (comma_expression "basic_string<char,_std" (binary_expression "basic_string<char" identifier < identifier) , identifier) : : (binary_expression "char_traits<char>,_std" (binary_expression "char_traits<char" identifier < identifier) > (ERROR "," ,) identifier) : :) (expression_statement "allocator<char>_> local_38;" (binary_expression "allocator<char>_> local_38" (binary_expression "allocator<char>_" (binary_expression "allocator<char" identifier < identifier) > identifier) > identifier) ;) (expression_statement "local_38._M_dataplus._M_p = (pointer)&local_38.field_2;" (assignment_expression "local_38._M_dataplus._M_p = (pointer)&local_38.field_2" (field_expression "local_38._M_dataplus._M_p" (field_expression "local_38._M_dataplus" identifier . field_identifier) . field_identifier) = (binary_expression "(pointer)&local_38.field_2" (parenthesized_expression "(pointer)" ( identifier )) & (field_expression "local_38.field_2" identifier . field_identifier))) ;) (ERROR "__cxx11::basic_string<char,_std::char_traits<char>,_std::" (comma_expression "__cxx11::basic_string<char,_std::char_traits<char>,_std" identifier (ERROR "::basic_string<char,_std::char_traits<char>" : : (comma_expression "basic_string<char,_std" (binary_expression "basic_string<char" identifier < identifier) , identifier) : : (binary_expression "char_traits<char" identifier < identifier) >) , identifier) : :) (expression_statement "allocator<char>_>::\n  _M_construct<char_const*>(&local_38,param_2,param_3 + param_2);" (binary_expression "allocator<char>_>::\n  _M_construct<char_const*>(&local_38,param_2,param_3 + param_2)" (binary_expression "allocator<char>_>::\n  _M_construct<char_const" (binary_expression "allocator<char>_>::\n  _M_construct" (binary_expression "allocator<char>_" (binary_expression "allocator<char" identifier < identifier) > identifier) > (ERROR "::" : :) identifier) < identifier) (ERROR "*" *) > (parenthesized_expression "(&local_38,param_2,param_3 + param_2)" ( (comma_expression "&local_38,param_2,param_3 + param_2" (pointer_expression "&local_38" & identifier) , (comma_expression "param_2,param_3 + param_2" identifier , (binary_expression "param_3 + param_2" identifier + identifier))) ))) ;) comment (expression_statement "iVar1 = (**(code **)(*param_1 + 0x10))(param_1,&local_38,param_4);" (assignment_expression "iVar1 = (**(code **)(*param_1 + 0x10))(param_1,&local_38,param_4)" identifier = (call_expression "(**(code **)(*param_1 + 0x10))(param_1,&local_38,param_4)" (parenthesized_expression "(**(code **)(*param_1 + 0x10))" ( (pointer_expression "**(code **)(*param_1 + 0x10)" * (pointer_expression "*(code **)(*param_1 + 0x10)" * (cast_expression "(code **)(*param_1 + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x10)" ( (binary_expression "*param_1 + 0x10" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,&local_38,param_4)" ( identifier , (pointer_expression "&local_38" & identifier) , identifier )))) ;) (if_statement "if ((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)local_38._M_dataplus._M_p != &local_38.field_2) {\n    operator_delete(local_38._M_dataplus._M_p);\n  }" if (parenthesized_expression "((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)local_38._M_dataplus._M_p != &local_38.field_2)" ( (parenthesized_expression "(anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)local_38._M_dataplus._M_p != &local_38.field_2)" ( (ERROR "anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::" (comma_expression "anon_union_16_2_edb7204a_for_basic_string<char,_std" (binary_expression "anon_union_16_2_edb7204a_for_basic_string<char" identifier < identifier) , identifier) : : (binary_expression "char_traits<char>,_std" (binary_expression "char_traits<char" identifier < identifier) > (ERROR "," ,) identifier) : :) (binary_expression "allocator<char>_>_9\n       *)local_38._M_dataplus._M_p != &local_38.field_2" (binary_expression "allocator<char>_>_9\n       *)local_38._M_dataplus._M_p" (binary_expression "allocator<char>_" (binary_expression "allocator<char" identifier < identifier) > identifier) > (binary_expression "_9\n       *)local_38._M_dataplus._M_p" identifier * (ERROR ")" )) (field_expression "local_38._M_dataplus._M_p" (field_expression "local_38._M_dataplus" identifier . field_identifier) . field_identifier))) != (pointer_expression "&local_38.field_2" & (field_expression "local_38.field_2" identifier . field_identifier))) )) )) (compound_statement "{\n    operator_delete(local_38._M_dataplus._M_p);\n  }" { (expression_statement "operator_delete(local_38._M_dataplus._M_p);" (call_expression "operator_delete(local_38._M_dataplus._M_p)" identifier (argument_list "(local_38._M_dataplus._M_p)" ( (field_expression "local_38._M_dataplus._M_p" (field_expression "local_38._M_dataplus" identifier . field_identifier) . field_identifier) ))) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 FUN_003127c0(long *param_1,long param_2,long param_3,undefined8 param_4)\n\n{\n  undefined4 uVar1;\n  undefined1 *local_38 [2];\n  undefined1 local_28 [16];\n  \n  local_38[0] = local_28;\n  FUN_001665c0(local_38,param_2,param_3 + param_2);\n                    \n  uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);\n  if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined4 FUN_003127c0(long *param_1,long param_2,long param_3,undefined8 param_4)\n\n{\n  undefined4 uVar1;\n  undefined1 *local_38 [2];\n  undefined1 local_28 [16];\n  \n  local_38[0] = local_28;\n  FUN_001665c0(local_38,param_2,param_3 + param_2);\n                    \n  uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);\n  if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_003127c0(long *param_1,long param_2,long param_3,undefined8 param_4)" identifier (parameter_list "(long *param_1,long param_2,long param_3,undefined8 param_4)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined1 *local_38 [2];\n  undefined1 local_28 [16];\n  \n  local_38[0] = local_28;\n  FUN_001665c0(local_38,param_2,param_3 + param_2);\n                    \n  uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);\n  if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined1 *local_38 [2];" type_identifier (pointer_declarator "*local_38 [2]" * (array_declarator "local_38 [2]" identifier [ number_literal ])) ;) (declaration "undefined1 local_28 [16];" type_identifier (array_declarator "local_28 [16]" identifier [ number_literal ]) ;) (expression_statement "local_38[0] = local_28;" (assignment_expression "local_38[0] = local_28" (subscript_expression "local_38[0]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_001665c0(local_38,param_2,param_3 + param_2);" (call_expression "FUN_001665c0(local_38,param_2,param_3 + param_2)" identifier (argument_list "(local_38,param_2,param_3 + param_2)" ( identifier , identifier , (binary_expression "param_3 + param_2" identifier + identifier) ))) ;) (expression_statement "uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);" (assignment_expression "uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4)" identifier = (call_expression "(**(code **)(*param_1 + 0x10))(param_1,local_38,param_4)" (parenthesized_expression "(**(code **)(*param_1 + 0x10))" ( (pointer_expression "**(code **)(*param_1 + 0x10)" * (pointer_expression "*(code **)(*param_1 + 0x10)" * (cast_expression "(code **)(*param_1 + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x10)" ( (binary_expression "*param_1 + 0x10" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,local_38,param_4)" ( identifier , identifier , identifier )))) ;) (if_statement "if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }" if (parenthesized_expression "(local_38[0] != local_28)" ( (binary_expression "local_38[0] != local_28" (subscript_expression "local_38[0]" identifier [ number_literal ]) != identifier) )) (compound_statement "{\n    FUN_002dac70();\n  }" { (expression_statement "FUN_002dac70();" (call_expression "FUN_002dac70()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (array_declarator IDENT [ LIT ])) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_003127c0(long *param_1,long param_2,long param_3,undefined8 param_4)\n\n{\n  undefined4 uVar1;\n  undefined1 *local_38 [2];\n  undefined1 local_28 [16];\n  \n  local_38[0] = local_28;\n  FUN_001665c0(local_38,param_2,param_3 + param_2);\n                    \n  uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);\n  if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }\n  return uVar1;\n}" (type_identifier "undefined4") (function_declarator "FUN_003127c0(long *param_1,long param_2,long param_3,undefined8 param_4)" (identifier "FUN_003127c0") (parameter_list "(long *param_1,long param_2,long param_3,undefined8 param_4)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) (, ",") (parameter_declaration "undefined8 param_4" (type_identifier "undefined8") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  undefined1 *local_38 [2];\n  undefined1 local_28 [16];\n  \n  local_38[0] = local_28;\n  FUN_001665c0(local_38,param_2,param_3 + param_2);\n                    \n  uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);\n  if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }\n  return uVar1;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "undefined1 *local_38 [2];" (type_identifier "undefined1") (pointer_declarator "*local_38 [2]" (* "*") (array_declarator "local_38 [2]" (identifier "local_38") ([ "[") (number_literal "2") (] "]"))) (; ";")) (declaration "undefined1 local_28 [16];" (type_identifier "undefined1") (array_declarator "local_28 [16]" (identifier "local_28") ([ "[") (number_literal "16") (] "]")) (; ";")) (expression_statement "local_38[0] = local_28;" (assignment_expression "local_38[0] = local_28" (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "local_28")) (; ";")) (expression_statement "FUN_001665c0(local_38,param_2,param_3 + param_2);" (call_expression "FUN_001665c0(local_38,param_2,param_3 + param_2)" (identifier "FUN_001665c0") (argument_list "(local_38,param_2,param_3 + param_2)" (( "(") (identifier "local_38") (, ",") (identifier "param_2") (, ",") (binary_expression "param_3 + param_2" (identifier "param_3") (+ "+") (identifier "param_2")) () ")"))) (; ";")) (expression_statement "uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);" (assignment_expression "uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4)" (identifier "uVar1") (= "=") (call_expression "(**(code **)(*param_1 + 0x10))(param_1,local_38,param_4)" (parenthesized_expression "(**(code **)(*param_1 + 0x10))" (( "(") (pointer_expression "**(code **)(*param_1 + 0x10)" (* "*") (pointer_expression "*(code **)(*param_1 + 0x10)" (* "*") (cast_expression "(code **)(*param_1 + 0x10)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x10)" (( "(") (binary_expression "*param_1 + 0x10" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x10")) () ")"))))) () ")")) (argument_list "(param_1,local_38,param_4)" (( "(") (identifier "param_1") (, ",") (identifier "local_38") (, ",") (identifier "param_4") () ")")))) (; ";")) (if_statement "if (local_38[0] != local_28) {\n    FUN_002dac70();\n  }" (if "if") (parenthesized_expression "(local_38[0] != local_28)" (( "(") (binary_expression "local_38[0] != local_28" (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) (!= "!=") (identifier "local_28")) () ")")) (compound_statement "{\n    FUN_002dac70();\n  }" ({ "{") (expression_statement "FUN_002dac70();" (call_expression "FUN_002dac70()" (identifier "FUN_002dac70") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

/* int std::__facet_shims::__messages_open<wchar_t>(std::integral_constant<bool, true>,
   std::locale::facet const*, char const*, unsigned long, std::locale const&) */

int std::__facet_shims::__messages_open<function_1>
              (long *param_1,long var_8,long var_7,type_1 param_4)

{
  int iVar1;
  basic_string<var_2,_std::char_traits<var_2>,_std::var_1<var_2>var_3> var_4;
  
  var_4._M_dataplus._M_p = (pointer)&var_4.field_2;
  __cxx11::basic_string<var_2,_std::char_traits<var_2>,_std::var_1<var_2>var_3>::
  var_5<var_6*>(&var_4,var_8,var_7 + var_8);
                    /* try { // try from 003127f1 to 003127f3 has its CatchHandler @ 00312813 */
  iVar1 = (**(type_2 **)(*param_1 + 0x10))(param_1,&var_4,param_4);
  if ((anon_union_16_2_edb7204a_for_basic_string<var_2,_std::char_traits<var_2>,_std::var_1<var_2>var_3>var_9
       *)var_4._M_dataplus._M_p != &var_4.field_2) {
    var_10(var_4._M_dataplus._M_p);
  }
  return iVar1;
}


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

undefined4 MASKED(long *param_1,long param_2,long param_3,undefined8 param_4)

{
  undefined4 uVar1;
  undefined1 *local_38 [2];
  undefined1 local_28 [16];
  
  local_38[0] = local_28;
  FUN_001665c0(local_38,param_2,param_3 + param_2);
                    /* try { // try from 003127f1 to 003127f3 has its CatchHandler @ 00312813 */
  uVar1 = (**(code **)(*param_1 + 0x10))(param_1,local_38,param_4);
  if (local_38[0] != local_28) {
    FUN_002dac70();
  }
  return uVar1;
}

