
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ctype<wchar_t>::do_is(wchar_t const*, wchar_t const*, unsigned short*) const */

wchar_t * __thiscall
std::ctype<wchar_t>::do_is(ctype<wchar_t> *this,wchar_t *param_1,wchar_t *param_2,ushort *param_3)

{
  ushort *puVar1;
  ushort *puVar2;
  int iVar3;
  ushort uVar4;
  int iVar5;
  
  if (param_1 < param_2) {
    puVar1 = param_3 + ((uint)((int)param_2 + (-1 - (int)param_1)) >> 2) + 1;
    do {
      iVar5 = 0;
      uVar4 = 0;
      do {
        iVar3 = __iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),
                             *(undefined4 *)(this + 8));
        if (iVar3 != 0) {
          uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);
        }
        iVar5 = iVar5 + 1;
      } while (iVar5 != 0xc);
      puVar2 = param_3 + 1;
      *param_3 = uVar4;
      param_1 = param_1 + 1;
      param_3 = puVar2;
    } while (puVar2 != puVar1);
  }
  return param_2;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 * FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)

{
  ushort *puVar1;
  ushort *puVar2;
  int iVar3;
  ushort uVar4;
  int iVar5;
  
  if (param_2 < param_3) {
    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;
    do {
      iVar5 = 0;
      uVar4 = 0;
      do {
        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),
                             *(undefined4 *)(param_1 + 8));
        if (iVar3 != 0) {
          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);
        }
        iVar5 = iVar5 + 1;
      } while (iVar5 != 0xc);
      puVar2 = param_4 + 1;
      *param_4 = uVar4;
      param_2 = param_2 + 1;
      param_4 = puVar2;
    } while (puVar2 != puVar1);
  }
  return param_3;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x16dad7
