
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* std::ctype<wchar_t>::_M_initialize_ctype() */

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

{
  ushort uVar1;
  undefined4 uVar2;
  int iVar3;
  undefined4 uVar4;
  wint_t wVar5;
  uint uVar6;
  
  wVar5 = 0;
  uVar2 = __uselocale(*(undefined4 *)(this + 8));
  do {
                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */
    iVar3 = wctob(wVar5);
    if (iVar3 == -1) {
      this[0xc] = (ctype<wchar_t>)0x0;
      goto LAB_00237b3b;
    }
    this[wVar5 + 0xd] = SUB41(iVar3,0);
    wVar5 = wVar5 + 1;
  } while (wVar5 != 0x80);
  this[0xc] = (ctype<wchar_t>)0x1;
LAB_00237b3b:
  iVar3 = 0;
  do {
                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */
    wVar5 = btowc(iVar3);
    *(wint_t *)(this + iVar3 * 4 + 0x90) = wVar5;
    iVar3 = iVar3 + 1;
  } while (iVar3 != 0x100);
  uVar6 = 0;
  do {
    iVar3 = 1 << ((byte)uVar6 & 0x1f);
    if (uVar6 < 8) {
      uVar1 = (ushort)(iVar3 << 8);
      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;
      uVar4 = _M_convert_to_wmask(this,uVar1);
      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;
    }
    else {
      uVar1 = (ushort)((uint)iVar3 >> 8);
      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;
      uVar4 = _M_convert_to_wmask(this,uVar1);
      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;
      if (uVar6 == 0xb) {
        __uselocale(uVar2);
        return;
      }
    }
    uVar6 = uVar6 + 1;
  } while( true );
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

void FUN_00237ae0(int param_1)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 uVar3;
  wint_t wVar4;
  uint uVar5;
  
  wVar4 = 0;
  uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));
  do {
                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */
    iVar2 = wctob(wVar4);
    if (iVar2 == -1) {
      *(undefined1 *)(param_1 + 0xc) = 0;
      goto LAB_00237b3b;
    }
    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;
    wVar4 = wVar4 + 1;
  } while (wVar4 != 0x80);
  *(undefined1 *)(param_1 + 0xc) = 1;
LAB_00237b3b:
  iVar2 = 0;
  do {
                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */
    wVar4 = btowc(iVar2);
    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;
    iVar2 = iVar2 + 1;
  } while (iVar2 != 0x100);
  uVar5 = 0;
  do {
    iVar2 = 1 << ((byte)uVar5 & 0x1f);
    if (uVar5 < 8) {
      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);
      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);
      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;
    }
    else {
      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);
      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);
      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;
      if (uVar5 == 0xb) {
        __uselocale(uVar1);
        return;
      }
    }
    uVar5 = uVar5 + 1;
  } while( true );
}


