
/* std::__codecvt_utf16_base<char32_t>::do_out(__mbstate_t&, char32_t const*, char32_t const*,
   char32_t const*&, char*, char*, char*&) const */

undefined4 __thiscall
std::__codecvt_utf16_base<char32_t>::do_out
          (__codecvt_utf16_base<char32_t> *this,__mbstate_t *param_1,wchar32 *param_2,
          wchar32 *param_3,wchar32 **param_4,char *param_5,char *param_6,char **param_7)

{
  bool bVar1;
  undefined4 uVar2;
  char **ppcVar3;
  ulong uVar4;
  undefined8 uVar5;
  wchar32 *local_28;
  wchar32 *local_20;
  char *local_18;
  char *local_10;
  
  uVar5 = *(undefined8 *)(this + 0x10);
  uVar4 = (ulong)*(uint *)(this + 0x18);
  ppcVar3 = &local_18;
  local_10 = param_6;
  local_28 = param_2;
  local_20 = param_3;
  local_18 = param_5;
  bVar1 = (anonymous_namespace)::write_utf16_bom<false>(ppcVar3,uVar4);
  uVar2 = 1;
  if (bVar1) {
    uVar2 = (anonymous_namespace)::ucs4_out(&local_28,ppcVar3,uVar5,uVar4 & 0xffffffff);
  }
  *param_4 = local_28;
  *param_7 = local_18;
  return uVar2;
}



undefined4
FUN_002f6cc0(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)

{
  char cVar1;
  undefined4 uVar2;
  undefined8 *puVar3;
  ulong uVar4;
  undefined8 uVar5;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  uVar5 = *(undefined8 *)(param_1 + 0x10);
  uVar4 = (ulong)*(uint *)(param_1 + 0x18);
  puVar3 = &local_18;
  local_10 = param_7;
  local_28 = param_3;
  local_20 = param_4;
  local_18 = param_6;
  cVar1 = FUN_002f5780(puVar3,uVar4);
  uVar2 = 1;
  if (cVar1 != '\0') {
    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);
  }
  *param_5 = local_28;
  *param_8 = local_18;
  return uVar2;
}


