
/* std::collate<wchar_t>::do_transform(wchar_t const*, wchar_t const*) const */

wchar_t * std::collate<wchar_t>::do_transform(wchar_t *param_1,wchar_t *param_2)

{
  wchar_t *pwVar1;
  wchar_t wVar2;
  wchar_t *pwVar3;
  uint uVar4;
  size_t sVar5;
  wchar_t wVar6;
  int unaff_EDI;
  wchar_t *__s;
  int in_stack_0000000c;
  int in_stack_00000010;
  wchar_t *local_48;
  uint local_44;
  wchar_t *local_34;
  int local_30;
  wchar_t local_2c [7];
  
  __x86_get_pc_thunk_di();
  param_1[1] = L'\0';
  *param_1 = (wchar_t)(param_1 + 2);
  param_1[2] = L'\0';
  local_34 = local_2c;
                    /* try { // try from 0024c067 to 0024c06b has its CatchHandler @ 0024c22a */
  std::wstring::_M_construct<wchar_t_const*>(&local_34,in_stack_0000000c,in_stack_00000010,0);
  __s = local_34;
  pwVar1 = local_34 + local_30;
  local_44 = in_stack_00000010 - in_stack_0000000c >> 1;
  if (0x1fffffff < local_44) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */
    __cxa_throw_bad_array_new_length();
  }
                    /* try { // try from 0024c09b to 0024c09f has its CatchHandler @ 0024c226 */
  local_48 = (wchar_t *)operator_new__(local_44 << 2);
  while( true ) {
    uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);
    if (local_44 <= uVar4) {
      local_44 = uVar4 + 1;
      operator_delete__(local_48);
      if (0x1fffffff < local_44) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */
        __cxa_throw_bad_array_new_length();
      }
                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */
      local_48 = (wchar_t *)operator_new__(local_44 * 4);
      uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);
    }
    if ((uint)(0x1fffffffU - param_1[1]) < uVar4) break;
                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */
    std::wstring::_M_append((wstring *)param_1,local_48,uVar4);
    sVar5 = wcslen(__s);
    if (pwVar1 == __s + sVar5) {
      operator_delete__(local_48);
      if (local_34 != local_2c) {
        operator_delete(local_34);
      }
      return param_1;
    }
    __s = __s + sVar5 + 1;
    wVar2 = param_1[1];
    pwVar3 = (wchar_t *)*param_1;
    if (param_1 + 2 == pwVar3) {
      wVar6 = L'\x03';
    }
    else {
      wVar6 = param_1[2];
    }
    if ((uint)wVar6 < (uint)(wVar2 + L'\x01')) {
      std::wstring::_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1);
      pwVar3 = (wchar_t *)*param_1;
    }
    pwVar3[wVar2] = L'\0';
    param_1[1] = wVar2 + L'\x01';
    pwVar3[wVar2 + L'\x01'] = L'\0';
  }
                    /* WARNING: Subroutine does not return */
  __throw_length_error(&UNK_0003abb9 + unaff_EDI);
}



int * FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)