CALL 0x0006206b
ADD EAX,0x17251b
PUSH EBP
MOV EBP,ESP
PUSH EDI
PUSH ESI
XOR ESI,ESI
PUSH EBX
MOV EBX,EAX
SUB ESP,0x28
MOV EDI,dword ptr [EBP + 0x8]
MOV dword ptr [EBP + -0x1c],EAX
PUSH dword ptr [EDI + 0x8]
CALL 0x0002a7d0
ADD ESP,0x10
MOV dword ptr [EBP + -0x20],EAX
JMP 0x00237b23
MOV byte ptr [EDI + ESI*0x1 + 0xd],AL
ADD ESI,0x1
CMP ESI,0x80
JZ 0x00237bde
SUB ESP,0xc
MOV EBX,dword ptr [EBP + -0x1c]
PUSH ESI
CALL 0x0002a520
ADD ESP,0x10
CMP EAX,-0x1
JNZ 0x00237b10
MOV byte ptr [EDI + 0xc],0x0
XOR ESI,ESI
LEA ESI,[ESI]
SUB ESP,0xc
MOV EBX,dword ptr [EBP + -0x1c]
PUSH ESI
CALL 0x0002ab20
MOV dword ptr [EDI + ESI*0x4 + 0x90],EAX
ADD ESI,0x1
ADD ESP,0x10
CMP ESI,0x100
JNZ 0x00237b40
XOR ESI,ESI
JMP 0x00237b90
SHL EAX,0x8
SUB ESP,0x8
MOV EBX,dword ptr [EBP + -0x1c]
MOV word ptr [EDI + ESI*0x2 + 0x490],AX
MOVZX EAX,AX
PUSH EAX
PUSH EDI
CALL 0x002373a0
ADD ESP,0x10
MOV dword ptr [EDI + ESI*0x4 + 0x4b0],EAX
ADD ESI,0x1
MOV EAX,0x1
MOV ECX,ESI
SHL EAX,CL
CMP ESI,0x7
JBE 0x00237b68
SUB ESP,0x8
SAR EAX,0x8
MOV EBX,dword ptr [EBP + -0x1c]
MOV word ptr [EDI + ESI*0x2 + 0x490],AX
PUSH EAX
PUSH EDI
CALL 0x002373a0
ADD ESP,0x10
MOV dword ptr [EDI + ESI*0x4 + 0x4b0],EAX
CMP ESI,0xb
JNZ 0x00237b8d
SUB ESP,0xc
PUSH dword ptr [EBP + -0x20]
MOV EBX,dword ptr [EBP + -0x1c]
CALL 0x0002a7d0
ADD ESP,0x10
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV byte ptr [EDI + 0xc],0x1
JMP 0x00237b3b
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nvoid FUN_00237ae0(int param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  wint_t wVar4;\n  uint uVar5;\n  \n  wVar4 = 0;\n  uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));\n  do {\n                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */\n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);\n  *(undefined1 *)(param_1 + 0xc) = 1;\nLAB_00237b3b:\n  iVar2 = 0;\n  do {\n                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */\n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);\n  uVar5 = 0;\n  do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );\n}\n\n" comment (function_definition "void FUN_00237ae0(int param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  wint_t wVar4;\n  uint uVar5;\n  \n  wVar4 = 0;\n  uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));\n  do {\n                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */\n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);\n  *(undefined1 *)(param_1 + 0xc) = 1;\nLAB_00237b3b:\n  iVar2 = 0;\n  do {\n                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */\n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);\n  uVar5 = 0;\n  do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );\n}" primitive_type (function_declarator "FUN_00237ae0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  wint_t wVar4;\n  uint uVar5;\n  \n  wVar4 = 0;\n  uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));\n  do {\n                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */\n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);\n  *(undefined1 *)(param_1 + 0xc) = 1;\nLAB_00237b3b:\n  iVar2 = 0;\n  do {\n                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */\n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);\n  uVar5 = 0;\n  do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "wint_t wVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "wVar4 = 0;" (assignment_expression "wVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));" (assignment_expression "uVar1 = __uselocale(*(undefined4 *)(param_1 + 8))" identifier = (call_expression "__uselocale(*(undefined4 *)(param_1 + 8))" identifier (argument_list "(*(undefined4 *)(param_1 + 8))" ( (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) )))) ;) (do_statement "do {\n                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */\n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);" do (compound_statement "{\n                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */\n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  }" { comment (expression_statement "iVar2 = wctob(wVar4);" (assignment_expression "iVar2 = wctob(wVar4)" identifier = (call_expression "wctob(wVar4)" identifier (argument_list "(wVar4)" ( identifier )))) ;) (if_statement "if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }" if (parenthesized_expression "(iVar2 == -1)" ( (binary_expression "iVar2 == -1" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }" { (expression_statement "*(undefined1 *)(param_1 + 0xc) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0xc) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0xc)" * (cast_expression "(undefined1 *)(param_1 + 0xc)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_00237b3b;" goto statement_identifier ;) })) (expression_statement "*(char *)(param_1 + 0xd + wVar4) = (char)iVar2;" (assignment_expression "*(char *)(param_1 + 0xd + wVar4) = (char)iVar2" (pointer_expression "*(char *)(param_1 + 0xd + wVar4)" * (cast_expression "(char *)(param_1 + 0xd + wVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd + wVar4)" ( (binary_expression "param_1 + 0xd + wVar4" (binary_expression "param_1 + 0xd" identifier + number_literal) + identifier) )))) = (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "wVar4 = wVar4 + 1;" (assignment_expression "wVar4 = wVar4 + 1" identifier = (binary_expression "wVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(wVar4 != 0x80)" ( (binary_expression "wVar4 != 0x80" identifier != number_literal) )) ;) (expression_statement "*(undefined1 *)(param_1 + 0xc) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0xc) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0xc)" * (cast_expression "(undefined1 *)(param_1 + 0xc)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_00237b3b:\n  iVar2 = 0;" statement_identifier : (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;)) (do_statement "do {\n                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */\n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);" do (compound_statement "{\n                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */\n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  }" { comment (expression_statement "wVar4 = btowc(iVar2);" (assignment_expression "wVar4 = btowc(iVar2)" identifier = (call_expression "btowc(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "*(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;" (assignment_expression "*(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4" (pointer_expression "*(wint_t *)(param_1 + 0x90 + iVar2 * 4)" * (cast_expression "(wint_t *)(param_1 + 0x90 + iVar2 * 4)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x90 + iVar2 * 4)" ( (binary_expression "param_1 + 0x90 + iVar2 * 4" (binary_expression "param_1 + 0x90" identifier + number_literal) + (binary_expression "iVar2 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar2 != 0x100)" ( (binary_expression "iVar2 != 0x100" identifier != number_literal) )) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );" do (compound_statement "{\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  }" { (expression_statement "iVar2 = 1 << ((byte)uVar5 & 0x1f);" (assignment_expression "iVar2 = 1 << ((byte)uVar5 & 0x1f)" identifier = (binary_expression "1 << ((byte)uVar5 & 0x1f)" number_literal << (parenthesized_expression "((byte)uVar5 & 0x1f)" ( (binary_expression "(byte)uVar5 & 0x1f" (cast_expression "(byte)uVar5" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" if (parenthesized_expression "(uVar5 < 8)" ( (binary_expression "uVar5 < 8" identifier < number_literal) )) (compound_statement "{\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }" { (expression_statement "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);" (assignment_expression "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8)" (pointer_expression "*(short *)(param_1 + 0x490 + uVar5 * 2)" * (cast_expression "(short *)(param_1 + 0x490 + uVar5 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x490 + uVar5 * 2)" ( (binary_expression "param_1 + 0x490 + uVar5 * 2" (binary_expression "param_1 + 0x490" identifier + number_literal) + (binary_expression "uVar5 * 2" identifier * number_literal)) )))) = (cast_expression "(short)(iVar2 << 8)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "(iVar2 << 8)" ( (binary_expression "iVar2 << 8" identifier << number_literal) )))) ;) (expression_statement "uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);" (assignment_expression "uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff)" identifier = (call_expression "FUN_002373a0(param_1,iVar2 << 8 & 0xffff)" identifier (argument_list "(param_1,iVar2 << 8 & 0xffff)" ( identifier , (binary_expression "iVar2 << 8 & 0xffff" (binary_expression "iVar2 << 8" identifier << number_literal) & number_literal) )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" * (cast_expression "(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4b0 + uVar5 * 4)" ( (binary_expression "param_1 + 0x4b0 + uVar5 * 4" (binary_expression "param_1 + 0x4b0" identifier + number_literal) + (binary_expression "uVar5 * 4" identifier * number_literal)) )))) = identifier) ;) }) (else_clause "else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" else (compound_statement "{\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" { (expression_statement "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);" (assignment_expression "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8)" (pointer_expression "*(short *)(param_1 + 0x490 + uVar5 * 2)" * (cast_expression "(short *)(param_1 + 0x490 + uVar5 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x490 + uVar5 * 2)" ( (binary_expression "param_1 + 0x490 + uVar5 * 2" (binary_expression "param_1 + 0x490" identifier + number_literal) + (binary_expression "uVar5 * 2" identifier * number_literal)) )))) = (cast_expression "(short)((uint)iVar2 >> 8)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((uint)iVar2 >> 8)" ( (binary_expression "(uint)iVar2 >> 8" (cast_expression "(uint)iVar2" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "uVar3 = FUN_002373a0(param_1,iVar2 >> 8);" (assignment_expression "uVar3 = FUN_002373a0(param_1,iVar2 >> 8)" identifier = (call_expression "FUN_002373a0(param_1,iVar2 >> 8)" identifier (argument_list "(param_1,iVar2 >> 8)" ( identifier , (binary_expression "iVar2 >> 8" identifier >> number_literal) )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" * (cast_expression "(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4b0 + uVar5 * 4)" ( (binary_expression "param_1 + 0x4b0 + uVar5 * 4" (binary_expression "param_1 + 0x4b0" identifier + number_literal) + (binary_expression "uVar5 * 4" identifier * number_literal)) )))) = identifier) ;) (if_statement "if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }" if (parenthesized_expression "(uVar5 == 0xb)" ( (binary_expression "uVar5 == 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 "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n/* std::ctype<wchar_t>::_M_initialize_ctype() */\n\nvoid __thiscall std::ctype<wchar_t>::_M_initialize_ctype(ctype<wchar_t> *this)\n\n{\n  ushort uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  wint_t wVar5;\n  uint uVar6;\n  \n  wVar5 = 0;\n  uVar2 = __uselocale(*(undefined4 *)(this + 8));\n  do {\n                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */\n    iVar3 = wctob(wVar5);\n    if (iVar3 == -1) {\n      this[0xc] = (ctype<wchar_t>)0x0;\n      goto LAB_00237b3b;\n    }\n    this[wVar5 + 0xd] = SUB41(iVar3,0);\n    wVar5 = wVar5 + 1;\n  } while (wVar5 != 0x80);\n  this[0xc] = (ctype<wchar_t>)0x1;\nLAB_00237b3b:\n  iVar3 = 0;\n  do {\n                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */\n    wVar5 = btowc(iVar3);\n    *(wint_t *)(this + iVar3 * 4 + 0x90) = wVar5;\n    iVar3 = iVar3 + 1;\n  } while (iVar3 != 0x100);\n  uVar6 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar6 & 0x1f);\n    if (uVar6 < 8) {\n      uVar1 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n    }\n    else {\n      uVar1 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n      if (uVar6 == 0xb) {\n        __uselocale(uVar2);\n        return;\n      }\n    }\n    uVar6 = uVar6 + 1;\n  } while( true );\n}\n\n" comment comment (function_definition "void __thiscall std::ctype<wchar_t>::_M_initialize_ctype(ctype<wchar_t> *this)\n\n{\n  ushort uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  wint_t wVar5;\n  uint uVar6;\n  \n  wVar5 = 0;\n  uVar2 = __uselocale(*(undefined4 *)(this + 8));\n  do {\n                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */\n    iVar3 = wctob(wVar5);\n    if (iVar3 == -1) {\n      this[0xc] = (ctype<wchar_t>)0x0;\n      goto LAB_00237b3b;\n    }\n    this[wVar5 + 0xd] = SUB41(iVar3,0);\n    wVar5 = wVar5 + 1;\n  } while (wVar5 != 0x80);\n  this[0xc] = (ctype<wchar_t>)0x1;\nLAB_00237b3b:\n  iVar3 = 0;\n  do {\n                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */\n    wVar5 = btowc(iVar3);\n    *(wint_t *)(this + iVar3 * 4 + 0x90) = wVar5;\n    iVar3 = iVar3 + 1;\n  } while (iVar3 != 0x100);\n  uVar6 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar6 & 0x1f);\n    if (uVar6 < 8) {\n      uVar1 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n    }\n    else {\n      uVar1 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n      if (uVar6 == 0xb) {\n        __uselocale(uVar2);\n        return;\n      }\n    }\n    uVar6 = uVar6 + 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  ushort uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  wint_t wVar5;\n  uint uVar6;\n  \n  wVar5 = 0;\n  uVar2 = __uselocale(*(undefined4 *)(this + 8));\n  do {\n                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */\n    iVar3 = wctob(wVar5);\n    if (iVar3 == -1) {\n      this[0xc] = (ctype<wchar_t>)0x0;\n      goto LAB_00237b3b;\n    }\n    this[wVar5 + 0xd] = SUB41(iVar3,0);\n    wVar5 = wVar5 + 1;\n  } while (wVar5 != 0x80);\n  this[0xc] = (ctype<wchar_t>)0x1;\nLAB_00237b3b:\n  iVar3 = 0;\n  do {\n                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */\n    wVar5 = btowc(iVar3);\n    *(wint_t *)(this + iVar3 * 4 + 0x90) = wVar5;\n    iVar3 = iVar3 + 1;\n  } while (iVar3 != 0x100);\n  uVar6 = 0;\n  do {\n    iVar3 = 1 << ((byte)uVar6 & 0x1f);\n    if (uVar6 < 8) {\n      uVar1 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n    }\n    else {\n      uVar1 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n      if (uVar6 == 0xb) {\n        __uselocale(uVar2);\n        return;\n      }\n    }\n    uVar6 = uVar6 + 1;\n  } while( true );\n}" { (declaration "ushort uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "wint_t wVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (expression_statement "wVar5 = 0;" (assignment_expression "wVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar2 = __uselocale(*(undefined4 *)(this + 8));" (assignment_expression "uVar2 = __uselocale(*(undefined4 *)(this + 8))" identifier = (call_expression "__uselocale(*(undefined4 *)(this + 8))" identifier (argument_list "(*(undefined4 *)(this + 8))" ( (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) )))) ;) (do_statement "do {\n                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */\n    iVar3 = wctob(wVar5);\n    if (iVar3 == -1) {\n      this[0xc] = (ctype<wchar_t>)0x0;\n      goto LAB_00237b3b;\n    }\n    this[wVar5 + 0xd] = SUB41(iVar3,0);\n    wVar5 = wVar5 + 1;\n  } while (wVar5 != 0x80);" do (compound_statement "{\n                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */\n    iVar3 = wctob(wVar5);\n    if (iVar3 == -1) {\n      this[0xc] = (ctype<wchar_t>)0x0;\n      goto LAB_00237b3b;\n    }\n    this[wVar5 + 0xd] = SUB41(iVar3,0);\n    wVar5 = wVar5 + 1;\n  }" { comment (expression_statement "iVar3 = wctob(wVar5);" (assignment_expression "iVar3 = wctob(wVar5)" identifier = (call_expression "wctob(wVar5)" identifier (argument_list "(wVar5)" ( identifier )))) ;) (if_statement "if (iVar3 == -1) {\n      this[0xc] = (ctype<wchar_t>)0x0;\n      goto LAB_00237b3b;\n    }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n      this[0xc] = (ctype<wchar_t>)0x0;\n      goto LAB_00237b3b;\n    }" { (expression_statement "this[0xc] = (ctype<wchar_t>)0x0;" (assignment_expression "this[0xc] = (ctype<wchar_t>)0x0" (subscript_expression "this[0xc]" 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_00237b3b;" goto statement_identifier ;) })) (expression_statement "this[wVar5 + 0xd] = SUB41(iVar3,0);" (assignment_expression "this[wVar5 + 0xd] = SUB41(iVar3,0)" (subscript_expression "this[wVar5 + 0xd]" identifier [ (binary_expression "wVar5 + 0xd" identifier + number_literal) ]) = (call_expression "SUB41(iVar3,0)" identifier (argument_list "(iVar3,0)" ( identifier , number_literal )))) ;) (expression_statement "wVar5 = wVar5 + 1;" (assignment_expression "wVar5 = wVar5 + 1" identifier = (binary_expression "wVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(wVar5 != 0x80)" ( (binary_expression "wVar5 != 0x80" identifier != number_literal) )) ;) (expression_statement "this[0xc] = (ctype<wchar_t>)0x1;" (assignment_expression "this[0xc] = (ctype<wchar_t>)0x1" (subscript_expression "this[0xc]" 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_00237b3b:\n  iVar3 = 0;" statement_identifier : (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;)) (do_statement "do {\n                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */\n    wVar5 = btowc(iVar3);\n    *(wint_t *)(this + iVar3 * 4 + 0x90) = wVar5;\n    iVar3 = iVar3 + 1;\n  } while (iVar3 != 0x100);" do (compound_statement "{\n                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */\n    wVar5 = btowc(iVar3);\n    *(wint_t *)(this + iVar3 * 4 + 0x90) = wVar5;\n    iVar3 = iVar3 + 1;\n  }" { comment (expression_statement "wVar5 = btowc(iVar3);" (assignment_expression "wVar5 = btowc(iVar3)" identifier = (call_expression "btowc(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "*(wint_t *)(this + iVar3 * 4 + 0x90) = wVar5;" (assignment_expression "*(wint_t *)(this + iVar3 * 4 + 0x90) = wVar5" (pointer_expression "*(wint_t *)(this + iVar3 * 4 + 0x90)" * (cast_expression "(wint_t *)(this + iVar3 * 4 + 0x90)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + iVar3 * 4 + 0x90)" ( (binary_expression "this + iVar3 * 4 + 0x90" (binary_expression "this + iVar3 * 4" identifier + (binary_expression "iVar3 * 4" identifier * number_literal)) + number_literal) )))) = identifier) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != 0x100)" ( (binary_expression "iVar3 != 0x100" identifier != number_literal) )) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (do_statement "do {\n    iVar3 = 1 << ((byte)uVar6 & 0x1f);\n    if (uVar6 < 8) {\n      uVar1 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n    }\n    else {\n      uVar1 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n      if (uVar6 == 0xb) {\n        __uselocale(uVar2);\n        return;\n      }\n    }\n    uVar6 = uVar6 + 1;\n  } while( true );" do (compound_statement "{\n    iVar3 = 1 << ((byte)uVar6 & 0x1f);\n    if (uVar6 < 8) {\n      uVar1 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n    }\n    else {\n      uVar1 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n      if (uVar6 == 0xb) {\n        __uselocale(uVar2);\n        return;\n      }\n    }\n    uVar6 = uVar6 + 1;\n  }" { (expression_statement "iVar3 = 1 << ((byte)uVar6 & 0x1f);" (assignment_expression "iVar3 = 1 << ((byte)uVar6 & 0x1f)" identifier = (binary_expression "1 << ((byte)uVar6 & 0x1f)" number_literal << (parenthesized_expression "((byte)uVar6 & 0x1f)" ( (binary_expression "(byte)uVar6 & 0x1f" (cast_expression "(byte)uVar6" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if (uVar6 < 8) {\n      uVar1 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n    }\n    else {\n      uVar1 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n      if (uVar6 == 0xb) {\n        __uselocale(uVar2);\n        return;\n      }\n    }" if (parenthesized_expression "(uVar6 < 8)" ( (binary_expression "uVar6 < 8" identifier < number_literal) )) (compound_statement "{\n      uVar1 = (ushort)(iVar3 << 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n    }" { (expression_statement "uVar1 = (ushort)(iVar3 << 8);" (assignment_expression "uVar1 = (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 + uVar6 * 2 + 0x490) = uVar1;" (assignment_expression "*(ushort *)(this + uVar6 * 2 + 0x490) = uVar1" (pointer_expression "*(ushort *)(this + uVar6 * 2 + 0x490)" * (cast_expression "(ushort *)(this + uVar6 * 2 + 0x490)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + uVar6 * 2 + 0x490)" ( (binary_expression "this + uVar6 * 2 + 0x490" (binary_expression "this + uVar6 * 2" identifier + (binary_expression "uVar6 * 2" identifier * number_literal)) + number_literal) )))) = identifier) ;) (expression_statement "uVar4 = _M_convert_to_wmask(this,uVar1);" (assignment_expression "uVar4 = _M_convert_to_wmask(this,uVar1)" identifier = (call_expression "_M_convert_to_wmask(this,uVar1)" identifier (argument_list "(this,uVar1)" ( identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;" (assignment_expression "*(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4" (pointer_expression "*(undefined4 *)(this + uVar6 * 4 + 0x4b0)" * (cast_expression "(undefined4 *)(this + uVar6 * 4 + 0x4b0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + uVar6 * 4 + 0x4b0)" ( (binary_expression "this + uVar6 * 4 + 0x4b0" (binary_expression "this + uVar6 * 4" identifier + (binary_expression "uVar6 * 4" identifier * number_literal)) + number_literal) )))) = identifier) ;) }) (else_clause "else {\n      uVar1 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n      if (uVar6 == 0xb) {\n        __uselocale(uVar2);\n        return;\n      }\n    }" else (compound_statement "{\n      uVar1 = (ushort)((uint)iVar3 >> 8);\n      *(ushort *)(this + uVar6 * 2 + 0x490) = uVar1;\n      uVar4 = _M_convert_to_wmask(this,uVar1);\n      *(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;\n      if (uVar6 == 0xb) {\n        __uselocale(uVar2);\n        return;\n      }\n    }" { (expression_statement "uVar1 = (ushort)((uint)iVar3 >> 8);" (assignment_expression "uVar1 = (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 + uVar6 * 2 + 0x490) = uVar1;" (assignment_expression "*(ushort *)(this + uVar6 * 2 + 0x490) = uVar1" (pointer_expression "*(ushort *)(this + uVar6 * 2 + 0x490)" * (cast_expression "(ushort *)(this + uVar6 * 2 + 0x490)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + uVar6 * 2 + 0x490)" ( (binary_expression "this + uVar6 * 2 + 0x490" (binary_expression "this + uVar6 * 2" identifier + (binary_expression "uVar6 * 2" identifier * number_literal)) + number_literal) )))) = identifier) ;) (expression_statement "uVar4 = _M_convert_to_wmask(this,uVar1);" (assignment_expression "uVar4 = _M_convert_to_wmask(this,uVar1)" identifier = (call_expression "_M_convert_to_wmask(this,uVar1)" identifier (argument_list "(this,uVar1)" ( identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4;" (assignment_expression "*(undefined4 *)(this + uVar6 * 4 + 0x4b0) = uVar4" (pointer_expression "*(undefined4 *)(this + uVar6 * 4 + 0x4b0)" * (cast_expression "(undefined4 *)(this + uVar6 * 4 + 0x4b0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + uVar6 * 4 + 0x4b0)" ( (binary_expression "this + uVar6 * 4 + 0x4b0" (binary_expression "this + uVar6 * 4" identifier + (binary_expression "uVar6 * 4" identifier * number_literal)) + number_literal) )))) = identifier) ;) (if_statement "if (uVar6 == 0xb) {\n        __uselocale(uVar2);\n        return;\n      }" if (parenthesized_expression "(uVar6 == 0xb)" ( (binary_expression "uVar6 == 0xb" identifier == number_literal) )) (compound_statement "{\n        __uselocale(uVar2);\n        return;\n      }" { (expression_statement "__uselocale(uVar2);" (call_expression "__uselocale(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })) }))) (expression_statement "uVar6 = uVar6 + 1;" (assignment_expression "uVar6 = uVar6 + 1" identifier = (binary_expression "uVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "void FUN_00237ae0(int param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  wint_t wVar4;\n  uint uVar5;\n  \n  wVar4 = 0;\n  uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));\n  do {\n                    \n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);\n  *(undefined1 *)(param_1 + 0xc) = 1;\nLAB_00237b3b:\n  iVar2 = 0;\n  do {\n                    \n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);\n  uVar5 = 0;\n  do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );\n}\n\n" (function_definition "void FUN_00237ae0(int param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  wint_t wVar4;\n  uint uVar5;\n  \n  wVar4 = 0;\n  uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));\n  do {\n                    \n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);\n  *(undefined1 *)(param_1 + 0xc) = 1;\nLAB_00237b3b:\n  iVar2 = 0;\n  do {\n                    \n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);\n  uVar5 = 0;\n  do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );\n}" primitive_type (function_declarator "FUN_00237ae0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  wint_t wVar4;\n  uint uVar5;\n  \n  wVar4 = 0;\n  uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));\n  do {\n                    \n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);\n  *(undefined1 *)(param_1 + 0xc) = 1;\nLAB_00237b3b:\n  iVar2 = 0;\n  do {\n                    \n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);\n  uVar5 = 0;\n  do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "wint_t wVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "wVar4 = 0;" (assignment_expression "wVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));" (assignment_expression "uVar1 = __uselocale(*(undefined4 *)(param_1 + 8))" identifier = (call_expression "__uselocale(*(undefined4 *)(param_1 + 8))" identifier (argument_list "(*(undefined4 *)(param_1 + 8))" ( (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) )))) ;) (do_statement "do {\n                    \n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);" do (compound_statement "{\n                    \n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  }" { (expression_statement "iVar2 = wctob(wVar4);" (assignment_expression "iVar2 = wctob(wVar4)" identifier = (call_expression "wctob(wVar4)" identifier (argument_list "(wVar4)" ( identifier )))) ;) (if_statement "if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }" if (parenthesized_expression "(iVar2 == -1)" ( (binary_expression "iVar2 == -1" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }" { (expression_statement "*(undefined1 *)(param_1 + 0xc) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0xc) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0xc)" * (cast_expression "(undefined1 *)(param_1 + 0xc)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_00237b3b;" goto statement_identifier ;) })) (expression_statement "*(char *)(param_1 + 0xd + wVar4) = (char)iVar2;" (assignment_expression "*(char *)(param_1 + 0xd + wVar4) = (char)iVar2" (pointer_expression "*(char *)(param_1 + 0xd + wVar4)" * (cast_expression "(char *)(param_1 + 0xd + wVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd + wVar4)" ( (binary_expression "param_1 + 0xd + wVar4" (binary_expression "param_1 + 0xd" identifier + number_literal) + identifier) )))) = (cast_expression "(char)iVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "wVar4 = wVar4 + 1;" (assignment_expression "wVar4 = wVar4 + 1" identifier = (binary_expression "wVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(wVar4 != 0x80)" ( (binary_expression "wVar4 != 0x80" identifier != number_literal) )) ;) (expression_statement "*(undefined1 *)(param_1 + 0xc) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0xc) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0xc)" * (cast_expression "(undefined1 *)(param_1 + 0xc)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_00237b3b:\n  iVar2 = 0;" statement_identifier : (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;)) (do_statement "do {\n                    \n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);" do (compound_statement "{\n                    \n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  }" { (expression_statement "wVar4 = btowc(iVar2);" (assignment_expression "wVar4 = btowc(iVar2)" identifier = (call_expression "btowc(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "*(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;" (assignment_expression "*(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4" (pointer_expression "*(wint_t *)(param_1 + 0x90 + iVar2 * 4)" * (cast_expression "(wint_t *)(param_1 + 0x90 + iVar2 * 4)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x90 + iVar2 * 4)" ( (binary_expression "param_1 + 0x90 + iVar2 * 4" (binary_expression "param_1 + 0x90" identifier + number_literal) + (binary_expression "iVar2 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar2 != 0x100)" ( (binary_expression "iVar2 != 0x100" identifier != number_literal) )) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );" do (compound_statement "{\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  }" { (expression_statement "iVar2 = 1 << ((byte)uVar5 & 0x1f);" (assignment_expression "iVar2 = 1 << ((byte)uVar5 & 0x1f)" identifier = (binary_expression "1 << ((byte)uVar5 & 0x1f)" number_literal << (parenthesized_expression "((byte)uVar5 & 0x1f)" ( (binary_expression "(byte)uVar5 & 0x1f" (cast_expression "(byte)uVar5" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )))) ;) (if_statement "if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" if (parenthesized_expression "(uVar5 < 8)" ( (binary_expression "uVar5 < 8" identifier < number_literal) )) (compound_statement "{\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }" { (expression_statement "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);" (assignment_expression "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8)" (pointer_expression "*(short *)(param_1 + 0x490 + uVar5 * 2)" * (cast_expression "(short *)(param_1 + 0x490 + uVar5 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x490 + uVar5 * 2)" ( (binary_expression "param_1 + 0x490 + uVar5 * 2" (binary_expression "param_1 + 0x490" identifier + number_literal) + (binary_expression "uVar5 * 2" identifier * number_literal)) )))) = (cast_expression "(short)(iVar2 << 8)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "(iVar2 << 8)" ( (binary_expression "iVar2 << 8" identifier << number_literal) )))) ;) (expression_statement "uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);" (assignment_expression "uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff)" identifier = (call_expression "FUN_002373a0(param_1,iVar2 << 8 & 0xffff)" identifier (argument_list "(param_1,iVar2 << 8 & 0xffff)" ( identifier , (binary_expression "iVar2 << 8 & 0xffff" (binary_expression "iVar2 << 8" identifier << number_literal) & number_literal) )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" * (cast_expression "(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4b0 + uVar5 * 4)" ( (binary_expression "param_1 + 0x4b0 + uVar5 * 4" (binary_expression "param_1 + 0x4b0" identifier + number_literal) + (binary_expression "uVar5 * 4" identifier * number_literal)) )))) = identifier) ;) }) (else_clause "else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" else (compound_statement "{\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" { (expression_statement "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);" (assignment_expression "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8)" (pointer_expression "*(short *)(param_1 + 0x490 + uVar5 * 2)" * (cast_expression "(short *)(param_1 + 0x490 + uVar5 * 2)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x490 + uVar5 * 2)" ( (binary_expression "param_1 + 0x490 + uVar5 * 2" (binary_expression "param_1 + 0x490" identifier + number_literal) + (binary_expression "uVar5 * 2" identifier * number_literal)) )))) = (cast_expression "(short)((uint)iVar2 >> 8)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((uint)iVar2 >> 8)" ( (binary_expression "(uint)iVar2 >> 8" (cast_expression "(uint)iVar2" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "uVar3 = FUN_002373a0(param_1,iVar2 >> 8);" (assignment_expression "uVar3 = FUN_002373a0(param_1,iVar2 >> 8)" identifier = (call_expression "FUN_002373a0(param_1,iVar2 >> 8)" identifier (argument_list "(param_1,iVar2 >> 8)" ( identifier , (binary_expression "iVar2 >> 8" identifier >> number_literal) )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" * (cast_expression "(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4b0 + uVar5 * 4)" ( (binary_expression "param_1 + 0x4b0 + uVar5 * 4" (binary_expression "param_1 + 0x4b0" identifier + number_literal) + (binary_expression "uVar5 * 4" identifier * number_literal)) )))) = identifier) ;) (if_statement "if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }" if (parenthesized_expression "(uVar5 == 0xb)" ( (binary_expression "uVar5 == 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 "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE 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 ( 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 ( 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 (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 IDENT << LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (binary_expression IDENT << LIT) & 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 , (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) ;) (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_00237ae0(int param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  wint_t wVar4;\n  uint uVar5;\n  \n  wVar4 = 0;\n  uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));\n  do {\n                    \n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);\n  *(undefined1 *)(param_1 + 0xc) = 1;\nLAB_00237b3b:\n  iVar2 = 0;\n  do {\n                    \n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);\n  uVar5 = 0;\n  do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );\n}" (primitive_type "void") (function_declarator "FUN_00237ae0(int param_1)" (identifier "FUN_00237ae0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  wint_t wVar4;\n  uint uVar5;\n  \n  wVar4 = 0;\n  uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));\n  do {\n                    \n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);\n  *(undefined1 *)(param_1 + 0xc) = 1;\nLAB_00237b3b:\n  iVar2 = 0;\n  do {\n                    \n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);\n  uVar5 = 0;\n  do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "wint_t wVar4;" (type_identifier "wint_t") (identifier "wVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (expression_statement "wVar4 = 0;" (assignment_expression "wVar4 = 0" (identifier "wVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));" (assignment_expression "uVar1 = __uselocale(*(undefined4 *)(param_1 + 8))" (identifier "uVar1") (= "=") (call_expression "__uselocale(*(undefined4 *)(param_1 + 8))" (identifier "__uselocale") (argument_list "(*(undefined4 *)(param_1 + 8))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) () ")")))) (; ";")) (do_statement "do {\n                    \n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  } while (wVar4 != 0x80);" (do "do") (compound_statement "{\n                    \n    iVar2 = wctob(wVar4);\n    if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }\n    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;\n    wVar4 = wVar4 + 1;\n  }" ({ "{") (expression_statement "iVar2 = wctob(wVar4);" (assignment_expression "iVar2 = wctob(wVar4)" (identifier "iVar2") (= "=") (call_expression "wctob(wVar4)" (identifier "wctob") (argument_list "(wVar4)" (( "(") (identifier "wVar4") () ")")))) (; ";")) (if_statement "if (iVar2 == -1) {\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }" (if "if") (parenthesized_expression "(iVar2 == -1)" (( "(") (binary_expression "iVar2 == -1" (identifier "iVar2") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      *(undefined1 *)(param_1 + 0xc) = 0;\n      goto LAB_00237b3b;\n    }" ({ "{") (expression_statement "*(undefined1 *)(param_1 + 0xc) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0xc) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_00237b3b;" (goto "goto") (statement_identifier "LAB_00237b3b") (; ";")) (} "}"))) (expression_statement "*(char *)(param_1 + 0xd + wVar4) = (char)iVar2;" (assignment_expression "*(char *)(param_1 + 0xd + wVar4) = (char)iVar2" (pointer_expression "*(char *)(param_1 + 0xd + wVar4)" (* "*") (cast_expression "(char *)(param_1 + 0xd + wVar4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd + wVar4)" (( "(") (binary_expression "param_1 + 0xd + wVar4" (binary_expression "param_1 + 0xd" (identifier "param_1") (+ "+") (number_literal "0xd")) (+ "+") (identifier "wVar4")) () ")")))) (= "=") (cast_expression "(char)iVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "iVar2"))) (; ";")) (expression_statement "wVar4 = wVar4 + 1;" (assignment_expression "wVar4 = wVar4 + 1" (identifier "wVar4") (= "=") (binary_expression "wVar4 + 1" (identifier "wVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(wVar4 != 0x80)" (( "(") (binary_expression "wVar4 != 0x80" (identifier "wVar4") (!= "!=") (number_literal "0x80")) () ")")) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0xc) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0xc) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (number_literal "1")) (; ";")) (labeled_statement "LAB_00237b3b:\n  iVar2 = 0;" (statement_identifier "LAB_00237b3b") (: ":") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";"))) (do_statement "do {\n                    \n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  } while (iVar2 != 0x100);" (do "do") (compound_statement "{\n                    \n    wVar4 = btowc(iVar2);\n    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;\n    iVar2 = iVar2 + 1;\n  }" ({ "{") (expression_statement "wVar4 = btowc(iVar2);" (assignment_expression "wVar4 = btowc(iVar2)" (identifier "wVar4") (= "=") (call_expression "btowc(iVar2)" (identifier "btowc") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "*(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;" (assignment_expression "*(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4" (pointer_expression "*(wint_t *)(param_1 + 0x90 + iVar2 * 4)" (* "*") (cast_expression "(wint_t *)(param_1 + 0x90 + iVar2 * 4)" (( "(") (type_descriptor "wint_t *" (type_identifier "wint_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x90 + iVar2 * 4)" (( "(") (binary_expression "param_1 + 0x90 + iVar2 * 4" (binary_expression "param_1 + 0x90" (identifier "param_1") (+ "+") (number_literal "0x90")) (+ "+") (binary_expression "iVar2 * 4" (identifier "iVar2") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "wVar4")) (; ";")) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar2 != 0x100)" (( "(") (binary_expression "iVar2 != 0x100" (identifier "iVar2") (!= "!=") (number_literal "0x100")) () ")")) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  } while( true );" (do "do") (compound_statement "{\n    iVar2 = 1 << ((byte)uVar5 & 0x1f);\n    if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }\n    uVar5 = uVar5 + 1;\n  }" ({ "{") (expression_statement "iVar2 = 1 << ((byte)uVar5 & 0x1f);" (assignment_expression "iVar2 = 1 << ((byte)uVar5 & 0x1f)" (identifier "iVar2") (= "=") (binary_expression "1 << ((byte)uVar5 & 0x1f)" (number_literal "1") (<< "<<") (parenthesized_expression "((byte)uVar5 & 0x1f)" (( "(") (binary_expression "(byte)uVar5 & 0x1f" (cast_expression "(byte)uVar5" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar5")) (& "&") (number_literal "0x1f")) () ")")))) (; ";")) (if_statement "if (uVar5 < 8) {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }\n    else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" (if "if") (parenthesized_expression "(uVar5 < 8)" (( "(") (binary_expression "uVar5 < 8" (identifier "uVar5") (< "<") (number_literal "8")) () ")")) (compound_statement "{\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n    }" ({ "{") (expression_statement "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);" (assignment_expression "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8)" (pointer_expression "*(short *)(param_1 + 0x490 + uVar5 * 2)" (* "*") (cast_expression "(short *)(param_1 + 0x490 + uVar5 * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x490 + uVar5 * 2)" (( "(") (binary_expression "param_1 + 0x490 + uVar5 * 2" (binary_expression "param_1 + 0x490" (identifier "param_1") (+ "+") (number_literal "0x490")) (+ "+") (binary_expression "uVar5 * 2" (identifier "uVar5") (* "*") (number_literal "2"))) () ")")))) (= "=") (cast_expression "(short)(iVar2 << 8)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (parenthesized_expression "(iVar2 << 8)" (( "(") (binary_expression "iVar2 << 8" (identifier "iVar2") (<< "<<") (number_literal "8")) () ")")))) (; ";")) (expression_statement "uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);" (assignment_expression "uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff)" (identifier "uVar3") (= "=") (call_expression "FUN_002373a0(param_1,iVar2 << 8 & 0xffff)" (identifier "FUN_002373a0") (argument_list "(param_1,iVar2 << 8 & 0xffff)" (( "(") (identifier "param_1") (, ",") (binary_expression "iVar2 << 8 & 0xffff" (binary_expression "iVar2 << 8" (identifier "iVar2") (<< "<<") (number_literal "8")) (& "&") (number_literal "0xffff")) () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4b0 + uVar5 * 4)" (( "(") (binary_expression "param_1 + 0x4b0 + uVar5 * 4" (binary_expression "param_1 + 0x4b0" (identifier "param_1") (+ "+") (number_literal "0x4b0")) (+ "+") (binary_expression "uVar5 * 4" (identifier "uVar5") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (} "}")) (else_clause "else {\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" (else "else") (compound_statement "{\n      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);\n      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);\n      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;\n      if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }\n    }" ({ "{") (expression_statement "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);" (assignment_expression "*(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8)" (pointer_expression "*(short *)(param_1 + 0x490 + uVar5 * 2)" (* "*") (cast_expression "(short *)(param_1 + 0x490 + uVar5 * 2)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x490 + uVar5 * 2)" (( "(") (binary_expression "param_1 + 0x490 + uVar5 * 2" (binary_expression "param_1 + 0x490" (identifier "param_1") (+ "+") (number_literal "0x490")) (+ "+") (binary_expression "uVar5 * 2" (identifier "uVar5") (* "*") (number_literal "2"))) () ")")))) (= "=") (cast_expression "(short)((uint)iVar2 >> 8)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (parenthesized_expression "((uint)iVar2 >> 8)" (( "(") (binary_expression "(uint)iVar2 >> 8" (cast_expression "(uint)iVar2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "iVar2")) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "uVar3 = FUN_002373a0(param_1,iVar2 >> 8);" (assignment_expression "uVar3 = FUN_002373a0(param_1,iVar2 >> 8)" (identifier "uVar3") (= "=") (call_expression "FUN_002373a0(param_1,iVar2 >> 8)" (identifier "FUN_002373a0") (argument_list "(param_1,iVar2 >> 8)" (( "(") (identifier "param_1") (, ",") (binary_expression "iVar2 >> 8" (identifier "iVar2") (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4b0 + uVar5 * 4)" (( "(") (binary_expression "param_1 + 0x4b0 + uVar5 * 4" (binary_expression "param_1 + 0x4b0" (identifier "param_1") (+ "+") (number_literal "0x4b0")) (+ "+") (binary_expression "uVar5 * 4" (identifier "uVar5") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (if_statement "if (uVar5 == 0xb) {\n        __uselocale(uVar1);\n        return;\n      }" (if "if") (parenthesized_expression "(uVar5 == 0xb)" (( "(") (binary_expression "uVar5 == 0xb" (identifier "uVar5") (== "==") (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 "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* 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_3 uVar2;
  int var_4;
  type_3 uVar4;
  type_4 var_6;
  type_5 var_9;
  
  var_6 = 0;
  uVar2 = var_1(*(type_3 *)(var_2 + 8));
  do {
                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */
    var_4 = var_3(var_6);
    if (var_4 == -1) {
      var_2[0xc] = (type_1<var_5>)0x0;
      goto LAB_00237b3b;
    }
    var_2[var_6 + 0xd] = var_7(var_4,0);
    var_6 = var_6 + 1;
  } while (var_6 != 0x80);
  var_2[0xc] = (type_1<var_5>)0x1;
LAB_00237b3b:
  var_4 = 0;
  do {
                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */
    var_6 = var_8(var_4);
    *(type_4 *)(var_2 + var_4 * 4 + 0x90) = var_6;
    var_4 = var_4 + 1;
  } while (var_4 != 0x100);
  var_9 = 0;
  do {
    var_4 = 1 << ((type_6)var_9 & 0x1f);
    if (var_9 < 8) {
      uVar1 = (type_2)(var_4 << 8);
      *(type_2 *)(var_2 + var_9 * 2 + 0x490) = uVar1;
      uVar4 = var_10(var_2,uVar1);
      *(type_3 *)(var_2 + var_9 * 4 + 0x4b0) = uVar4;
    }
    else {
      uVar1 = (type_2)((type_5)var_4 >> 8);
      *(type_2 *)(var_2 + var_9 * 2 + 0x490) = uVar1;
      uVar4 = var_10(var_2,uVar1);
      *(type_3 *)(var_2 + var_9 * 4 + 0x4b0) = uVar4;
      if (var_9 == 0xb) {
        var_1(uVar2);
        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: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (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 (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 (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: (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: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) 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) (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))) (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))))))

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

void MASKED(int param_1)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 uVar3;
  wint_t wVar4;
  uint uVar5;
  
  wVar4 = 0;
  uVar1 = __uselocale(*(undefined4 *)(param_1 + 8));
  do {
                    /* try { // try from 00237b2a to 00237b2e has its CatchHandler @ 00237be7 */
    iVar2 = wctob(wVar4);
    if (iVar2 == -1) {
      *(undefined1 *)(param_1 + 0xc) = 0;
      goto LAB_00237b3b;
    }
    *(char *)(param_1 + 0xd + wVar4) = (char)iVar2;
    wVar4 = wVar4 + 1;
  } while (wVar4 != 0x80);
  *(undefined1 *)(param_1 + 0xc) = 1;
LAB_00237b3b:
  iVar2 = 0;
  do {
                    /* try { // try from 00237b47 to 00237b4b has its CatchHandler @ 00237bec */
    wVar4 = btowc(iVar2);
    *(wint_t *)(param_1 + 0x90 + iVar2 * 4) = wVar4;
    iVar2 = iVar2 + 1;
  } while (iVar2 != 0x100);
  uVar5 = 0;
  do {
    iVar2 = 1 << ((byte)uVar5 & 0x1f);
    if (uVar5 < 8) {
      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)(iVar2 << 8);
      uVar3 = FUN_002373a0(param_1,iVar2 << 8 & 0xffff);
      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;
    }
    else {
      *(short *)(param_1 + 0x490 + uVar5 * 2) = (short)((uint)iVar2 >> 8);
      uVar3 = FUN_002373a0(param_1,iVar2 >> 8);
      *(undefined4 *)(param_1 + 0x4b0 + uVar5 * 4) = uVar3;
      if (uVar5 == 0xb) {
        __uselocale(uVar1);
        return;
      }
    }
    uVar5 = uVar5 + 1;
  } while( true );
}

