
/* std::ctype<wchar_t>::_M_initialize_ctype() */

void __thiscall std::ctype<wchar_t>::_M_initialize_ctype(ctype<wchar_t> *this)

{
  undefined8 uVar1;
  undefined8 uVar2;
  int iVar3;
  wint_t wVar4;
  long lVar5;
  ushort uVar6;
  ulong uVar7;
  
  lVar5 = 0;
  uVar1 = __uselocale(*(undefined8 *)(this + 0x10));
  do {
                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */
    iVar3 = wctob((wint_t)lVar5);
    if (iVar3 == -1) {
      this[0x18] = (ctype<wchar_t>)0x0;
      goto LAB_002d7c55;
    }
    this[lVar5 + 0x19] = SUB41(iVar3,0);
    lVar5 = lVar5 + 1;
  } while (lVar5 != 0x80);
  this[0x18] = (ctype<wchar_t>)0x1;
LAB_002d7c55:
  lVar5 = 0;
  do {
                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */
    wVar4 = btowc((int)lVar5);
    *(wint_t *)(this + lVar5 * 4 + 0x9c) = wVar4;
    lVar5 = lVar5 + 1;
  } while (lVar5 != 0x100);
  uVar7 = 0;
  do {
    iVar3 = 1 << ((byte)uVar7 & 0x1f);
    if (uVar7 < 8) {
      uVar6 = (ushort)(iVar3 << 8);
      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;
      uVar2 = _M_convert_to_wmask(this,uVar6);
      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;
    }
    else {
      uVar6 = (ushort)((uint)iVar3 >> 8);
      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;
      uVar2 = _M_convert_to_wmask(this,uVar6);
      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;
      if (uVar7 == 0xb) {
        __uselocale(uVar1);
        return;
      }
    }
    uVar7 = uVar7 + 1;
  } while( true );
}



void FUN_002d7c10(long param_1)

{
  undefined8 uVar1;
  undefined8 uVar2;
  int iVar3;
  wint_t wVar4;
  long lVar5;
  uint uVar6;
  ulong uVar7;
  
  lVar5 = 0;
  uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));
  do {
                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */
    iVar3 = wctob((wint_t)lVar5);
    if (iVar3 == -1) {
      *(undefined1 *)(param_1 + 0x18) = 0;
      goto LAB_002d7c55;
    }
    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;
    lVar5 = lVar5 + 1;
  } while (lVar5 != 0x80);
  *(undefined1 *)(param_1 + 0x18) = 1;
LAB_002d7c55:
  lVar5 = 0;
  do {
                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */
    wVar4 = btowc((int)lVar5);
    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;
    lVar5 = lVar5 + 1;
  } while (lVar5 != 0x100);
  uVar7 = 0;
  do {
    iVar3 = 1 << ((byte)uVar7 & 0x1f);
    if (uVar7 < 8) {
      uVar6 = iVar3 << 8;
      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;
      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);
      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;
    }
    else {
      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);
      uVar2 = FUN_002d7650(param_1);
      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;
      if (uVar7 == 0xb) {
        __uselocale(uVar1);
        return;
      }
    }
    uVar7 = uVar7 + 1;
  } while( true );
}