SUB RSP,0x28
MOV R10,R8
MOV R11,qword ptr [RDI + 0x10]
MOV qword ptr [RSP + 0x10],R9
MOV R9D,dword ptr [RDI + 0x18]
LEA R8,[RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,R8
MOV qword ptr [RSP],RDX
MOV ESI,R9D
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x18],RAX
CALL 0x002f5780
MOV EDX,0x1
TEST AL,AL
JZ 0x002f6d13
MOV RDX,R11
MOV RDI,RSP
MOV ECX,R9D
MOV RSI,R8
CALL 0x002f5ff0
MOV EDX,EAX
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [R10],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RAX],RCX
MOV EAX,EDX
ADD RSP,0x28
RET
(translation_unit "undefined4\nFUN_002f6cc0(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  undefined8 *puVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  uVar5 = *(undefined8 *)(param_1 + 0x10);\n  uVar4 = (ulong)*(uint *)(param_1 + 0x18);\n  puVar3 = &local_18;\n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  cVar1 = FUN_002f5780(puVar3,uVar4);\n  uVar2 = 1;\n  if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}\n\n" (function_definition "undefined4\nFUN_002f6cc0(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  undefined8 *puVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  uVar5 = *(undefined8 *)(param_1 + 0x10);\n  uVar4 = (ulong)*(uint *)(param_1 + 0x18);\n  puVar3 = &local_18;\n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  cVar1 = FUN_002f5780(puVar3,uVar4);\n  uVar2 = 1;\n  if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" type_identifier (function_declarator "FUN_002f6cc0(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" identifier (parameter_list "(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "undefined8 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) , (parameter_declaration "undefined8 *param_8" type_identifier (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  undefined4 uVar2;\n  undefined8 *puVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  uVar5 = *(undefined8 *)(param_1 + 0x10);\n  uVar4 = (ulong)*(uint *)(param_1 + 0x18);\n  puVar3 = &local_18;\n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  cVar1 = FUN_002f5780(puVar3,uVar4);\n  uVar2 = 1;\n  if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "undefined8 local_28;" type_identifier identifier ;) (declaration "undefined8 local_20;" type_identifier identifier ;) (declaration "undefined8 local_18;" type_identifier identifier ;) (declaration "undefined8 local_10;" type_identifier identifier ;) (expression_statement "uVar5 = *(undefined8 *)(param_1 + 0x10);" (assignment_expression "uVar5 = *(undefined8 *)(param_1 + 0x10)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = (ulong)*(uint *)(param_1 + 0x18);" (assignment_expression "uVar4 = (ulong)*(uint *)(param_1 + 0x18)" identifier = (binary_expression "(ulong)*(uint *)(param_1 + 0x18)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = &local_18;" (assignment_expression "puVar3 = &local_18" identifier = (pointer_expression "&local_18" & identifier)) ;) (expression_statement "local_10 = param_7;" (assignment_expression "local_10 = param_7" identifier = identifier) ;) (expression_statement "local_28 = param_3;" (assignment_expression "local_28 = param_3" identifier = identifier) ;) (expression_statement "local_20 = param_4;" (assignment_expression "local_20 = param_4" identifier = identifier) ;) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" identifier = identifier) ;) (expression_statement "cVar1 = FUN_002f5780(puVar3,uVar4);" (assignment_expression "cVar1 = FUN_002f5780(puVar3,uVar4)" identifier = (call_expression "FUN_002f5780(puVar3,uVar4)" identifier (argument_list "(puVar3,uVar4)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (if_statement "if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }" if (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }" { (expression_statement "uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);" (assignment_expression "uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff)" identifier = (call_expression "FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff)" identifier (argument_list "(&local_28,puVar3,uVar5,uVar4 & 0xffffffff)" ( (pointer_expression "&local_28" & identifier) , identifier , identifier , (binary_expression "uVar4 & 0xffffffff" identifier & number_literal) )))) ;) })) (expression_statement "*param_5 = local_28;" (assignment_expression "*param_5 = local_28" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = local_18;" (assignment_expression "*param_8 = local_18" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* std::__codecvt_utf16_base<char32_t>::do_out(__mbstate_t&, char32_t const*, char32_t const*,\n   char32_t const*&, char*, char*, char*&) const */\n\nundefined4 __thiscall\nstd::__codecvt_utf16_base<char32_t>::do_out\n          (__codecvt_utf16_base<char32_t> *this,__mbstate_t *param_1,wchar32 *param_2,\n          wchar32 *param_3,wchar32 **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  bool bVar1;\n  undefined4 uVar2;\n  char **ppcVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  wchar32 *local_28;\n  wchar32 *local_20;\n  char *local_18;\n  char *local_10;\n  \n  uVar5 = *(undefined8 *)(this + 0x10);\n  uVar4 = (ulong)*(uint *)(this + 0x18);\n  ppcVar3 = &local_18;\n  local_10 = param_6;\n  local_28 = param_2;\n  local_20 = param_3;\n  local_18 = param_5;\n  bVar1 = (anonymous_namespace)::write_utf16_bom<false>(ppcVar3,uVar4);\n  uVar2 = 1;\n  if (bVar1) {\n    uVar2 = (anonymous_namespace)::ucs4_out(&local_28,ppcVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_4 = local_28;\n  *param_7 = local_18;\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 __thiscall\nstd::__codecvt_utf16_base<char32_t>::do_out\n          (__codecvt_utf16_base<char32_t> *this,__mbstate_t *param_1,wchar32 *param_2,\n          wchar32 *param_3,wchar32 **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  bool bVar1;\n  undefined4 uVar2;\n  char **ppcVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  wchar32 *local_28;\n  wchar32 *local_20;\n  char *local_18;\n  char *local_10;\n  \n  uVar5 = *(undefined8 *)(this + 0x10);\n  uVar4 = (ulong)*(uint *)(this + 0x18);\n  ppcVar3 = &local_18;\n  local_10 = param_6;\n  local_28 = param_2;\n  local_20 = param_3;\n  local_18 = param_5;\n  bVar1 = (anonymous_namespace)::write_utf16_bom<false>(ppcVar3,uVar4);\n  uVar2 = 1;\n  if (bVar1) {\n    uVar2 = (anonymous_namespace)::ucs4_out(&local_28,ppcVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_4 = local_28;\n  *param_7 = local_18;\n  return uVar2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::__codecvt_utf16_base<char32_t>::" identifier : : identifier < primitive_type > : :) (function_declarator "do_out\n          (__codecvt_utf16_base<char32_t> *this,__mbstate_t *param_1,wchar32 *param_2,\n          wchar32 *param_3,wchar32 **param_4,char *param_5,char *param_6,char **param_7)" identifier (parameter_list "(__codecvt_utf16_base<char32_t> *this,__mbstate_t *param_1,wchar32 *param_2,\n          wchar32 *param_3,wchar32 **param_4,char *param_5,char *param_6,char **param_7)" ( (parameter_declaration "__codecvt_utf16_base<char32_t> *this" type_identifier (ERROR "<char32_t>" < primitive_type >) (pointer_declarator "*this" * identifier)) , (parameter_declaration "__mbstate_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar32 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "wchar32 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "wchar32 **param_4" type_identifier (pointer_declarator "**param_4" * (pointer_declarator "*param_4" * identifier))) , (parameter_declaration "char *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "char *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "char **param_7" primitive_type (pointer_declarator "**param_7" * (pointer_declarator "*param_7" * identifier))) ))) (compound_statement "{\n  bool bVar1;\n  undefined4 uVar2;\n  char **ppcVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  wchar32 *local_28;\n  wchar32 *local_20;\n  char *local_18;\n  char *local_10;\n  \n  uVar5 = *(undefined8 *)(this + 0x10);\n  uVar4 = (ulong)*(uint *)(this + 0x18);\n  ppcVar3 = &local_18;\n  local_10 = param_6;\n  local_28 = param_2;\n  local_20 = param_3;\n  local_18 = param_5;\n  bVar1 = (anonymous_namespace)::write_utf16_bom<false>(ppcVar3,uVar4);\n  uVar2 = 1;\n  if (bVar1) {\n    uVar2 = (anonymous_namespace)::ucs4_out(&local_28,ppcVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_4 = local_28;\n  *param_7 = local_18;\n  return uVar2;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "char **ppcVar3;" primitive_type (pointer_declarator "**ppcVar3" * (pointer_declarator "*ppcVar3" * identifier)) ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "wchar32 *local_28;" type_identifier (pointer_declarator "*local_28" * identifier) ;) (declaration "wchar32 *local_20;" type_identifier (pointer_declarator "*local_20" * identifier) ;) (declaration "char *local_18;" primitive_type (pointer_declarator "*local_18" * identifier) ;) (declaration "char *local_10;" primitive_type (pointer_declarator "*local_10" * identifier) ;) (expression_statement "uVar5 = *(undefined8 *)(this + 0x10);" (assignment_expression "uVar5 = *(undefined8 *)(this + 0x10)" identifier = (pointer_expression "*(undefined8 *)(this + 0x10)" * (cast_expression "(undefined8 *)(this + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = (ulong)*(uint *)(this + 0x18);" (assignment_expression "uVar4 = (ulong)*(uint *)(this + 0x18)" identifier = (binary_expression "(ulong)*(uint *)(this + 0x18)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(uint *)(this + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) ))))) ;) (expression_statement "ppcVar3 = &local_18;" (assignment_expression "ppcVar3 = &local_18" identifier = (pointer_expression "&local_18" & identifier)) ;) (expression_statement "local_10 = param_6;" (assignment_expression "local_10 = param_6" identifier = identifier) ;) (expression_statement "local_28 = param_2;" (assignment_expression "local_28 = param_2" identifier = identifier) ;) (expression_statement "local_20 = param_3;" (assignment_expression "local_20 = param_3" identifier = identifier) ;) (expression_statement "local_18 = param_5;" (assignment_expression "local_18 = param_5" identifier = identifier) ;) (expression_statement "bVar1 = (anonymous_namespace)::write_utf16_bom<false>(ppcVar3,uVar4);" (binary_expression "bVar1 = (anonymous_namespace)::write_utf16_bom<false>(ppcVar3,uVar4)" (binary_expression "bVar1 = (anonymous_namespace)::write_utf16_bom<false" (assignment_expression "bVar1 = (anonymous_namespace)" identifier = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) (ERROR "::write_utf16_bom" : : identifier) < false) > (parenthesized_expression "(ppcVar3,uVar4)" ( (comma_expression "ppcVar3,uVar4" identifier , identifier) ))) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (if_statement "if (bVar1) {\n    uVar2 = (anonymous_namespace)::ucs4_out(&local_28,ppcVar3,uVar5,uVar4 & 0xffffffff);\n  }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n    uVar2 = (anonymous_namespace)::ucs4_out(&local_28,ppcVar3,uVar5,uVar4 & 0xffffffff);\n  }" { (ERROR "uVar2 = (anonymous_namespace)::" (assignment_expression "uVar2 = (anonymous_namespace)" identifier = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) : :) (expression_statement "ucs4_out(&local_28,ppcVar3,uVar5,uVar4 & 0xffffffff);" (call_expression "ucs4_out(&local_28,ppcVar3,uVar5,uVar4 & 0xffffffff)" identifier (argument_list "(&local_28,ppcVar3,uVar5,uVar4 & 0xffffffff)" ( (pointer_expression "&local_28" & identifier) , identifier , identifier , (binary_expression "uVar4 & 0xffffffff" identifier & number_literal) ))) ;) })) (expression_statement "*param_4 = local_28;" (assignment_expression "*param_4 = local_28" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "*param_7 = local_18;" (assignment_expression "*param_7 = local_18" (pointer_expression "*param_7" * identifier) = identifier) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "undefined4\nFUN_002f6cc0(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  undefined8 *puVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  uVar5 = *(undefined8 *)(param_1 + 0x10);\n  uVar4 = (ulong)*(uint *)(param_1 + 0x18);\n  puVar3 = &local_18;\n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  cVar1 = FUN_002f5780(puVar3,uVar4);\n  uVar2 = 1;\n  if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}\n\n" (function_definition "undefined4\nFUN_002f6cc0(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  undefined8 *puVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  uVar5 = *(undefined8 *)(param_1 + 0x10);\n  uVar4 = (ulong)*(uint *)(param_1 + 0x18);\n  puVar3 = &local_18;\n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  cVar1 = FUN_002f5780(puVar3,uVar4);\n  uVar2 = 1;\n  if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" type_identifier (function_declarator "FUN_002f6cc0(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" identifier (parameter_list "(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "undefined8 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) , (parameter_declaration "undefined8 *param_8" type_identifier (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  undefined4 uVar2;\n  undefined8 *puVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  uVar5 = *(undefined8 *)(param_1 + 0x10);\n  uVar4 = (ulong)*(uint *)(param_1 + 0x18);\n  puVar3 = &local_18;\n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  cVar1 = FUN_002f5780(puVar3,uVar4);\n  uVar2 = 1;\n  if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "undefined8 uVar5;" type_identifier identifier ;) (declaration "undefined8 local_28;" type_identifier identifier ;) (declaration "undefined8 local_20;" type_identifier identifier ;) (declaration "undefined8 local_18;" type_identifier identifier ;) (declaration "undefined8 local_10;" type_identifier identifier ;) (expression_statement "uVar5 = *(undefined8 *)(param_1 + 0x10);" (assignment_expression "uVar5 = *(undefined8 *)(param_1 + 0x10)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x10)" * (cast_expression "(undefined8 *)(param_1 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = (ulong)*(uint *)(param_1 + 0x18);" (assignment_expression "uVar4 = (ulong)*(uint *)(param_1 + 0x18)" identifier = (binary_expression "(ulong)*(uint *)(param_1 + 0x18)" (parenthesized_expression "(ulong)" ( identifier )) * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = &local_18;" (assignment_expression "puVar3 = &local_18" identifier = (pointer_expression "&local_18" & identifier)) ;) (expression_statement "local_10 = param_7;" (assignment_expression "local_10 = param_7" identifier = identifier) ;) (expression_statement "local_28 = param_3;" (assignment_expression "local_28 = param_3" identifier = identifier) ;) (expression_statement "local_20 = param_4;" (assignment_expression "local_20 = param_4" identifier = identifier) ;) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" identifier = identifier) ;) (expression_statement "cVar1 = FUN_002f5780(puVar3,uVar4);" (assignment_expression "cVar1 = FUN_002f5780(puVar3,uVar4)" identifier = (call_expression "FUN_002f5780(puVar3,uVar4)" identifier (argument_list "(puVar3,uVar4)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (if_statement "if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }" if (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }" { (expression_statement "uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);" (assignment_expression "uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff)" identifier = (call_expression "FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff)" identifier (argument_list "(&local_28,puVar3,uVar5,uVar4 & 0xffffffff)" ( (pointer_expression "&local_28" & identifier) , identifier , identifier , (binary_expression "uVar4 & 0xffffffff" identifier & number_literal) )))) ;) })) (expression_statement "*param_5 = local_28;" (assignment_expression "*param_5 = local_28" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = local_18;" (assignment_expression "*param_8 = local_18" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT , IDENT , (binary_expression IDENT & LIT) )))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4\nFUN_002f6cc0(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  undefined8 *puVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  uVar5 = *(undefined8 *)(param_1 + 0x10);\n  uVar4 = (ulong)*(uint *)(param_1 + 0x18);\n  puVar3 = &local_18;\n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  cVar1 = FUN_002f5780(puVar3,uVar4);\n  uVar2 = 1;\n  if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "FUN_002f6cc0(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" (identifier "FUN_002f6cc0") (parameter_list "(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "undefined8 param_3" (type_identifier "undefined8") (identifier "param_3")) (, ",") (parameter_declaration "undefined8 param_4" (type_identifier "undefined8") (identifier "param_4")) (, ",") (parameter_declaration "undefined8 *param_5" (type_identifier "undefined8") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "undefined8 param_6" (type_identifier "undefined8") (identifier "param_6")) (, ",") (parameter_declaration "undefined8 param_7" (type_identifier "undefined8") (identifier "param_7")) (, ",") (parameter_declaration "undefined8 *param_8" (type_identifier "undefined8") (pointer_declarator "*param_8" (* "*") (identifier "param_8"))) () ")"))) (compound_statement "{\n  char cVar1;\n  undefined4 uVar2;\n  undefined8 *puVar3;\n  ulong uVar4;\n  undefined8 uVar5;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  uVar5 = *(undefined8 *)(param_1 + 0x10);\n  uVar4 = (ulong)*(uint *)(param_1 + 0x18);\n  puVar3 = &local_18;\n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  cVar1 = FUN_002f5780(puVar3,uVar4);\n  uVar2 = 1;\n  if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined8 *puVar3;" (type_identifier "undefined8") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "undefined8 uVar5;" (type_identifier "undefined8") (identifier "uVar5") (; ";")) (declaration "undefined8 local_28;" (type_identifier "undefined8") (identifier "local_28") (; ";")) (declaration "undefined8 local_20;" (type_identifier "undefined8") (identifier "local_20") (; ";")) (declaration "undefined8 local_18;" (type_identifier "undefined8") (identifier "local_18") (; ";")) (declaration "undefined8 local_10;" (type_identifier "undefined8") (identifier "local_10") (; ";")) (expression_statement "uVar5 = *(undefined8 *)(param_1 + 0x10);" (assignment_expression "uVar5 = *(undefined8 *)(param_1 + 0x10)" (identifier "uVar5") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uVar4 = (ulong)*(uint *)(param_1 + 0x18);" (assignment_expression "uVar4 = (ulong)*(uint *)(param_1 + 0x18)" (identifier "uVar4") (= "=") (binary_expression "(ulong)*(uint *)(param_1 + 0x18)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (* "*") (cast_expression "(uint *)(param_1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "puVar3 = &local_18;" (assignment_expression "puVar3 = &local_18" (identifier "puVar3") (= "=") (pointer_expression "&local_18" (& "&") (identifier "local_18"))) (; ";")) (expression_statement "local_10 = param_7;" (assignment_expression "local_10 = param_7" (identifier "local_10") (= "=") (identifier "param_7")) (; ";")) (expression_statement "local_28 = param_3;" (assignment_expression "local_28 = param_3" (identifier "local_28") (= "=") (identifier "param_3")) (; ";")) (expression_statement "local_20 = param_4;" (assignment_expression "local_20 = param_4" (identifier "local_20") (= "=") (identifier "param_4")) (; ";")) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" (identifier "local_18") (= "=") (identifier "param_6")) (; ";")) (expression_statement "cVar1 = FUN_002f5780(puVar3,uVar4);" (assignment_expression "cVar1 = FUN_002f5780(puVar3,uVar4)" (identifier "cVar1") (= "=") (call_expression "FUN_002f5780(puVar3,uVar4)" (identifier "FUN_002f5780") (argument_list "(puVar3,uVar4)" (( "(") (identifier "puVar3") (, ",") (identifier "uVar4") () ")")))) (; ";")) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (if_statement "if (cVar1 != '\0') {\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }" (if "if") (parenthesized_expression "(cVar1 != '\0')" (( "(") (binary_expression "cVar1 != '\0'" (identifier "cVar1") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);\n  }" ({ "{") (expression_statement "uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);" (assignment_expression "uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff)" (identifier "uVar2") (= "=") (call_expression "FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff)" (identifier "FUN_002f5ff0") (argument_list "(&local_28,puVar3,uVar5,uVar4 & 0xffffffff)" (( "(") (pointer_expression "&local_28" (& "&") (identifier "local_28")) (, ",") (identifier "puVar3") (, ",") (identifier "uVar5") (, ",") (binary_expression "uVar4 & 0xffffffff" (identifier "uVar4") (& "&") (number_literal "0xffffffff")) () ")")))) (; ";")) (} "}"))) (expression_statement "*param_5 = local_28;" (assignment_expression "*param_5 = local_28" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_28")) (; ";")) (expression_statement "*param_8 = local_18;" (assignment_expression "*param_8 = local_18" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "local_18")) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

/* std::__codecvt_utf16_base<char32_t>::do_out(__mbstate_t&, char32_t const*, char32_t const*,
   char32_t const*&, char*, char*, char*&) const */

type_1 __thiscall
std::type_2<char32_t>::function_1
          (type_2<char32_t> *var_1,type_3 *param_1,type_4 *param_2,
          type_4 *param_3,type_4 **param_4,char *param_5,char *param_6,char **param_7)

{
  bool bVar1;
  type_1 uVar2;
  char **ppcVar3;
  type_5 var_3;
  type_6 uVar5;
  type_4 *local_28;
  type_4 *local_20;
  char *local_18;
  char *local_10;
  
  uVar5 = *(type_6 *)(var_1 + 0x10);
  var_3 = (type_5)*(type_7 *)(var_1 + 0x18);
  ppcVar3 = &local_18;
  local_10 = param_6;
  local_28 = param_2;
  local_20 = param_3;
  local_18 = param_5;
  bVar1 = (anonymous_namespace)::write_utf16_bom<false>(ppcVar3,var_3);
  uVar2 = 1;
  if (bVar1) {
    uVar2 = (anonymous_namespace)::var_2(&local_28,ppcVar3,uVar5,var_3 & 0xffffffff);
  }
  *param_4 = local_28;
  *param_7 = local_18;
  return uVar2;
}


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

undefined4
MASKED(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)

{
  char cVar1;
  undefined4 uVar2;
  undefined8 *puVar3;
  ulong uVar4;
  undefined8 uVar5;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  uVar5 = *(undefined8 *)(param_1 + 0x10);
  uVar4 = (ulong)*(uint *)(param_1 + 0x18);
  puVar3 = &local_18;
  local_10 = param_7;
  local_28 = param_3;
  local_20 = param_4;
  local_18 = param_6;
  cVar1 = FUN_002f5780(puVar3,uVar4);
  uVar2 = 1;
  if (cVar1 != '\0') {
    uVar2 = FUN_002f5ff0(&local_28,puVar3,uVar5,uVar4 & 0xffffffff);
  }
  *param_5 = local_28;
  *param_8 = local_18;
  return uVar2;
}