SUB ESP,0x1c
MOV EBP,dword ptr [ESP + 0x30]
MOV EAX,dword ptr [ESP + 0x38]
CMP dword ptr [ESP + 0x34],EAX
JNC 0x002215c4
SUB EAX,0x1
MOV EDX,dword ptr [ESP + 0x3c]
SUB EAX,dword ptr [ESP + 0x34]
SHR EAX,0x2
LEA EAX,[EDX + EAX*0x2 + 0x2]
MOV dword ptr [ESP + 0xc],EAX
LEA ESI,[ESI]
XOR EDI,EDI
MOV dword ptr [ESP + 0x30],EBP
XOR ESI,ESI
MOV EBP,EDI
MOV EDI,dword ptr [ESP + 0x30]
NOP
SUB ESP,0x4
PUSH dword ptr [EDI + 0x8]
PUSH dword ptr [EDI + ESI*0x4 + 0x4b0]
MOV EAX,dword ptr [ESP + 0x40]
PUSH dword ptr [EAX]
CALL 0x00029880
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00221597
OR BP,word ptr [EDI + ESI*0x2 + 0x490]
ADD ESI,0x1
CMP ESI,0xc
JNZ 0x00221570
MOV EAX,dword ptr [ESP + 0x3c]
MOV dword ptr [ESP + 0x30],EDI
MOV EDI,EBP
ADD dword ptr [ESP + 0x3c],0x2
MOV EBP,dword ptr [ESP + 0x30]
MOV word ptr [EAX],DI
MOV EAX,dword ptr [ESP + 0xc]
ADD dword ptr [ESP + 0x34],0x4
CMP dword ptr [ESP + 0x3c],EAX
JNZ 0x00221560
MOV EAX,dword ptr [ESP + 0x38]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 * FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)\n\n{\n  ushort *puVar1;\n  ushort *puVar2;\n  int iVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }\n  return param_3;\n}\n\n" comment (function_definition "undefined4 * FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)\n\n{\n  ushort *puVar1;\n  ushort *puVar2;\n  int iVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }\n  return param_3;\n}" type_identifier (pointer_declarator "* FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)" * (function_declarator "FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)" identifier (parameter_list "(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "ushort *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) )))) (compound_statement "{\n  ushort *puVar1;\n  ushort *puVar2;\n  int iVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }\n  return param_3;\n}" { (declaration "ushort *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ushort *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ushort uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }" if (parenthesized_expression "(param_2 < param_3)" ( (binary_expression "param_2 < param_3" identifier < identifier) )) (compound_statement "{\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }" { (expression_statement "puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;" (assignment_expression "puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1" identifier = (binary_expression "param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1" (binary_expression "param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2)" identifier + (parenthesized_expression "((uint)((int)param_3 + (-1 - (int)param_2)) >> 2)" ( (binary_expression "(uint)((int)param_3 + (-1 - (int)param_2)) >> 2" (call_expression "(uint)((int)param_3 + (-1 - (int)param_2))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)param_3 + (-1 - (int)param_2))" ( (binary_expression "(int)param_3 + (-1 - (int)param_2)" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(-1 - (int)param_2)" ( (binary_expression "-1 - (int)param_2" number_literal - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) >> number_literal) ))) + number_literal)) ;) (do_statement "do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);" do (compound_statement "{\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);" do (compound_statement "{\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      }" { (expression_statement "iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));" (assignment_expression "iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8))" identifier = (call_expression "__iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8))" identifier (argument_list "(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8))" ( (pointer_expression "*param_2" * identifier) , (pointer_expression "*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4)" * (cast_expression "(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4b0 + iVar5 * 4)" ( (binary_expression "param_1 + 0x4b0 + iVar5 * 4" (binary_expression "param_1 + 0x4b0" identifier + number_literal) + (binary_expression "iVar5 * 4" identifier * number_literal)) )))) , (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) )))) )))) ;) (if_statement "if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }" { (expression_statement "uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);" (assignment_expression "uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2)" identifier = (binary_expression "uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2)" identifier | (pointer_expression "*(ushort *)(param_1 + 0x490 + iVar5 * 2)" * (cast_expression "(ushort *)(param_1 + 0x490 + iVar5 * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x490 + iVar5 * 2)" ( (binary_expression "param_1 + 0x490 + iVar5 * 2" (binary_expression "param_1 + 0x490" identifier + number_literal) + (binary_expression "iVar5 * 2" identifier * number_literal)) )))))) ;) })) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != 0xc)" ( (binary_expression "iVar5 != 0xc" identifier != number_literal) )) ;) (expression_statement "puVar2 = param_4 + 1;" (assignment_expression "puVar2 = param_4 + 1" identifier = (binary_expression "param_4 + 1" identifier + number_literal)) ;) (expression_statement "*param_4 = uVar4;" (assignment_expression "*param_4 = uVar4" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "param_4 = puVar2;" (assignment_expression "param_4 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(puVar2 != puVar1)" ( (binary_expression "puVar2 != puVar1" identifier != identifier) )) ;) })) (return_statement "return param_3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::ctype<wchar_t>::do_is(wchar_t const*, wchar_t const*, unsigned short*) const */\n\nwchar_t * __thiscall\nstd::ctype<wchar_t>::do_is(ctype<wchar_t> *this,wchar_t *param_1,wchar_t *param_2,ushort *param_3)\n\n{\n  ushort *puVar1;\n  ushort *puVar2;\n  int iVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  if (param_1 < param_2) {\n    puVar1 = param_3 + ((uint)((int)param_2 + (-1 - (int)param_1)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_3 + 1;\n      *param_3 = uVar4;\n      param_1 = param_1 + 1;\n      param_3 = puVar2;\n    } while (puVar2 != puVar1);\n  }\n  return param_2;\n}\n\n" comment comment (expression_statement "wchar_t * __thiscall\nstd::ctype<wchar_t>::do_is(ctype<wchar_t> *this,wchar_t *param_1,wchar_t *param_2,ushort *param_3)\n\n{\n  ushort *puVar1;" (update_expression "wchar_t * __thiscall\nstd::ctype<wchar_t>::do_is(ctype<wchar_t> *this,wchar_t *param_1,wchar_t *param_2,ushort *param_3)\n\n{\n  ushort *puVar1" (binary_expression "wchar_t * __thiscall\nstd::ctype<wchar_t>::do_is(ctype<wchar_t> *this,wchar_t *param_1,wchar_t *param_2,ushort *param_3)\n\n{\n  ushort *puVar1" (binary_expression "wchar_t * __thiscall\nstd::ctype<wchar_t" (binary_expression "wchar_t * __thiscall" identifier * identifier) (ERROR "std::ctype" identifier : : identifier) < identifier) > (ERROR "::do_is(ctype<wchar_t> *this,wchar_t *param_1,wchar_t *param_2,ushort *param_3)\n\n{" : : (call_expression "do_is(ctype<wchar_t> *this,wchar_t *param_1,wchar_t *param_2,ushort *param_3)" identifier (argument_list "(ctype<wchar_t> *this,wchar_t *param_1,wchar_t *param_2,ushort *param_3)" ( (binary_expression "ctype<wchar_t> *this" (binary_expression "ctype<wchar_t" identifier < identifier) > (pointer_expression "*this" * identifier)) , (binary_expression "wchar_t *param_1" identifier * identifier) , (binary_expression "wchar_t *param_2" identifier * identifier) , (binary_expression "ushort *param_3" identifier * identifier) ))) {) (binary_expression "ushort *puVar1" identifier * identifier)) --) ;) (declaration "ushort *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ushort uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (param_1 < param_2) {\n    puVar1 = param_3 + ((uint)((int)param_2 + (-1 - (int)param_1)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_3 + 1;\n      *param_3 = uVar4;\n      param_1 = param_1 + 1;\n      param_3 = puVar2;\n    } while (puVar2 != puVar1);\n  }" if (parenthesized_expression "(param_1 < param_2)" ( (binary_expression "param_1 < param_2" identifier < identifier) )) (compound_statement "{\n    puVar1 = param_3 + ((uint)((int)param_2 + (-1 - (int)param_1)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_3 + 1;\n      *param_3 = uVar4;\n      param_1 = param_1 + 1;\n      param_3 = puVar2;\n    } while (puVar2 != puVar1);\n  }" { (expression_statement "puVar1 = param_3 + ((uint)((int)param_2 + (-1 - (int)param_1)) >> 2) + 1;" (assignment_expression "puVar1 = param_3 + ((uint)((int)param_2 + (-1 - (int)param_1)) >> 2) + 1" identifier = (binary_expression "param_3 + ((uint)((int)param_2 + (-1 - (int)param_1)) >> 2) + 1" (binary_expression "param_3 + ((uint)((int)param_2 + (-1 - (int)param_1)) >> 2)" identifier + (parenthesized_expression "((uint)((int)param_2 + (-1 - (int)param_1)) >> 2)" ( (binary_expression "(uint)((int)param_2 + (-1 - (int)param_1)) >> 2" (call_expression "(uint)((int)param_2 + (-1 - (int)param_1))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)param_2 + (-1 - (int)param_1))" ( (binary_expression "(int)param_2 + (-1 - (int)param_1)" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(-1 - (int)param_1)" ( (binary_expression "-1 - (int)param_1" number_literal - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) >> number_literal) ))) + number_literal)) ;) (do_statement "do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_3 + 1;\n      *param_3 = uVar4;\n      param_1 = param_1 + 1;\n      param_3 = puVar2;\n    } while (puVar2 != puVar1);" do (compound_statement "{\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_3 + 1;\n      *param_3 = uVar4;\n      param_1 = param_1 + 1;\n      param_3 = puVar2;\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar3 = __iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);" do (compound_statement "{\n        iVar3 = __iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);\n        }\n        iVar5 = iVar5 + 1;\n      }" { (expression_statement "iVar3 = __iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8));" (assignment_expression "iVar3 = __iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8))" identifier = (call_expression "__iswctype_l(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8))" identifier (argument_list "(*param_1,*(undefined4 *)(this + iVar5 * 4 + 0x4b0),\n                             *(undefined4 *)(this + 8))" ( (pointer_expression "*param_1" * identifier) , (pointer_expression "*(undefined4 *)(this + iVar5 * 4 + 0x4b0)" * (cast_expression "(undefined4 *)(this + iVar5 * 4 + 0x4b0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + iVar5 * 4 + 0x4b0)" ( (binary_expression "this + iVar5 * 4 + 0x4b0" (binary_expression "this + iVar5 * 4" identifier + (binary_expression "iVar5 * 4" identifier * number_literal)) + number_literal) )))) , (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) )))) )))) ;) (if_statement "if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);\n        }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);\n        }" { (expression_statement "uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490);" (assignment_expression "uVar4 = uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490)" identifier = (binary_expression "uVar4 | *(ushort *)(this + iVar5 * 2 + 0x490)" identifier | (pointer_expression "*(ushort *)(this + iVar5 * 2 + 0x490)" * (cast_expression "(ushort *)(this + iVar5 * 2 + 0x490)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + iVar5 * 2 + 0x490)" ( (binary_expression "this + iVar5 * 2 + 0x490" (binary_expression "this + iVar5 * 2" identifier + (binary_expression "iVar5 * 2" identifier * number_literal)) + number_literal) )))))) ;) })) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != 0xc)" ( (binary_expression "iVar5 != 0xc" identifier != number_literal) )) ;) (expression_statement "puVar2 = param_3 + 1;" (assignment_expression "puVar2 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) (expression_statement "*param_3 = uVar4;" (assignment_expression "*param_3 = uVar4" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "param_3 = puVar2;" (assignment_expression "param_3 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(puVar2 != puVar1)" ( (binary_expression "puVar2 != puVar1" identifier != identifier) )) ;) })) (return_statement "return param_2;" return identifier ;) (ERROR "}" }))
(translation_unit "undefined4 * FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)\n\n{\n  ushort *puVar1;\n  ushort *puVar2;\n  int iVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }\n  return param_3;\n}\n\n" (function_definition "undefined4 * FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)\n\n{\n  ushort *puVar1;\n  ushort *puVar2;\n  int iVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }\n  return param_3;\n}" type_identifier (pointer_declarator "* FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)" * (function_declarator "FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)" identifier (parameter_list "(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "ushort *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) )))) (compound_statement "{\n  ushort *puVar1;\n  ushort *puVar2;\n  int iVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }\n  return param_3;\n}" { (declaration "ushort *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ushort *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ushort uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }" if (parenthesized_expression "(param_2 < param_3)" ( (binary_expression "param_2 < param_3" identifier < identifier) )) (compound_statement "{\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }" { (expression_statement "puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;" (assignment_expression "puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1" identifier = (binary_expression "param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1" (binary_expression "param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2)" identifier + (parenthesized_expression "((uint)((int)param_3 + (-1 - (int)param_2)) >> 2)" ( (binary_expression "(uint)((int)param_3 + (-1 - (int)param_2)) >> 2" (call_expression "(uint)((int)param_3 + (-1 - (int)param_2))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)param_3 + (-1 - (int)param_2))" ( (binary_expression "(int)param_3 + (-1 - (int)param_2)" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(-1 - (int)param_2)" ( (binary_expression "-1 - (int)param_2" number_literal - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) >> number_literal) ))) + number_literal)) ;) (do_statement "do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);" do (compound_statement "{\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);" do (compound_statement "{\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      }" { (expression_statement "iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));" (assignment_expression "iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8))" identifier = (call_expression "__iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8))" identifier (argument_list "(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8))" ( (pointer_expression "*param_2" * identifier) , (pointer_expression "*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4)" * (cast_expression "(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4b0 + iVar5 * 4)" ( (binary_expression "param_1 + 0x4b0 + iVar5 * 4" (binary_expression "param_1 + 0x4b0" identifier + number_literal) + (binary_expression "iVar5 * 4" identifier * number_literal)) )))) , (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) )))) )))) ;) (if_statement "if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }" { (expression_statement "uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);" (assignment_expression "uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2)" identifier = (binary_expression "uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2)" identifier | (pointer_expression "*(ushort *)(param_1 + 0x490 + iVar5 * 2)" * (cast_expression "(ushort *)(param_1 + 0x490 + iVar5 * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x490 + iVar5 * 2)" ( (binary_expression "param_1 + 0x490 + iVar5 * 2" (binary_expression "param_1 + 0x490" identifier + number_literal) + (binary_expression "iVar5 * 2" identifier * number_literal)) )))))) ;) })) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != 0xc)" ( (binary_expression "iVar5 != 0xc" identifier != number_literal) )) ;) (expression_statement "puVar2 = param_4 + 1;" (assignment_expression "puVar2 = param_4 + 1" identifier = (binary_expression "param_4 + 1" identifier + number_literal)) ;) (expression_statement "*param_4 = uVar4;" (assignment_expression "*param_4 = uVar4" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "param_4 = puVar2;" (assignment_expression "param_4 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(puVar2 != puVar1)" ( (binary_expression "puVar2 != puVar1" identifier != identifier) )) ;) })) (return_statement "return param_3;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) ))) >> LIT) ))) + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT | (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 * FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)\n\n{\n  ushort *puVar1;\n  ushort *puVar2;\n  int iVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }\n  return param_3;\n}" (type_identifier "undefined4") (pointer_declarator "* FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)" (* "*") (function_declarator "FUN_00221520(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)" (identifier "FUN_00221520") (parameter_list "(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "ushort *param_4" (type_identifier "ushort") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")")))) (compound_statement "{\n  ushort *puVar1;\n  ushort *puVar2;\n  int iVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }\n  return param_3;\n}" ({ "{") (declaration "ushort *puVar1;" (type_identifier "ushort") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "ushort *puVar2;" (type_identifier "ushort") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "ushort uVar4;" (type_identifier "ushort") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (if_statement "if (param_2 < param_3) {\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }" (if "if") (parenthesized_expression "(param_2 < param_3)" (( "(") (binary_expression "param_2 < param_3" (identifier "param_2") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;\n    do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);\n  }" ({ "{") (expression_statement "puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;" (assignment_expression "puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1" (identifier "puVar1") (= "=") (binary_expression "param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1" (binary_expression "param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2)" (identifier "param_4") (+ "+") (parenthesized_expression "((uint)((int)param_3 + (-1 - (int)param_2)) >> 2)" (( "(") (binary_expression "(uint)((int)param_3 + (-1 - (int)param_2)) >> 2" (call_expression "(uint)((int)param_3 + (-1 - (int)param_2))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((int)param_3 + (-1 - (int)param_2))" (( "(") (binary_expression "(int)param_3 + (-1 - (int)param_2)" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (+ "+") (parenthesized_expression "(-1 - (int)param_2)" (( "(") (binary_expression "-1 - (int)param_2" (number_literal "-1") (- "-") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")"))) () ")"))) (>> ">>") (number_literal "2")) () ")"))) (+ "+") (number_literal "1"))) (; ";")) (do_statement "do {\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    } while (puVar2 != puVar1);" (do "do") (compound_statement "{\n      iVar5 = 0;\n      uVar4 = 0;\n      do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);\n      puVar2 = param_4 + 1;\n      *param_4 = uVar4;\n      param_2 = param_2 + 1;\n      param_4 = puVar2;\n    }" ({ "{") (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      } while (iVar5 != 0xc);" (do "do") (compound_statement "{\n        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));\n        if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }\n        iVar5 = iVar5 + 1;\n      }" ({ "{") (expression_statement "iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8));" (assignment_expression "iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8))" (identifier "iVar3") (= "=") (call_expression "__iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8))" (identifier "__iswctype_l") (argument_list "(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),\n                             *(undefined4 *)(param_1 + 8))" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4b0 + iVar5 * 4)" (( "(") (binary_expression "param_1 + 0x4b0 + iVar5 * 4" (binary_expression "param_1 + 0x4b0" (identifier "param_1") (+ "+") (number_literal "0x4b0")) (+ "+") (binary_expression "iVar5 * 4" (identifier "iVar5") (* "*") (number_literal "4"))) () ")")))) (, ",") (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")) () ")")))) () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);\n        }" ({ "{") (expression_statement "uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);" (assignment_expression "uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2)" (identifier "uVar4") (= "=") (binary_expression "uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2)" (identifier "uVar4") (| "|") (pointer_expression "*(ushort *)(param_1 + 0x490 + iVar5 * 2)" (* "*") (cast_expression "(ushort *)(param_1 + 0x490 + iVar5 * 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x490 + iVar5 * 2)" (( "(") (binary_expression "param_1 + 0x490 + iVar5 * 2" (binary_expression "param_1 + 0x490" (identifier "param_1") (+ "+") (number_literal "0x490")) (+ "+") (binary_expression "iVar5 * 2" (identifier "iVar5") (* "*") (number_literal "2"))) () ")")))))) (; ";")) (} "}"))) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar5 != 0xc)" (( "(") (binary_expression "iVar5 != 0xc" (identifier "iVar5") (!= "!=") (number_literal "0xc")) () ")")) (; ";")) (expression_statement "puVar2 = param_4 + 1;" (assignment_expression "puVar2 = param_4 + 1" (identifier "puVar2") (= "=") (binary_expression "param_4 + 1" (identifier "param_4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*param_4 = uVar4;" (assignment_expression "*param_4 = uVar4" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_4 = puVar2;" (assignment_expression "param_4 = puVar2" (identifier "param_4") (= "=") (identifier "puVar2")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar2 != puVar1)" (( "(") (binary_expression "puVar2 != puVar1" (identifier "puVar2") (!= "!=") (identifier "puVar1")) () ")")) (; ";")) (} "}"))) (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ctype<wchar_t>::do_is(wchar_t const*, wchar_t const*, unsigned short*) const */