PUSH R13
PUSH R12
PUSH RBP
MOV RBP,RDI
PUSH RBX
XOR EBX,EBX
SUB RSP,0x8
MOV RDI,qword ptr [RDI + 0x10]
CALL 0x00144780
MOV R12,RAX
JMP 0x002d7c45
MOV byte ptr [RBP + RBX*0x1 + 0x19],AL
ADD RBX,0x1
CMP RBX,0x80
JZ 0x002d7cec
MOV EDI,EBX
CALL 0x00144530
CMP EAX,-0x1
JNZ 0x002d7c30
MOV byte ptr [RBP + 0x18],0x0
XOR EBX,EBX
NOP word ptr [RAX + RAX*0x1]
MOV EDI,EBX
CALL 0x00144950
MOV dword ptr [RBP + RBX*0x4 + 0x9c],EAX
ADD RBX,0x1
CMP RBX,0x100
JNZ 0x002d7c60
XOR R13D,R13D
MOV EBX,0x1
JMP 0x002d7cab
SHL ESI,0x8
MOV RDI,RBP
MOV word ptr [RBP + R13*0x2 + 0x49c],SI
MOVZX ESI,SI
CALL 0x002d7650
MOV qword ptr [RBP + R13*0x8 + 0x4c0],RAX
ADD R13,0x1
MOV ESI,EBX
MOV ECX,R13D
SHL ESI,CL
CMP R13,0x7
JBE 0x002d7c88
SAR ESI,0x8
MOV RDI,RBP
MOV word ptr [RBP + R13*0x2 + 0x49c],SI
CALL 0x002d7650
MOV qword ptr [RBP + R13*0x8 + 0x4c0],RAX
CMP R13,0xb
JNZ 0x002d7ca7
ADD RSP,0x8
MOV RDI,R12
POP RBX
POP RBP
POP R12
POP R13
JMP 0x00144780
MOV byte ptr [RBP + 0x18],0x1
JMP 0x002d7c55
(translation_unit "void FUN_002d7c10(long param_1)\n\n{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  uint uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  do {\n                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */\n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  *(undefined1 *)(param_1 + 0x18) = 1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */\n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}\n\n" (function_definition "void FUN_002d7c10(long param_1)\n\n{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  uint uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  do {\n                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */\n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  *(undefined1 *)(param_1 + 0x18) = 1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */\n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}" primitive_type (function_declarator "FUN_002d7c10(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  uint uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  do {\n                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */\n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  *(undefined1 *)(param_1 + 0x18) = 1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */\n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "wint_t wVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "ulong uVar7;" type_identifier identifier ;) (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));" (assignment_expression "uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10))" identifier = (call_expression "__uselocale(*(undefined8 *)(param_1 + 0x10))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x10))" ( (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) )))) )))) ;) (do_statement "do {\n                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */\n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);" do (compound_statement "{\n                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */\n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  }" { comment (expression_statement "iVar3 = wctob((wint_t)lVar5);" (assignment_expression "iVar3 = wctob((wint_t)lVar5)" identifier = (call_expression "wctob((wint_t)lVar5)" identifier (argument_list "((wint_t)lVar5)" ( (cast_expression "(wint_t)lVar5" ( (type_descriptor "wint_t" type_identifier) ) identifier) )))) ;) (if_statement "if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }" { (expression_statement "*(undefined1 *)(param_1 + 0x18) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x18) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x18)" * (cast_expression "(undefined1 *)(param_1 + 0x18)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_002d7c55;" goto statement_identifier ;) })) (expression_statement "*(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;" (assignment_expression "*(char *)(param_1 + 0x19 + lVar5) = (char)iVar3" (pointer_expression "*(char *)(param_1 + 0x19 + lVar5)" * (cast_expression "(char *)(param_1 + 0x19 + lVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x19 + lVar5)" ( (binary_expression "param_1 + 0x19 + lVar5" (binary_expression "param_1 + 0x19" identifier + number_literal) + identifier) )))) = (cast_expression "(char)iVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" identifier = (binary_expression "lVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar5 != 0x80)" ( (binary_expression "lVar5 != 0x80" identifier != number_literal) )) ;) (expression_statement "*(undefined1 *)(param_1 + 0x18) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x18) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x18)" * (cast_expression "(undefined1 *)(param_1 + 0x18)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_002d7c55:\n  lVar5 = 0;" statement_identifier : (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" identifier = number_literal) ;)) (do_statement "do {\n                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */\n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);" do (compound_statement "{\n                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */\n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  }" { comment (expression_statement "wVar4 = btowc((int)lVar5);" (assignment_expression "wVar4 = btowc((int)lVar5)" identifier = (call_expression "btowc((int)lVar5)" identifier (argument_list "((int)lVar5)" ( (cast_expression "(int)lVar5" ( (type_descriptor "int" primitive_type) ) identifier) )))) ;) (expression_statement "*(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;" (assignment_expression "*(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4" (pointer_expression "*(wint_t *)(param_1 + 0x9c + lVar5 * 4)" * (cast_expression "(wint_t *)(param_1 + 0x9c + lVar5 * 4)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x9c + lVar5 * 4)" ( (binary_expression "param_1 + 0x9c + lVar5 * 4" (binary_expression "param_1 + 0x9c" identifier + number_literal) + (binary_expression "lVar5 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" identifier = (binary_expression "lVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar5 != 0x100)" ( (binary_expression "lVar5 != 0x100" identifier != number_literal) )) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (do_statement "do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );" do (compound_statement "{\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  }" { (expression_statement "iVar3 = 1 << ((byte)uVar7 & 0x1f);" (assignment_expression "iVar3 = 1 << ((byte)uVar7 & 0x1f)" identifier = (binary_expression "1 << ((byte)uVar7 & 0x1f)" number_literal << (parenthesized_expression "((byte)uVar7 & 0x1f)" ( (binary_expression "(byte)uVar7 & 0x1f" (cast_expression "(byte)uVar7" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" if (parenthesized_expression "(uVar7 < 8)" ( (binary_expression "uVar7 < 8" identifier < number_literal) )) (compound_statement "{\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }" { (expression_statement "uVar6 = iVar3 << 8;" (assignment_expression "uVar6 = iVar3 << 8" identifier = (binary_expression "iVar3 << 8" identifier << number_literal)) ;) (expression_statement "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;" (assignment_expression "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6" (pointer_expression "*(short *)(param_1 + 0x49c + uVar7 * 2)" * (cast_expression "(short *)(param_1 + 0x49c + uVar7 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x49c + uVar7 * 2)" ( (binary_expression "param_1 + 0x49c + uVar7 * 2" (binary_expression "param_1 + 0x49c" identifier + number_literal) + (binary_expression "uVar7 * 2" identifier * number_literal)) )))) = (cast_expression "(short)uVar6" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);" (assignment_expression "uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff)" identifier = (call_expression "FUN_002d7650(param_1,uVar6 & 0xffff)" identifier (argument_list "(param_1,uVar6 & 0xffff)" ( identifier , (binary_expression "uVar6 & 0xffff" identifier & number_literal) )))) ;) (expression_statement "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" * (cast_expression "(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c0 + uVar7 * 8)" ( (binary_expression "param_1 + 0x4c0 + uVar7 * 8" (binary_expression "param_1 + 0x4c0" identifier + number_literal) + (binary_expression "uVar7 * 8" identifier * number_literal)) )))) = identifier) ;) }) (else_clause "else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" else (compound_statement "{\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" { (expression_statement "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);" (assignment_expression "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8)" (pointer_expression "*(short *)(param_1 + 0x49c + uVar7 * 2)" * (cast_expression "(short *)(param_1 + 0x49c + uVar7 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x49c + uVar7 * 2)" ( (binary_expression "param_1 + 0x49c + uVar7 * 2" (binary_expression "param_1 + 0x49c" identifier + number_literal) + (binary_expression "uVar7 * 2" identifier * number_literal)) )))) = (cast_expression "(short)((uint)iVar3 >> 8)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((uint)iVar3 >> 8)" ( (binary_expression "(uint)iVar3 >> 8" (cast_expression "(uint)iVar3" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "uVar2 = FUN_002d7650(param_1);" (assignment_expression "uVar2 = FUN_002d7650(param_1)" identifier = (call_expression "FUN_002d7650(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" * (cast_expression "(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c0 + uVar7 * 8)" ( (binary_expression "param_1 + 0x4c0 + uVar7 * 8" (binary_expression "param_1 + 0x4c0" identifier + number_literal) + (binary_expression "uVar7 * 8" identifier * number_literal)) )))) = identifier) ;) (if_statement "if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }" if (parenthesized_expression "(uVar7 == 0xb)" ( (binary_expression "uVar7 == 0xb" identifier == number_literal) )) (compound_statement "{\n        __uselocale(uVar1);\n        return;\n      }" { (expression_statement "__uselocale(uVar1);" (call_expression "__uselocale(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (return_statement "return;" return ;) })) }))) (expression_statement "uVar7 = uVar7 + 1;" (assignment_expression "uVar7 = uVar7 + 1" identifier = (binary_expression "uVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "/* std::ctype<wchar_t>::_M_initialize_ctype() */\n\nvoid __thiscall std::ctype<wchar_t>::_M_initialize_ctype(ctype<wchar_t> *this)\n\n{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  ushort uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(this + 0x10));\n  do {\n                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */\n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      this[0x18] = (ctype<wchar_t>)0x0;\n      goto LAB_002d7c55;\n    }\n    this[lVar5 + 0x19] = SUB41(iVar3,0);\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  this[0x18] = (ctype<wchar_t>)0x1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */\n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(this + lVar5 * 4 + 0x9c) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n    }\n    else {\n      uVar6 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}\n\n" comment (function_definition "void __thiscall std::ctype<wchar_t>::_M_initialize_ctype(ctype<wchar_t> *this)\n\n{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  ushort uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(this + 0x10));\n  do {\n                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */\n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      this[0x18] = (ctype<wchar_t>)0x0;\n      goto LAB_002d7c55;\n    }\n    this[lVar5 + 0x19] = SUB41(iVar3,0);\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  this[0x18] = (ctype<wchar_t>)0x1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */\n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(this + lVar5 * 4 + 0x9c) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n    }\n    else {\n      uVar6 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::ctype<wchar_t>::" identifier : : identifier < identifier > : :) (function_declarator "_M_initialize_ctype(ctype<wchar_t> *this)" identifier (parameter_list "(ctype<wchar_t> *this)" ( (parameter_declaration "ctype<wchar_t> *this" type_identifier (ERROR "<wchar_t>" < identifier >) (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  ushort uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(this + 0x10));\n  do {\n                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */\n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      this[0x18] = (ctype<wchar_t>)0x0;\n      goto LAB_002d7c55;\n    }\n    this[lVar5 + 0x19] = SUB41(iVar3,0);\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  this[0x18] = (ctype<wchar_t>)0x1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */\n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(this + lVar5 * 4 + 0x9c) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n    }\n    else {\n      uVar6 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "wint_t wVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "ushort uVar6;" type_identifier identifier ;) (declaration "ulong uVar7;" type_identifier identifier ;) (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar1 = __uselocale(*(undefined8 *)(this + 0x10));" (assignment_expression "uVar1 = __uselocale(*(undefined8 *)(this + 0x10))" identifier = (call_expression "__uselocale(*(undefined8 *)(this + 0x10))" identifier (argument_list "(*(undefined8 *)(this + 0x10))" ( (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) )))) )))) ;) (do_statement "do {\n                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */\n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      this[0x18] = (ctype<wchar_t>)0x0;\n      goto LAB_002d7c55;\n    }\n    this[lVar5 + 0x19] = SUB41(iVar3,0);\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);" do (compound_statement "{\n                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */\n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      this[0x18] = (ctype<wchar_t>)0x0;\n      goto LAB_002d7c55;\n    }\n    this[lVar5 + 0x19] = SUB41(iVar3,0);\n    lVar5 = lVar5 + 1;\n  }" { comment (expression_statement "iVar3 = wctob((wint_t)lVar5);" (assignment_expression "iVar3 = wctob((wint_t)lVar5)" identifier = (call_expression "wctob((wint_t)lVar5)" identifier (argument_list "((wint_t)lVar5)" ( (cast_expression "(wint_t)lVar5" ( (type_descriptor "wint_t" type_identifier) ) identifier) )))) ;) (if_statement "if (iVar3 == -1) {\n      this[0x18] = (ctype<wchar_t>)0x0;\n      goto LAB_002d7c55;\n    }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n      this[0x18] = (ctype<wchar_t>)0x0;\n      goto LAB_002d7c55;\n    }" { (expression_statement "this[0x18] = (ctype<wchar_t>)0x0;" (assignment_expression "this[0x18] = (ctype<wchar_t>)0x0" (subscript_expression "this[0x18]" identifier [ number_literal ]) = (parenthesized_expression "(ctype<wchar_t>)0x0" ( (binary_expression "ctype<wchar_t>)0x0" (binary_expression "ctype<wchar_t" identifier < identifier) > (ERROR ")" )) number_literal) ))) ;) (goto_statement "goto LAB_002d7c55;" goto statement_identifier ;) })) (expression_statement "this[lVar5 + 0x19] = SUB41(iVar3,0);" (assignment_expression "this[lVar5 + 0x19] = SUB41(iVar3,0)" (subscript_expression "this[lVar5 + 0x19]" identifier [ (binary_expression "lVar5 + 0x19" identifier + number_literal) ]) = (call_expression "SUB41(iVar3,0)" identifier (argument_list "(iVar3,0)" ( identifier , number_literal )))) ;) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" identifier = (binary_expression "lVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar5 != 0x80)" ( (binary_expression "lVar5 != 0x80" identifier != number_literal) )) ;) (expression_statement "this[0x18] = (ctype<wchar_t>)0x1;" (assignment_expression "this[0x18] = (ctype<wchar_t>)0x1" (subscript_expression "this[0x18]" identifier [ number_literal ]) = (parenthesized_expression "(ctype<wchar_t>)0x1" ( (binary_expression "ctype<wchar_t>)0x1" (binary_expression "ctype<wchar_t" identifier < identifier) > (ERROR ")" )) number_literal) ))) ;) (labeled_statement "LAB_002d7c55:\n  lVar5 = 0;" statement_identifier : (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" identifier = number_literal) ;)) (do_statement "do {\n                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */\n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(this + lVar5 * 4 + 0x9c) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);" do (compound_statement "{\n                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */\n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(this + lVar5 * 4 + 0x9c) = wVar4;\n    lVar5 = lVar5 + 1;\n  }" { comment (expression_statement "wVar4 = btowc((int)lVar5);" (assignment_expression "wVar4 = btowc((int)lVar5)" identifier = (call_expression "btowc((int)lVar5)" identifier (argument_list "((int)lVar5)" ( (cast_expression "(int)lVar5" ( (type_descriptor "int" primitive_type) ) identifier) )))) ;) (expression_statement "*(wint_t *)(this + lVar5 * 4 + 0x9c) = wVar4;" (assignment_expression "*(wint_t *)(this + lVar5 * 4 + 0x9c) = wVar4" (pointer_expression "*(wint_t *)(this + lVar5 * 4 + 0x9c)" * (cast_expression "(wint_t *)(this + lVar5 * 4 + 0x9c)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + lVar5 * 4 + 0x9c)" ( (binary_expression "this + lVar5 * 4 + 0x9c" (binary_expression "this + lVar5 * 4" identifier + (binary_expression "lVar5 * 4" identifier * number_literal)) + number_literal) )))) = identifier) ;) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" identifier = (binary_expression "lVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar5 != 0x100)" ( (binary_expression "lVar5 != 0x100" identifier != number_literal) )) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (do_statement "do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n    }\n    else {\n      uVar6 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );" do (compound_statement "{\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n    }\n    else {\n      uVar6 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  }" { (expression_statement "iVar3 = 1 << ((byte)uVar7 & 0x1f);" (assignment_expression "iVar3 = 1 << ((byte)uVar7 & 0x1f)" identifier = (binary_expression "1 << ((byte)uVar7 & 0x1f)" number_literal << (parenthesized_expression "((byte)uVar7 & 0x1f)" ( (binary_expression "(byte)uVar7 & 0x1f" (cast_expression "(byte)uVar7" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if (uVar7 < 8) {\n      uVar6 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n    }\n    else {\n      uVar6 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" if (parenthesized_expression "(uVar7 < 8)" ( (binary_expression "uVar7 < 8" identifier < number_literal) )) (compound_statement "{\n      uVar6 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n    }" { (expression_statement "uVar6 = (ushort)(iVar3 << 8);" (assignment_expression "uVar6 = (ushort)(iVar3 << 8)" identifier = (call_expression "(ushort)(iVar3 << 8)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "(iVar3 << 8)" ( (binary_expression "iVar3 << 8" identifier << number_literal) )))) ;) (expression_statement "*(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;" (assignment_expression "*(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6" (pointer_expression "*(ushort *)(this + uVar7 * 2 + 0x49c)" * (cast_expression "(ushort *)(this + uVar7 * 2 + 0x49c)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + uVar7 * 2 + 0x49c)" ( (binary_expression "this + uVar7 * 2 + 0x49c" (binary_expression "this + uVar7 * 2" identifier + (binary_expression "uVar7 * 2" identifier * number_literal)) + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = _M_convert_to_wmask(this,uVar6);" (assignment_expression "uVar2 = _M_convert_to_wmask(this,uVar6)" identifier = (call_expression "_M_convert_to_wmask(this,uVar6)" identifier (argument_list "(this,uVar6)" ( identifier , identifier )))) ;) (expression_statement "*(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;" (assignment_expression "*(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2" (pointer_expression "*(undefined8 *)(this + uVar7 * 8 + 0x4c0)" * (cast_expression "(undefined8 *)(this + uVar7 * 8 + 0x4c0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + uVar7 * 8 + 0x4c0)" ( (binary_expression "this + uVar7 * 8 + 0x4c0" (binary_expression "this + uVar7 * 8" identifier + (binary_expression "uVar7 * 8" identifier * number_literal)) + number_literal) )))) = identifier) ;) }) (else_clause "else {\n      uVar6 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" else (compound_statement "{\n      uVar6 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;\n      uVar2 = _M_convert_to_wmask(this,uVar6);\n      *(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" { (expression_statement "uVar6 = (ushort)((uint)iVar3 >> 8);" (assignment_expression "uVar6 = (ushort)((uint)iVar3 >> 8)" identifier = (call_expression "(ushort)((uint)iVar3 >> 8)" (parenthesized_expression "(ushort)" ( identifier )) (argument_list "((uint)iVar3 >> 8)" ( (binary_expression "(uint)iVar3 >> 8" (cast_expression "(uint)iVar3" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "*(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6;" (assignment_expression "*(ushort *)(this + uVar7 * 2 + 0x49c) = uVar6" (pointer_expression "*(ushort *)(this + uVar7 * 2 + 0x49c)" * (cast_expression "(ushort *)(this + uVar7 * 2 + 0x49c)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + uVar7 * 2 + 0x49c)" ( (binary_expression "this + uVar7 * 2 + 0x49c" (binary_expression "this + uVar7 * 2" identifier + (binary_expression "uVar7 * 2" identifier * number_literal)) + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = _M_convert_to_wmask(this,uVar6);" (assignment_expression "uVar2 = _M_convert_to_wmask(this,uVar6)" identifier = (call_expression "_M_convert_to_wmask(this,uVar6)" identifier (argument_list "(this,uVar6)" ( identifier , identifier )))) ;) (expression_statement "*(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2;" (assignment_expression "*(undefined8 *)(this + uVar7 * 8 + 0x4c0) = uVar2" (pointer_expression "*(undefined8 *)(this + uVar7 * 8 + 0x4c0)" * (cast_expression "(undefined8 *)(this + uVar7 * 8 + 0x4c0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + uVar7 * 8 + 0x4c0)" ( (binary_expression "this + uVar7 * 8 + 0x4c0" (binary_expression "this + uVar7 * 8" identifier + (binary_expression "uVar7 * 8" identifier * number_literal)) + number_literal) )))) = identifier) ;) (if_statement "if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }" if (parenthesized_expression "(uVar7 == 0xb)" ( (binary_expression "uVar7 == 0xb" identifier == number_literal) )) (compound_statement "{\n        __uselocale(uVar1);\n        return;\n      }" { (expression_statement "__uselocale(uVar1);" (call_expression "__uselocale(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (return_statement "return;" return ;) })) }))) (expression_statement "uVar7 = uVar7 + 1;" (assignment_expression "uVar7 = uVar7 + 1" identifier = (binary_expression "uVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "void FUN_002d7c10(long param_1)\n\n{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  uint uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  do {\n                    \n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  *(undefined1 *)(param_1 + 0x18) = 1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    \n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}\n\n" (function_definition "void FUN_002d7c10(long param_1)\n\n{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  uint uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  do {\n                    \n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  *(undefined1 *)(param_1 + 0x18) = 1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    \n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}" primitive_type (function_declarator "FUN_002d7c10(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  uint uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  do {\n                    \n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  *(undefined1 *)(param_1 + 0x18) = 1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    \n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "wint_t wVar4;" type_identifier identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "ulong uVar7;" type_identifier identifier ;) (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));" (assignment_expression "uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10))" identifier = (call_expression "__uselocale(*(undefined8 *)(param_1 + 0x10))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x10))" ( (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) )))) )))) ;) (do_statement "do {\n                    \n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);" do (compound_statement "{\n                    \n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  }" { (expression_statement "iVar3 = wctob((wint_t)lVar5);" (assignment_expression "iVar3 = wctob((wint_t)lVar5)" identifier = (call_expression "wctob((wint_t)lVar5)" identifier (argument_list "((wint_t)lVar5)" ( (cast_expression "(wint_t)lVar5" ( (type_descriptor "wint_t" type_identifier) ) identifier) )))) ;) (if_statement "if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }" { (expression_statement "*(undefined1 *)(param_1 + 0x18) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x18) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x18)" * (cast_expression "(undefined1 *)(param_1 + 0x18)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_002d7c55;" goto statement_identifier ;) })) (expression_statement "*(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;" (assignment_expression "*(char *)(param_1 + 0x19 + lVar5) = (char)iVar3" (pointer_expression "*(char *)(param_1 + 0x19 + lVar5)" * (cast_expression "(char *)(param_1 + 0x19 + lVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x19 + lVar5)" ( (binary_expression "param_1 + 0x19 + lVar5" (binary_expression "param_1 + 0x19" identifier + number_literal) + identifier) )))) = (cast_expression "(char)iVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" identifier = (binary_expression "lVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar5 != 0x80)" ( (binary_expression "lVar5 != 0x80" identifier != number_literal) )) ;) (expression_statement "*(undefined1 *)(param_1 + 0x18) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x18) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x18)" * (cast_expression "(undefined1 *)(param_1 + 0x18)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_002d7c55:\n  lVar5 = 0;" statement_identifier : (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" identifier = number_literal) ;)) (do_statement "do {\n                    \n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);" do (compound_statement "{\n                    \n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  }" { (expression_statement "wVar4 = btowc((int)lVar5);" (assignment_expression "wVar4 = btowc((int)lVar5)" identifier = (call_expression "btowc((int)lVar5)" identifier (argument_list "((int)lVar5)" ( (cast_expression "(int)lVar5" ( (type_descriptor "int" primitive_type) ) identifier) )))) ;) (expression_statement "*(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;" (assignment_expression "*(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4" (pointer_expression "*(wint_t *)(param_1 + 0x9c + lVar5 * 4)" * (cast_expression "(wint_t *)(param_1 + 0x9c + lVar5 * 4)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x9c + lVar5 * 4)" ( (binary_expression "param_1 + 0x9c + lVar5 * 4" (binary_expression "param_1 + 0x9c" identifier + number_literal) + (binary_expression "lVar5 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" identifier = (binary_expression "lVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(lVar5 != 0x100)" ( (binary_expression "lVar5 != 0x100" identifier != number_literal) )) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (do_statement "do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );" do (compound_statement "{\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  }" { (expression_statement "iVar3 = 1 << ((byte)uVar7 & 0x1f);" (assignment_expression "iVar3 = 1 << ((byte)uVar7 & 0x1f)" identifier = (binary_expression "1 << ((byte)uVar7 & 0x1f)" number_literal << (parenthesized_expression "((byte)uVar7 & 0x1f)" ( (binary_expression "(byte)uVar7 & 0x1f" (cast_expression "(byte)uVar7" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" if (parenthesized_expression "(uVar7 < 8)" ( (binary_expression "uVar7 < 8" identifier < number_literal) )) (compound_statement "{\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }" { (expression_statement "uVar6 = iVar3 << 8;" (assignment_expression "uVar6 = iVar3 << 8" identifier = (binary_expression "iVar3 << 8" identifier << number_literal)) ;) (expression_statement "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;" (assignment_expression "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6" (pointer_expression "*(short *)(param_1 + 0x49c + uVar7 * 2)" * (cast_expression "(short *)(param_1 + 0x49c + uVar7 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x49c + uVar7 * 2)" ( (binary_expression "param_1 + 0x49c + uVar7 * 2" (binary_expression "param_1 + 0x49c" identifier + number_literal) + (binary_expression "uVar7 * 2" identifier * number_literal)) )))) = (cast_expression "(short)uVar6" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);" (assignment_expression "uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff)" identifier = (call_expression "FUN_002d7650(param_1,uVar6 & 0xffff)" identifier (argument_list "(param_1,uVar6 & 0xffff)" ( identifier , (binary_expression "uVar6 & 0xffff" identifier & number_literal) )))) ;) (expression_statement "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" * (cast_expression "(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c0 + uVar7 * 8)" ( (binary_expression "param_1 + 0x4c0 + uVar7 * 8" (binary_expression "param_1 + 0x4c0" identifier + number_literal) + (binary_expression "uVar7 * 8" identifier * number_literal)) )))) = identifier) ;) }) (else_clause "else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" else (compound_statement "{\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" { (expression_statement "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);" (assignment_expression "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8)" (pointer_expression "*(short *)(param_1 + 0x49c + uVar7 * 2)" * (cast_expression "(short *)(param_1 + 0x49c + uVar7 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x49c + uVar7 * 2)" ( (binary_expression "param_1 + 0x49c + uVar7 * 2" (binary_expression "param_1 + 0x49c" identifier + number_literal) + (binary_expression "uVar7 * 2" identifier * number_literal)) )))) = (cast_expression "(short)((uint)iVar3 >> 8)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((uint)iVar3 >> 8)" ( (binary_expression "(uint)iVar3 >> 8" (cast_expression "(uint)iVar3" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "uVar2 = FUN_002d7650(param_1);" (assignment_expression "uVar2 = FUN_002d7650(param_1)" identifier = (call_expression "FUN_002d7650(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" * (cast_expression "(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c0 + uVar7 * 8)" ( (binary_expression "param_1 + 0x4c0 + uVar7 * 8" (binary_expression "param_1 + 0x4c0" identifier + number_literal) + (binary_expression "uVar7 * 8" identifier * number_literal)) )))) = identifier) ;) (if_statement "if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }" if (parenthesized_expression "(uVar7 == 0xb)" ( (binary_expression "uVar7 == 0xb" identifier == number_literal) )) (compound_statement "{\n        __uselocale(uVar1);\n        return;\n      }" { (expression_statement "__uselocale(uVar1);" (call_expression "__uselocale(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (return_statement "return;" return ;) })) }))) (expression_statement "uVar7 = uVar7 + 1;" (assignment_expression "uVar7 = uVar7 + 1" identifier = (binary_expression "uVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression LIT << (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT << LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT & LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "void FUN_002d7c10(long param_1)\n\n{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  uint uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  do {\n                    \n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  *(undefined1 *)(param_1 + 0x18) = 1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    \n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}" (primitive_type "void") (function_declarator "FUN_002d7c10(long param_1)" (identifier "FUN_002d7c10") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined8 uVar1;\n  undefined8 uVar2;\n  int iVar3;\n  wint_t wVar4;\n  long lVar5;\n  uint uVar6;\n  ulong uVar7;\n  \n  lVar5 = 0;\n  uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));\n  do {\n                    \n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);\n  *(undefined1 *)(param_1 + 0x18) = 1;\nLAB_002d7c55:\n  lVar5 = 0;\n  do {\n                    \n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);\n  uVar7 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );\n}" ({ "{") (declaration "undefined8 uVar1;" (type_identifier "undefined8") (identifier "uVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "wint_t wVar4;" (type_identifier "wint_t") (identifier "wVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "ulong uVar7;" (type_identifier "ulong") (identifier "uVar7") (; ";")) (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" (identifier "lVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));" (assignment_expression "uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10))" (identifier "uVar1") (= "=") (call_expression "__uselocale(*(undefined8 *)(param_1 + 0x10))" (identifier "__uselocale") (argument_list "(*(undefined8 *)(param_1 + 0x10))" (( "(") (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")) () ")")))) () ")")))) (; ";")) (do_statement "do {\n                    \n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x80);" (do "do") (compound_statement "{\n                    \n    iVar3 = wctob((wint_t)lVar5);\n    if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }\n    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;\n    lVar5 = lVar5 + 1;\n  }" ({ "{") (expression_statement "iVar3 = wctob((wint_t)lVar5);" (assignment_expression "iVar3 = wctob((wint_t)lVar5)" (identifier "iVar3") (= "=") (call_expression "wctob((wint_t)lVar5)" (identifier "wctob") (argument_list "((wint_t)lVar5)" (( "(") (cast_expression "(wint_t)lVar5" (( "(") (type_descriptor "wint_t" (type_identifier "wint_t")) () ")") (identifier "lVar5")) () ")")))) (; ";")) (if_statement "if (iVar3 == -1) {\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }" (if "if") (parenthesized_expression "(iVar3 == -1)" (( "(") (binary_expression "iVar3 == -1" (identifier "iVar3") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      *(undefined1 *)(param_1 + 0x18) = 0;\n      goto LAB_002d7c55;\n    }" ({ "{") (expression_statement "*(undefined1 *)(param_1 + 0x18) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x18) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_002d7c55;" (goto "goto") (statement_identifier "LAB_002d7c55") (; ";")) (} "}"))) (expression_statement "*(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;" (assignment_expression "*(char *)(param_1 + 0x19 + lVar5) = (char)iVar3" (pointer_expression "*(char *)(param_1 + 0x19 + lVar5)" (* "*") (cast_expression "(char *)(param_1 + 0x19 + lVar5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x19 + lVar5)" (( "(") (binary_expression "param_1 + 0x19 + lVar5" (binary_expression "param_1 + 0x19" (identifier "param_1") (+ "+") (number_literal "0x19")) (+ "+") (identifier "lVar5")) () ")")))) (= "=") (cast_expression "(char)iVar3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "iVar3"))) (; ";")) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" (identifier "lVar5") (= "=") (binary_expression "lVar5 + 1" (identifier "lVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(lVar5 != 0x80)" (( "(") (binary_expression "lVar5 != 0x80" (identifier "lVar5") (!= "!=") (number_literal "0x80")) () ")")) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0x18) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x18) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (number_literal "1")) (; ";")) (labeled_statement "LAB_002d7c55:\n  lVar5 = 0;" (statement_identifier "LAB_002d7c55") (: ":") (expression_statement "lVar5 = 0;" (assignment_expression "lVar5 = 0" (identifier "lVar5") (= "=") (number_literal "0")) (; ";"))) (do_statement "do {\n                    \n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  } while (lVar5 != 0x100);" (do "do") (compound_statement "{\n                    \n    wVar4 = btowc((int)lVar5);\n    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;\n    lVar5 = lVar5 + 1;\n  }" ({ "{") (expression_statement "wVar4 = btowc((int)lVar5);" (assignment_expression "wVar4 = btowc((int)lVar5)" (identifier "wVar4") (= "=") (call_expression "btowc((int)lVar5)" (identifier "btowc") (argument_list "((int)lVar5)" (( "(") (cast_expression "(int)lVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "lVar5")) () ")")))) (; ";")) (expression_statement "*(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;" (assignment_expression "*(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4" (pointer_expression "*(wint_t *)(param_1 + 0x9c + lVar5 * 4)" (* "*") (cast_expression "(wint_t *)(param_1 + 0x9c + lVar5 * 4)" (( "(") (type_descriptor "wint_t *" (type_identifier "wint_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x9c + lVar5 * 4)" (( "(") (binary_expression "param_1 + 0x9c + lVar5 * 4" (binary_expression "param_1 + 0x9c" (identifier "param_1") (+ "+") (number_literal "0x9c")) (+ "+") (binary_expression "lVar5 * 4" (identifier "lVar5") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "wVar4")) (; ";")) (expression_statement "lVar5 = lVar5 + 1;" (assignment_expression "lVar5 = lVar5 + 1" (identifier "lVar5") (= "=") (binary_expression "lVar5 + 1" (identifier "lVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(lVar5 != 0x100)" (( "(") (binary_expression "lVar5 != 0x100" (identifier "lVar5") (!= "!=") (number_literal "0x100")) () ")")) (; ";")) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" (identifier "uVar7") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  } while( true );" (do "do") (compound_statement "{\n    iVar3 = 1 << ((byte)uVar7 & 0x1f);\n    if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar7 = uVar7 + 1;\n  }" ({ "{") (expression_statement "iVar3 = 1 << ((byte)uVar7 & 0x1f);" (assignment_expression "iVar3 = 1 << ((byte)uVar7 & 0x1f)" (identifier "iVar3") (= "=") (binary_expression "1 << ((byte)uVar7 & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "((byte)uVar7 & 0x1f)" (( "(") (binary_expression "(byte)uVar7 & 0x1f" (cast_expression "(byte)uVar7" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar7")) (& "&") (number_literal "0x1f")) () ")")))) (; ";")) (if_statement "if (uVar7 < 8) {\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }\n    else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" (if "if") (parenthesized_expression "(uVar7 < 8)" (( "(") (binary_expression "uVar7 < 8" (identifier "uVar7") (< "<") (number_literal "8")) () ")")) (compound_statement "{\n      uVar6 = iVar3 << 8;\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;\n      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n    }" ({ "{") (expression_statement "uVar6 = iVar3 << 8;" (assignment_expression "uVar6 = iVar3 << 8" (identifier "uVar6") (= "=") (binary_expression "iVar3 << 8" (identifier "iVar3") (<< "<<") (number_literal "8"))) (; ";")) (expression_statement "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;" (assignment_expression "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6" (pointer_expression "*(short *)(param_1 + 0x49c + uVar7 * 2)" (* "*") (cast_expression "(short *)(param_1 + 0x49c + uVar7 * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x49c + uVar7 * 2)" (( "(") (binary_expression "param_1 + 0x49c + uVar7 * 2" (binary_expression "param_1 + 0x49c" (identifier "param_1") (+ "+") (number_literal "0x49c")) (+ "+") (binary_expression "uVar7 * 2" (identifier "uVar7") (* "*") (number_literal "2"))) () ")")))) (= "=") (cast_expression "(short)uVar6" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "uVar6"))) (; ";")) (expression_statement "uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);" (assignment_expression "uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff)" (identifier "uVar2") (= "=") (call_expression "FUN_002d7650(param_1,uVar6 & 0xffff)" (identifier "FUN_002d7650") (argument_list "(param_1,uVar6 & 0xffff)" (( "(") (identifier "param_1") (, ",") (binary_expression "uVar6 & 0xffff" (identifier "uVar6") (& "&") (number_literal "0xffff")) () ")")))) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4c0 + uVar7 * 8)" (( "(") (binary_expression "param_1 + 0x4c0 + uVar7 * 8" (binary_expression "param_1 + 0x4c0" (identifier "param_1") (+ "+") (number_literal "0x4c0")) (+ "+") (binary_expression "uVar7 * 8" (identifier "uVar7") (* "*") (number_literal "8"))) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (} "}")) (else_clause "else {\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" (else "else") (compound_statement "{\n      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);\n      uVar2 = FUN_002d7650(param_1);\n      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;\n      if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" ({ "{") (expression_statement "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);" (assignment_expression "*(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8)" (pointer_expression "*(short *)(param_1 + 0x49c + uVar7 * 2)" (* "*") (cast_expression "(short *)(param_1 + 0x49c + uVar7 * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x49c + uVar7 * 2)" (( "(") (binary_expression "param_1 + 0x49c + uVar7 * 2" (binary_expression "param_1 + 0x49c" (identifier "param_1") (+ "+") (number_literal "0x49c")) (+ "+") (binary_expression "uVar7 * 2" (identifier "uVar7") (* "*") (number_literal "2"))) () ")")))) (= "=") (cast_expression "(short)((uint)iVar3 >> 8)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (parenthesized_expression "((uint)iVar3 >> 8)" (( "(") (binary_expression "(uint)iVar3 >> 8" (cast_expression "(uint)iVar3" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "iVar3")) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "uVar2 = FUN_002d7650(param_1);" (assignment_expression "uVar2 = FUN_002d7650(param_1)" (identifier "uVar2") (= "=") (call_expression "FUN_002d7650(param_1)" (identifier "FUN_002d7650") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;" (assignment_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2" (pointer_expression "*(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4c0 + uVar7 * 8)" (( "(") (binary_expression "param_1 + 0x4c0 + uVar7 * 8" (binary_expression "param_1 + 0x4c0" (identifier "param_1") (+ "+") (number_literal "0x4c0")) (+ "+") (binary_expression "uVar7 * 8" (identifier "uVar7") (* "*") (number_literal "8"))) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (if_statement "if (uVar7 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }" (if "if") (parenthesized_expression "(uVar7 == 0xb)" (( "(") (binary_expression "uVar7 == 0xb" (identifier "uVar7") (== "==") (number_literal "0xb")) () ")")) (compound_statement "{\n        __uselocale(uVar1);\n        return;\n      }" ({ "{") (expression_statement "__uselocale(uVar1);" (call_expression "__uselocale(uVar1)" (identifier "__uselocale") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")))) (expression_statement "uVar7 = uVar7 + 1;" (assignment_expression "uVar7 = uVar7 + 1" (identifier "uVar7") (= "=") (binary_expression "uVar7 + 1" (identifier "uVar7") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

/* std::ctype<wchar_t>::_M_initialize_ctype() */

void __thiscall std::type_1<var_5>::function_1(type_1<var_5> *var_2)

{
  type_2 uVar1;
  type_2 uVar2;
  int var_4;
  type_3 wVar4;
  long var_6;
  type_4 uVar6;
  type_5 var_9;
  
  var_6 = 0;
  uVar1 = var_1(*(type_2 *)(var_2 + 0x10));
  do {
                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */
    var_4 = var_3((type_3)var_6);
    if (var_4 == -1) {
      var_2[0x18] = (type_1<var_5>)0x0;
      goto LAB_002d7c55;
    }
    var_2[var_6 + 0x19] = var_7(var_4,0);
    var_6 = var_6 + 1;
  } while (var_6 != 0x80);
  var_2[0x18] = (type_1<var_5>)0x1;
LAB_002d7c55:
  var_6 = 0;
  do {
                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */
    wVar4 = var_8((int)var_6);
    *(type_3 *)(var_2 + var_6 * 4 + 0x9c) = wVar4;
    var_6 = var_6 + 1;
  } while (var_6 != 0x100);
  var_9 = 0;
  do {
    var_4 = 1 << ((type_6)var_9 & 0x1f);
    if (var_9 < 8) {
      uVar6 = (type_4)(var_4 << 8);
      *(type_4 *)(var_2 + var_9 * 2 + 0x49c) = uVar6;
      uVar2 = var_10(var_2,uVar6);
      *(type_2 *)(var_2 + var_9 * 8 + 0x4c0) = uVar2;
    }
    else {
      uVar6 = (type_4)((type_7)var_4 >> 8);
      *(type_4 *)(var_2 + var_9 * 2 + 0x49c) = uVar6;
      uVar2 = var_10(var_2,uVar6);
      *(type_2 *)(var_2 + var_9 * 8 + 0x4c0) = uVar2;
      if (var_9 == 0xb) {
        var_1(uVar1);
        return;
      }
    }
    var_9 = var_9 + 1;
  } while( true );
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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))))))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (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))))) right: (number_literal))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (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))))) right: (number_literal))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (number_literal) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (true))))))

void MASKED(long param_1)

{
  undefined8 uVar1;
  undefined8 uVar2;
  int iVar3;
  wint_t wVar4;
  long lVar5;
  uint uVar6;
  ulong uVar7;
  
  lVar5 = 0;
  uVar1 = __uselocale(*(undefined8 *)(param_1 + 0x10));
  do {
                    /* try { // try from 002d7c47 to 002d7c4b has its CatchHandler @ 002d7cf5 */
    iVar3 = wctob((wint_t)lVar5);
    if (iVar3 == -1) {
      *(undefined1 *)(param_1 + 0x18) = 0;
      goto LAB_002d7c55;
    }
    *(char *)(param_1 + 0x19 + lVar5) = (char)iVar3;
    lVar5 = lVar5 + 1;
  } while (lVar5 != 0x80);
  *(undefined1 *)(param_1 + 0x18) = 1;
LAB_002d7c55:
  lVar5 = 0;
  do {
                    /* try { // try from 002d7c62 to 002d7c66 has its CatchHandler @ 002d7cfd */
    wVar4 = btowc((int)lVar5);
    *(wint_t *)(param_1 + 0x9c + lVar5 * 4) = wVar4;
    lVar5 = lVar5 + 1;
  } while (lVar5 != 0x100);
  uVar7 = 0;
  do {
    iVar3 = 1 << ((byte)uVar7 & 0x1f);
    if (uVar7 < 8) {
      uVar6 = iVar3 << 8;
      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)uVar6;
      uVar2 = FUN_002d7650(param_1,uVar6 & 0xffff);
      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;
    }
    else {
      *(short *)(param_1 + 0x49c + uVar7 * 2) = (short)((uint)iVar3 >> 8);
      uVar2 = FUN_002d7650(param_1);
      *(undefined8 *)(param_1 + 0x4c0 + uVar7 * 8) = uVar2;
      if (uVar7 == 0xb) {
        __uselocale(uVar1);
        return;
      }
    }
    uVar7 = uVar7 + 1;
  } while( true );
}