{
  wchar_t *pwVar1;
  int iVar2;
  int *piVar3;
  uint uVar4;
  size_t sVar5;
  int unaff_EDI;
  wchar_t *__s;
  undefined4 local_48;
  uint local_44;
  wchar_t *local_34;
  int local_30;
  wchar_t local_2c [7];
  
  FUN_000559ee();
  param_1[1] = 0;
  *param_1 = (int)(param_1 + 2);
  param_1[2] = 0;
  local_34 = local_2c;
                    /* try { // try from 0024c067 to 0024c06b has its CatchHandler @ 0024c22a */
  FUN_001ee0d0(&local_34,param_3,param_4,0);
  __s = local_34;
  pwVar1 = local_34 + local_30;
  local_44 = param_4 - param_3 >> 1;
  if (0x1fffffff < local_44) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */
    FUN_001e6740();
  }
                    /* try { // try from 0024c09b to 0024c09f has its CatchHandler @ 0024c226 */
  local_48 = FUN_001e5180(local_44 << 2);
  while( true ) {
    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);
    if (local_44 <= uVar4) {
      local_44 = uVar4 + 1;
      FUN_001e6d50(local_48);
      if (0x1fffffff < local_44) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */
        FUN_001e6740();
      }
                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */
      local_48 = FUN_001e5180(local_44 * 4);
      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);
    }
    if (0x1fffffffU - param_1[1] < uVar4) break;
                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */
    FUN_001ecc70(param_1,local_48,uVar4);
    sVar5 = wcslen(__s);
    if (pwVar1 == __s + sVar5) {
      FUN_001e6d50(local_48);
      if (local_34 != local_2c) {
        FUN_001e6db0(local_34);
      }
      return param_1;
    }
    __s = __s + sVar5 + 1;
    iVar2 = param_1[1];
    piVar3 = (int *)*param_1;
    if (param_1 + 2 == piVar3) {
      uVar4 = 3;
    }
    else {
      uVar4 = param_1[2];
    }
    if (uVar4 < iVar2 + 1U) {
      FUN_001eb0a0(param_1,iVar2,0,0,1);
      piVar3 = (int *)*param_1;
    }
    piVar3[iVar2] = 0;
    param_1[1] = iVar2 + 1U;
    piVar3[iVar2 + 1] = 0;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0022c7a0(unaff_EDI + 0x3abb9);
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
CALL 0x000559ee
ADD EDI,0x142fd7
PUSH ESI
LEA ECX,[EBP + -0x28]
PUSH EBX
SUB ESP,0x4c
MOV ESI,dword ptr [EBP + 0x8]
MOV dword ptr [EBP + -0x58],ECX
MOV dword ptr [EBP + -0x30],ECX
LEA EAX,[ESI + 0x8]
MOV dword ptr [ESI + 0x4],0x0
MOV EBX,EDI
MOV dword ptr [ESI],EAX
MOV dword ptr [EBP + -0x54],EAX
LEA EAX,[EBP + -0x30]
MOV dword ptr [ESI + 0x8],0x0
PUSH 0x0
PUSH dword ptr [EBP + 0x14]
PUSH dword ptr [EBP + 0x10]
PUSH EAX
MOV dword ptr [EBP + -0x3c],EDI
CALL 0x001ee0d0
MOV EDI,dword ptr [EBP + -0x30]
MOV EAX,dword ptr [EBP + -0x2c]
ADD ESP,0x10
LEA EAX,[EDI + EAX*0x4]
MOV dword ptr [EBP + -0x50],EAX
MOV EAX,dword ptr [EBP + 0x14]
SUB EAX,dword ptr [EBP + 0x10]
SAR EAX,0x1
MOV dword ptr [EBP + -0x40],EAX
CMP EAX,0x1fffffff
JA 0x0024c22e
SUB ESP,0xc
SHL EAX,0x2
MOV EBX,dword ptr [EBP + -0x3c]
PUSH EAX
CALL 0x001e5180
MOV dword ptr [EBP + -0x44],EAX
ADD ESP,0x10
JMP 0x0024c0c8
MOV ECX,dword ptr [EBP + -0x4c]
MOV EDX,dword ptr [EBP + -0x48]
MOV dword ptr [EAX + ECX*0x4],0x0
MOV dword ptr [ESI + 0x4],EDX
MOV dword ptr [EAX + ECX*0x4 + 0x4],0x0
PUSH dword ptr [EBP + -0x40]
MOV EBX,dword ptr [EBP + -0x3c]
PUSH EDI
PUSH dword ptr [EBP + -0x44]
PUSH dword ptr [EBP + 0xc]
CALL 0x0027af30
ADD ESP,0x10
CMP dword ptr [EBP + -0x40],EAX
JA 0x0024c12f
SUB ESP,0xc
PUSH dword ptr [EBP + -0x44]
MOV EBX,dword ptr [EBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [EBP + -0x40],EAX
CALL 0x001e6d50
MOV EAX,dword ptr [EBP + -0x40]
ADD ESP,0x10
CMP EAX,0x1fffffff
JA 0x0024c207
SUB ESP,0xc
SHL EAX,0x2
MOV EBX,dword ptr [EBP + -0x3c]
PUSH EAX
CALL 0x001e5180
ADD ESP,0x10
PUSH dword ptr [EBP + -0x40]
MOV EBX,dword ptr [EBP + -0x3c]
PUSH EDI
PUSH EAX
PUSH dword ptr [EBP + 0xc]
MOV dword ptr [EBP + -0x44],EAX
CALL 0x0027af30
ADD ESP,0x10
MOV EDX,0x1fffffff
SUB EDX,dword ptr [ESI + 0x4]
CMP EAX,EDX
JA 0x0024c1f3
SUB ESP,0x4
MOV EBX,dword ptr [EBP + -0x3c]
PUSH EAX
PUSH dword ptr [EBP + -0x44]
PUSH ESI
CALL 0x001ecc70
MOV EBX,dword ptr [EBP + -0x3c]
MOV dword ptr [ESP],EDI
CALL 0x00029270
ADD ESP,0x10
LEA EAX,[EDI + EAX*0x4]
CMP dword ptr [EBP + -0x50],EAX
JZ 0x0024c1c0
LEA EDI,[EAX + 0x4]
MOV EAX,dword ptr [ESI + 0x4]
MOV dword ptr [EBP + -0x4c],EAX
ADD EAX,0x1
MOV dword ptr [EBP + -0x48],EAX
MOV EAX,dword ptr [ESI]
CMP dword ptr [EBP + -0x54],EAX
JZ 0x0024c1b0
MOV EDX,dword ptr [ESI + 0x8]
CMP dword ptr [EBP + -0x48],EDX
JBE 0x0024c0b0
SUB ESP,0xc
MOV EBX,dword ptr [EBP + -0x3c]
PUSH 0x1
PUSH 0x0
PUSH 0x0
PUSH dword ptr [EBP + -0x4c]
PUSH ESI
CALL 0x001eb0a0
ADD ESP,0x20
MOV EAX,dword ptr [ESI]
JMP 0x0024c0b0
MOV EDX,0x3
JMP 0x0024c17e
SUB ESP,0xc
MOV EDI,dword ptr [EBP + -0x3c]
PUSH dword ptr [EBP + -0x44]
MOV EBX,EDI
CALL 0x001e6d50
MOV EAX,dword ptr [EBP + -0x30]
ADD ESP,0x10
CMP EAX,dword ptr [EBP + -0x58]
JZ 0x0024c1e7
SUB ESP,0xc
PUSH EAX
CALL 0x001e6db0
ADD ESP,0x10
LEA ESP,[EBP + -0xc]
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET 0x4
MOV EBX,dword ptr [EBP + -0x3c]
SUB ESP,0xc
LEA EAX,[EBX + 0xffef7be2]
PUSH EAX
CALL 0x0022c7a0
MOV EBX,dword ptr [EBP + -0x3c]
CALL 0x001e6740
MOV EBX,dword ptr [EBP + -0x3c]
CALL 0x001e6740
(translation_unit "int * FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  size_t sVar5;\n  int unaff_EDI;\n  wchar_t *__s;\n  undefined4 local_48;\n  uint local_44;\n  wchar_t *local_34;\n  int local_30;\n  wchar_t local_2c [7];\n  \n  FUN_000559ee();\n  param_1[1] = 0;\n  *param_1 = (int)(param_1 + 2);\n  param_1[2] = 0;\n  local_34 = local_2c;\n                    /* try { // try from 0024c067 to 0024c06b has its CatchHandler @ 0024c22a */\n  FUN_001ee0d0(&local_34,param_3,param_4,0);\n  __s = local_34;\n  pwVar1 = local_34 + local_30;\n  local_44 = param_4 - param_3 >> 1;\n  if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */\n    FUN_001e6740();\n  }\n                    /* try { // try from 0024c09b to 0024c09f has its CatchHandler @ 0024c226 */\n  local_48 = FUN_001e5180(local_44 << 2);\n  while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        FUN_001e6740();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */\n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c7a0(unaff_EDI + 0x3abb9);\n}\n\n" (function_definition "int * FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  size_t sVar5;\n  int unaff_EDI;\n  wchar_t *__s;\n  undefined4 local_48;\n  uint local_44;\n  wchar_t *local_34;\n  int local_30;\n  wchar_t local_2c [7];\n  \n  FUN_000559ee();\n  param_1[1] = 0;\n  *param_1 = (int)(param_1 + 2);\n  param_1[2] = 0;\n  local_34 = local_2c;\n                    /* try { // try from 0024c067 to 0024c06b has its CatchHandler @ 0024c22a */\n  FUN_001ee0d0(&local_34,param_3,param_4,0);\n  __s = local_34;\n  pwVar1 = local_34 + local_30;\n  local_44 = param_4 - param_3 >> 1;\n  if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */\n    FUN_001e6740();\n  }\n                    /* try { // try from 0024c09b to 0024c09f has its CatchHandler @ 0024c226 */\n  local_48 = FUN_001e5180(local_44 << 2);\n  while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        FUN_001e6740();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */\n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c7a0(unaff_EDI + 0x3abb9);\n}" primitive_type (pointer_declarator "* FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)" * (function_declarator "FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)" identifier (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) )))) (compound_statement "{\n  wchar_t *pwVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  size_t sVar5;\n  int unaff_EDI;\n  wchar_t *__s;\n  undefined4 local_48;\n  uint local_44;\n  wchar_t *local_34;\n  int local_30;\n  wchar_t local_2c [7];\n  \n  FUN_000559ee();\n  param_1[1] = 0;\n  *param_1 = (int)(param_1 + 2);\n  param_1[2] = 0;\n  local_34 = local_2c;\n                    /* try { // try from 0024c067 to 0024c06b has its CatchHandler @ 0024c22a */\n  FUN_001ee0d0(&local_34,param_3,param_4,0);\n  __s = local_34;\n  pwVar1 = local_34 + local_30;\n  local_44 = param_4 - param_3 >> 1;\n  if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */\n    FUN_001e6740();\n  }\n                    /* try { // try from 0024c09b to 0024c09f has its CatchHandler @ 0024c226 */\n  local_48 = FUN_001e5180(local_44 << 2);\n  while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        FUN_001e6740();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */\n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c7a0(unaff_EDI + 0x3abb9);\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "wchar_t *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (declaration "undefined4 local_48;" type_identifier identifier ;) (declaration "uint local_44;" type_identifier identifier ;) (declaration "wchar_t *local_34;" type_identifier (pointer_declarator "*local_34" * identifier) ;) (declaration "int local_30;" primitive_type identifier ;) (declaration "wchar_t local_2c [7];" type_identifier (array_declarator "local_2c [7]" identifier [ number_literal ]) ;) (expression_statement "FUN_000559ee();" (call_expression "FUN_000559ee()" identifier (argument_list "()" ( ))) ;) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*param_1 = (int)(param_1 + 2);" (assignment_expression "*param_1 = (int)(param_1 + 2)" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)(param_1 + 2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) ;) (expression_statement "param_1[2] = 0;" (assignment_expression "param_1[2] = 0" (subscript_expression "param_1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_34 = local_2c;" (assignment_expression "local_34 = local_2c" identifier = identifier) ;) comment (expression_statement "FUN_001ee0d0(&local_34,param_3,param_4,0);" (call_expression "FUN_001ee0d0(&local_34,param_3,param_4,0)" identifier (argument_list "(&local_34,param_3,param_4,0)" ( (pointer_expression "&local_34" & identifier) , identifier , identifier , number_literal ))) ;) (expression_statement "__s = local_34;" (assignment_expression "__s = local_34" identifier = identifier) ;) (expression_statement "pwVar1 = local_34 + local_30;" (assignment_expression "pwVar1 = local_34 + local_30" identifier = (binary_expression "local_34 + local_30" identifier + identifier)) ;) (expression_statement "local_44 = param_4 - param_3 >> 1;" (assignment_expression "local_44 = param_4 - param_3 >> 1" identifier = (binary_expression "param_4 - param_3 >> 1" (binary_expression "param_4 - param_3" identifier - identifier) >> number_literal)) ;) (if_statement "if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */\n    FUN_001e6740();\n  }" if (parenthesized_expression "(0x1fffffff < local_44)" ( (binary_expression "0x1fffffff < local_44" number_literal < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */\n    FUN_001e6740();\n  }" { comment comment (expression_statement "FUN_001e6740();" (call_expression "FUN_001e6740()" identifier (argument_list "()" ( ))) ;) })) comment (expression_statement "local_48 = FUN_001e5180(local_44 << 2);" (assignment_expression "local_48 = FUN_001e5180(local_44 << 2)" identifier = (call_expression "FUN_001e5180(local_44 << 2)" identifier (argument_list "(local_44 << 2)" ( (binary_expression "local_44 << 2" identifier << number_literal) )))) ;) (while_statement "while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        FUN_001e6740();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */\n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        FUN_001e6740();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */\n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }" { (expression_statement "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);" (assignment_expression "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44)" identifier = (call_expression "FUN_0027af30(param_2,local_48,__s,local_44)" identifier (argument_list "(param_2,local_48,__s,local_44)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        FUN_001e6740();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }" if (parenthesized_expression "(local_44 <= uVar4)" ( (binary_expression "local_44 <= uVar4" identifier <= identifier) )) (compound_statement "{\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        FUN_001e6740();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }" { (expression_statement "local_44 = uVar4 + 1;" (assignment_expression "local_44 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) (expression_statement "FUN_001e6d50(local_48);" (call_expression "FUN_001e6d50(local_48)" identifier (argument_list "(local_48)" ( identifier ))) ;) (if_statement "if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        FUN_001e6740();\n      }" if (parenthesized_expression "(0x1fffffff < local_44)" ( (binary_expression "0x1fffffff < local_44" number_literal < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        FUN_001e6740();\n      }" { comment comment (expression_statement "FUN_001e6740();" (call_expression "FUN_001e6740()" identifier (argument_list "()" ( ))) ;) })) comment (expression_statement "local_48 = FUN_001e5180(local_44 * 4);" (assignment_expression "local_48 = FUN_001e5180(local_44 * 4)" identifier = (call_expression "FUN_001e5180(local_44 * 4)" identifier (argument_list "(local_44 * 4)" ( (binary_expression "local_44 * 4" identifier * number_literal) )))) ;) (expression_statement "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);" (assignment_expression "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44)" identifier = (call_expression "FUN_0027af30(param_2,local_48,__s,local_44)" identifier (argument_list "(param_2,local_48,__s,local_44)" ( identifier , identifier , identifier , identifier )))) ;) })) (if_statement "if (0x1fffffffU - param_1[1] < uVar4) break;" if (parenthesized_expression "(0x1fffffffU - param_1[1] < uVar4)" ( (binary_expression "0x1fffffffU - param_1[1] < uVar4" (binary_expression "0x1fffffffU - param_1[1]" number_literal - (subscript_expression "param_1[1]" identifier [ number_literal ])) < identifier) )) (break_statement "break;" break ;)) comment (expression_statement "FUN_001ecc70(param_1,local_48,uVar4);" (call_expression "FUN_001ecc70(param_1,local_48,uVar4)" identifier (argument_list "(param_1,local_48,uVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "sVar5 = wcslen(__s);" (assignment_expression "sVar5 = wcslen(__s)" identifier = (call_expression "wcslen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }" if (parenthesized_expression "(pwVar1 == __s + sVar5)" ( (binary_expression "pwVar1 == __s + sVar5" identifier == (binary_expression "__s + sVar5" identifier + identifier)) )) (compound_statement "{\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }" { (expression_statement "FUN_001e6d50(local_48);" (call_expression "FUN_001e6d50(local_48)" identifier (argument_list "(local_48)" ( identifier ))) ;) (if_statement "if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }" if (parenthesized_expression "(local_34 != local_2c)" ( (binary_expression "local_34 != local_2c" identifier != identifier) )) (compound_statement "{\n        FUN_001e6db0(local_34);\n      }" { (expression_statement "FUN_001e6db0(local_34);" (call_expression "FUN_001e6db0(local_34)" identifier (argument_list "(local_34)" ( identifier ))) ;) })) (return_statement "return param_1;" return identifier ;) })) (expression_statement "__s = __s + sVar5 + 1;" (assignment_expression "__s = __s + sVar5 + 1" identifier = (binary_expression "__s + sVar5 + 1" (binary_expression "__s + sVar5" identifier + identifier) + number_literal)) ;) (expression_statement "iVar2 = param_1[1];" (assignment_expression "iVar2 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "piVar3 = (int *)*param_1;" (assignment_expression "piVar3 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }" if (parenthesized_expression "(param_1 + 2 == piVar3)" ( (binary_expression "param_1 + 2 == piVar3" (binary_expression "param_1 + 2" identifier + number_literal) == identifier) )) (compound_statement "{\n      uVar4 = 3;\n    }" { (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" identifier = number_literal) ;) }) (else_clause "else {\n      uVar4 = param_1[2];\n    }" else (compound_statement "{\n      uVar4 = param_1[2];\n    }" { (expression_statement "uVar4 = param_1[2];" (assignment_expression "uVar4 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }" if (parenthesized_expression "(uVar4 < iVar2 + 1U)" ( (binary_expression "uVar4 < iVar2 + 1U" identifier < (binary_expression "iVar2 + 1U" identifier + number_literal)) )) (compound_statement "{\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }" { (expression_statement "FUN_001eb0a0(param_1,iVar2,0,0,1);" (call_expression "FUN_001eb0a0(param_1,iVar2,0,0,1)" identifier (argument_list "(param_1,iVar2,0,0,1)" ( identifier , identifier , number_literal , number_literal , number_literal ))) ;) (expression_statement "piVar3 = (int *)*param_1;" (assignment_expression "piVar3 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "piVar3[iVar2] = 0;" (assignment_expression "piVar3[iVar2] = 0" (subscript_expression "piVar3[iVar2]" identifier [ identifier ]) = number_literal) ;) (expression_statement "param_1[1] = iVar2 + 1U;" (assignment_expression "param_1[1] = iVar2 + 1U" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar2 + 1U" identifier + number_literal)) ;) (expression_statement "piVar3[iVar2 + 1] = 0;" (assignment_expression "piVar3[iVar2 + 1] = 0" (subscript_expression "piVar3[iVar2 + 1]" identifier [ (binary_expression "iVar2 + 1" identifier + number_literal) ]) = number_literal) ;) })) comment (expression_statement "FUN_0022c7a0(unaff_EDI + 0x3abb9);" (call_expression "FUN_0022c7a0(unaff_EDI + 0x3abb9)" identifier (argument_list "(unaff_EDI + 0x3abb9)" ( (binary_expression "unaff_EDI + 0x3abb9" identifier + number_literal) ))) ;) })))
(translation_unit "/* std::collate<wchar_t>::do_transform(wchar_t const*, wchar_t const*) const */\n\nwchar_t * std::collate<wchar_t>::do_transform(wchar_t *param_1,wchar_t *param_2)\n\n{\n  wchar_t *pwVar1;\n  wchar_t wVar2;\n  wchar_t *pwVar3;\n  uint uVar4;\n  size_t sVar5;\n  wchar_t wVar6;\n  int unaff_EDI;\n  wchar_t *__s;\n  int in_stack_0000000c;\n  int in_stack_00000010;\n  wchar_t *local_48;\n  uint local_44;\n  wchar_t *local_34;\n  int local_30;\n  wchar_t local_2c [7];\n  \n  __x86_get_pc_thunk_di();\n  param_1[1] = L'\0';\n  *param_1 = (wchar_t)(param_1 + 2);\n  param_1[2] = L'\0';\n  local_34 = local_2c;\n                    /* try { // try from 0024c067 to 0024c06b has its CatchHandler @ 0024c22a */\n  std::wstring::_M_construct<wchar_t_const*>(&local_34,in_stack_0000000c,in_stack_00000010,0);\n  __s = local_34;\n  pwVar1 = local_34 + local_30;\n  local_44 = in_stack_00000010 - in_stack_0000000c >> 1;\n  if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */\n    __cxa_throw_bad_array_new_length();\n  }\n                    /* try { // try from 0024c09b to 0024c09f has its CatchHandler @ 0024c226 */\n  local_48 = (wchar_t *)operator_new__(local_44 << 2);\n  while( true ) {\n    uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      operator_delete__(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        __cxa_throw_bad_array_new_length();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = (wchar_t *)operator_new__(local_44 * 4);\n      uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);\n    }\n    if ((uint)(0x1fffffffU - param_1[1]) < uVar4) break;\n                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */\n    std::wstring::_M_append((wstring *)param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      operator_delete__(local_48);\n      if (local_34 != local_2c) {\n        operator_delete(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    wVar2 = param_1[1];\n    pwVar3 = (wchar_t *)*param_1;\n    if (param_1 + 2 == pwVar3) {\n      wVar6 = L'\x03';\n    }\n    else {\n      wVar6 = param_1[2];\n    }\n    if ((uint)wVar6 < (uint)(wVar2 + L'\x01')) {\n      std::wstring::_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    pwVar3[wVar2] = L'\0';\n    param_1[1] = wVar2 + L'\x01';\n    pwVar3[wVar2 + L'\x01'] = L'\0';\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_length_error(&UNK_0003abb9 + unaff_EDI);\n}\n\n" comment (ERROR "wchar_t * std::collate<wchar_t>::do_transform(wchar_t *param_1,wchar_t *param_2)" (binary_expression "wchar_t * std::collate<wchar_t>::do_transform(wchar_t *param_1,wchar_t *param_2)" (binary_expression "wchar_t * std::collate<wchar_t" (binary_expression "wchar_t * std" identifier * identifier) (ERROR "::collate" : : identifier) < identifier) > (ERROR "::" : :) (call_expression "do_transform(wchar_t *param_1,wchar_t *param_2)" identifier (argument_list "(wchar_t *param_1,wchar_t *param_2)" ( (binary_expression "wchar_t *param_1" identifier * identifier) , (binary_expression "wchar_t *param_2" identifier * identifier) ))))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t wVar2;\n  wchar_t *pwVar3;\n  uint uVar4;\n  size_t sVar5;\n  wchar_t wVar6;\n  int unaff_EDI;\n  wchar_t *__s;\n  int in_stack_0000000c;\n  int in_stack_00000010;\n  wchar_t *local_48;\n  uint local_44;\n  wchar_t *local_34;\n  int local_30;\n  wchar_t local_2c [7];\n  \n  __x86_get_pc_thunk_di();\n  param_1[1] = L'\0';\n  *param_1 = (wchar_t)(param_1 + 2);\n  param_1[2] = L'\0';\n  local_34 = local_2c;\n                    /* try { // try from 0024c067 to 0024c06b has its CatchHandler @ 0024c22a */\n  std::wstring::_M_construct<wchar_t_const*>(&local_34,in_stack_0000000c,in_stack_00000010,0);\n  __s = local_34;\n  pwVar1 = local_34 + local_30;\n  local_44 = in_stack_00000010 - in_stack_0000000c >> 1;\n  if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */\n    __cxa_throw_bad_array_new_length();\n  }\n                    /* try { // try from 0024c09b to 0024c09f has its CatchHandler @ 0024c226 */\n  local_48 = (wchar_t *)operator_new__(local_44 << 2);\n  while( true ) {\n    uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      operator_delete__(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        __cxa_throw_bad_array_new_length();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = (wchar_t *)operator_new__(local_44 * 4);\n      uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);\n    }\n    if ((uint)(0x1fffffffU - param_1[1]) < uVar4) break;\n                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */\n    std::wstring::_M_append((wstring *)param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      operator_delete__(local_48);\n      if (local_34 != local_2c) {\n        operator_delete(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    wVar2 = param_1[1];\n    pwVar3 = (wchar_t *)*param_1;\n    if (param_1 + 2 == pwVar3) {\n      wVar6 = L'\x03';\n    }\n    else {\n      wVar6 = param_1[2];\n    }\n    if ((uint)wVar6 < (uint)(wVar2 + L'\x01')) {\n      std::wstring::_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    pwVar3[wVar2] = L'\0';\n    param_1[1] = wVar2 + L'\x01';\n    pwVar3[wVar2 + L'\x01'] = L'\0';\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_length_error(&UNK_0003abb9 + unaff_EDI);\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t wVar2;" type_identifier identifier ;) (declaration "wchar_t *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "wchar_t wVar6;" type_identifier identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "wchar_t *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (declaration "int in_stack_0000000c;" primitive_type identifier ;) (declaration "int in_stack_00000010;" primitive_type identifier ;) (declaration "wchar_t *local_48;" type_identifier (pointer_declarator "*local_48" * identifier) ;) (declaration "uint local_44;" type_identifier identifier ;) (declaration "wchar_t *local_34;" type_identifier (pointer_declarator "*local_34" * identifier) ;) (declaration "int local_30;" primitive_type identifier ;) (declaration "wchar_t local_2c [7];" type_identifier (array_declarator "local_2c [7]" identifier [ number_literal ]) ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (expression_statement "param_1[1] = L'\0';" (assignment_expression "param_1[1] = L'\0'" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "*param_1 = (wchar_t)(param_1 + 2);" (assignment_expression "*param_1 = (wchar_t)(param_1 + 2)" (pointer_expression "*param_1" * identifier) = (call_expression "(wchar_t)(param_1 + 2)" (parenthesized_expression "(wchar_t)" ( identifier )) (argument_list "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) ;) (expression_statement "param_1[2] = L'\0';" (assignment_expression "param_1[2] = L'\0'" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "local_34 = local_2c;" (assignment_expression "local_34 = local_2c" identifier = identifier) ;) comment (labeled_statement "std::wstring::_M_construct<wchar_t_const*>(&local_34,in_stack_0000000c,in_stack_00000010,0);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_construct<wchar_t_const*>(&local_34,in_stack_0000000c,in_stack_00000010,0);" statement_identifier : (ERROR ":" :) (expression_statement "_M_construct<wchar_t_const*>(&local_34,in_stack_0000000c,in_stack_00000010,0);" (binary_expression "_M_construct<wchar_t_const*>(&local_34,in_stack_0000000c,in_stack_00000010,0)" (binary_expression "_M_construct<wchar_t_const" identifier < identifier) (ERROR "*" *) > (parenthesized_expression "(&local_34,in_stack_0000000c,in_stack_00000010,0)" ( (comma_expression "&local_34,in_stack_0000000c,in_stack_00000010,0" (pointer_expression "&local_34" & identifier) , (comma_expression "in_stack_0000000c,in_stack_00000010,0" identifier , (comma_expression "in_stack_00000010,0" identifier , number_literal))) ))) ;))) (expression_statement "__s = local_34;" (assignment_expression "__s = local_34" identifier = identifier) ;) (expression_statement "pwVar1 = local_34 + local_30;" (assignment_expression "pwVar1 = local_34 + local_30" identifier = (binary_expression "local_34 + local_30" identifier + identifier)) ;) (expression_statement "local_44 = in_stack_00000010 - in_stack_0000000c >> 1;" (assignment_expression "local_44 = in_stack_00000010 - in_stack_0000000c >> 1" identifier = (binary_expression "in_stack_00000010 - in_stack_0000000c >> 1" (binary_expression "in_stack_00000010 - in_stack_0000000c" identifier - identifier) >> number_literal)) ;) (if_statement "if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */\n    __cxa_throw_bad_array_new_length();\n  }" if (parenthesized_expression "(0x1fffffff < local_44)" ( (binary_expression "0x1fffffff < local_44" number_literal < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */\n    __cxa_throw_bad_array_new_length();\n  }" { comment comment (expression_statement "__cxa_throw_bad_array_new_length();" (call_expression "__cxa_throw_bad_array_new_length()" identifier (argument_list "()" ( ))) ;) })) comment (expression_statement "local_48 = (wchar_t *)operator_new__(local_44 << 2);" (assignment_expression "local_48 = (wchar_t *)operator_new__(local_44 << 2)" identifier = (cast_expression "(wchar_t *)operator_new__(local_44 << 2)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "operator_new__(local_44 << 2)" identifier (argument_list "(local_44 << 2)" ( (binary_expression "local_44 << 2" identifier << number_literal) ))))) ;) (while_statement "while( true ) {\n    uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      operator_delete__(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        __cxa_throw_bad_array_new_length();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = (wchar_t *)operator_new__(local_44 * 4);\n      uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);\n    }\n    if ((uint)(0x1fffffffU - param_1[1]) < uVar4) break;\n                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */\n    std::wstring::_M_append((wstring *)param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      operator_delete__(local_48);\n      if (local_34 != local_2c) {\n        operator_delete(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    wVar2 = param_1[1];\n    pwVar3 = (wchar_t *)*param_1;\n    if (param_1 + 2 == pwVar3) {\n      wVar6 = L'\x03';\n    }\n    else {\n      wVar6 = param_1[2];\n    }\n    if ((uint)wVar6 < (uint)(wVar2 + L'\x01')) {\n      std::wstring::_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    pwVar3[wVar2] = L'\0';\n    param_1[1] = wVar2 + L'\x01';\n    pwVar3[wVar2 + L'\x01'] = L'\0';\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      operator_delete__(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        __cxa_throw_bad_array_new_length();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = (wchar_t *)operator_new__(local_44 * 4);\n      uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);\n    }\n    if ((uint)(0x1fffffffU - param_1[1]) < uVar4) break;\n                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */\n    std::wstring::_M_append((wstring *)param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      operator_delete__(local_48);\n      if (local_34 != local_2c) {\n        operator_delete(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    wVar2 = param_1[1];\n    pwVar3 = (wchar_t *)*param_1;\n    if (param_1 + 2 == pwVar3) {\n      wVar6 = L'\x03';\n    }\n    else {\n      wVar6 = param_1[2];\n    }\n    if ((uint)wVar6 < (uint)(wVar2 + L'\x01')) {\n      std::wstring::_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    pwVar3[wVar2] = L'\0';\n    param_1[1] = wVar2 + L'\x01';\n    pwVar3[wVar2 + L'\x01'] = L'\0';\n  }" { (expression_statement "uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);" (assignment_expression "uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44)" identifier = (call_expression "_M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44)" identifier (argument_list "((collate<wchar_t> *)param_2,local_48,__s,local_44)" ( (parenthesized_expression "(collate<wchar_t> *)param_2,local_48,__s,local_44)" ( (comma_expression "collate<wchar_t> *)param_2,local_48,__s,local_44" (binary_expression "collate<wchar_t> *)param_2" (binary_expression "collate<wchar_t" identifier < identifier) > (pointer_expression "*)param_2" * (ERROR ")" )) identifier)) , (comma_expression "local_48,__s,local_44" identifier , (comma_expression "__s,local_44" identifier , identifier))) )) )))) ;) (if_statement "if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      operator_delete__(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        __cxa_throw_bad_array_new_length();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = (wchar_t *)operator_new__(local_44 * 4);\n      uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);\n    }" if (parenthesized_expression "(local_44 <= uVar4)" ( (binary_expression "local_44 <= uVar4" identifier <= identifier) )) (compound_statement "{\n      local_44 = uVar4 + 1;\n      operator_delete__(local_48);\n      if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        __cxa_throw_bad_array_new_length();\n      }\n                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */\n      local_48 = (wchar_t *)operator_new__(local_44 * 4);\n      uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);\n    }" { (expression_statement "local_44 = uVar4 + 1;" (assignment_expression "local_44 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) (expression_statement "operator_delete__(local_48);" (call_expression "operator_delete__(local_48)" identifier (argument_list "(local_48)" ( identifier ))) ;) (if_statement "if (0x1fffffff < local_44) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        __cxa_throw_bad_array_new_length();\n      }" if (parenthesized_expression "(0x1fffffff < local_44)" ( (binary_expression "0x1fffffff < local_44" number_literal < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */\n        __cxa_throw_bad_array_new_length();\n      }" { comment comment (expression_statement "__cxa_throw_bad_array_new_length();" (call_expression "__cxa_throw_bad_array_new_length()" identifier (argument_list "()" ( ))) ;) })) comment (expression_statement "local_48 = (wchar_t *)operator_new__(local_44 * 4);" (assignment_expression "local_48 = (wchar_t *)operator_new__(local_44 * 4)" identifier = (cast_expression "(wchar_t *)operator_new__(local_44 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "operator_new__(local_44 * 4)" identifier (argument_list "(local_44 * 4)" ( (binary_expression "local_44 * 4" identifier * number_literal) ))))) ;) (expression_statement "uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44);" (assignment_expression "uVar4 = _M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44)" identifier = (call_expression "_M_transform((collate<wchar_t> *)param_2,local_48,__s,local_44)" identifier (argument_list "((collate<wchar_t> *)param_2,local_48,__s,local_44)" ( (parenthesized_expression "(collate<wchar_t> *)param_2,local_48,__s,local_44)" ( (comma_expression "collate<wchar_t> *)param_2,local_48,__s,local_44" (binary_expression "collate<wchar_t> *)param_2" (binary_expression "collate<wchar_t" identifier < identifier) > (pointer_expression "*)param_2" * (ERROR ")" )) identifier)) , (comma_expression "local_48,__s,local_44" identifier , (comma_expression "__s,local_44" identifier , identifier))) )) )))) ;) })) (if_statement "if ((uint)(0x1fffffffU - param_1[1]) < uVar4) break;" if (parenthesized_expression "((uint)(0x1fffffffU - param_1[1]) < uVar4)" ( (binary_expression "(uint)(0x1fffffffU - param_1[1]) < uVar4" (call_expression "(uint)(0x1fffffffU - param_1[1])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0x1fffffffU - param_1[1])" ( (binary_expression "0x1fffffffU - param_1[1]" number_literal - (subscript_expression "param_1[1]" identifier [ number_literal ])) ))) < identifier) )) (break_statement "break;" break ;)) comment (labeled_statement "std::wstring::_M_append((wstring *)param_1,local_48,uVar4);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_append((wstring *)param_1,local_48,uVar4);" statement_identifier : (ERROR ":" :) (expression_statement "_M_append((wstring *)param_1,local_48,uVar4);" (call_expression "_M_append((wstring *)param_1,local_48,uVar4)" identifier (argument_list "((wstring *)param_1,local_48,uVar4)" ( (cast_expression "(wstring *)param_1" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier ))) ;))) (expression_statement "sVar5 = wcslen(__s);" (assignment_expression "sVar5 = wcslen(__s)" identifier = (call_expression "wcslen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (pwVar1 == __s + sVar5) {\n      operator_delete__(local_48);\n      if (local_34 != local_2c) {\n        operator_delete(local_34);\n      }\n      return param_1;\n    }" if (parenthesized_expression "(pwVar1 == __s + sVar5)" ( (binary_expression "pwVar1 == __s + sVar5" identifier == (binary_expression "__s + sVar5" identifier + identifier)) )) (compound_statement "{\n      operator_delete__(local_48);\n      if (local_34 != local_2c) {\n        operator_delete(local_34);\n      }\n      return param_1;\n    }" { (expression_statement "operator_delete__(local_48);" (call_expression "operator_delete__(local_48)" identifier (argument_list "(local_48)" ( identifier ))) ;) (if_statement "if (local_34 != local_2c) {\n        operator_delete(local_34);\n      }" if (parenthesized_expression "(local_34 != local_2c)" ( (binary_expression "local_34 != local_2c" identifier != identifier) )) (compound_statement "{\n        operator_delete(local_34);\n      }" { (expression_statement "operator_delete(local_34);" (call_expression "operator_delete(local_34)" identifier (argument_list "(local_34)" ( identifier ))) ;) })) (return_statement "return param_1;" return identifier ;) })) (expression_statement "__s = __s + sVar5 + 1;" (assignment_expression "__s = __s + sVar5 + 1" identifier = (binary_expression "__s + sVar5 + 1" (binary_expression "__s + sVar5" identifier + identifier) + number_literal)) ;) (expression_statement "wVar2 = param_1[1];" (assignment_expression "wVar2 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (param_1 + 2 == pwVar3) {\n      wVar6 = L'\x03';\n    }\n    else {\n      wVar6 = param_1[2];\n    }" if (parenthesized_expression "(param_1 + 2 == pwVar3)" ( (binary_expression "param_1 + 2 == pwVar3" (binary_expression "param_1 + 2" identifier + number_literal) == identifier) )) (compound_statement "{\n      wVar6 = L'\x03';\n    }" { (expression_statement "wVar6 = L'\x03';" (assignment_expression "wVar6 = L'\x03'" identifier = (char_literal "L'\x03'" L' escape_sequence ')) ;) }) (else_clause "else {\n      wVar6 = param_1[2];\n    }" else (compound_statement "{\n      wVar6 = param_1[2];\n    }" { (expression_statement "wVar6 = param_1[2];" (assignment_expression "wVar6 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if ((uint)wVar6 < (uint)(wVar2 + L'\x01')) {\n      std::wstring::_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1);\n      pwVar3 = (wchar_t *)*param_1;\n    }" if (parenthesized_expression "((uint)wVar6 < (uint)(wVar2 + L'\x01'))" ( (binary_expression "(uint)wVar6 < (uint)(wVar2 + L'\x01')" (cast_expression "(uint)wVar6" ( (type_descriptor "uint" type_identifier) ) identifier) < (call_expression "(uint)(wVar2 + L'\x01')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(wVar2 + L'\x01')" ( (binary_expression "wVar2 + L'\x01'" identifier + (char_literal "L'\x01'" L' escape_sequence ')) )))) )) (compound_statement "{\n      std::wstring::_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1);\n      pwVar3 = (wchar_t *)*param_1;\n    }" { (labeled_statement "std::wstring::_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1);" statement_identifier : (ERROR ":" :) (expression_statement "_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1);" (call_expression "_M_mutate((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1)" identifier (argument_list "((wstring *)param_1,wVar2,0,(wchar_t *)0x0,1)" ( (cast_expression "(wstring *)param_1" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , number_literal , (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , number_literal ))) ;))) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "pwVar3[wVar2] = L'\0';" (assignment_expression "pwVar3[wVar2] = L'\0'" (subscript_expression "pwVar3[wVar2]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "param_1[1] = wVar2 + L'\x01';" (assignment_expression "param_1[1] = wVar2 + L'\x01'" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "wVar2 + L'\x01'" identifier + (char_literal "L'\x01'" L' escape_sequence '))) ;) (expression_statement "pwVar3[wVar2 + L'\x01'] = L'\0';" (assignment_expression "pwVar3[wVar2 + L'\x01'] = L'\0'" (subscript_expression "pwVar3[wVar2 + L'\x01']" identifier [ (binary_expression "wVar2 + L'\x01'" identifier + (char_literal "L'\x01'" L' escape_sequence ')) ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) })) comment (expression_statement "__throw_length_error(&UNK_0003abb9 + unaff_EDI);" (call_expression "__throw_length_error(&UNK_0003abb9 + unaff_EDI)" identifier (argument_list "(&UNK_0003abb9 + unaff_EDI)" ( (binary_expression "&UNK_0003abb9 + unaff_EDI" (pointer_expression "&UNK_0003abb9" & identifier) + identifier) ))) ;) }))
(translation_unit "int * FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  size_t sVar5;\n  int unaff_EDI;\n  wchar_t *__s;\n  undefined4 local_48;\n  uint local_44;\n  wchar_t *local_34;\n  int local_30;\n  wchar_t local_2c [7];\n  \n  FUN_000559ee();\n  param_1[1] = 0;\n  *param_1 = (int)(param_1 + 2);\n  param_1[2] = 0;\n  local_34 = local_2c;\n                    \n  FUN_001ee0d0(&local_34,param_3,param_4,0);\n  __s = local_34;\n  pwVar1 = local_34 + local_30;\n  local_44 = param_4 - param_3 >> 1;\n  if (0x1fffffff < local_44) {\n                    \n                    \n    FUN_001e6740();\n  }\n                    \n  local_48 = FUN_001e5180(local_44 << 2);\n  while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    \n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }\n                    \n  FUN_0022c7a0(unaff_EDI + 0x3abb9);\n}\n\n" (function_definition "int * FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  size_t sVar5;\n  int unaff_EDI;\n  wchar_t *__s;\n  undefined4 local_48;\n  uint local_44;\n  wchar_t *local_34;\n  int local_30;\n  wchar_t local_2c [7];\n  \n  FUN_000559ee();\n  param_1[1] = 0;\n  *param_1 = (int)(param_1 + 2);\n  param_1[2] = 0;\n  local_34 = local_2c;\n                    \n  FUN_001ee0d0(&local_34,param_3,param_4,0);\n  __s = local_34;\n  pwVar1 = local_34 + local_30;\n  local_44 = param_4 - param_3 >> 1;\n  if (0x1fffffff < local_44) {\n                    \n                    \n    FUN_001e6740();\n  }\n                    \n  local_48 = FUN_001e5180(local_44 << 2);\n  while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    \n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }\n                    \n  FUN_0022c7a0(unaff_EDI + 0x3abb9);\n}" primitive_type (pointer_declarator "* FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)" * (function_declarator "FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)" identifier (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) )))) (compound_statement "{\n  wchar_t *pwVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  size_t sVar5;\n  int unaff_EDI;\n  wchar_t *__s;\n  undefined4 local_48;\n  uint local_44;\n  wchar_t *local_34;\n  int local_30;\n  wchar_t local_2c [7];\n  \n  FUN_000559ee();\n  param_1[1] = 0;\n  *param_1 = (int)(param_1 + 2);\n  param_1[2] = 0;\n  local_34 = local_2c;\n                    \n  FUN_001ee0d0(&local_34,param_3,param_4,0);\n  __s = local_34;\n  pwVar1 = local_34 + local_30;\n  local_44 = param_4 - param_3 >> 1;\n  if (0x1fffffff < local_44) {\n                    \n                    \n    FUN_001e6740();\n  }\n                    \n  local_48 = FUN_001e5180(local_44 << 2);\n  while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    \n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }\n                    \n  FUN_0022c7a0(unaff_EDI + 0x3abb9);\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "wchar_t *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (declaration "undefined4 local_48;" type_identifier identifier ;) (declaration "uint local_44;" type_identifier identifier ;) (declaration "wchar_t *local_34;" type_identifier (pointer_declarator "*local_34" * identifier) ;) (declaration "int local_30;" primitive_type identifier ;) (declaration "wchar_t local_2c [7];" type_identifier (array_declarator "local_2c [7]" identifier [ number_literal ]) ;) (expression_statement "FUN_000559ee();" (call_expression "FUN_000559ee()" identifier (argument_list "()" ( ))) ;) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*param_1 = (int)(param_1 + 2);" (assignment_expression "*param_1 = (int)(param_1 + 2)" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)(param_1 + 2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) ;) (expression_statement "param_1[2] = 0;" (assignment_expression "param_1[2] = 0" (subscript_expression "param_1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_34 = local_2c;" (assignment_expression "local_34 = local_2c" identifier = identifier) ;) (expression_statement "FUN_001ee0d0(&local_34,param_3,param_4,0);" (call_expression "FUN_001ee0d0(&local_34,param_3,param_4,0)" identifier (argument_list "(&local_34,param_3,param_4,0)" ( (pointer_expression "&local_34" & identifier) , identifier , identifier , number_literal ))) ;) (expression_statement "__s = local_34;" (assignment_expression "__s = local_34" identifier = identifier) ;) (expression_statement "pwVar1 = local_34 + local_30;" (assignment_expression "pwVar1 = local_34 + local_30" identifier = (binary_expression "local_34 + local_30" identifier + identifier)) ;) (expression_statement "local_44 = param_4 - param_3 >> 1;" (assignment_expression "local_44 = param_4 - param_3 >> 1" identifier = (binary_expression "param_4 - param_3 >> 1" (binary_expression "param_4 - param_3" identifier - identifier) >> number_literal)) ;) (if_statement "if (0x1fffffff < local_44) {\n                    \n                    \n    FUN_001e6740();\n  }" if (parenthesized_expression "(0x1fffffff < local_44)" ( (binary_expression "0x1fffffff < local_44" number_literal < identifier) )) (compound_statement "{\n                    \n                    \n    FUN_001e6740();\n  }" { (expression_statement "FUN_001e6740();" (call_expression "FUN_001e6740()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "local_48 = FUN_001e5180(local_44 << 2);" (assignment_expression "local_48 = FUN_001e5180(local_44 << 2)" identifier = (call_expression "FUN_001e5180(local_44 << 2)" identifier (argument_list "(local_44 << 2)" ( (binary_expression "local_44 << 2" identifier << number_literal) )))) ;) (while_statement "while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    \n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    \n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }" { (expression_statement "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);" (assignment_expression "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44)" identifier = (call_expression "FUN_0027af30(param_2,local_48,__s,local_44)" identifier (argument_list "(param_2,local_48,__s,local_44)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }" if (parenthesized_expression "(local_44 <= uVar4)" ( (binary_expression "local_44 <= uVar4" identifier <= identifier) )) (compound_statement "{\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }" { (expression_statement "local_44 = uVar4 + 1;" (assignment_expression "local_44 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) (expression_statement "FUN_001e6d50(local_48);" (call_expression "FUN_001e6d50(local_48)" identifier (argument_list "(local_48)" ( identifier ))) ;) (if_statement "if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }" if (parenthesized_expression "(0x1fffffff < local_44)" ( (binary_expression "0x1fffffff < local_44" number_literal < identifier) )) (compound_statement "{\n                    \n                    \n        FUN_001e6740();\n      }" { (expression_statement "FUN_001e6740();" (call_expression "FUN_001e6740()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "local_48 = FUN_001e5180(local_44 * 4);" (assignment_expression "local_48 = FUN_001e5180(local_44 * 4)" identifier = (call_expression "FUN_001e5180(local_44 * 4)" identifier (argument_list "(local_44 * 4)" ( (binary_expression "local_44 * 4" identifier * number_literal) )))) ;) (expression_statement "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);" (assignment_expression "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44)" identifier = (call_expression "FUN_0027af30(param_2,local_48,__s,local_44)" identifier (argument_list "(param_2,local_48,__s,local_44)" ( identifier , identifier , identifier , identifier )))) ;) })) (if_statement "if (0x1fffffffU - param_1[1] < uVar4) break;" if (parenthesized_expression "(0x1fffffffU - param_1[1] < uVar4)" ( (binary_expression "0x1fffffffU - param_1[1] < uVar4" (binary_expression "0x1fffffffU - param_1[1]" number_literal - (subscript_expression "param_1[1]" identifier [ number_literal ])) < identifier) )) (break_statement "break;" break ;)) (expression_statement "FUN_001ecc70(param_1,local_48,uVar4);" (call_expression "FUN_001ecc70(param_1,local_48,uVar4)" identifier (argument_list "(param_1,local_48,uVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "sVar5 = wcslen(__s);" (assignment_expression "sVar5 = wcslen(__s)" identifier = (call_expression "wcslen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }" if (parenthesized_expression "(pwVar1 == __s + sVar5)" ( (binary_expression "pwVar1 == __s + sVar5" identifier == (binary_expression "__s + sVar5" identifier + identifier)) )) (compound_statement "{\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }" { (expression_statement "FUN_001e6d50(local_48);" (call_expression "FUN_001e6d50(local_48)" identifier (argument_list "(local_48)" ( identifier ))) ;) (if_statement "if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }" if (parenthesized_expression "(local_34 != local_2c)" ( (binary_expression "local_34 != local_2c" identifier != identifier) )) (compound_statement "{\n        FUN_001e6db0(local_34);\n      }" { (expression_statement "FUN_001e6db0(local_34);" (call_expression "FUN_001e6db0(local_34)" identifier (argument_list "(local_34)" ( identifier ))) ;) })) (return_statement "return param_1;" return identifier ;) })) (expression_statement "__s = __s + sVar5 + 1;" (assignment_expression "__s = __s + sVar5 + 1" identifier = (binary_expression "__s + sVar5 + 1" (binary_expression "__s + sVar5" identifier + identifier) + number_literal)) ;) (expression_statement "iVar2 = param_1[1];" (assignment_expression "iVar2 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "piVar3 = (int *)*param_1;" (assignment_expression "piVar3 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }" if (parenthesized_expression "(param_1 + 2 == piVar3)" ( (binary_expression "param_1 + 2 == piVar3" (binary_expression "param_1 + 2" identifier + number_literal) == identifier) )) (compound_statement "{\n      uVar4 = 3;\n    }" { (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" identifier = number_literal) ;) }) (else_clause "else {\n      uVar4 = param_1[2];\n    }" else (compound_statement "{\n      uVar4 = param_1[2];\n    }" { (expression_statement "uVar4 = param_1[2];" (assignment_expression "uVar4 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }" if (parenthesized_expression "(uVar4 < iVar2 + 1U)" ( (binary_expression "uVar4 < iVar2 + 1U" identifier < (binary_expression "iVar2 + 1U" identifier + number_literal)) )) (compound_statement "{\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }" { (expression_statement "FUN_001eb0a0(param_1,iVar2,0,0,1);" (call_expression "FUN_001eb0a0(param_1,iVar2,0,0,1)" identifier (argument_list "(param_1,iVar2,0,0,1)" ( identifier , identifier , number_literal , number_literal , number_literal ))) ;) (expression_statement "piVar3 = (int *)*param_1;" (assignment_expression "piVar3 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "piVar3[iVar2] = 0;" (assignment_expression "piVar3[iVar2] = 0" (subscript_expression "piVar3[iVar2]" identifier [ identifier ]) = number_literal) ;) (expression_statement "param_1[1] = iVar2 + 1U;" (assignment_expression "param_1[1] = iVar2 + 1U" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar2 + 1U" identifier + number_literal)) ;) (expression_statement "piVar3[iVar2 + 1] = 0;" (assignment_expression "piVar3[iVar2 + 1] = 0" (subscript_expression "piVar3[iVar2 + 1]" identifier [ (binary_expression "iVar2 + 1" identifier + number_literal) ]) = number_literal) ;) })) (expression_statement "FUN_0022c7a0(unaff_EDI + 0x3abb9);" (call_expression "FUN_0022c7a0(unaff_EDI + 0x3abb9)" identifier (argument_list "(unaff_EDI + 0x3abb9)" ( (binary_expression "unaff_EDI + 0x3abb9" identifier + number_literal) ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - IDENT) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT << LIT) )))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT * LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression LIT - (subscript_expression IDENT [ LIT ])) < IDENT) )) (break_statement break ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (binary_expression IDENT + IDENT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) + LIT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) })))
(function_definition "int * FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  size_t sVar5;\n  int unaff_EDI;\n  wchar_t *__s;\n  undefined4 local_48;\n  uint local_44;\n  wchar_t *local_34;\n  int local_30;\n  wchar_t local_2c [7];\n  \n  FUN_000559ee();\n  param_1[1] = 0;\n  *param_1 = (int)(param_1 + 2);\n  param_1[2] = 0;\n  local_34 = local_2c;\n                    \n  FUN_001ee0d0(&local_34,param_3,param_4,0);\n  __s = local_34;\n  pwVar1 = local_34 + local_30;\n  local_44 = param_4 - param_3 >> 1;\n  if (0x1fffffff < local_44) {\n                    \n                    \n    FUN_001e6740();\n  }\n                    \n  local_48 = FUN_001e5180(local_44 << 2);\n  while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    \n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }\n                    \n  FUN_0022c7a0(unaff_EDI + 0x3abb9);\n}" (primitive_type "int") (pointer_declarator "* FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)" (* "*") (function_declarator "FUN_0024c020(int *param_1,undefined4 param_2,int param_3,int param_4)" (identifier "FUN_0024c020") (parameter_list "(int *param_1,undefined4 param_2,int param_3,int param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")")))) (compound_statement "{\n  wchar_t *pwVar1;\n  int iVar2;\n  int *piVar3;\n  uint uVar4;\n  size_t sVar5;\n  int unaff_EDI;\n  wchar_t *__s;\n  undefined4 local_48;\n  uint local_44;\n  wchar_t *local_34;\n  int local_30;\n  wchar_t local_2c [7];\n  \n  FUN_000559ee();\n  param_1[1] = 0;\n  *param_1 = (int)(param_1 + 2);\n  param_1[2] = 0;\n  local_34 = local_2c;\n                    \n  FUN_001ee0d0(&local_34,param_3,param_4,0);\n  __s = local_34;\n  pwVar1 = local_34 + local_30;\n  local_44 = param_4 - param_3 >> 1;\n  if (0x1fffffff < local_44) {\n                    \n                    \n    FUN_001e6740();\n  }\n                    \n  local_48 = FUN_001e5180(local_44 << 2);\n  while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    \n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }\n                    \n  FUN_0022c7a0(unaff_EDI + 0x3abb9);\n}" ({ "{") (declaration "wchar_t *pwVar1;" (type_identifier "wchar_t") (pointer_declarator "*pwVar1" (* "*") (identifier "pwVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "size_t sVar5;" (primitive_type "size_t") (identifier "sVar5") (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (declaration "wchar_t *__s;" (type_identifier "wchar_t") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "undefined4 local_48;" (type_identifier "undefined4") (identifier "local_48") (; ";")) (declaration "uint local_44;" (type_identifier "uint") (identifier "local_44") (; ";")) (declaration "wchar_t *local_34;" (type_identifier "wchar_t") (pointer_declarator "*local_34" (* "*") (identifier "local_34")) (; ";")) (declaration "int local_30;" (primitive_type "int") (identifier "local_30") (; ";")) (declaration "wchar_t local_2c [7];" (type_identifier "wchar_t") (array_declarator "local_2c [7]" (identifier "local_2c") ([ "[") (number_literal "7") (] "]")) (; ";")) (expression_statement "FUN_000559ee();" (call_expression "FUN_000559ee()" (identifier "FUN_000559ee") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_1 = (int)(param_1 + 2);" (assignment_expression "*param_1 = (int)(param_1 + 2)" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (cast_expression "(int)(param_1 + 2)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (; ";")) (expression_statement "param_1[2] = 0;" (assignment_expression "param_1[2] = 0" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_34 = local_2c;" (assignment_expression "local_34 = local_2c" (identifier "local_34") (= "=") (identifier "local_2c")) (; ";")) (expression_statement "FUN_001ee0d0(&local_34,param_3,param_4,0);" (call_expression "FUN_001ee0d0(&local_34,param_3,param_4,0)" (identifier "FUN_001ee0d0") (argument_list "(&local_34,param_3,param_4,0)" (( "(") (pointer_expression "&local_34" (& "&") (identifier "local_34")) (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "__s = local_34;" (assignment_expression "__s = local_34" (identifier "__s") (= "=") (identifier "local_34")) (; ";")) (expression_statement "pwVar1 = local_34 + local_30;" (assignment_expression "pwVar1 = local_34 + local_30" (identifier "pwVar1") (= "=") (binary_expression "local_34 + local_30" (identifier "local_34") (+ "+") (identifier "local_30"))) (; ";")) (expression_statement "local_44 = param_4 - param_3 >> 1;" (assignment_expression "local_44 = param_4 - param_3 >> 1" (identifier "local_44") (= "=") (binary_expression "param_4 - param_3 >> 1" (binary_expression "param_4 - param_3" (identifier "param_4") (- "-") (identifier "param_3")) (>> ">>") (number_literal "1"))) (; ";")) (if_statement "if (0x1fffffff < local_44) {\n                    \n                    \n    FUN_001e6740();\n  }" (if "if") (parenthesized_expression "(0x1fffffff < local_44)" (( "(") (binary_expression "0x1fffffff < local_44" (number_literal "0x1fffffff") (< "<") (identifier "local_44")) () ")")) (compound_statement "{\n                    \n                    \n    FUN_001e6740();\n  }" ({ "{") (expression_statement "FUN_001e6740();" (call_expression "FUN_001e6740()" (identifier "FUN_001e6740") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "local_48 = FUN_001e5180(local_44 << 2);" (assignment_expression "local_48 = FUN_001e5180(local_44 << 2)" (identifier "local_48") (= "=") (call_expression "FUN_001e5180(local_44 << 2)" (identifier "FUN_001e5180") (argument_list "(local_44 << 2)" (( "(") (binary_expression "local_44 << 2" (identifier "local_44") (<< "<<") (number_literal "2")) () ")")))) (; ";")) (while_statement "while( true ) {\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    \n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }\n    if (0x1fffffffU - param_1[1] < uVar4) break;\n                    \n    FUN_001ecc70(param_1,local_48,uVar4);\n    sVar5 = wcslen(__s);\n    if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }\n    __s = __s + sVar5 + 1;\n    iVar2 = param_1[1];\n    piVar3 = (int *)*param_1;\n    if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }\n    if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }\n    piVar3[iVar2] = 0;\n    param_1[1] = iVar2 + 1U;\n    piVar3[iVar2 + 1] = 0;\n  }" ({ "{") (expression_statement "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);" (assignment_expression "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44)" (identifier "uVar4") (= "=") (call_expression "FUN_0027af30(param_2,local_48,__s,local_44)" (identifier "FUN_0027af30") (argument_list "(param_2,local_48,__s,local_44)" (( "(") (identifier "param_2") (, ",") (identifier "local_48") (, ",") (identifier "__s") (, ",") (identifier "local_44") () ")")))) (; ";")) (if_statement "if (local_44 <= uVar4) {\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }" (if "if") (parenthesized_expression "(local_44 <= uVar4)" (( "(") (binary_expression "local_44 <= uVar4" (identifier "local_44") (<= "<=") (identifier "uVar4")) () ")")) (compound_statement "{\n      local_44 = uVar4 + 1;\n      FUN_001e6d50(local_48);\n      if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }\n                    \n      local_48 = FUN_001e5180(local_44 * 4);\n      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);\n    }" ({ "{") (expression_statement "local_44 = uVar4 + 1;" (assignment_expression "local_44 = uVar4 + 1" (identifier "local_44") (= "=") (binary_expression "uVar4 + 1" (identifier "uVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "FUN_001e6d50(local_48);" (call_expression "FUN_001e6d50(local_48)" (identifier "FUN_001e6d50") (argument_list "(local_48)" (( "(") (identifier "local_48") () ")"))) (; ";")) (if_statement "if (0x1fffffff < local_44) {\n                    \n                    \n        FUN_001e6740();\n      }" (if "if") (parenthesized_expression "(0x1fffffff < local_44)" (( "(") (binary_expression "0x1fffffff < local_44" (number_literal "0x1fffffff") (< "<") (identifier "local_44")) () ")")) (compound_statement "{\n                    \n                    \n        FUN_001e6740();\n      }" ({ "{") (expression_statement "FUN_001e6740();" (call_expression "FUN_001e6740()" (identifier "FUN_001e6740") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "local_48 = FUN_001e5180(local_44 * 4);" (assignment_expression "local_48 = FUN_001e5180(local_44 * 4)" (identifier "local_48") (= "=") (call_expression "FUN_001e5180(local_44 * 4)" (identifier "FUN_001e5180") (argument_list "(local_44 * 4)" (( "(") (binary_expression "local_44 * 4" (identifier "local_44") (* "*") (number_literal "4")) () ")")))) (; ";")) (expression_statement "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);" (assignment_expression "uVar4 = FUN_0027af30(param_2,local_48,__s,local_44)" (identifier "uVar4") (= "=") (call_expression "FUN_0027af30(param_2,local_48,__s,local_44)" (identifier "FUN_0027af30") (argument_list "(param_2,local_48,__s,local_44)" (( "(") (identifier "param_2") (, ",") (identifier "local_48") (, ",") (identifier "__s") (, ",") (identifier "local_44") () ")")))) (; ";")) (} "}"))) (if_statement "if (0x1fffffffU - param_1[1] < uVar4) break;" (if "if") (parenthesized_expression "(0x1fffffffU - param_1[1] < uVar4)" (( "(") (binary_expression "0x1fffffffU - param_1[1] < uVar4" (binary_expression "0x1fffffffU - param_1[1]" (number_literal "0x1fffffffU") (- "-") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (< "<") (identifier "uVar4")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "FUN_001ecc70(param_1,local_48,uVar4);" (call_expression "FUN_001ecc70(param_1,local_48,uVar4)" (identifier "FUN_001ecc70") (argument_list "(param_1,local_48,uVar4)" (( "(") (identifier "param_1") (, ",") (identifier "local_48") (, ",") (identifier "uVar4") () ")"))) (; ";")) (expression_statement "sVar5 = wcslen(__s);" (assignment_expression "sVar5 = wcslen(__s)" (identifier "sVar5") (= "=") (call_expression "wcslen(__s)" (identifier "wcslen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (if_statement "if (pwVar1 == __s + sVar5) {\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }" (if "if") (parenthesized_expression "(pwVar1 == __s + sVar5)" (( "(") (binary_expression "pwVar1 == __s + sVar5" (identifier "pwVar1") (== "==") (binary_expression "__s + sVar5" (identifier "__s") (+ "+") (identifier "sVar5"))) () ")")) (compound_statement "{\n      FUN_001e6d50(local_48);\n      if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }\n      return param_1;\n    }" ({ "{") (expression_statement "FUN_001e6d50(local_48);" (call_expression "FUN_001e6d50(local_48)" (identifier "FUN_001e6d50") (argument_list "(local_48)" (( "(") (identifier "local_48") () ")"))) (; ";")) (if_statement "if (local_34 != local_2c) {\n        FUN_001e6db0(local_34);\n      }" (if "if") (parenthesized_expression "(local_34 != local_2c)" (( "(") (binary_expression "local_34 != local_2c" (identifier "local_34") (!= "!=") (identifier "local_2c")) () ")")) (compound_statement "{\n        FUN_001e6db0(local_34);\n      }" ({ "{") (expression_statement "FUN_001e6db0(local_34);" (call_expression "FUN_001e6db0(local_34)" (identifier "FUN_001e6db0") (argument_list "(local_34)" (( "(") (identifier "local_34") () ")"))) (; ";")) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "__s = __s + sVar5 + 1;" (assignment_expression "__s = __s + sVar5 + 1" (identifier "__s") (= "=") (binary_expression "__s + sVar5 + 1" (binary_expression "__s + sVar5" (identifier "__s") (+ "+") (identifier "sVar5")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar2 = param_1[1];" (assignment_expression "iVar2 = param_1[1]" (identifier "iVar2") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar3 = (int *)*param_1;" (assignment_expression "piVar3 = (int *)*param_1" (identifier "piVar3") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if (param_1 + 2 == piVar3) {\n      uVar4 = 3;\n    }\n    else {\n      uVar4 = param_1[2];\n    }" (if "if") (parenthesized_expression "(param_1 + 2 == piVar3)" (( "(") (binary_expression "param_1 + 2 == piVar3" (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) (== "==") (identifier "piVar3")) () ")")) (compound_statement "{\n      uVar4 = 3;\n    }" ({ "{") (expression_statement "uVar4 = 3;" (assignment_expression "uVar4 = 3" (identifier "uVar4") (= "=") (number_literal "3")) (; ";")) (} "}")) (else_clause "else {\n      uVar4 = param_1[2];\n    }" (else "else") (compound_statement "{\n      uVar4 = param_1[2];\n    }" ({ "{") (expression_statement "uVar4 = param_1[2];" (assignment_expression "uVar4 = param_1[2]" (identifier "uVar4") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}")))) (if_statement "if (uVar4 < iVar2 + 1U) {\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }" (if "if") (parenthesized_expression "(uVar4 < iVar2 + 1U)" (( "(") (binary_expression "uVar4 < iVar2 + 1U" (identifier "uVar4") (< "<") (binary_expression "iVar2 + 1U" (identifier "iVar2") (+ "+") (number_literal "1U"))) () ")")) (compound_statement "{\n      FUN_001eb0a0(param_1,iVar2,0,0,1);\n      piVar3 = (int *)*param_1;\n    }" ({ "{") (expression_statement "FUN_001eb0a0(param_1,iVar2,0,0,1);" (call_expression "FUN_001eb0a0(param_1,iVar2,0,0,1)" (identifier "FUN_001eb0a0") (argument_list "(param_1,iVar2,0,0,1)" (( "(") (identifier "param_1") (, ",") (identifier "iVar2") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "piVar3 = (int *)*param_1;" (assignment_expression "piVar3 = (int *)*param_1" (identifier "piVar3") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))) (expression_statement "piVar3[iVar2] = 0;" (assignment_expression "piVar3[iVar2] = 0" (subscript_expression "piVar3[iVar2]" (identifier "piVar3") ([ "[") (identifier "iVar2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[1] = iVar2 + 1U;" (assignment_expression "param_1[1] = iVar2 + 1U" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar2 + 1U" (identifier "iVar2") (+ "+") (number_literal "1U"))) (; ";")) (expression_statement "piVar3[iVar2 + 1] = 0;" (assignment_expression "piVar3[iVar2 + 1] = 0" (subscript_expression "piVar3[iVar2 + 1]" (identifier "piVar3") ([ "[") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1")) (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "FUN_0022c7a0(unaff_EDI + 0x3abb9);" (call_expression "FUN_0022c7a0(unaff_EDI + 0x3abb9)" (identifier "FUN_0022c7a0") (argument_list "(unaff_EDI + 0x3abb9)" (( "(") (binary_expression "unaff_EDI + 0x3abb9" (identifier "unaff_EDI") (+ "+") (number_literal "0x3abb9")) () ")"))) (; ";")) (} "}")))

/* std::collate<wchar_t>::do_transform(wchar_t const*, wchar_t const*) const */

type_1 * std::var_13<type_1>::do_transform(type_1 *var_2,type_1 *param_2)

{
  type_1 *var_18;
  type_1 var_24;
  type_1 *var_23;
  type_2 var_14;
  size_t var_20;
  type_1 wVar6;
  int var_27;
  type_1 *var_19;
  int var_8;
  int var_7;
  type_1 *local_48;
  type_2 var_9;
  type_1 *var_5;
  int var_6;
  type_1 var_21 [7];
  
  var_1();
  var_2[1] = L'\0';
  *var_2 = (type_1)(var_2 + 2);
  var_2[2] = L'\0';
  var_5 = var_21;
                    /* try { // try from 0024c067 to 0024c06b has its CatchHandler @ 0024c22a */
  std::wstring::var_3<var_4*>(&var_5,var_8,var_7,0);
  var_19 = var_5;
  var_18 = var_5 + var_6;
  var_9 = var_7 - var_8 >> 1;
  if (0x1fffffff < var_9) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */
    var_10();
  }
                    /* try { // try from 0024c09b to 0024c09f has its CatchHandler @ 0024c226 */
  local_48 = (type_1 *)var_11(var_9 << 2);
  while( true ) {
    var_14 = var_12((var_13<type_1> *)param_2,local_48,var_19,var_9);
    if (var_9 <= var_14) {
      var_9 = var_14 + 1;
      var_15(local_48);
      if (0x1fffffff < var_9) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */
        var_10();
      }
                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */
      local_48 = (type_1 *)var_11(var_9 * 4);
      var_14 = var_12((var_13<type_1> *)param_2,local_48,var_19,var_9);
    }
    if ((type_2)(0x1fffffffU - var_2[1]) < var_14) break;
                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */
    std::wstring::var_16((type_3 *)var_2,local_48,var_14);
    var_20 = var_17(var_19);
    if (var_18 == var_19 + var_20) {
      var_15(local_48);
      if (var_5 != var_21) {
        var_22(var_5);
      }
      return var_2;
    }
    var_19 = var_19 + var_20 + 1;
    var_24 = var_2[1];
    var_23 = (type_1 *)*var_2;
    if (var_2 + 2 == var_23) {
      wVar6 = L'\x03';
    }
    else {
      wVar6 = var_2[2];
    }
    if ((type_2)wVar6 < (type_2)(var_24 + L'\x01')) {
      std::wstring::var_25((type_3 *)var_2,var_24,0,(type_1 *)0x0,1);
      var_23 = (type_1 *)*var_2;
    }
    var_23[var_24] = L'\0';
    var_2[1] = var_24 + L'\x01';
    var_23[var_24 + L'\x01'] = L'\0';
  }
                    /* WARNING: Subroutine does not return */
  var_26(&UNK_0003abb9 + var_27);
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (identifier) (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (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: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (number_literal) right: (subscript_expression argument: (identifier) index: (number_literal))) right: (identifier))) consequence: (break_statement)) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (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: (binary_expression left: (identifier) right: (identifier)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (number_literal) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))))

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

{
  wchar_t *pwVar1;
  int iVar2;
  int *piVar3;
  uint uVar4;
  size_t sVar5;
  int unaff_EDI;
  wchar_t *__s;
  undefined4 local_48;
  uint local_44;
  wchar_t *local_34;
  int local_30;
  wchar_t local_2c [7];
  
  FUN_000559ee();
  param_1[1] = 0;
  *param_1 = (int)(param_1 + 2);
  param_1[2] = 0;
  local_34 = local_2c;
                    /* try { // try from 0024c067 to 0024c06b has its CatchHandler @ 0024c22a */
  FUN_001ee0d0(&local_34,param_3,param_4,0);
  __s = local_34;
  pwVar1 = local_34 + local_30;
  local_44 = param_4 - param_3 >> 1;
  if (0x1fffffff < local_44) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0024c231 to 0024c235 has its CatchHandler @ 0024c226 */
    FUN_001e6740();
  }
                    /* try { // try from 0024c09b to 0024c09f has its CatchHandler @ 0024c226 */
  local_48 = FUN_001e5180(local_44 << 2);
  while( true ) {
    uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);
    if (local_44 <= uVar4) {
      local_44 = uVar4 + 1;
      FUN_001e6d50(local_48);
      if (0x1fffffff < local_44) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 0024c20a to 0024c20e has its CatchHandler @ 0024c205 */
        FUN_001e6740();
      }
                    /* try { // try from 0024c111 to 0024c115 has its CatchHandler @ 0024c205 */
      local_48 = FUN_001e5180(local_44 * 4);
      uVar4 = FUN_0027af30(param_2,local_48,__s,local_44);
    }
    if (0x1fffffffU - param_1[1] < uVar4) break;
                    /* try { // try from 0024c14a to 0024c204 has its CatchHandler @ 0024c236 */
    FUN_001ecc70(param_1,local_48,uVar4);
    sVar5 = wcslen(__s);
    if (pwVar1 == __s + sVar5) {
      FUN_001e6d50(local_48);
      if (local_34 != local_2c) {
        FUN_001e6db0(local_34);
      }
      return param_1;
    }
    __s = __s + sVar5 + 1;
    iVar2 = param_1[1];
    piVar3 = (int *)*param_1;
    if (param_1 + 2 == piVar3) {
      uVar4 = 3;
    }
    else {
      uVar4 = param_1[2];
    }
    if (uVar4 < iVar2 + 1U) {
      FUN_001eb0a0(param_1,iVar2,0,0,1);
      piVar3 = (int *)*param_1;
    }
    piVar3[iVar2] = 0;
    param_1[1] = iVar2 + 1U;
    piVar3[iVar2 + 1] = 0;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0022c7a0(unaff_EDI + 0x3abb9);
}