var_1 * var_2
std::ctype<var_1>::do_is(ctype<var_1> *var_9,var_1 *var_5,var_1 *var_6,var_3 *var_7)

{
  var_3 *var_4;
  var_3 *var_13;
  int var_11;
  var_3 var_12;
  int var_10;
  
  if (var_5 < var_6) {
    var_4 = var_7 + ((uint)((int)var_6 + (-1 - (int)var_5)) >> 2) + 1;
    do {
      var_10 = 0;
      var_12 = 0;
      do {
        var_11 = var_8(*var_5,*(type_1 *)(var_9 + var_10 * 4 + 0x4b0),
                             *(type_1 *)(var_9 + 8));
        if (var_11 != 0) {
          var_12 = var_12 | *(var_3 *)(var_9 + var_10 * 2 + 0x490);
        }
        var_10 = var_10 + 1;
      } while (var_10 != 0xc);
      var_13 = var_7 + 1;
      *var_7 = var_12;
      var_5 = var_5 + 1;
      var_7 = var_13;
    } while (var_13 != var_4);
  }
  return var_6;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 * MASKED(int param_1,undefined4 *param_2,undefined4 *param_3,ushort *param_4)

{
  ushort *puVar1;
  ushort *puVar2;
  int iVar3;
  ushort uVar4;
  int iVar5;
  
  if (param_2 < param_3) {
    puVar1 = param_4 + ((uint)((int)param_3 + (-1 - (int)param_2)) >> 2) + 1;
    do {
      iVar5 = 0;
      uVar4 = 0;
      do {
        iVar3 = __iswctype_l(*param_2,*(undefined4 *)(param_1 + 0x4b0 + iVar5 * 4),
                             *(undefined4 *)(param_1 + 8));
        if (iVar3 != 0) {
          uVar4 = uVar4 | *(ushort *)(param_1 + 0x490 + iVar5 * 2);
        }
        iVar5 = iVar5 + 1;
      } while (iVar5 != 0xc);
      puVar2 = param_4 + 1;
      *param_4 = uVar4;
      param_2 = param_2 + 1;
      param_4 = puVar2;
    } while (puVar2 != puVar1);
  }
  return param_3;
}

