
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wfilebuf::xsgetn(wchar_t*, int) */

int __thiscall std::wfilebuf::xsgetn(wfilebuf *this,wchar_t *param_1,int param_2)

{
  wchar_t *pwVar1;
  wchar_t *pwVar2;
  int *piVar3;
  undefined4 uVar4;
  char cVar5;
  wchar_t *pwVar6;
  int iVar7;
  wchar_t *pwVar8;
  size_t __n;
  int iVar9;
  uint local_24;
  
  if (this[0x74] == (wfilebuf)0x0) {
    if (this[0x66] == (wfilebuf)0x0) {
      local_24 = *(uint *)(this + 0x40);
      iVar9 = 0;
    }
    else {
      iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff);
      if (iVar9 == -1) {
        return 0;
      }
      local_24 = *(uint *)(this + 0x40);
      *(undefined4 *)(this + 0x14) = 0;
      iVar9 = 0;
      *(undefined4 *)(this + 0x10) = 0;
      uVar4 = *(undefined4 *)(this + 0x5c);
      *(undefined4 *)(this + 0x18) = 0;
      *(undefined4 *)(this + 4) = uVar4;
      *(undefined4 *)(this + 8) = uVar4;
      *(undefined4 *)(this + 0xc) = uVar4;
      this[0x66] = (wfilebuf)0x0;
    }
  }
  else {
    pwVar1 = *(wchar_t **)(this + 8);
    pwVar2 = *(wchar_t **)(this + 4);
    iVar9 = 0;
    pwVar6 = pwVar1;
    pwVar8 = param_1;
    if ((0 < param_2) && (pwVar1 == pwVar2)) {
      pwVar8 = param_1 + 1;
      pwVar6 = pwVar1 + 1;
      param_2 = param_2 + -1;
      *param_1 = *pwVar1;
      *(wchar_t **)(this + 8) = pwVar6;
      if (this[0x74] == (wfilebuf)0x0) {
        local_24 = *(uint *)(this + 0x40);
        iVar9 = 1;
        param_1 = pwVar8;
        goto LAB_0022943f;
      }
      iVar9 = 1;
    }
    this[0x74] = (wfilebuf)0x0;
    iVar7 = *(int *)(this + 0x6c) + (uint)(pwVar2 != pwVar6) * 4;
    *(int *)(this + 0x6c) = iVar7;
    *(int *)(this + 8) = iVar7;
    *(undefined4 *)(this + 4) = *(undefined4 *)(this + 0x5c);
    *(undefined4 *)(this + 0xc) = *(undefined4 *)(this + 0x70);
    local_24 = *(uint *)(this + 0x40);
    param_1 = pwVar8;
  }
LAB_0022943f:
  iVar7 = 2;
  if (1 < *(uint *)(this + 0x60)) {
    iVar7 = *(int *)(this + 0x60);
  }
  if (iVar7 + -1 < param_2) {
    piVar3 = *(int **)(this + 0x78);
    if (piVar3 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
      __throw_bad_cast();
    }
    cVar5 = (**(code **)(*piVar3 + 0x18))(piVar3);
    if (((local_24 & 8) != 0) && (cVar5 != '\0')) {
      pwVar8 = *(wchar_t **)(this + 8);
      if (pwVar8 != *(wchar_t **)(this + 0xc)) {
        iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;
        __n = iVar7 >> 2;
        wmemcpy(param_1,pwVar8,__n);
        *(int *)(this + 8) = *(int *)(this + 8) + iVar7;
        param_1 = (wchar_t *)((int)param_1 + iVar7);
        iVar9 = iVar9 + __n;
        param_2 = param_2 - __n;
      }
      while( true ) {
        iVar7 = __basic_file<char>::xsgetn
                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);
        if (iVar7 == -1) {
                    /* WARNING: Subroutine does not return */
          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");
        }
        if (iVar7 == 0) break;
        iVar9 = iVar9 + iVar7;
        param_2 = param_2 - iVar7;
        if (param_2 == 0) goto LAB_002295cb;
        param_1 = param_1 + iVar7;
      }
      if (param_2 != 0) {
        uVar4 = *(undefined4 *)(this + 0x5c);
        *(undefined4 *)(this + 0x14) = 0;
        *(undefined4 *)(this + 0x10) = 0;
        *(undefined4 *)(this + 4) = uVar4;
        *(undefined4 *)(this + 8) = uVar4;
        *(undefined4 *)(this + 0xc) = uVar4;
        *(undefined4 *)(this + 0x18) = 0;
        this[0x65] = (wfilebuf)0x0;
        return iVar9;
      }
LAB_002295cb:
      this[0x65] = (wfilebuf)0x1;
      return iVar9;
    }
  }
  iVar7 = wstreambuf::xsgetn((wstreambuf *)this,param_1,param_2);
  return iVar9 + iVar7;
}



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

int FUN_002293d0(int *param_1,wchar_t *param_2,int param_3)

{
  wchar_t *pwVar1;
  wchar_t *pwVar2;
  int *piVar3;
  char cVar4;
  wchar_t *pwVar5;
  int iVar6;
  wchar_t *pwVar7;
  size_t __n;
  int iVar8;
  uint local_24;
  
  if ((char)param_1[0x1d] == '\0') {
    if (*(char *)((int)param_1 + 0x66) == '\0') {
      local_24 = param_1[0x10];
      iVar8 = 0;
    }
    else {
      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);
      if (iVar6 == -1) {
        return 0;
      }
      local_24 = param_1[0x10];
      param_1[5] = 0;
      iVar8 = 0;
      param_1[4] = 0;
      iVar6 = param_1[0x17];
      param_1[6] = 0;
      param_1[1] = iVar6;
      param_1[2] = iVar6;
      param_1[3] = iVar6;
      *(undefined1 *)((int)param_1 + 0x66) = 0;
    }
  }
  else {
    pwVar1 = (wchar_t *)param_1[2];
    pwVar2 = (wchar_t *)param_1[1];
    iVar8 = 0;
    pwVar5 = pwVar1;
    pwVar7 = param_2;
    if ((0 < param_3) && (pwVar1 == pwVar2)) {
      pwVar7 = param_2 + 1;
      pwVar5 = pwVar1 + 1;
      param_3 = param_3 + -1;
      *param_2 = *pwVar1;
      param_1[2] = (int)pwVar5;
      if ((char)param_1[0x1d] == '\0') {
        local_24 = param_1[0x10];
        iVar8 = 1;
        param_2 = pwVar7;
        goto LAB_0022943f;
      }
      iVar8 = 1;
    }
    *(undefined1 *)(param_1 + 0x1d) = 0;
    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;
    param_1[0x1b] = iVar6;
    param_1[2] = iVar6;
    param_1[1] = param_1[0x17];
    param_1[3] = param_1[0x1c];
    local_24 = param_1[0x10];
    param_2 = pwVar7;
  }
LAB_0022943f:
  iVar6 = 2;
  if (1 < (uint)param_1[0x18]) {
    iVar6 = param_1[0x18];
  }
  if (iVar6 + -1 < param_3) {
    piVar3 = (int *)param_1[0x1e];
    if (piVar3 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
      FUN_002428a0();
    }
    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);
    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {
      pwVar7 = (wchar_t *)param_1[2];
      if (pwVar7 != (wchar_t *)param_1[3]) {
        iVar6 = param_1[3] - (int)pwVar7;
        __n = iVar6 >> 2;
        wmemcpy(param_2,pwVar7,__n);
        param_1[2] = param_1[2] + iVar6;
        param_2 = (wchar_t *)((int)param_2 + iVar6);
        iVar8 = iVar8 + __n;
        param_3 = param_3 - __n;
      }
      while( true ) {
        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);
        if (iVar6 == -1) {
                    /* WARNING: Subroutine does not return */
          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");
        }
        if (iVar6 == 0) break;
        iVar8 = iVar8 + iVar6;
        param_3 = param_3 - iVar6;
        if (param_3 == 0) goto LAB_002295cb;
        param_2 = param_2 + iVar6;
      }
      if (param_3 != 0) {
        iVar6 = param_1[0x17];
        param_1[5] = 0;
        param_1[4] = 0;
        param_1[1] = iVar6;
        param_1[2] = iVar6;
        param_1[3] = iVar6;
        param_1[6] = 0;
        *(undefined1 *)((int)param_1 + 0x65) = 0;
        return iVar8;
      }
LAB_002295cb:
      *(undefined1 *)((int)param_1 + 0x65) = 1;
      return iVar8;
    }
  }
  iVar6 = FUN_00208330(param_1,param_2,param_3);
  return iVar8 + iVar6;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00036db0
ADD EBX,0x180c27
SUB ESP,0x1c
MOV ESI,dword ptr [ESP + 0x30]
MOV ECX,dword ptr [ESP + 0x34]
MOV EBP,dword ptr [ESP + 0x38]
CMP byte ptr [ESI + 0x74],0x0
JZ 0x002294a0
MOV EAX,dword ptr [ESI + 0x8]
MOV EDX,dword ptr [ESI + 0x4]
XOR EDI,EDI
TEST EBP,EBP
JLE 0x0022940c
CMP EAX,EDX
JZ 0x002294b8
CMP EDX,EAX
MOV EDX,dword ptr [ESI + 0x6c]
MOV byte ptr [ESI + 0x74],0x0
SETNZ AL
MOVZX EAX,AL
LEA EAX,[EDX + EAX*0x4]
MOV EDX,dword ptr [ESI + 0x70]
MOV dword ptr [ESI + 0x6c],EAX
MOV dword ptr [ESP + 0x8],EDX
MOV EDX,dword ptr [ESI + 0x5c]
MOV dword ptr [ESI + 0x8],EAX
MOV EAX,dword ptr [ESP + 0x8]
MOV dword ptr [ESI + 0x4],EDX
MOV dword ptr [ESI + 0xc],EAX
MOV EAX,dword ptr [ESI + 0x40]
MOV dword ptr [ESP + 0x8],EAX
CMP dword ptr [ESI + 0x60],0x2
MOV EAX,0x2
CMOVNC EAX,dword ptr [ESI + 0x60]
SUB EAX,0x1
CMP EBP,EAX
JLE 0x00229481
MOV EAX,dword ptr [ESI + 0x78]
TEST EAX,EAX
JZ 0x00229619
MOV dword ptr [ESP + 0x34],ECX
SUB ESP,0xc
MOV EDX,dword ptr [EAX]
PUSH EAX
CALL dword ptr [EDX + 0x18]
MOV ECX,dword ptr [ESP + 0x44]
ADD ESP,0x10
TEST byte ptr [ESP + 0x8],0x8
JZ 0x00229481
TEST AL,AL
JNZ 0x00229550
SUB ESP,0x4
PUSH EBP
PUSH ECX
PUSH ESI
CALL 0x00208330
ADD ESP,0x10
ADD EDI,EAX
ADD ESP,0x1c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP byte ptr [ESI + 0x66],0x0
JNZ 0x002294f0
MOV EAX,dword ptr [ESI + 0x40]
XOR EDI,EDI
MOV dword ptr [ESP + 0x8],EAX
JMP 0x0022943f
LEA EDI,[ECX + 0x4]
ADD EAX,0x4
SUB EBP,0x1
MOV dword ptr [ESP + 0xc],EDI
MOV EDI,dword ptr [EAX + -0x4]
MOV dword ptr [ECX],EDI
CMP byte ptr [ESI + 0x74],0x0
MOV dword ptr [ESI + 0x8],EAX
JNZ 0x0022961e
MOV EAX,dword ptr [ESI + 0x40]
MOV ECX,dword ptr [ESP + 0xc]
MOV EDI,0x1
MOV dword ptr [ESP + 0x8],EAX
JMP 0x0022943f
MOV dword ptr [ESP + 0x34],ECX
SUB ESP,0x8
MOV EAX,dword ptr [ESI]
PUSH -0x1
PUSH ESI
CALL dword ptr [EAX + 0x34]
ADD ESP,0x10
CMP EAX,-0x1
JZ 0x00229540
MOV EAX,dword ptr [ESI + 0x40]
MOV dword ptr [ESI + 0x14],0x0
XOR EDI,EDI
MOV dword ptr [ESI + 0x10],0x0
MOV ECX,dword ptr [ESP + 0x34]
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,dword ptr [ESI + 0x5c]
MOV dword ptr [ESI + 0x18],0x0
MOV dword ptr [ESI + 0x4],EAX
MOV dword ptr [ESI + 0x8],EAX
MOV dword ptr [ESI + 0xc],EAX
MOV byte ptr [ESI + 0x66],0x0
JMP 0x0022943f
XOR EDI,EDI
JMP 0x00229491
MOV EDX,dword ptr [ESI + 0xc]
MOV EAX,dword ptr [ESI + 0x8]
CMP EAX,EDX
JZ 0x0022958e
SUB EDX,EAX
SUB ESP,0x4
MOV dword ptr [ESP + 0xc],EDX
SAR EDX,0x2
PUSH EDX
MOV dword ptr [ESP + 0x14],EDX
PUSH EAX
PUSH ECX
MOV dword ptr [ESP + 0x44],ECX
CALL 0x0002a380
MOV EAX,dword ptr [ESP + 0x18]
ADD dword ptr [ESI + 0x8],EAX
MOV EDX,dword ptr [ESP + 0x1c]
MOV ECX,dword ptr [ESP + 0x44]
ADD ESP,0x10
ADD ECX,EAX
ADD EDI,EDX
SUB EBP,EDX
LEA EAX,[ESI + 0x38]
MOV dword ptr [ESP + 0x30],ESI
MOV ESI,ECX
MOV dword ptr [ESP + 0x8],EAX
JMP 0x002295a9
ADD EDI,EAX
SUB EBP,EAX
JZ 0x002295d8
LEA ESI,[ESI + EAX*0x4]
SUB ESP,0x4
PUSH EBP
PUSH ESI
PUSH dword ptr [ESP + 0x14]
CALL 0x001fd880
ADD ESP,0x10
CMP EAX,-0x1
JZ 0x0022960a
TEST EAX,EAX
JNZ 0x002295a0
MOV ESI,dword ptr [ESP + 0x30]
TEST EBP,EBP
JNZ 0x002295e0
MOV byte ptr [ESI + 0x65],0x1
JMP 0x00229491
MOV ESI,dword ptr [ESP + 0x30]
JMP 0x002295cb
MOV EAX,dword ptr [ESI + 0x5c]
MOV dword ptr [ESI + 0x14],0x0
MOV dword ptr [ESI + 0x10],0x0
MOV dword ptr [ESI + 0x4],EAX
MOV dword ptr [ESI + 0x8],EAX
MOV dword ptr [ESI + 0xc],EAX
MOV dword ptr [ESI + 0x18],0x0
MOV byte ptr [ESI + 0x65],0x0
JMP 0x00229491
SUB ESP,0xc
LEA EAX,[EBX + 0xfff12a40]
PUSH EAX
CALL 0x0023cd60
CALL 0x002428a0
MOV ECX,dword ptr [ESP + 0xc]
MOV EDI,0x1
JMP 0x0022940c
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_002293d0(int *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  char cVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  wchar_t *pwVar7;\n  size_t __n;\n  int iVar8;\n  uint local_24;\n  \n  if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }\nLAB_0022943f:\n  iVar6 = 2;\n  if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }\n  if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }\n  iVar6 = FUN_00208330(param_1,param_2,param_3);\n  return iVar8 + iVar6;\n}\n\n" comment (function_definition "int FUN_002293d0(int *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  char cVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  wchar_t *pwVar7;\n  size_t __n;\n  int iVar8;\n  uint local_24;\n  \n  if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }\nLAB_0022943f:\n  iVar6 = 2;\n  if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }\n  if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }\n  iVar6 = FUN_00208330(param_1,param_2,param_3);\n  return iVar8 + iVar6;\n}" primitive_type (function_declarator "FUN_002293d0(int *param_1,wchar_t *param_2,int param_3)" identifier (parameter_list "(int *param_1,wchar_t *param_2,int param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  char cVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  wchar_t *pwVar7;\n  size_t __n;\n  int iVar8;\n  uint local_24;\n  \n  if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }\nLAB_0022943f:\n  iVar6 = 2;\n  if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }\n  if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }\n  iVar6 = FUN_00208330(param_1,param_2,param_3);\n  return iVar8 + iVar6;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "wchar_t *pwVar5;" type_identifier (pointer_declarator "*pwVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "wchar_t *pwVar7;" type_identifier (pointer_declarator "*pwVar7" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "uint local_24;" type_identifier identifier ;) (if_statement "if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }" if (parenthesized_expression "((char)param_1[0x1d] == '\0')" ( (binary_expression "(char)param_1[0x1d] == '\0'" (cast_expression "(char)param_1[0x1d]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_1[0x1d]" identifier [ number_literal ])) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }" { (if_statement "if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }" if (parenthesized_expression "(*(char *)((int)param_1 + 0x66) == '\0')" ( (binary_expression "*(char *)((int)param_1 + 0x66) == '\0'" (pointer_expression "*(char *)((int)param_1 + 0x66)" * (cast_expression "(char *)((int)param_1 + 0x66)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x66)" ( (binary_expression "(int)param_1 + 0x66" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }" { (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }" else (compound_statement "{\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }" { (expression_statement "iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);" (assignment_expression "iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff)" identifier = (call_expression "(**(code **)(*param_1 + 0x34))(param_1,0xffffffff)" (parenthesized_expression "(**(code **)(*param_1 + 0x34))" ( (pointer_expression "**(code **)(*param_1 + 0x34)" * (pointer_expression "*(code **)(*param_1 + 0x34)" * (cast_expression "(code **)(*param_1 + 0x34)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x34)" ( (binary_expression "*param_1 + 0x34" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,0xffffffff)" ( identifier , number_literal )))) ;) (if_statement "if (iVar6 == -1) {\n        return 0;\n      }" if (parenthesized_expression "(iVar6 == -1)" ( (binary_expression "iVar6 == -1" identifier == number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (expression_statement "param_1[5] = 0;" (assignment_expression "param_1[5] = 0" (subscript_expression "param_1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar6 = param_1[0x17];" (assignment_expression "iVar6 = param_1[0x17]" identifier = (subscript_expression "param_1[0x17]" identifier [ number_literal ])) ;) (expression_statement "param_1[6] = 0;" (assignment_expression "param_1[6] = 0" (subscript_expression "param_1[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[1] = iVar6;" (assignment_expression "param_1[1] = iVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = iVar6;" (assignment_expression "param_1[2] = iVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[3] = iVar6;" (assignment_expression "param_1[3] = iVar6" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined1 *)((int)param_1 + 0x66) = 0;" (assignment_expression "*(undefined1 *)((int)param_1 + 0x66) = 0" (pointer_expression "*(undefined1 *)((int)param_1 + 0x66)" * (cast_expression "(undefined1 *)((int)param_1 + 0x66)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x66)" ( (binary_expression "(int)param_1 + 0x66" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) }))) }) (else_clause "else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }" else (compound_statement "{\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }" { (expression_statement "pwVar1 = (wchar_t *)param_1[2];" (assignment_expression "pwVar1 = (wchar_t *)param_1[2]" identifier = (cast_expression "(wchar_t *)param_1[2]" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (expression_statement "pwVar2 = (wchar_t *)param_1[1];" (assignment_expression "pwVar2 = (wchar_t *)param_1[1]" identifier = (cast_expression "(wchar_t *)param_1[1]" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (expression_statement "pwVar5 = pwVar1;" (assignment_expression "pwVar5 = pwVar1" identifier = identifier) ;) (expression_statement "pwVar7 = param_2;" (assignment_expression "pwVar7 = param_2" identifier = identifier) ;) (if_statement "if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }" if (parenthesized_expression "((0 < param_3) && (pwVar1 == pwVar2))" ( (binary_expression "(0 < param_3) && (pwVar1 == pwVar2)" (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) && (parenthesized_expression "(pwVar1 == pwVar2)" ( (binary_expression "pwVar1 == pwVar2" identifier == identifier) ))) )) (compound_statement "{\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }" { (expression_statement "pwVar7 = param_2 + 1;" (assignment_expression "pwVar7 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "pwVar5 = pwVar1 + 1;" (assignment_expression "pwVar5 = pwVar1 + 1" identifier = (binary_expression "pwVar1 + 1" identifier + number_literal)) ;) (expression_statement "param_3 = param_3 + -1;" (assignment_expression "param_3 = param_3 + -1" identifier = (binary_expression "param_3 + -1" identifier + number_literal)) ;) (expression_statement "*param_2 = *pwVar1;" (assignment_expression "*param_2 = *pwVar1" (pointer_expression "*param_2" * identifier) = (pointer_expression "*pwVar1" * identifier)) ;) (expression_statement "param_1[2] = (int)pwVar5;" (assignment_expression "param_1[2] = (int)pwVar5" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)pwVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }" if (parenthesized_expression "((char)param_1[0x1d] == '\0')" ( (binary_expression "(char)param_1[0x1d] == '\0'" (cast_expression "(char)param_1[0x1d]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_1[0x1d]" identifier [ number_literal ])) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }" { (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (expression_statement "iVar8 = 1;" (assignment_expression "iVar8 = 1" identifier = number_literal) ;) (expression_statement "param_2 = pwVar7;" (assignment_expression "param_2 = pwVar7" identifier = identifier) ;) (goto_statement "goto LAB_0022943f;" goto statement_identifier ;) })) (expression_statement "iVar8 = 1;" (assignment_expression "iVar8 = 1" identifier = number_literal) ;) })) (expression_statement "*(undefined1 *)(param_1 + 0x1d) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x1d) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x1d)" * (cast_expression "(undefined1 *)(param_1 + 0x1d)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1d)" ( (binary_expression "param_1 + 0x1d" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;" (assignment_expression "iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4" identifier = (binary_expression "param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4" (subscript_expression "param_1[0x1b]" identifier [ number_literal ]) + (binary_expression "(uint)(pwVar2 != pwVar5) * 4" (call_expression "(uint)(pwVar2 != pwVar5)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pwVar2 != pwVar5)" ( (binary_expression "pwVar2 != pwVar5" identifier != identifier) ))) * number_literal))) ;) (expression_statement "param_1[0x1b] = iVar6;" (assignment_expression "param_1[0x1b] = iVar6" (subscript_expression "param_1[0x1b]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = iVar6;" (assignment_expression "param_1[2] = iVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[1] = param_1[0x17];" (assignment_expression "param_1[1] = param_1[0x17]" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (subscript_expression "param_1[0x17]" identifier [ number_literal ])) ;) (expression_statement "param_1[3] = param_1[0x1c];" (assignment_expression "param_1[3] = param_1[0x1c]" (subscript_expression "param_1[3]" identifier [ number_literal ]) = (subscript_expression "param_1[0x1c]" identifier [ number_literal ])) ;) (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (expression_statement "param_2 = pwVar7;" (assignment_expression "param_2 = pwVar7" identifier = identifier) ;) }))) (labeled_statement "LAB_0022943f:\n  iVar6 = 2;" statement_identifier : (expression_statement "iVar6 = 2;" (assignment_expression "iVar6 = 2" identifier = number_literal) ;)) (if_statement "if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }" if (parenthesized_expression "(1 < (uint)param_1[0x18])" ( (binary_expression "1 < (uint)param_1[0x18]" number_literal < (cast_expression "(uint)param_1[0x18]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[0x18]" identifier [ number_literal ]))) )) (compound_statement "{\n    iVar6 = param_1[0x18];\n  }" { (expression_statement "iVar6 = param_1[0x18];" (assignment_expression "iVar6 = param_1[0x18]" identifier = (subscript_expression "param_1[0x18]" identifier [ number_literal ])) ;) })) (if_statement "if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }" if (parenthesized_expression "(iVar6 + -1 < param_3)" ( (binary_expression "iVar6 + -1 < param_3" (binary_expression "iVar6 + -1" identifier + number_literal) < identifier) )) (compound_statement "{\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }" { (expression_statement "piVar3 = (int *)param_1[0x1e];" (assignment_expression "piVar3 = (int *)param_1[0x1e]" identifier = (cast_expression "(int *)param_1[0x1e]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[0x1e]" identifier [ number_literal ]))) ;) (if_statement "if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      FUN_002428a0();\n    }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      FUN_002428a0();\n    }" { comment (expression_statement "FUN_002428a0();" (call_expression "FUN_002428a0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);" (assignment_expression "cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3)" identifier = (call_expression "(**(code **)(*piVar3 + 0x18))(piVar3)" (parenthesized_expression "(**(code **)(*piVar3 + 0x18))" ( (pointer_expression "**(code **)(*piVar3 + 0x18)" * (pointer_expression "*(code **)(*piVar3 + 0x18)" * (cast_expression "(code **)(*piVar3 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 0x18)" ( (binary_expression "*piVar3 + 0x18" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3)" ( identifier )))) ;) (if_statement "if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }" if (parenthesized_expression "(((local_24 & 8) != 0) && (cVar4 != '\0'))" ( (binary_expression "((local_24 & 8) != 0) && (cVar4 != '\0')" (parenthesized_expression "((local_24 & 8) != 0)" ( (binary_expression "(local_24 & 8) != 0" (parenthesized_expression "(local_24 & 8)" ( (binary_expression "local_24 & 8" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(cVar4 != '\0')" ( (binary_expression "cVar4 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }" { (expression_statement "pwVar7 = (wchar_t *)param_1[2];" (assignment_expression "pwVar7 = (wchar_t *)param_1[2]" identifier = (cast_expression "(wchar_t *)param_1[2]" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (if_statement "if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }" if (parenthesized_expression "(pwVar7 != (wchar_t *)param_1[3])" ( (binary_expression "pwVar7 != (wchar_t *)param_1[3]" identifier != (cast_expression "(wchar_t *)param_1[3]" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) )) (compound_statement "{\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }" { (expression_statement "iVar6 = param_1[3] - (int)pwVar7;" (assignment_expression "iVar6 = param_1[3] - (int)pwVar7" identifier = (binary_expression "param_1[3] - (int)pwVar7" (subscript_expression "param_1[3]" identifier [ number_literal ]) - (cast_expression "(int)pwVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "__n = iVar6 >> 2;" (assignment_expression "__n = iVar6 >> 2" identifier = (binary_expression "iVar6 >> 2" identifier >> number_literal)) ;) (expression_statement "wmemcpy(param_2,pwVar7,__n);" (call_expression "wmemcpy(param_2,pwVar7,__n)" identifier (argument_list "(param_2,pwVar7,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "param_1[2] = param_1[2] + iVar6;" (assignment_expression "param_1[2] = param_1[2] + iVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "param_1[2] + iVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) + identifier)) ;) (expression_statement "param_2 = (wchar_t *)((int)param_2 + iVar6);" (assignment_expression "param_2 = (wchar_t *)((int)param_2 + iVar6)" identifier = (cast_expression "(wchar_t *)((int)param_2 + iVar6)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + iVar6)" ( (binary_expression "(int)param_2 + iVar6" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "iVar8 = iVar8 + __n;" (assignment_expression "iVar8 = iVar8 + __n" identifier = (binary_expression "iVar8 + __n" identifier + identifier)) ;) (expression_statement "param_3 = param_3 - __n;" (assignment_expression "param_3 = param_3 - __n" identifier = (binary_expression "param_3 - __n" identifier - identifier)) ;) })) (while_statement "while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }" { (expression_statement "iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);" (assignment_expression "iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3)" identifier = (call_expression "FUN_001fd880(param_1 + 0xe,param_2,param_3)" identifier (argument_list "(param_1 + 0xe,param_2,param_3)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) , identifier , identifier )))) ;) (if_statement "if (iVar6 == -1) {\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }" if (parenthesized_expression "(iVar6 == -1)" ( (binary_expression "iVar6 == -1" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }" { comment (expression_statement "FUN_0023cd60("basic_filebuf::xsgetn error reading the file");" (call_expression "FUN_0023cd60("basic_filebuf::xsgetn error reading the file")" identifier (argument_list "("basic_filebuf::xsgetn error reading the file")" ( (string_literal ""basic_filebuf::xsgetn error reading the file"" " string_content ") ))) ;) })) (if_statement "if (iVar6 == 0) break;" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar8 = iVar8 + iVar6;" (assignment_expression "iVar8 = iVar8 + iVar6" identifier = (binary_expression "iVar8 + iVar6" identifier + identifier)) ;) (expression_statement "param_3 = param_3 - iVar6;" (assignment_expression "param_3 = param_3 - iVar6" identifier = (binary_expression "param_3 - iVar6" identifier - identifier)) ;) (if_statement "if (param_3 == 0) goto LAB_002295cb;" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_002295cb;" goto statement_identifier ;)) (expression_statement "param_2 = param_2 + iVar6;" (assignment_expression "param_2 = param_2 + iVar6" identifier = (binary_expression "param_2 + iVar6" identifier + identifier)) ;) })) (if_statement "if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }" { (expression_statement "iVar6 = param_1[0x17];" (assignment_expression "iVar6 = param_1[0x17]" identifier = (subscript_expression "param_1[0x17]" identifier [ number_literal ])) ;) (expression_statement "param_1[5] = 0;" (assignment_expression "param_1[5] = 0" (subscript_expression "param_1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[1] = iVar6;" (assignment_expression "param_1[1] = iVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = iVar6;" (assignment_expression "param_1[2] = iVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[3] = iVar6;" (assignment_expression "param_1[3] = iVar6" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[6] = 0;" (assignment_expression "param_1[6] = 0" (subscript_expression "param_1[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined1 *)((int)param_1 + 0x65) = 0;" (assignment_expression "*(undefined1 *)((int)param_1 + 0x65) = 0" (pointer_expression "*(undefined1 *)((int)param_1 + 0x65)" * (cast_expression "(undefined1 *)((int)param_1 + 0x65)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x65)" ( (binary_expression "(int)param_1 + 0x65" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return iVar8;" return identifier ;) })) (labeled_statement "LAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;" statement_identifier : (expression_statement "*(undefined1 *)((int)param_1 + 0x65) = 1;" (assignment_expression "*(undefined1 *)((int)param_1 + 0x65) = 1" (pointer_expression "*(undefined1 *)((int)param_1 + 0x65)" * (cast_expression "(undefined1 *)((int)param_1 + 0x65)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x65)" ( (binary_expression "(int)param_1 + 0x65" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;)) (return_statement "return iVar8;" return identifier ;) })) })) (expression_statement "iVar6 = FUN_00208330(param_1,param_2,param_3);" (assignment_expression "iVar6 = FUN_00208330(param_1,param_2,param_3)" identifier = (call_expression "FUN_00208330(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (return_statement "return iVar8 + iVar6;" return (binary_expression "iVar8 + iVar6" identifier + identifier) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::wfilebuf::xsgetn(wchar_t*, int) */\n\nint __thiscall std::wfilebuf::xsgetn(wfilebuf *this,wchar_t *param_1,int param_2)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  undefined4 uVar4;\n  char cVar5;\n  wchar_t *pwVar6;\n  int iVar7;\n  wchar_t *pwVar8;\n  size_t __n;\n  int iVar9;\n  uint local_24;\n  \n  if (this[0x74] == (wfilebuf)0x0) {\n    if (this[0x66] == (wfilebuf)0x0) {\n      local_24 = *(uint *)(this + 0x40);\n      iVar9 = 0;\n    }\n    else {\n      iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff);\n      if (iVar9 == -1) {\n        return 0;\n      }\n      local_24 = *(uint *)(this + 0x40);\n      *(undefined4 *)(this + 0x14) = 0;\n      iVar9 = 0;\n      *(undefined4 *)(this + 0x10) = 0;\n      uVar4 = *(undefined4 *)(this + 0x5c);\n      *(undefined4 *)(this + 0x18) = 0;\n      *(undefined4 *)(this + 4) = uVar4;\n      *(undefined4 *)(this + 8) = uVar4;\n      *(undefined4 *)(this + 0xc) = uVar4;\n      this[0x66] = (wfilebuf)0x0;\n    }\n  }\n  else {\n    pwVar1 = *(wchar_t **)(this + 8);\n    pwVar2 = *(wchar_t **)(this + 4);\n    iVar9 = 0;\n    pwVar6 = pwVar1;\n    pwVar8 = param_1;\n    if ((0 < param_2) && (pwVar1 == pwVar2)) {\n      pwVar8 = param_1 + 1;\n      pwVar6 = pwVar1 + 1;\n      param_2 = param_2 + -1;\n      *param_1 = *pwVar1;\n      *(wchar_t **)(this + 8) = pwVar6;\n      if (this[0x74] == (wfilebuf)0x0) {\n        local_24 = *(uint *)(this + 0x40);\n        iVar9 = 1;\n        param_1 = pwVar8;\n        goto LAB_0022943f;\n      }\n      iVar9 = 1;\n    }\n    this[0x74] = (wfilebuf)0x0;\n    iVar7 = *(int *)(this + 0x6c) + (uint)(pwVar2 != pwVar6) * 4;\n    *(int *)(this + 0x6c) = iVar7;\n    *(int *)(this + 8) = iVar7;\n    *(undefined4 *)(this + 4) = *(undefined4 *)(this + 0x5c);\n    *(undefined4 *)(this + 0xc) = *(undefined4 *)(this + 0x70);\n    local_24 = *(uint *)(this + 0x40);\n    param_1 = pwVar8;\n  }\nLAB_0022943f:\n  iVar7 = 2;\n  if (1 < *(uint *)(this + 0x60)) {\n    iVar7 = *(int *)(this + 0x60);\n  }\n  if (iVar7 + -1 < param_2) {\n    piVar3 = *(int **)(this + 0x78);\n    if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __throw_bad_cast();\n    }\n    cVar5 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar5 != '\0')) {\n      pwVar8 = *(wchar_t **)(this + 8);\n      if (pwVar8 != *(wchar_t **)(this + 0xc)) {\n        iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;\n        __n = iVar7 >> 2;\n        wmemcpy(param_1,pwVar8,__n);\n        *(int *)(this + 8) = *(int *)(this + 8) + iVar7;\n        param_1 = (wchar_t *)((int)param_1 + iVar7);\n        iVar9 = iVar9 + __n;\n        param_2 = param_2 - __n;\n      }\n      while( true ) {\n        iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);\n        if (iVar7 == -1) {\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar7 == 0) break;\n        iVar9 = iVar9 + iVar7;\n        param_2 = param_2 - iVar7;\n        if (param_2 == 0) goto LAB_002295cb;\n        param_1 = param_1 + iVar7;\n      }\n      if (param_2 != 0) {\n        uVar4 = *(undefined4 *)(this + 0x5c);\n        *(undefined4 *)(this + 0x14) = 0;\n        *(undefined4 *)(this + 0x10) = 0;\n        *(undefined4 *)(this + 4) = uVar4;\n        *(undefined4 *)(this + 8) = uVar4;\n        *(undefined4 *)(this + 0xc) = uVar4;\n        *(undefined4 *)(this + 0x18) = 0;\n        this[0x65] = (wfilebuf)0x0;\n        return iVar9;\n      }\nLAB_002295cb:\n      this[0x65] = (wfilebuf)0x1;\n      return iVar9;\n    }\n  }\n  iVar7 = wstreambuf::xsgetn((wstreambuf *)this,param_1,param_2);\n  return iVar9 + iVar7;\n}\n\n" comment comment (function_definition "int __thiscall std::wfilebuf::xsgetn(wfilebuf *this,wchar_t *param_1,int param_2)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  undefined4 uVar4;\n  char cVar5;\n  wchar_t *pwVar6;\n  int iVar7;\n  wchar_t *pwVar8;\n  size_t __n;\n  int iVar9;\n  uint local_24;\n  \n  if (this[0x74] == (wfilebuf)0x0) {\n    if (this[0x66] == (wfilebuf)0x0) {\n      local_24 = *(uint *)(this + 0x40);\n      iVar9 = 0;\n    }\n    else {\n      iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff);\n      if (iVar9 == -1) {\n        return 0;\n      }\n      local_24 = *(uint *)(this + 0x40);\n      *(undefined4 *)(this + 0x14) = 0;\n      iVar9 = 0;\n      *(undefined4 *)(this + 0x10) = 0;\n      uVar4 = *(undefined4 *)(this + 0x5c);\n      *(undefined4 *)(this + 0x18) = 0;\n      *(undefined4 *)(this + 4) = uVar4;\n      *(undefined4 *)(this + 8) = uVar4;\n      *(undefined4 *)(this + 0xc) = uVar4;\n      this[0x66] = (wfilebuf)0x0;\n    }\n  }\n  else {\n    pwVar1 = *(wchar_t **)(this + 8);\n    pwVar2 = *(wchar_t **)(this + 4);\n    iVar9 = 0;\n    pwVar6 = pwVar1;\n    pwVar8 = param_1;\n    if ((0 < param_2) && (pwVar1 == pwVar2)) {\n      pwVar8 = param_1 + 1;\n      pwVar6 = pwVar1 + 1;\n      param_2 = param_2 + -1;\n      *param_1 = *pwVar1;\n      *(wchar_t **)(this + 8) = pwVar6;\n      if (this[0x74] == (wfilebuf)0x0) {\n        local_24 = *(uint *)(this + 0x40);\n        iVar9 = 1;\n        param_1 = pwVar8;\n        goto LAB_0022943f;\n      }\n      iVar9 = 1;\n    }\n    this[0x74] = (wfilebuf)0x0;\n    iVar7 = *(int *)(this + 0x6c) + (uint)(pwVar2 != pwVar6) * 4;\n    *(int *)(this + 0x6c) = iVar7;\n    *(int *)(this + 8) = iVar7;\n    *(undefined4 *)(this + 4) = *(undefined4 *)(this + 0x5c);\n    *(undefined4 *)(this + 0xc) = *(undefined4 *)(this + 0x70);\n    local_24 = *(uint *)(this + 0x40);\n    param_1 = pwVar8;\n  }\nLAB_0022943f:\n  iVar7 = 2;\n  if (1 < *(uint *)(this + 0x60)) {\n    iVar7 = *(int *)(this + 0x60);\n  }\n  if (iVar7 + -1 < param_2) {\n    piVar3 = *(int **)(this + 0x78);\n    if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __throw_bad_cast();\n    }\n    cVar5 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar5 != '\0')) {\n      pwVar8 = *(wchar_t **)(this + 8);\n      if (pwVar8 != *(wchar_t **)(this + 0xc)) {\n        iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;\n        __n = iVar7 >> 2;\n        wmemcpy(param_1,pwVar8,__n);\n        *(int *)(this + 8) = *(int *)(this + 8) + iVar7;\n        param_1 = (wchar_t *)((int)param_1 + iVar7);\n        iVar9 = iVar9 + __n;\n        param_2 = param_2 - __n;\n      }\n      while( true ) {\n        iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);\n        if (iVar7 == -1) {\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar7 == 0) break;\n        iVar9 = iVar9 + iVar7;\n        param_2 = param_2 - iVar7;\n        if (param_2 == 0) goto LAB_002295cb;\n        param_1 = param_1 + iVar7;\n      }\n      if (param_2 != 0) {\n        uVar4 = *(undefined4 *)(this + 0x5c);\n        *(undefined4 *)(this + 0x14) = 0;\n        *(undefined4 *)(this + 0x10) = 0;\n        *(undefined4 *)(this + 4) = uVar4;\n        *(undefined4 *)(this + 8) = uVar4;\n        *(undefined4 *)(this + 0xc) = uVar4;\n        *(undefined4 *)(this + 0x18) = 0;\n        this[0x65] = (wfilebuf)0x0;\n        return iVar9;\n      }\nLAB_002295cb:\n      this[0x65] = (wfilebuf)0x1;\n      return iVar9;\n    }\n  }\n  iVar7 = wstreambuf::xsgetn((wstreambuf *)this,param_1,param_2);\n  return iVar9 + iVar7;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wfilebuf::" identifier : : identifier : :) (function_declarator "xsgetn(wfilebuf *this,wchar_t *param_1,int param_2)" identifier (parameter_list "(wfilebuf *this,wchar_t *param_1,int param_2)" ( (parameter_declaration "wfilebuf *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "wchar_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  undefined4 uVar4;\n  char cVar5;\n  wchar_t *pwVar6;\n  int iVar7;\n  wchar_t *pwVar8;\n  size_t __n;\n  int iVar9;\n  uint local_24;\n  \n  if (this[0x74] == (wfilebuf)0x0) {\n    if (this[0x66] == (wfilebuf)0x0) {\n      local_24 = *(uint *)(this + 0x40);\n      iVar9 = 0;\n    }\n    else {\n      iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff);\n      if (iVar9 == -1) {\n        return 0;\n      }\n      local_24 = *(uint *)(this + 0x40);\n      *(undefined4 *)(this + 0x14) = 0;\n      iVar9 = 0;\n      *(undefined4 *)(this + 0x10) = 0;\n      uVar4 = *(undefined4 *)(this + 0x5c);\n      *(undefined4 *)(this + 0x18) = 0;\n      *(undefined4 *)(this + 4) = uVar4;\n      *(undefined4 *)(this + 8) = uVar4;\n      *(undefined4 *)(this + 0xc) = uVar4;\n      this[0x66] = (wfilebuf)0x0;\n    }\n  }\n  else {\n    pwVar1 = *(wchar_t **)(this + 8);\n    pwVar2 = *(wchar_t **)(this + 4);\n    iVar9 = 0;\n    pwVar6 = pwVar1;\n    pwVar8 = param_1;\n    if ((0 < param_2) && (pwVar1 == pwVar2)) {\n      pwVar8 = param_1 + 1;\n      pwVar6 = pwVar1 + 1;\n      param_2 = param_2 + -1;\n      *param_1 = *pwVar1;\n      *(wchar_t **)(this + 8) = pwVar6;\n      if (this[0x74] == (wfilebuf)0x0) {\n        local_24 = *(uint *)(this + 0x40);\n        iVar9 = 1;\n        param_1 = pwVar8;\n        goto LAB_0022943f;\n      }\n      iVar9 = 1;\n    }\n    this[0x74] = (wfilebuf)0x0;\n    iVar7 = *(int *)(this + 0x6c) + (uint)(pwVar2 != pwVar6) * 4;\n    *(int *)(this + 0x6c) = iVar7;\n    *(int *)(this + 8) = iVar7;\n    *(undefined4 *)(this + 4) = *(undefined4 *)(this + 0x5c);\n    *(undefined4 *)(this + 0xc) = *(undefined4 *)(this + 0x70);\n    local_24 = *(uint *)(this + 0x40);\n    param_1 = pwVar8;\n  }\nLAB_0022943f:\n  iVar7 = 2;\n  if (1 < *(uint *)(this + 0x60)) {\n    iVar7 = *(int *)(this + 0x60);\n  }\n  if (iVar7 + -1 < param_2) {\n    piVar3 = *(int **)(this + 0x78);\n    if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __throw_bad_cast();\n    }\n    cVar5 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar5 != '\0')) {\n      pwVar8 = *(wchar_t **)(this + 8);\n      if (pwVar8 != *(wchar_t **)(this + 0xc)) {\n        iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;\n        __n = iVar7 >> 2;\n        wmemcpy(param_1,pwVar8,__n);\n        *(int *)(this + 8) = *(int *)(this + 8) + iVar7;\n        param_1 = (wchar_t *)((int)param_1 + iVar7);\n        iVar9 = iVar9 + __n;\n        param_2 = param_2 - __n;\n      }\n      while( true ) {\n        iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);\n        if (iVar7 == -1) {\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar7 == 0) break;\n        iVar9 = iVar9 + iVar7;\n        param_2 = param_2 - iVar7;\n        if (param_2 == 0) goto LAB_002295cb;\n        param_1 = param_1 + iVar7;\n      }\n      if (param_2 != 0) {\n        uVar4 = *(undefined4 *)(this + 0x5c);\n        *(undefined4 *)(this + 0x14) = 0;\n        *(undefined4 *)(this + 0x10) = 0;\n        *(undefined4 *)(this + 4) = uVar4;\n        *(undefined4 *)(this + 8) = uVar4;\n        *(undefined4 *)(this + 0xc) = uVar4;\n        *(undefined4 *)(this + 0x18) = 0;\n        this[0x65] = (wfilebuf)0x0;\n        return iVar9;\n      }\nLAB_002295cb:\n      this[0x65] = (wfilebuf)0x1;\n      return iVar9;\n    }\n  }\n  iVar7 = wstreambuf::xsgetn((wstreambuf *)this,param_1,param_2);\n  return iVar9 + iVar7;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "char cVar5;" primitive_type identifier ;) (declaration "wchar_t *pwVar6;" type_identifier (pointer_declarator "*pwVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "wchar_t *pwVar8;" type_identifier (pointer_declarator "*pwVar8" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "uint local_24;" type_identifier identifier ;) (if_statement "if (this[0x74] == (wfilebuf)0x0) {\n    if (this[0x66] == (wfilebuf)0x0) {\n      local_24 = *(uint *)(this + 0x40);\n      iVar9 = 0;\n    }\n    else {\n      iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff);\n      if (iVar9 == -1) {\n        return 0;\n      }\n      local_24 = *(uint *)(this + 0x40);\n      *(undefined4 *)(this + 0x14) = 0;\n      iVar9 = 0;\n      *(undefined4 *)(this + 0x10) = 0;\n      uVar4 = *(undefined4 *)(this + 0x5c);\n      *(undefined4 *)(this + 0x18) = 0;\n      *(undefined4 *)(this + 4) = uVar4;\n      *(undefined4 *)(this + 8) = uVar4;\n      *(undefined4 *)(this + 0xc) = uVar4;\n      this[0x66] = (wfilebuf)0x0;\n    }\n  }\n  else {\n    pwVar1 = *(wchar_t **)(this + 8);\n    pwVar2 = *(wchar_t **)(this + 4);\n    iVar9 = 0;\n    pwVar6 = pwVar1;\n    pwVar8 = param_1;\n    if ((0 < param_2) && (pwVar1 == pwVar2)) {\n      pwVar8 = param_1 + 1;\n      pwVar6 = pwVar1 + 1;\n      param_2 = param_2 + -1;\n      *param_1 = *pwVar1;\n      *(wchar_t **)(this + 8) = pwVar6;\n      if (this[0x74] == (wfilebuf)0x0) {\n        local_24 = *(uint *)(this + 0x40);\n        iVar9 = 1;\n        param_1 = pwVar8;\n        goto LAB_0022943f;\n      }\n      iVar9 = 1;\n    }\n    this[0x74] = (wfilebuf)0x0;\n    iVar7 = *(int *)(this + 0x6c) + (uint)(pwVar2 != pwVar6) * 4;\n    *(int *)(this + 0x6c) = iVar7;\n    *(int *)(this + 8) = iVar7;\n    *(undefined4 *)(this + 4) = *(undefined4 *)(this + 0x5c);\n    *(undefined4 *)(this + 0xc) = *(undefined4 *)(this + 0x70);\n    local_24 = *(uint *)(this + 0x40);\n    param_1 = pwVar8;\n  }" if (parenthesized_expression "(this[0x74] == (wfilebuf)0x0)" ( (binary_expression "this[0x74] == (wfilebuf)0x0" (subscript_expression "this[0x74]" identifier [ number_literal ]) == (cast_expression "(wfilebuf)0x0" ( (type_descriptor "wfilebuf" type_identifier) ) number_literal)) )) (compound_statement "{\n    if (this[0x66] == (wfilebuf)0x0) {\n      local_24 = *(uint *)(this + 0x40);\n      iVar9 = 0;\n    }\n    else {\n      iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff);\n      if (iVar9 == -1) {\n        return 0;\n      }\n      local_24 = *(uint *)(this + 0x40);\n      *(undefined4 *)(this + 0x14) = 0;\n      iVar9 = 0;\n      *(undefined4 *)(this + 0x10) = 0;\n      uVar4 = *(undefined4 *)(this + 0x5c);\n      *(undefined4 *)(this + 0x18) = 0;\n      *(undefined4 *)(this + 4) = uVar4;\n      *(undefined4 *)(this + 8) = uVar4;\n      *(undefined4 *)(this + 0xc) = uVar4;\n      this[0x66] = (wfilebuf)0x0;\n    }\n  }" { (if_statement "if (this[0x66] == (wfilebuf)0x0) {\n      local_24 = *(uint *)(this + 0x40);\n      iVar9 = 0;\n    }\n    else {\n      iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff);\n      if (iVar9 == -1) {\n        return 0;\n      }\n      local_24 = *(uint *)(this + 0x40);\n      *(undefined4 *)(this + 0x14) = 0;\n      iVar9 = 0;\n      *(undefined4 *)(this + 0x10) = 0;\n      uVar4 = *(undefined4 *)(this + 0x5c);\n      *(undefined4 *)(this + 0x18) = 0;\n      *(undefined4 *)(this + 4) = uVar4;\n      *(undefined4 *)(this + 8) = uVar4;\n      *(undefined4 *)(this + 0xc) = uVar4;\n      this[0x66] = (wfilebuf)0x0;\n    }" if (parenthesized_expression "(this[0x66] == (wfilebuf)0x0)" ( (binary_expression "this[0x66] == (wfilebuf)0x0" (subscript_expression "this[0x66]" identifier [ number_literal ]) == (cast_expression "(wfilebuf)0x0" ( (type_descriptor "wfilebuf" type_identifier) ) number_literal)) )) (compound_statement "{\n      local_24 = *(uint *)(this + 0x40);\n      iVar9 = 0;\n    }" { (expression_statement "local_24 = *(uint *)(this + 0x40);" (assignment_expression "local_24 = *(uint *)(this + 0x40)" identifier = (pointer_expression "*(uint *)(this + 0x40)" * (cast_expression "(uint *)(this + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) ))))) ;) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff);\n      if (iVar9 == -1) {\n        return 0;\n      }\n      local_24 = *(uint *)(this + 0x40);\n      *(undefined4 *)(this + 0x14) = 0;\n      iVar9 = 0;\n      *(undefined4 *)(this + 0x10) = 0;\n      uVar4 = *(undefined4 *)(this + 0x5c);\n      *(undefined4 *)(this + 0x18) = 0;\n      *(undefined4 *)(this + 4) = uVar4;\n      *(undefined4 *)(this + 8) = uVar4;\n      *(undefined4 *)(this + 0xc) = uVar4;\n      this[0x66] = (wfilebuf)0x0;\n    }" else (compound_statement "{\n      iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff);\n      if (iVar9 == -1) {\n        return 0;\n      }\n      local_24 = *(uint *)(this + 0x40);\n      *(undefined4 *)(this + 0x14) = 0;\n      iVar9 = 0;\n      *(undefined4 *)(this + 0x10) = 0;\n      uVar4 = *(undefined4 *)(this + 0x5c);\n      *(undefined4 *)(this + 0x18) = 0;\n      *(undefined4 *)(this + 4) = uVar4;\n      *(undefined4 *)(this + 8) = uVar4;\n      *(undefined4 *)(this + 0xc) = uVar4;\n      this[0x66] = (wfilebuf)0x0;\n    }" { (expression_statement "iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff);" (assignment_expression "iVar9 = (**(code **)(*(int *)this + 0x34))(this,0xffffffff)" identifier = (call_expression "(**(code **)(*(int *)this + 0x34))(this,0xffffffff)" (parenthesized_expression "(**(code **)(*(int *)this + 0x34))" ( (pointer_expression "**(code **)(*(int *)this + 0x34)" * (pointer_expression "*(code **)(*(int *)this + 0x34)" * (cast_expression "(code **)(*(int *)this + 0x34)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)this + 0x34)" ( (binary_expression "*(int *)this + 0x34" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (argument_list "(this,0xffffffff)" ( identifier , number_literal )))) ;) (if_statement "if (iVar9 == -1) {\n        return 0;\n      }" if (parenthesized_expression "(iVar9 == -1)" ( (binary_expression "iVar9 == -1" identifier == number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "local_24 = *(uint *)(this + 0x40);" (assignment_expression "local_24 = *(uint *)(this + 0x40)" identifier = (pointer_expression "*(uint *)(this + 0x40)" * (cast_expression "(uint *)(this + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x14) = 0;" (assignment_expression "*(undefined4 *)(this + 0x14) = 0" (pointer_expression "*(undefined4 *)(this + 0x14)" * (cast_expression "(undefined4 *)(this + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x10) = 0;" (assignment_expression "*(undefined4 *)(this + 0x10) = 0" (pointer_expression "*(undefined4 *)(this + 0x10)" * (cast_expression "(undefined4 *)(this + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar4 = *(undefined4 *)(this + 0x5c);" (assignment_expression "uVar4 = *(undefined4 *)(this + 0x5c)" identifier = (pointer_expression "*(undefined4 *)(this + 0x5c)" * (cast_expression "(undefined4 *)(this + 0x5c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x5c)" ( (binary_expression "this + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x18) = 0;" (assignment_expression "*(undefined4 *)(this + 0x18) = 0" (pointer_expression "*(undefined4 *)(this + 0x18)" * (cast_expression "(undefined4 *)(this + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 4) = uVar4;" (assignment_expression "*(undefined4 *)(this + 4) = uVar4" (pointer_expression "*(undefined4 *)(this + 4)" * (cast_expression "(undefined4 *)(this + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 8) = uVar4;" (assignment_expression "*(undefined4 *)(this + 8) = uVar4" (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 0xc) = uVar4;" (assignment_expression "*(undefined4 *)(this + 0xc) = uVar4" (pointer_expression "*(undefined4 *)(this + 0xc)" * (cast_expression "(undefined4 *)(this + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "this[0x66] = (wfilebuf)0x0;" (assignment_expression "this[0x66] = (wfilebuf)0x0" (subscript_expression "this[0x66]" identifier [ number_literal ]) = (cast_expression "(wfilebuf)0x0" ( (type_descriptor "wfilebuf" type_identifier) ) number_literal)) ;) }))) }) (else_clause "else {\n    pwVar1 = *(wchar_t **)(this + 8);\n    pwVar2 = *(wchar_t **)(this + 4);\n    iVar9 = 0;\n    pwVar6 = pwVar1;\n    pwVar8 = param_1;\n    if ((0 < param_2) && (pwVar1 == pwVar2)) {\n      pwVar8 = param_1 + 1;\n      pwVar6 = pwVar1 + 1;\n      param_2 = param_2 + -1;\n      *param_1 = *pwVar1;\n      *(wchar_t **)(this + 8) = pwVar6;\n      if (this[0x74] == (wfilebuf)0x0) {\n        local_24 = *(uint *)(this + 0x40);\n        iVar9 = 1;\n        param_1 = pwVar8;\n        goto LAB_0022943f;\n      }\n      iVar9 = 1;\n    }\n    this[0x74] = (wfilebuf)0x0;\n    iVar7 = *(int *)(this + 0x6c) + (uint)(pwVar2 != pwVar6) * 4;\n    *(int *)(this + 0x6c) = iVar7;\n    *(int *)(this + 8) = iVar7;\n    *(undefined4 *)(this + 4) = *(undefined4 *)(this + 0x5c);\n    *(undefined4 *)(this + 0xc) = *(undefined4 *)(this + 0x70);\n    local_24 = *(uint *)(this + 0x40);\n    param_1 = pwVar8;\n  }" else (compound_statement "{\n    pwVar1 = *(wchar_t **)(this + 8);\n    pwVar2 = *(wchar_t **)(this + 4);\n    iVar9 = 0;\n    pwVar6 = pwVar1;\n    pwVar8 = param_1;\n    if ((0 < param_2) && (pwVar1 == pwVar2)) {\n      pwVar8 = param_1 + 1;\n      pwVar6 = pwVar1 + 1;\n      param_2 = param_2 + -1;\n      *param_1 = *pwVar1;\n      *(wchar_t **)(this + 8) = pwVar6;\n      if (this[0x74] == (wfilebuf)0x0) {\n        local_24 = *(uint *)(this + 0x40);\n        iVar9 = 1;\n        param_1 = pwVar8;\n        goto LAB_0022943f;\n      }\n      iVar9 = 1;\n    }\n    this[0x74] = (wfilebuf)0x0;\n    iVar7 = *(int *)(this + 0x6c) + (uint)(pwVar2 != pwVar6) * 4;\n    *(int *)(this + 0x6c) = iVar7;\n    *(int *)(this + 8) = iVar7;\n    *(undefined4 *)(this + 4) = *(undefined4 *)(this + 0x5c);\n    *(undefined4 *)(this + 0xc) = *(undefined4 *)(this + 0x70);\n    local_24 = *(uint *)(this + 0x40);\n    param_1 = pwVar8;\n  }" { (expression_statement "pwVar1 = *(wchar_t **)(this + 8);" (assignment_expression "pwVar1 = *(wchar_t **)(this + 8)" identifier = (pointer_expression "*(wchar_t **)(this + 8)" * (cast_expression "(wchar_t **)(this + 8)" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) (expression_statement "pwVar2 = *(wchar_t **)(this + 4);" (assignment_expression "pwVar2 = *(wchar_t **)(this + 4)" identifier = (pointer_expression "*(wchar_t **)(this + 4)" * (cast_expression "(wchar_t **)(this + 4)" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (expression_statement "pwVar6 = pwVar1;" (assignment_expression "pwVar6 = pwVar1" identifier = identifier) ;) (expression_statement "pwVar8 = param_1;" (assignment_expression "pwVar8 = param_1" identifier = identifier) ;) (if_statement "if ((0 < param_2) && (pwVar1 == pwVar2)) {\n      pwVar8 = param_1 + 1;\n      pwVar6 = pwVar1 + 1;\n      param_2 = param_2 + -1;\n      *param_1 = *pwVar1;\n      *(wchar_t **)(this + 8) = pwVar6;\n      if (this[0x74] == (wfilebuf)0x0) {\n        local_24 = *(uint *)(this + 0x40);\n        iVar9 = 1;\n        param_1 = pwVar8;\n        goto LAB_0022943f;\n      }\n      iVar9 = 1;\n    }" if (parenthesized_expression "((0 < param_2) && (pwVar1 == pwVar2))" ( (binary_expression "(0 < param_2) && (pwVar1 == pwVar2)" (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) && (parenthesized_expression "(pwVar1 == pwVar2)" ( (binary_expression "pwVar1 == pwVar2" identifier == identifier) ))) )) (compound_statement "{\n      pwVar8 = param_1 + 1;\n      pwVar6 = pwVar1 + 1;\n      param_2 = param_2 + -1;\n      *param_1 = *pwVar1;\n      *(wchar_t **)(this + 8) = pwVar6;\n      if (this[0x74] == (wfilebuf)0x0) {\n        local_24 = *(uint *)(this + 0x40);\n        iVar9 = 1;\n        param_1 = pwVar8;\n        goto LAB_0022943f;\n      }\n      iVar9 = 1;\n    }" { (expression_statement "pwVar8 = param_1 + 1;" (assignment_expression "pwVar8 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "pwVar6 = pwVar1 + 1;" (assignment_expression "pwVar6 = pwVar1 + 1" identifier = (binary_expression "pwVar1 + 1" identifier + number_literal)) ;) (expression_statement "param_2 = param_2 + -1;" (assignment_expression "param_2 = param_2 + -1" identifier = (binary_expression "param_2 + -1" identifier + number_literal)) ;) (expression_statement "*param_1 = *pwVar1;" (assignment_expression "*param_1 = *pwVar1" (pointer_expression "*param_1" * identifier) = (pointer_expression "*pwVar1" * identifier)) ;) (expression_statement "*(wchar_t **)(this + 8) = pwVar6;" (assignment_expression "*(wchar_t **)(this + 8) = pwVar6" (pointer_expression "*(wchar_t **)(this + 8)" * (cast_expression "(wchar_t **)(this + 8)" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (if_statement "if (this[0x74] == (wfilebuf)0x0) {\n        local_24 = *(uint *)(this + 0x40);\n        iVar9 = 1;\n        param_1 = pwVar8;\n        goto LAB_0022943f;\n      }" if (parenthesized_expression "(this[0x74] == (wfilebuf)0x0)" ( (binary_expression "this[0x74] == (wfilebuf)0x0" (subscript_expression "this[0x74]" identifier [ number_literal ]) == (cast_expression "(wfilebuf)0x0" ( (type_descriptor "wfilebuf" type_identifier) ) number_literal)) )) (compound_statement "{\n        local_24 = *(uint *)(this + 0x40);\n        iVar9 = 1;\n        param_1 = pwVar8;\n        goto LAB_0022943f;\n      }" { (expression_statement "local_24 = *(uint *)(this + 0x40);" (assignment_expression "local_24 = *(uint *)(this + 0x40)" identifier = (pointer_expression "*(uint *)(this + 0x40)" * (cast_expression "(uint *)(this + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) ))))) ;) (expression_statement "iVar9 = 1;" (assignment_expression "iVar9 = 1" identifier = number_literal) ;) (expression_statement "param_1 = pwVar8;" (assignment_expression "param_1 = pwVar8" identifier = identifier) ;) (goto_statement "goto LAB_0022943f;" goto statement_identifier ;) })) (expression_statement "iVar9 = 1;" (assignment_expression "iVar9 = 1" identifier = number_literal) ;) })) (expression_statement "this[0x74] = (wfilebuf)0x0;" (assignment_expression "this[0x74] = (wfilebuf)0x0" (subscript_expression "this[0x74]" identifier [ number_literal ]) = (cast_expression "(wfilebuf)0x0" ( (type_descriptor "wfilebuf" type_identifier) ) number_literal)) ;) (expression_statement "iVar7 = *(int *)(this + 0x6c) + (uint)(pwVar2 != pwVar6) * 4;" (assignment_expression "iVar7 = *(int *)(this + 0x6c) + (uint)(pwVar2 != pwVar6) * 4" identifier = (binary_expression "*(int *)(this + 0x6c) + (uint)(pwVar2 != pwVar6) * 4" (pointer_expression "*(int *)(this + 0x6c)" * (cast_expression "(int *)(this + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x6c)" ( (binary_expression "this + 0x6c" identifier + number_literal) )))) + (binary_expression "(uint)(pwVar2 != pwVar6) * 4" (call_expression "(uint)(pwVar2 != pwVar6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pwVar2 != pwVar6)" ( (binary_expression "pwVar2 != pwVar6" identifier != identifier) ))) * number_literal))) ;) (expression_statement "*(int *)(this + 0x6c) = iVar7;" (assignment_expression "*(int *)(this + 0x6c) = iVar7" (pointer_expression "*(int *)(this + 0x6c)" * (cast_expression "(int *)(this + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x6c)" ( (binary_expression "this + 0x6c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(this + 8) = iVar7;" (assignment_expression "*(int *)(this + 8) = iVar7" (pointer_expression "*(int *)(this + 8)" * (cast_expression "(int *)(this + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 4) = *(undefined4 *)(this + 0x5c);" (assignment_expression "*(undefined4 *)(this + 4) = *(undefined4 *)(this + 0x5c)" (pointer_expression "*(undefined4 *)(this + 4)" * (cast_expression "(undefined4 *)(this + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x5c)" * (cast_expression "(undefined4 *)(this + 0x5c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x5c)" ( (binary_expression "this + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0xc) = *(undefined4 *)(this + 0x70);" (assignment_expression "*(undefined4 *)(this + 0xc) = *(undefined4 *)(this + 0x70)" (pointer_expression "*(undefined4 *)(this + 0xc)" * (cast_expression "(undefined4 *)(this + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(this + 0x70)" * (cast_expression "(undefined4 *)(this + 0x70)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x70)" ( (binary_expression "this + 0x70" identifier + number_literal) ))))) ;) (expression_statement "local_24 = *(uint *)(this + 0x40);" (assignment_expression "local_24 = *(uint *)(this + 0x40)" identifier = (pointer_expression "*(uint *)(this + 0x40)" * (cast_expression "(uint *)(this + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) ))))) ;) (expression_statement "param_1 = pwVar8;" (assignment_expression "param_1 = pwVar8" identifier = identifier) ;) }))) (labeled_statement "LAB_0022943f:\n  iVar7 = 2;" statement_identifier : (expression_statement "iVar7 = 2;" (assignment_expression "iVar7 = 2" identifier = number_literal) ;)) (if_statement "if (1 < *(uint *)(this + 0x60)) {\n    iVar7 = *(int *)(this + 0x60);\n  }" if (parenthesized_expression "(1 < *(uint *)(this + 0x60))" ( (binary_expression "1 < *(uint *)(this + 0x60)" number_literal < (pointer_expression "*(uint *)(this + 0x60)" * (cast_expression "(uint *)(this + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x60)" ( (binary_expression "this + 0x60" identifier + number_literal) ))))) )) (compound_statement "{\n    iVar7 = *(int *)(this + 0x60);\n  }" { (expression_statement "iVar7 = *(int *)(this + 0x60);" (assignment_expression "iVar7 = *(int *)(this + 0x60)" identifier = (pointer_expression "*(int *)(this + 0x60)" * (cast_expression "(int *)(this + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x60)" ( (binary_expression "this + 0x60" identifier + number_literal) ))))) ;) })) (if_statement "if (iVar7 + -1 < param_2) {\n    piVar3 = *(int **)(this + 0x78);\n    if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __throw_bad_cast();\n    }\n    cVar5 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar5 != '\0')) {\n      pwVar8 = *(wchar_t **)(this + 8);\n      if (pwVar8 != *(wchar_t **)(this + 0xc)) {\n        iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;\n        __n = iVar7 >> 2;\n        wmemcpy(param_1,pwVar8,__n);\n        *(int *)(this + 8) = *(int *)(this + 8) + iVar7;\n        param_1 = (wchar_t *)((int)param_1 + iVar7);\n        iVar9 = iVar9 + __n;\n        param_2 = param_2 - __n;\n      }\n      while( true ) {\n        iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);\n        if (iVar7 == -1) {\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar7 == 0) break;\n        iVar9 = iVar9 + iVar7;\n        param_2 = param_2 - iVar7;\n        if (param_2 == 0) goto LAB_002295cb;\n        param_1 = param_1 + iVar7;\n      }\n      if (param_2 != 0) {\n        uVar4 = *(undefined4 *)(this + 0x5c);\n        *(undefined4 *)(this + 0x14) = 0;\n        *(undefined4 *)(this + 0x10) = 0;\n        *(undefined4 *)(this + 4) = uVar4;\n        *(undefined4 *)(this + 8) = uVar4;\n        *(undefined4 *)(this + 0xc) = uVar4;\n        *(undefined4 *)(this + 0x18) = 0;\n        this[0x65] = (wfilebuf)0x0;\n        return iVar9;\n      }\nLAB_002295cb:\n      this[0x65] = (wfilebuf)0x1;\n      return iVar9;\n    }\n  }" if (parenthesized_expression "(iVar7 + -1 < param_2)" ( (binary_expression "iVar7 + -1 < param_2" (binary_expression "iVar7 + -1" identifier + number_literal) < identifier) )) (compound_statement "{\n    piVar3 = *(int **)(this + 0x78);\n    if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __throw_bad_cast();\n    }\n    cVar5 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar5 != '\0')) {\n      pwVar8 = *(wchar_t **)(this + 8);\n      if (pwVar8 != *(wchar_t **)(this + 0xc)) {\n        iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;\n        __n = iVar7 >> 2;\n        wmemcpy(param_1,pwVar8,__n);\n        *(int *)(this + 8) = *(int *)(this + 8) + iVar7;\n        param_1 = (wchar_t *)((int)param_1 + iVar7);\n        iVar9 = iVar9 + __n;\n        param_2 = param_2 - __n;\n      }\n      while( true ) {\n        iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);\n        if (iVar7 == -1) {\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar7 == 0) break;\n        iVar9 = iVar9 + iVar7;\n        param_2 = param_2 - iVar7;\n        if (param_2 == 0) goto LAB_002295cb;\n        param_1 = param_1 + iVar7;\n      }\n      if (param_2 != 0) {\n        uVar4 = *(undefined4 *)(this + 0x5c);\n        *(undefined4 *)(this + 0x14) = 0;\n        *(undefined4 *)(this + 0x10) = 0;\n        *(undefined4 *)(this + 4) = uVar4;\n        *(undefined4 *)(this + 8) = uVar4;\n        *(undefined4 *)(this + 0xc) = uVar4;\n        *(undefined4 *)(this + 0x18) = 0;\n        this[0x65] = (wfilebuf)0x0;\n        return iVar9;\n      }\nLAB_002295cb:\n      this[0x65] = (wfilebuf)0x1;\n      return iVar9;\n    }\n  }" { (expression_statement "piVar3 = *(int **)(this + 0x78);" (assignment_expression "piVar3 = *(int **)(this + 0x78)" identifier = (pointer_expression "*(int **)(this + 0x78)" * (cast_expression "(int **)(this + 0x78)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x78)" ( (binary_expression "this + 0x78" identifier + number_literal) ))))) ;) (if_statement "if (piVar3 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __throw_bad_cast();\n    }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __throw_bad_cast();\n    }" { comment (expression_statement "__throw_bad_cast();" (call_expression "__throw_bad_cast()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "cVar5 = (**(code **)(*piVar3 + 0x18))(piVar3);" (assignment_expression "cVar5 = (**(code **)(*piVar3 + 0x18))(piVar3)" identifier = (call_expression "(**(code **)(*piVar3 + 0x18))(piVar3)" (parenthesized_expression "(**(code **)(*piVar3 + 0x18))" ( (pointer_expression "**(code **)(*piVar3 + 0x18)" * (pointer_expression "*(code **)(*piVar3 + 0x18)" * (cast_expression "(code **)(*piVar3 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 0x18)" ( (binary_expression "*piVar3 + 0x18" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3)" ( identifier )))) ;) (if_statement "if (((local_24 & 8) != 0) && (cVar5 != '\0')) {\n      pwVar8 = *(wchar_t **)(this + 8);\n      if (pwVar8 != *(wchar_t **)(this + 0xc)) {\n        iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;\n        __n = iVar7 >> 2;\n        wmemcpy(param_1,pwVar8,__n);\n        *(int *)(this + 8) = *(int *)(this + 8) + iVar7;\n        param_1 = (wchar_t *)((int)param_1 + iVar7);\n        iVar9 = iVar9 + __n;\n        param_2 = param_2 - __n;\n      }\n      while( true ) {\n        iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);\n        if (iVar7 == -1) {\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar7 == 0) break;\n        iVar9 = iVar9 + iVar7;\n        param_2 = param_2 - iVar7;\n        if (param_2 == 0) goto LAB_002295cb;\n        param_1 = param_1 + iVar7;\n      }\n      if (param_2 != 0) {\n        uVar4 = *(undefined4 *)(this + 0x5c);\n        *(undefined4 *)(this + 0x14) = 0;\n        *(undefined4 *)(this + 0x10) = 0;\n        *(undefined4 *)(this + 4) = uVar4;\n        *(undefined4 *)(this + 8) = uVar4;\n        *(undefined4 *)(this + 0xc) = uVar4;\n        *(undefined4 *)(this + 0x18) = 0;\n        this[0x65] = (wfilebuf)0x0;\n        return iVar9;\n      }\nLAB_002295cb:\n      this[0x65] = (wfilebuf)0x1;\n      return iVar9;\n    }" if (parenthesized_expression "(((local_24 & 8) != 0) && (cVar5 != '\0'))" ( (binary_expression "((local_24 & 8) != 0) && (cVar5 != '\0')" (parenthesized_expression "((local_24 & 8) != 0)" ( (binary_expression "(local_24 & 8) != 0" (parenthesized_expression "(local_24 & 8)" ( (binary_expression "local_24 & 8" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      pwVar8 = *(wchar_t **)(this + 8);\n      if (pwVar8 != *(wchar_t **)(this + 0xc)) {\n        iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;\n        __n = iVar7 >> 2;\n        wmemcpy(param_1,pwVar8,__n);\n        *(int *)(this + 8) = *(int *)(this + 8) + iVar7;\n        param_1 = (wchar_t *)((int)param_1 + iVar7);\n        iVar9 = iVar9 + __n;\n        param_2 = param_2 - __n;\n      }\n      while( true ) {\n        iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);\n        if (iVar7 == -1) {\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar7 == 0) break;\n        iVar9 = iVar9 + iVar7;\n        param_2 = param_2 - iVar7;\n        if (param_2 == 0) goto LAB_002295cb;\n        param_1 = param_1 + iVar7;\n      }\n      if (param_2 != 0) {\n        uVar4 = *(undefined4 *)(this + 0x5c);\n        *(undefined4 *)(this + 0x14) = 0;\n        *(undefined4 *)(this + 0x10) = 0;\n        *(undefined4 *)(this + 4) = uVar4;\n        *(undefined4 *)(this + 8) = uVar4;\n        *(undefined4 *)(this + 0xc) = uVar4;\n        *(undefined4 *)(this + 0x18) = 0;\n        this[0x65] = (wfilebuf)0x0;\n        return iVar9;\n      }\nLAB_002295cb:\n      this[0x65] = (wfilebuf)0x1;\n      return iVar9;\n    }" { (expression_statement "pwVar8 = *(wchar_t **)(this + 8);" (assignment_expression "pwVar8 = *(wchar_t **)(this + 8)" identifier = (pointer_expression "*(wchar_t **)(this + 8)" * (cast_expression "(wchar_t **)(this + 8)" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) (if_statement "if (pwVar8 != *(wchar_t **)(this + 0xc)) {\n        iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;\n        __n = iVar7 >> 2;\n        wmemcpy(param_1,pwVar8,__n);\n        *(int *)(this + 8) = *(int *)(this + 8) + iVar7;\n        param_1 = (wchar_t *)((int)param_1 + iVar7);\n        iVar9 = iVar9 + __n;\n        param_2 = param_2 - __n;\n      }" if (parenthesized_expression "(pwVar8 != *(wchar_t **)(this + 0xc))" ( (binary_expression "pwVar8 != *(wchar_t **)(this + 0xc)" identifier != (pointer_expression "*(wchar_t **)(this + 0xc)" * (cast_expression "(wchar_t **)(this + 0xc)" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) ))))) )) (compound_statement "{\n        iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;\n        __n = iVar7 >> 2;\n        wmemcpy(param_1,pwVar8,__n);\n        *(int *)(this + 8) = *(int *)(this + 8) + iVar7;\n        param_1 = (wchar_t *)((int)param_1 + iVar7);\n        iVar9 = iVar9 + __n;\n        param_2 = param_2 - __n;\n      }" { (expression_statement "iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8;" (assignment_expression "iVar7 = (int)*(wchar_t **)(this + 0xc) - (int)pwVar8" identifier = (binary_expression "(int)*(wchar_t **)(this + 0xc) - (int)pwVar8" (cast_expression "(int)*(wchar_t **)(this + 0xc)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(wchar_t **)(this + 0xc)" * (cast_expression "(wchar_t **)(this + 0xc)" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) ))))) - (cast_expression "(int)pwVar8" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "__n = iVar7 >> 2;" (assignment_expression "__n = iVar7 >> 2" identifier = (binary_expression "iVar7 >> 2" identifier >> number_literal)) ;) (expression_statement "wmemcpy(param_1,pwVar8,__n);" (call_expression "wmemcpy(param_1,pwVar8,__n)" identifier (argument_list "(param_1,pwVar8,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(int *)(this + 8) = *(int *)(this + 8) + iVar7;" (assignment_expression "*(int *)(this + 8) = *(int *)(this + 8) + iVar7" (pointer_expression "*(int *)(this + 8)" * (cast_expression "(int *)(this + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (binary_expression "*(int *)(this + 8) + iVar7" (pointer_expression "*(int *)(this + 8)" * (cast_expression "(int *)(this + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) + identifier)) ;) (expression_statement "param_1 = (wchar_t *)((int)param_1 + iVar7);" (assignment_expression "param_1 = (wchar_t *)((int)param_1 + iVar7)" identifier = (cast_expression "(wchar_t *)((int)param_1 + iVar7)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + iVar7)" ( (binary_expression "(int)param_1 + iVar7" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "iVar9 = iVar9 + __n;" (assignment_expression "iVar9 = iVar9 + __n" identifier = (binary_expression "iVar9 + __n" identifier + identifier)) ;) (expression_statement "param_2 = param_2 - __n;" (assignment_expression "param_2 = param_2 - __n" identifier = (binary_expression "param_2 - __n" identifier - identifier)) ;) })) (while_statement "while( true ) {\n        iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);\n        if (iVar7 == -1) {\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar7 == 0) break;\n        iVar9 = iVar9 + iVar7;\n        param_2 = param_2 - iVar7;\n        if (param_2 == 0) goto LAB_002295cb;\n        param_1 = param_1 + iVar7;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);\n        if (iVar7 == -1) {\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar7 == 0) break;\n        iVar9 = iVar9 + iVar7;\n        param_2 = param_2 - iVar7;\n        if (param_2 == 0) goto LAB_002295cb;\n        param_1 = param_1 + iVar7;\n      }" { (expression_statement "iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2);" (assignment_expression "iVar7 = __basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2)" identifier = (binary_expression "__basic_file<char>::xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2)" (binary_expression "__basic_file<char" identifier < identifier) > (ERROR "::" : :) (call_expression "xsgetn\n                          ((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2)" identifier (argument_list "((__basic_file<char> *)(this + 0x38),(char *)param_1,param_2)" ( (call_expression "(__basic_file<char> *)(this + 0x38)" (parenthesized_expression "(__basic_file<char> *)" ( (binary_expression "__basic_file<char> *" (binary_expression "__basic_file<char" identifier < identifier) > (pointer_expression "*" * identifier)) )) (argument_list "(this + 0x38)" ( (binary_expression "this + 0x38" identifier + number_literal) ))) , (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))))) ;) (if_statement "if (iVar7 == -1) {\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }" if (parenthesized_expression "(iVar7 == -1)" ( (binary_expression "iVar7 == -1" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n          __throw_ios_failure("basic_filebuf::xsgetn error reading the file");\n        }" { comment (expression_statement "__throw_ios_failure("basic_filebuf::xsgetn error reading the file");" (call_expression "__throw_ios_failure("basic_filebuf::xsgetn error reading the file")" identifier (argument_list "("basic_filebuf::xsgetn error reading the file")" ( (string_literal ""basic_filebuf::xsgetn error reading the file"" " string_content ") ))) ;) })) (if_statement "if (iVar7 == 0) break;" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar9 = iVar9 + iVar7;" (assignment_expression "iVar9 = iVar9 + iVar7" identifier = (binary_expression "iVar9 + iVar7" identifier + identifier)) ;) (expression_statement "param_2 = param_2 - iVar7;" (assignment_expression "param_2 = param_2 - iVar7" identifier = (binary_expression "param_2 - iVar7" identifier - identifier)) ;) (if_statement "if (param_2 == 0) goto LAB_002295cb;" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_002295cb;" goto statement_identifier ;)) (expression_statement "param_1 = param_1 + iVar7;" (assignment_expression "param_1 = param_1 + iVar7" identifier = (binary_expression "param_1 + iVar7" identifier + identifier)) ;) })) (if_statement "if (param_2 != 0) {\n        uVar4 = *(undefined4 *)(this + 0x5c);\n        *(undefined4 *)(this + 0x14) = 0;\n        *(undefined4 *)(this + 0x10) = 0;\n        *(undefined4 *)(this + 4) = uVar4;\n        *(undefined4 *)(this + 8) = uVar4;\n        *(undefined4 *)(this + 0xc) = uVar4;\n        *(undefined4 *)(this + 0x18) = 0;\n        this[0x65] = (wfilebuf)0x0;\n        return iVar9;\n      }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar4 = *(undefined4 *)(this + 0x5c);\n        *(undefined4 *)(this + 0x14) = 0;\n        *(undefined4 *)(this + 0x10) = 0;\n        *(undefined4 *)(this + 4) = uVar4;\n        *(undefined4 *)(this + 8) = uVar4;\n        *(undefined4 *)(this + 0xc) = uVar4;\n        *(undefined4 *)(this + 0x18) = 0;\n        this[0x65] = (wfilebuf)0x0;\n        return iVar9;\n      }" { (expression_statement "uVar4 = *(undefined4 *)(this + 0x5c);" (assignment_expression "uVar4 = *(undefined4 *)(this + 0x5c)" identifier = (pointer_expression "*(undefined4 *)(this + 0x5c)" * (cast_expression "(undefined4 *)(this + 0x5c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x5c)" ( (binary_expression "this + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(this + 0x14) = 0;" (assignment_expression "*(undefined4 *)(this + 0x14) = 0" (pointer_expression "*(undefined4 *)(this + 0x14)" * (cast_expression "(undefined4 *)(this + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x10) = 0;" (assignment_expression "*(undefined4 *)(this + 0x10) = 0" (pointer_expression "*(undefined4 *)(this + 0x10)" * (cast_expression "(undefined4 *)(this + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 4) = uVar4;" (assignment_expression "*(undefined4 *)(this + 4) = uVar4" (pointer_expression "*(undefined4 *)(this + 4)" * (cast_expression "(undefined4 *)(this + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 8) = uVar4;" (assignment_expression "*(undefined4 *)(this + 8) = uVar4" (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 0xc) = uVar4;" (assignment_expression "*(undefined4 *)(this + 0xc) = uVar4" (pointer_expression "*(undefined4 *)(this + 0xc)" * (cast_expression "(undefined4 *)(this + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(this + 0x18) = 0;" (assignment_expression "*(undefined4 *)(this + 0x18) = 0" (pointer_expression "*(undefined4 *)(this + 0x18)" * (cast_expression "(undefined4 *)(this + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) = number_literal) ;) (expression_statement "this[0x65] = (wfilebuf)0x0;" (assignment_expression "this[0x65] = (wfilebuf)0x0" (subscript_expression "this[0x65]" identifier [ number_literal ]) = (cast_expression "(wfilebuf)0x0" ( (type_descriptor "wfilebuf" type_identifier) ) number_literal)) ;) (return_statement "return iVar9;" return identifier ;) })) (labeled_statement "LAB_002295cb:\n      this[0x65] = (wfilebuf)0x1;" statement_identifier : (expression_statement "this[0x65] = (wfilebuf)0x1;" (assignment_expression "this[0x65] = (wfilebuf)0x1" (subscript_expression "this[0x65]" identifier [ number_literal ]) = (cast_expression "(wfilebuf)0x1" ( (type_descriptor "wfilebuf" type_identifier) ) number_literal)) ;)) (return_statement "return iVar9;" return identifier ;) })) })) (ERROR "iVar7 = wstreambuf::" (assignment_expression "iVar7 = wstreambuf" identifier = identifier) : :) (expression_statement "xsgetn((wstreambuf *)this,param_1,param_2);" (call_expression "xsgetn((wstreambuf *)this,param_1,param_2)" identifier (argument_list "((wstreambuf *)this,param_1,param_2)" ( (cast_expression "(wstreambuf *)this" ( (type_descriptor "wstreambuf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier ))) ;) (return_statement "return iVar9 + iVar7;" return (binary_expression "iVar9 + iVar7" identifier + identifier) ;) })))
(translation_unit "int FUN_002293d0(int *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  char cVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  wchar_t *pwVar7;\n  size_t __n;\n  int iVar8;\n  uint local_24;\n  \n  if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }\nLAB_0022943f:\n  iVar6 = 2;\n  if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }\n  if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }\n  iVar6 = FUN_00208330(param_1,param_2,param_3);\n  return iVar8 + iVar6;\n}\n\n" (function_definition "int FUN_002293d0(int *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  char cVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  wchar_t *pwVar7;\n  size_t __n;\n  int iVar8;\n  uint local_24;\n  \n  if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }\nLAB_0022943f:\n  iVar6 = 2;\n  if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }\n  if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }\n  iVar6 = FUN_00208330(param_1,param_2,param_3);\n  return iVar8 + iVar6;\n}" primitive_type (function_declarator "FUN_002293d0(int *param_1,wchar_t *param_2,int param_3)" identifier (parameter_list "(int *param_1,wchar_t *param_2,int param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  char cVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  wchar_t *pwVar7;\n  size_t __n;\n  int iVar8;\n  uint local_24;\n  \n  if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }\nLAB_0022943f:\n  iVar6 = 2;\n  if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }\n  if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }\n  iVar6 = FUN_00208330(param_1,param_2,param_3);\n  return iVar8 + iVar6;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "wchar_t *pwVar5;" type_identifier (pointer_declarator "*pwVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "wchar_t *pwVar7;" type_identifier (pointer_declarator "*pwVar7" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "uint local_24;" type_identifier identifier ;) (if_statement "if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }" if (parenthesized_expression "((char)param_1[0x1d] == '\0')" ( (binary_expression "(char)param_1[0x1d] == '\0'" (cast_expression "(char)param_1[0x1d]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_1[0x1d]" identifier [ number_literal ])) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }" { (if_statement "if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }" if (parenthesized_expression "(*(char *)((int)param_1 + 0x66) == '\0')" ( (binary_expression "*(char *)((int)param_1 + 0x66) == '\0'" (pointer_expression "*(char *)((int)param_1 + 0x66)" * (cast_expression "(char *)((int)param_1 + 0x66)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x66)" ( (binary_expression "(int)param_1 + 0x66" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }" { (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }" else (compound_statement "{\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }" { (expression_statement "iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);" (assignment_expression "iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff)" identifier = (call_expression "(**(code **)(*param_1 + 0x34))(param_1,0xffffffff)" (parenthesized_expression "(**(code **)(*param_1 + 0x34))" ( (pointer_expression "**(code **)(*param_1 + 0x34)" * (pointer_expression "*(code **)(*param_1 + 0x34)" * (cast_expression "(code **)(*param_1 + 0x34)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x34)" ( (binary_expression "*param_1 + 0x34" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1,0xffffffff)" ( identifier , number_literal )))) ;) (if_statement "if (iVar6 == -1) {\n        return 0;\n      }" if (parenthesized_expression "(iVar6 == -1)" ( (binary_expression "iVar6 == -1" identifier == number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (expression_statement "param_1[5] = 0;" (assignment_expression "param_1[5] = 0" (subscript_expression "param_1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar6 = param_1[0x17];" (assignment_expression "iVar6 = param_1[0x17]" identifier = (subscript_expression "param_1[0x17]" identifier [ number_literal ])) ;) (expression_statement "param_1[6] = 0;" (assignment_expression "param_1[6] = 0" (subscript_expression "param_1[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[1] = iVar6;" (assignment_expression "param_1[1] = iVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = iVar6;" (assignment_expression "param_1[2] = iVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[3] = iVar6;" (assignment_expression "param_1[3] = iVar6" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined1 *)((int)param_1 + 0x66) = 0;" (assignment_expression "*(undefined1 *)((int)param_1 + 0x66) = 0" (pointer_expression "*(undefined1 *)((int)param_1 + 0x66)" * (cast_expression "(undefined1 *)((int)param_1 + 0x66)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x66)" ( (binary_expression "(int)param_1 + 0x66" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) }))) }) (else_clause "else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }" else (compound_statement "{\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }" { (expression_statement "pwVar1 = (wchar_t *)param_1[2];" (assignment_expression "pwVar1 = (wchar_t *)param_1[2]" identifier = (cast_expression "(wchar_t *)param_1[2]" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (expression_statement "pwVar2 = (wchar_t *)param_1[1];" (assignment_expression "pwVar2 = (wchar_t *)param_1[1]" identifier = (cast_expression "(wchar_t *)param_1[1]" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) ;) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (expression_statement "pwVar5 = pwVar1;" (assignment_expression "pwVar5 = pwVar1" identifier = identifier) ;) (expression_statement "pwVar7 = param_2;" (assignment_expression "pwVar7 = param_2" identifier = identifier) ;) (if_statement "if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }" if (parenthesized_expression "((0 < param_3) && (pwVar1 == pwVar2))" ( (binary_expression "(0 < param_3) && (pwVar1 == pwVar2)" (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) && (parenthesized_expression "(pwVar1 == pwVar2)" ( (binary_expression "pwVar1 == pwVar2" identifier == identifier) ))) )) (compound_statement "{\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }" { (expression_statement "pwVar7 = param_2 + 1;" (assignment_expression "pwVar7 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "pwVar5 = pwVar1 + 1;" (assignment_expression "pwVar5 = pwVar1 + 1" identifier = (binary_expression "pwVar1 + 1" identifier + number_literal)) ;) (expression_statement "param_3 = param_3 + -1;" (assignment_expression "param_3 = param_3 + -1" identifier = (binary_expression "param_3 + -1" identifier + number_literal)) ;) (expression_statement "*param_2 = *pwVar1;" (assignment_expression "*param_2 = *pwVar1" (pointer_expression "*param_2" * identifier) = (pointer_expression "*pwVar1" * identifier)) ;) (expression_statement "param_1[2] = (int)pwVar5;" (assignment_expression "param_1[2] = (int)pwVar5" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)pwVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }" if (parenthesized_expression "((char)param_1[0x1d] == '\0')" ( (binary_expression "(char)param_1[0x1d] == '\0'" (cast_expression "(char)param_1[0x1d]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_1[0x1d]" identifier [ number_literal ])) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }" { (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (expression_statement "iVar8 = 1;" (assignment_expression "iVar8 = 1" identifier = number_literal) ;) (expression_statement "param_2 = pwVar7;" (assignment_expression "param_2 = pwVar7" identifier = identifier) ;) (goto_statement "goto LAB_0022943f;" goto statement_identifier ;) })) (expression_statement "iVar8 = 1;" (assignment_expression "iVar8 = 1" identifier = number_literal) ;) })) (expression_statement "*(undefined1 *)(param_1 + 0x1d) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x1d) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x1d)" * (cast_expression "(undefined1 *)(param_1 + 0x1d)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1d)" ( (binary_expression "param_1 + 0x1d" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;" (assignment_expression "iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4" identifier = (binary_expression "param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4" (subscript_expression "param_1[0x1b]" identifier [ number_literal ]) + (binary_expression "(uint)(pwVar2 != pwVar5) * 4" (call_expression "(uint)(pwVar2 != pwVar5)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pwVar2 != pwVar5)" ( (binary_expression "pwVar2 != pwVar5" identifier != identifier) ))) * number_literal))) ;) (expression_statement "param_1[0x1b] = iVar6;" (assignment_expression "param_1[0x1b] = iVar6" (subscript_expression "param_1[0x1b]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = iVar6;" (assignment_expression "param_1[2] = iVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[1] = param_1[0x17];" (assignment_expression "param_1[1] = param_1[0x17]" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (subscript_expression "param_1[0x17]" identifier [ number_literal ])) ;) (expression_statement "param_1[3] = param_1[0x1c];" (assignment_expression "param_1[3] = param_1[0x1c]" (subscript_expression "param_1[3]" identifier [ number_literal ]) = (subscript_expression "param_1[0x1c]" identifier [ number_literal ])) ;) (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (expression_statement "param_2 = pwVar7;" (assignment_expression "param_2 = pwVar7" identifier = identifier) ;) }))) (labeled_statement "LAB_0022943f:\n  iVar6 = 2;" statement_identifier : (expression_statement "iVar6 = 2;" (assignment_expression "iVar6 = 2" identifier = number_literal) ;)) (if_statement "if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }" if (parenthesized_expression "(1 < (uint)param_1[0x18])" ( (binary_expression "1 < (uint)param_1[0x18]" number_literal < (cast_expression "(uint)param_1[0x18]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[0x18]" identifier [ number_literal ]))) )) (compound_statement "{\n    iVar6 = param_1[0x18];\n  }" { (expression_statement "iVar6 = param_1[0x18];" (assignment_expression "iVar6 = param_1[0x18]" identifier = (subscript_expression "param_1[0x18]" identifier [ number_literal ])) ;) })) (if_statement "if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }" if (parenthesized_expression "(iVar6 + -1 < param_3)" ( (binary_expression "iVar6 + -1 < param_3" (binary_expression "iVar6 + -1" identifier + number_literal) < identifier) )) (compound_statement "{\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }" { (expression_statement "piVar3 = (int *)param_1[0x1e];" (assignment_expression "piVar3 = (int *)param_1[0x1e]" identifier = (cast_expression "(int *)param_1[0x1e]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[0x1e]" identifier [ number_literal ]))) ;) (if_statement "if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n      FUN_002428a0();\n    }" { (expression_statement "FUN_002428a0();" (call_expression "FUN_002428a0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);" (assignment_expression "cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3)" identifier = (call_expression "(**(code **)(*piVar3 + 0x18))(piVar3)" (parenthesized_expression "(**(code **)(*piVar3 + 0x18))" ( (pointer_expression "**(code **)(*piVar3 + 0x18)" * (pointer_expression "*(code **)(*piVar3 + 0x18)" * (cast_expression "(code **)(*piVar3 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 0x18)" ( (binary_expression "*piVar3 + 0x18" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3)" ( identifier )))) ;) (if_statement "if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }" if (parenthesized_expression "(((local_24 & 8) != 0) && (cVar4 != '\0'))" ( (binary_expression "((local_24 & 8) != 0) && (cVar4 != '\0')" (parenthesized_expression "((local_24 & 8) != 0)" ( (binary_expression "(local_24 & 8) != 0" (parenthesized_expression "(local_24 & 8)" ( (binary_expression "local_24 & 8" identifier & number_literal) )) != number_literal) )) && (parenthesized_expression "(cVar4 != '\0')" ( (binary_expression "cVar4 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }" { (expression_statement "pwVar7 = (wchar_t *)param_1[2];" (assignment_expression "pwVar7 = (wchar_t *)param_1[2]" identifier = (cast_expression "(wchar_t *)param_1[2]" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (if_statement "if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }" if (parenthesized_expression "(pwVar7 != (wchar_t *)param_1[3])" ( (binary_expression "pwVar7 != (wchar_t *)param_1[3]" identifier != (cast_expression "(wchar_t *)param_1[3]" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) )) (compound_statement "{\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }" { (expression_statement "iVar6 = param_1[3] - (int)pwVar7;" (assignment_expression "iVar6 = param_1[3] - (int)pwVar7" identifier = (binary_expression "param_1[3] - (int)pwVar7" (subscript_expression "param_1[3]" identifier [ number_literal ]) - (cast_expression "(int)pwVar7" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "__n = iVar6 >> 2;" (assignment_expression "__n = iVar6 >> 2" identifier = (binary_expression "iVar6 >> 2" identifier >> number_literal)) ;) (expression_statement "wmemcpy(param_2,pwVar7,__n);" (call_expression "wmemcpy(param_2,pwVar7,__n)" identifier (argument_list "(param_2,pwVar7,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "param_1[2] = param_1[2] + iVar6;" (assignment_expression "param_1[2] = param_1[2] + iVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "param_1[2] + iVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) + identifier)) ;) (expression_statement "param_2 = (wchar_t *)((int)param_2 + iVar6);" (assignment_expression "param_2 = (wchar_t *)((int)param_2 + iVar6)" identifier = (cast_expression "(wchar_t *)((int)param_2 + iVar6)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + iVar6)" ( (binary_expression "(int)param_2 + iVar6" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "iVar8 = iVar8 + __n;" (assignment_expression "iVar8 = iVar8 + __n" identifier = (binary_expression "iVar8 + __n" identifier + identifier)) ;) (expression_statement "param_3 = param_3 - __n;" (assignment_expression "param_3 = param_3 - __n" identifier = (binary_expression "param_3 - __n" identifier - identifier)) ;) })) (while_statement "while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }" { (expression_statement "iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);" (assignment_expression "iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3)" identifier = (call_expression "FUN_001fd880(param_1 + 0xe,param_2,param_3)" identifier (argument_list "(param_1 + 0xe,param_2,param_3)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) , identifier , identifier )))) ;) (if_statement "if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }" if (parenthesized_expression "(iVar6 == -1)" ( (binary_expression "iVar6 == -1" identifier == number_literal) )) (compound_statement "{\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }" { (expression_statement "FUN_0023cd60("basic_filebuf::xsgetn error reading the file");" (call_expression "FUN_0023cd60("basic_filebuf::xsgetn error reading the file")" identifier (argument_list "("basic_filebuf::xsgetn error reading the file")" ( (string_literal ""basic_filebuf::xsgetn error reading the file"" " string_content ") ))) ;) })) (if_statement "if (iVar6 == 0) break;" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar8 = iVar8 + iVar6;" (assignment_expression "iVar8 = iVar8 + iVar6" identifier = (binary_expression "iVar8 + iVar6" identifier + identifier)) ;) (expression_statement "param_3 = param_3 - iVar6;" (assignment_expression "param_3 = param_3 - iVar6" identifier = (binary_expression "param_3 - iVar6" identifier - identifier)) ;) (if_statement "if (param_3 == 0) goto LAB_002295cb;" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_002295cb;" goto statement_identifier ;)) (expression_statement "param_2 = param_2 + iVar6;" (assignment_expression "param_2 = param_2 + iVar6" identifier = (binary_expression "param_2 + iVar6" identifier + identifier)) ;) })) (if_statement "if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }" { (expression_statement "iVar6 = param_1[0x17];" (assignment_expression "iVar6 = param_1[0x17]" identifier = (subscript_expression "param_1[0x17]" identifier [ number_literal ])) ;) (expression_statement "param_1[5] = 0;" (assignment_expression "param_1[5] = 0" (subscript_expression "param_1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_1[1] = iVar6;" (assignment_expression "param_1[1] = iVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[2] = iVar6;" (assignment_expression "param_1[2] = iVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[3] = iVar6;" (assignment_expression "param_1[3] = iVar6" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[6] = 0;" (assignment_expression "param_1[6] = 0" (subscript_expression "param_1[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined1 *)((int)param_1 + 0x65) = 0;" (assignment_expression "*(undefined1 *)((int)param_1 + 0x65) = 0" (pointer_expression "*(undefined1 *)((int)param_1 + 0x65)" * (cast_expression "(undefined1 *)((int)param_1 + 0x65)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x65)" ( (binary_expression "(int)param_1 + 0x65" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return iVar8;" return identifier ;) })) (labeled_statement "LAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;" statement_identifier : (expression_statement "*(undefined1 *)((int)param_1 + 0x65) = 1;" (assignment_expression "*(undefined1 *)((int)param_1 + 0x65) = 1" (pointer_expression "*(undefined1 *)((int)param_1 + 0x65)" * (cast_expression "(undefined1 *)((int)param_1 + 0x65)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x65)" ( (binary_expression "(int)param_1 + 0x65" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;)) (return_statement "return iVar8;" return identifier ;) })) })) (expression_statement "iVar6 = FUN_00208330(param_1,param_2,param_3);" (assignment_expression "iVar6 = FUN_00208330(param_1,param_2,param_3)" identifier = (call_expression "FUN_00208330(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (return_statement "return iVar8 + iVar6;" return (binary_expression "iVar8 + iVar6" identifier + identifier) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) == (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (binary_expression IDENT == IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT != IDENT) ))) * LIT))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) && (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;) (return_statement return IDENT ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;)) (return_statement return IDENT ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (return_statement return (binary_expression IDENT + IDENT) ;) })))
(function_definition "int FUN_002293d0(int *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  char cVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  wchar_t *pwVar7;\n  size_t __n;\n  int iVar8;\n  uint local_24;\n  \n  if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }\nLAB_0022943f:\n  iVar6 = 2;\n  if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }\n  if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }\n  iVar6 = FUN_00208330(param_1,param_2,param_3);\n  return iVar8 + iVar6;\n}" (primitive_type "int") (function_declarator "FUN_002293d0(int *param_1,wchar_t *param_2,int param_3)" (identifier "FUN_002293d0") (parameter_list "(int *param_1,wchar_t *param_2,int param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "wchar_t *param_2" (type_identifier "wchar_t") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  int *piVar3;\n  char cVar4;\n  wchar_t *pwVar5;\n  int iVar6;\n  wchar_t *pwVar7;\n  size_t __n;\n  int iVar8;\n  uint local_24;\n  \n  if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }\nLAB_0022943f:\n  iVar6 = 2;\n  if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }\n  if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }\n  iVar6 = FUN_00208330(param_1,param_2,param_3);\n  return iVar8 + iVar6;\n}" ({ "{") (declaration "wchar_t *pwVar1;" (type_identifier "wchar_t") (pointer_declarator "*pwVar1" (* "*") (identifier "pwVar1")) (; ";")) (declaration "wchar_t *pwVar2;" (type_identifier "wchar_t") (pointer_declarator "*pwVar2" (* "*") (identifier "pwVar2")) (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "char cVar4;" (primitive_type "char") (identifier "cVar4") (; ";")) (declaration "wchar_t *pwVar5;" (type_identifier "wchar_t") (pointer_declarator "*pwVar5" (* "*") (identifier "pwVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "wchar_t *pwVar7;" (type_identifier "wchar_t") (pointer_declarator "*pwVar7" (* "*") (identifier "pwVar7")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "uint local_24;" (type_identifier "uint") (identifier "local_24") (; ";")) (if_statement "if ((char)param_1[0x1d] == '\0') {\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }\n  else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }" (if "if") (parenthesized_expression "((char)param_1[0x1d] == '\0')" (( "(") (binary_expression "(char)param_1[0x1d] == '\0'" (cast_expression "(char)param_1[0x1d]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "param_1[0x1d]" (identifier "param_1") ([ "[") (number_literal "0x1d") (] "]"))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }\n  }" ({ "{") (if_statement "if (*(char *)((int)param_1 + 0x66) == '\0') {\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }\n    else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }" (if "if") (parenthesized_expression "(*(char *)((int)param_1 + 0x66) == '\0')" (( "(") (binary_expression "*(char *)((int)param_1 + 0x66) == '\0'" (pointer_expression "*(char *)((int)param_1 + 0x66)" (* "*") (cast_expression "(char *)((int)param_1 + 0x66)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 0x66)" (( "(") (binary_expression "(int)param_1 + 0x66" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x66")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      local_24 = param_1[0x10];\n      iVar8 = 0;\n    }" ({ "{") (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" (identifier "local_24") (= "=") (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]"))) (; ";")) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" (identifier "iVar8") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }" (else "else") (compound_statement "{\n      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);\n      if (iVar6 == -1) {\n        return 0;\n      }\n      local_24 = param_1[0x10];\n      param_1[5] = 0;\n      iVar8 = 0;\n      param_1[4] = 0;\n      iVar6 = param_1[0x17];\n      param_1[6] = 0;\n      param_1[1] = iVar6;\n      param_1[2] = iVar6;\n      param_1[3] = iVar6;\n      *(undefined1 *)((int)param_1 + 0x66) = 0;\n    }" ({ "{") (expression_statement "iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);" (assignment_expression "iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff)" (identifier "iVar6") (= "=") (call_expression "(**(code **)(*param_1 + 0x34))(param_1,0xffffffff)" (parenthesized_expression "(**(code **)(*param_1 + 0x34))" (( "(") (pointer_expression "**(code **)(*param_1 + 0x34)" (* "*") (pointer_expression "*(code **)(*param_1 + 0x34)" (* "*") (cast_expression "(code **)(*param_1 + 0x34)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x34)" (( "(") (binary_expression "*param_1 + 0x34" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x34")) () ")"))))) () ")")) (argument_list "(param_1,0xffffffff)" (( "(") (identifier "param_1") (, ",") (number_literal "0xffffffff") () ")")))) (; ";")) (if_statement "if (iVar6 == -1) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(iVar6 == -1)" (( "(") (binary_expression "iVar6 == -1" (identifier "iVar6") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" (identifier "local_24") (= "=") (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]"))) (; ";")) (expression_statement "param_1[5] = 0;" (assignment_expression "param_1[5] = 0" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" (identifier "iVar8") (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar6 = param_1[0x17];" (assignment_expression "iVar6 = param_1[0x17]" (identifier "iVar6") (= "=") (subscript_expression "param_1[0x17]" (identifier "param_1") ([ "[") (number_literal "0x17") (] "]"))) (; ";")) (expression_statement "param_1[6] = 0;" (assignment_expression "param_1[6] = 0" (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[1] = iVar6;" (assignment_expression "param_1[1] = iVar6" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "param_1[2] = iVar6;" (assignment_expression "param_1[2] = iVar6" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "param_1[3] = iVar6;" (assignment_expression "param_1[3] = iVar6" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "*(undefined1 *)((int)param_1 + 0x66) = 0;" (assignment_expression "*(undefined1 *)((int)param_1 + 0x66) = 0" (pointer_expression "*(undefined1 *)((int)param_1 + 0x66)" (* "*") (cast_expression "(undefined1 *)((int)param_1 + 0x66)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 0x66)" (( "(") (binary_expression "(int)param_1 + 0x66" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x66")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }" (else "else") (compound_statement "{\n    pwVar1 = (wchar_t *)param_1[2];\n    pwVar2 = (wchar_t *)param_1[1];\n    iVar8 = 0;\n    pwVar5 = pwVar1;\n    pwVar7 = param_2;\n    if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }\n    *(undefined1 *)(param_1 + 0x1d) = 0;\n    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;\n    param_1[0x1b] = iVar6;\n    param_1[2] = iVar6;\n    param_1[1] = param_1[0x17];\n    param_1[3] = param_1[0x1c];\n    local_24 = param_1[0x10];\n    param_2 = pwVar7;\n  }" ({ "{") (expression_statement "pwVar1 = (wchar_t *)param_1[2];" (assignment_expression "pwVar1 = (wchar_t *)param_1[2]" (identifier "pwVar1") (= "=") (cast_expression "(wchar_t *)param_1[2]" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")))) (; ";")) (expression_statement "pwVar2 = (wchar_t *)param_1[1];" (assignment_expression "pwVar2 = (wchar_t *)param_1[1]" (identifier "pwVar2") (= "=") (cast_expression "(wchar_t *)param_1[1]" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) (; ";")) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" (identifier "iVar8") (= "=") (number_literal "0")) (; ";")) (expression_statement "pwVar5 = pwVar1;" (assignment_expression "pwVar5 = pwVar1" (identifier "pwVar5") (= "=") (identifier "pwVar1")) (; ";")) (expression_statement "pwVar7 = param_2;" (assignment_expression "pwVar7 = param_2" (identifier "pwVar7") (= "=") (identifier "param_2")) (; ";")) (if_statement "if ((0 < param_3) && (pwVar1 == pwVar2)) {\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }" (if "if") (parenthesized_expression "((0 < param_3) && (pwVar1 == pwVar2))" (( "(") (binary_expression "(0 < param_3) && (pwVar1 == pwVar2)" (parenthesized_expression "(0 < param_3)" (( "(") (binary_expression "0 < param_3" (number_literal "0") (< "<") (identifier "param_3")) () ")")) (&& "&&") (parenthesized_expression "(pwVar1 == pwVar2)" (( "(") (binary_expression "pwVar1 == pwVar2" (identifier "pwVar1") (== "==") (identifier "pwVar2")) () ")"))) () ")")) (compound_statement "{\n      pwVar7 = param_2 + 1;\n      pwVar5 = pwVar1 + 1;\n      param_3 = param_3 + -1;\n      *param_2 = *pwVar1;\n      param_1[2] = (int)pwVar5;\n      if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }\n      iVar8 = 1;\n    }" ({ "{") (expression_statement "pwVar7 = param_2 + 1;" (assignment_expression "pwVar7 = param_2 + 1" (identifier "pwVar7") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pwVar5 = pwVar1 + 1;" (assignment_expression "pwVar5 = pwVar1 + 1" (identifier "pwVar5") (= "=") (binary_expression "pwVar1 + 1" (identifier "pwVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_3 = param_3 + -1;" (assignment_expression "param_3 = param_3 + -1" (identifier "param_3") (= "=") (binary_expression "param_3 + -1" (identifier "param_3") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*param_2 = *pwVar1;" (assignment_expression "*param_2 = *pwVar1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (pointer_expression "*pwVar1" (* "*") (identifier "pwVar1"))) (; ";")) (expression_statement "param_1[2] = (int)pwVar5;" (assignment_expression "param_1[2] = (int)pwVar5" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)pwVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pwVar5"))) (; ";")) (if_statement "if ((char)param_1[0x1d] == '\0') {\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }" (if "if") (parenthesized_expression "((char)param_1[0x1d] == '\0')" (( "(") (binary_expression "(char)param_1[0x1d] == '\0'" (cast_expression "(char)param_1[0x1d]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "param_1[0x1d]" (identifier "param_1") ([ "[") (number_literal "0x1d") (] "]"))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        local_24 = param_1[0x10];\n        iVar8 = 1;\n        param_2 = pwVar7;\n        goto LAB_0022943f;\n      }" ({ "{") (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" (identifier "local_24") (= "=") (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]"))) (; ";")) (expression_statement "iVar8 = 1;" (assignment_expression "iVar8 = 1" (identifier "iVar8") (= "=") (number_literal "1")) (; ";")) (expression_statement "param_2 = pwVar7;" (assignment_expression "param_2 = pwVar7" (identifier "param_2") (= "=") (identifier "pwVar7")) (; ";")) (goto_statement "goto LAB_0022943f;" (goto "goto") (statement_identifier "LAB_0022943f") (; ";")) (} "}"))) (expression_statement "iVar8 = 1;" (assignment_expression "iVar8 = 1" (identifier "iVar8") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "*(undefined1 *)(param_1 + 0x1d) = 0;" (assignment_expression "*(undefined1 *)(param_1 + 0x1d) = 0" (pointer_expression "*(undefined1 *)(param_1 + 0x1d)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x1d)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1d)" (( "(") (binary_expression "param_1 + 0x1d" (identifier "param_1") (+ "+") (number_literal "0x1d")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;" (assignment_expression "iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4" (identifier "iVar6") (= "=") (binary_expression "param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4" (subscript_expression "param_1[0x1b]" (identifier "param_1") ([ "[") (number_literal "0x1b") (] "]")) (+ "+") (binary_expression "(uint)(pwVar2 != pwVar5) * 4" (call_expression "(uint)(pwVar2 != pwVar5)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(pwVar2 != pwVar5)" (( "(") (binary_expression "pwVar2 != pwVar5" (identifier "pwVar2") (!= "!=") (identifier "pwVar5")) () ")"))) (* "*") (number_literal "4")))) (; ";")) (expression_statement "param_1[0x1b] = iVar6;" (assignment_expression "param_1[0x1b] = iVar6" (subscript_expression "param_1[0x1b]" (identifier "param_1") ([ "[") (number_literal "0x1b") (] "]")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "param_1[2] = iVar6;" (assignment_expression "param_1[2] = iVar6" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "param_1[1] = param_1[0x17];" (assignment_expression "param_1[1] = param_1[0x17]" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (subscript_expression "param_1[0x17]" (identifier "param_1") ([ "[") (number_literal "0x17") (] "]"))) (; ";")) (expression_statement "param_1[3] = param_1[0x1c];" (assignment_expression "param_1[3] = param_1[0x1c]" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (= "=") (subscript_expression "param_1[0x1c]" (identifier "param_1") ([ "[") (number_literal "0x1c") (] "]"))) (; ";")) (expression_statement "local_24 = param_1[0x10];" (assignment_expression "local_24 = param_1[0x10]" (identifier "local_24") (= "=") (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]"))) (; ";")) (expression_statement "param_2 = pwVar7;" (assignment_expression "param_2 = pwVar7" (identifier "param_2") (= "=") (identifier "pwVar7")) (; ";")) (} "}")))) (labeled_statement "LAB_0022943f:\n  iVar6 = 2;" (statement_identifier "LAB_0022943f") (: ":") (expression_statement "iVar6 = 2;" (assignment_expression "iVar6 = 2" (identifier "iVar6") (= "=") (number_literal "2")) (; ";"))) (if_statement "if (1 < (uint)param_1[0x18]) {\n    iVar6 = param_1[0x18];\n  }" (if "if") (parenthesized_expression "(1 < (uint)param_1[0x18])" (( "(") (binary_expression "1 < (uint)param_1[0x18]" (number_literal "1") (< "<") (cast_expression "(uint)param_1[0x18]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[0x18]" (identifier "param_1") ([ "[") (number_literal "0x18") (] "]")))) () ")")) (compound_statement "{\n    iVar6 = param_1[0x18];\n  }" ({ "{") (expression_statement "iVar6 = param_1[0x18];" (assignment_expression "iVar6 = param_1[0x18]" (identifier "iVar6") (= "=") (subscript_expression "param_1[0x18]" (identifier "param_1") ([ "[") (number_literal "0x18") (] "]"))) (; ";")) (} "}"))) (if_statement "if (iVar6 + -1 < param_3) {\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }" (if "if") (parenthesized_expression "(iVar6 + -1 < param_3)" (( "(") (binary_expression "iVar6 + -1 < param_3" (binary_expression "iVar6 + -1" (identifier "iVar6") (+ "+") (number_literal "-1")) (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n    piVar3 = (int *)param_1[0x1e];\n    if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }\n    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);\n    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }\n  }" ({ "{") (expression_statement "piVar3 = (int *)param_1[0x1e];" (assignment_expression "piVar3 = (int *)param_1[0x1e]" (identifier "piVar3") (= "=") (cast_expression "(int *)param_1[0x1e]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[0x1e]" (identifier "param_1") ([ "[") (number_literal "0x1e") (] "]")))) (; ";")) (if_statement "if (piVar3 == (int *)0x0) {\n                    \n      FUN_002428a0();\n    }" (if "if") (parenthesized_expression "(piVar3 == (int *)0x0)" (( "(") (binary_expression "piVar3 == (int *)0x0" (identifier "piVar3") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n      FUN_002428a0();\n    }" ({ "{") (expression_statement "FUN_002428a0();" (call_expression "FUN_002428a0()" (identifier "FUN_002428a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);" (assignment_expression "cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3)" (identifier "cVar4") (= "=") (call_expression "(**(code **)(*piVar3 + 0x18))(piVar3)" (parenthesized_expression "(**(code **)(*piVar3 + 0x18))" (( "(") (pointer_expression "**(code **)(*piVar3 + 0x18)" (* "*") (pointer_expression "*(code **)(*piVar3 + 0x18)" (* "*") (cast_expression "(code **)(*piVar3 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar3 + 0x18)" (( "(") (binary_expression "*piVar3 + 0x18" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (argument_list "(piVar3)" (( "(") (identifier "piVar3") () ")")))) (; ";")) (if_statement "if (((local_24 & 8) != 0) && (cVar4 != '\0')) {\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }" (if "if") (parenthesized_expression "(((local_24 & 8) != 0) && (cVar4 != '\0'))" (( "(") (binary_expression "((local_24 & 8) != 0) && (cVar4 != '\0')" (parenthesized_expression "((local_24 & 8) != 0)" (( "(") (binary_expression "(local_24 & 8) != 0" (parenthesized_expression "(local_24 & 8)" (( "(") (binary_expression "local_24 & 8" (identifier "local_24") (& "&") (number_literal "8")) () ")")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(cVar4 != '\0')" (( "(") (binary_expression "cVar4 != '\0'" (identifier "cVar4") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      pwVar7 = (wchar_t *)param_1[2];\n      if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }\n      while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }\n      if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }\nLAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;\n      return iVar8;\n    }" ({ "{") (expression_statement "pwVar7 = (wchar_t *)param_1[2];" (assignment_expression "pwVar7 = (wchar_t *)param_1[2]" (identifier "pwVar7") (= "=") (cast_expression "(wchar_t *)param_1[2]" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")))) (; ";")) (if_statement "if (pwVar7 != (wchar_t *)param_1[3]) {\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }" (if "if") (parenthesized_expression "(pwVar7 != (wchar_t *)param_1[3])" (( "(") (binary_expression "pwVar7 != (wchar_t *)param_1[3]" (identifier "pwVar7") (!= "!=") (cast_expression "(wchar_t *)param_1[3]" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")))) () ")")) (compound_statement "{\n        iVar6 = param_1[3] - (int)pwVar7;\n        __n = iVar6 >> 2;\n        wmemcpy(param_2,pwVar7,__n);\n        param_1[2] = param_1[2] + iVar6;\n        param_2 = (wchar_t *)((int)param_2 + iVar6);\n        iVar8 = iVar8 + __n;\n        param_3 = param_3 - __n;\n      }" ({ "{") (expression_statement "iVar6 = param_1[3] - (int)pwVar7;" (assignment_expression "iVar6 = param_1[3] - (int)pwVar7" (identifier "iVar6") (= "=") (binary_expression "param_1[3] - (int)pwVar7" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (- "-") (cast_expression "(int)pwVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pwVar7")))) (; ";")) (expression_statement "__n = iVar6 >> 2;" (assignment_expression "__n = iVar6 >> 2" (identifier "__n") (= "=") (binary_expression "iVar6 >> 2" (identifier "iVar6") (>> ">>") (number_literal "2"))) (; ";")) (expression_statement "wmemcpy(param_2,pwVar7,__n);" (call_expression "wmemcpy(param_2,pwVar7,__n)" (identifier "wmemcpy") (argument_list "(param_2,pwVar7,__n)" (( "(") (identifier "param_2") (, ",") (identifier "pwVar7") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "param_1[2] = param_1[2] + iVar6;" (assignment_expression "param_1[2] = param_1[2] + iVar6" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "param_1[2] + iVar6" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (+ "+") (identifier "iVar6"))) (; ";")) (expression_statement "param_2 = (wchar_t *)((int)param_2 + iVar6);" (assignment_expression "param_2 = (wchar_t *)((int)param_2 + iVar6)" (identifier "param_2") (= "=") (cast_expression "(wchar_t *)((int)param_2 + iVar6)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_2 + iVar6)" (( "(") (binary_expression "(int)param_2 + iVar6" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (+ "+") (identifier "iVar6")) () ")")))) (; ";")) (expression_statement "iVar8 = iVar8 + __n;" (assignment_expression "iVar8 = iVar8 + __n" (identifier "iVar8") (= "=") (binary_expression "iVar8 + __n" (identifier "iVar8") (+ "+") (identifier "__n"))) (; ";")) (expression_statement "param_3 = param_3 - __n;" (assignment_expression "param_3 = param_3 - __n" (identifier "param_3") (= "=") (binary_expression "param_3 - __n" (identifier "param_3") (- "-") (identifier "__n"))) (; ";")) (} "}"))) (while_statement "while( true ) {\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);\n        if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }\n        if (iVar6 == 0) break;\n        iVar8 = iVar8 + iVar6;\n        param_3 = param_3 - iVar6;\n        if (param_3 == 0) goto LAB_002295cb;\n        param_2 = param_2 + iVar6;\n      }" ({ "{") (expression_statement "iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);" (assignment_expression "iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3)" (identifier "iVar6") (= "=") (call_expression "FUN_001fd880(param_1 + 0xe,param_2,param_3)" (identifier "FUN_001fd880") (argument_list "(param_1 + 0xe,param_2,param_3)" (( "(") (binary_expression "param_1 + 0xe" (identifier "param_1") (+ "+") (number_literal "0xe")) (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar6 == -1) {\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }" (if "if") (parenthesized_expression "(iVar6 == -1)" (( "(") (binary_expression "iVar6 == -1" (identifier "iVar6") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n                    \n          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");\n        }" ({ "{") (expression_statement "FUN_0023cd60("basic_filebuf::xsgetn error reading the file");" (call_expression "FUN_0023cd60("basic_filebuf::xsgetn error reading the file")" (identifier "FUN_0023cd60") (argument_list "("basic_filebuf::xsgetn error reading the file")" (( "(") (string_literal ""basic_filebuf::xsgetn error reading the file"" (" """) (string_content "basic_filebuf::xsgetn error reading the file") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (iVar6 == 0) break;" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar8 = iVar8 + iVar6;" (assignment_expression "iVar8 = iVar8 + iVar6" (identifier "iVar8") (= "=") (binary_expression "iVar8 + iVar6" (identifier "iVar8") (+ "+") (identifier "iVar6"))) (; ";")) (expression_statement "param_3 = param_3 - iVar6;" (assignment_expression "param_3 = param_3 - iVar6" (identifier "param_3") (= "=") (binary_expression "param_3 - iVar6" (identifier "param_3") (- "-") (identifier "iVar6"))) (; ";")) (if_statement "if (param_3 == 0) goto LAB_002295cb;" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_002295cb;" (goto "goto") (statement_identifier "LAB_002295cb") (; ";"))) (expression_statement "param_2 = param_2 + iVar6;" (assignment_expression "param_2 = param_2 + iVar6" (identifier "param_2") (= "=") (binary_expression "param_2 + iVar6" (identifier "param_2") (+ "+") (identifier "iVar6"))) (; ";")) (} "}"))) (if_statement "if (param_3 != 0) {\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        iVar6 = param_1[0x17];\n        param_1[5] = 0;\n        param_1[4] = 0;\n        param_1[1] = iVar6;\n        param_1[2] = iVar6;\n        param_1[3] = iVar6;\n        param_1[6] = 0;\n        *(undefined1 *)((int)param_1 + 0x65) = 0;\n        return iVar8;\n      }" ({ "{") (expression_statement "iVar6 = param_1[0x17];" (assignment_expression "iVar6 = param_1[0x17]" (identifier "iVar6") (= "=") (subscript_expression "param_1[0x17]" (identifier "param_1") ([ "[") (number_literal "0x17") (] "]"))) (; ";")) (expression_statement "param_1[5] = 0;" (assignment_expression "param_1[5] = 0" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[4] = 0;" (assignment_expression "param_1[4] = 0" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[1] = iVar6;" (assignment_expression "param_1[1] = iVar6" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "param_1[2] = iVar6;" (assignment_expression "param_1[2] = iVar6" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "param_1[3] = iVar6;" (assignment_expression "param_1[3] = iVar6" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "param_1[6] = 0;" (assignment_expression "param_1[6] = 0" (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined1 *)((int)param_1 + 0x65) = 0;" (assignment_expression "*(undefined1 *)((int)param_1 + 0x65) = 0" (pointer_expression "*(undefined1 *)((int)param_1 + 0x65)" (* "*") (cast_expression "(undefined1 *)((int)param_1 + 0x65)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 0x65)" (( "(") (binary_expression "(int)param_1 + 0x65" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x65")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return iVar8;" (return "return") (identifier "iVar8") (; ";")) (} "}"))) (labeled_statement "LAB_002295cb:\n      *(undefined1 *)((int)param_1 + 0x65) = 1;" (statement_identifier "LAB_002295cb") (: ":") (expression_statement "*(undefined1 *)((int)param_1 + 0x65) = 1;" (assignment_expression "*(undefined1 *)((int)param_1 + 0x65) = 1" (pointer_expression "*(undefined1 *)((int)param_1 + 0x65)" (* "*") (cast_expression "(undefined1 *)((int)param_1 + 0x65)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 0x65)" (( "(") (binary_expression "(int)param_1 + 0x65" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x65")) () ")")))) (= "=") (number_literal "1")) (; ";"))) (return_statement "return iVar8;" (return "return") (identifier "iVar8") (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar6 = FUN_00208330(param_1,param_2,param_3);" (assignment_expression "iVar6 = FUN_00208330(param_1,param_2,param_3)" (identifier "iVar6") (= "=") (call_expression "FUN_00208330(param_1,param_2,param_3)" (identifier "FUN_00208330") (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (return_statement "return iVar8 + iVar6;" (return "return") (binary_expression "iVar8 + iVar6" (identifier "iVar8") (+ "+") (identifier "iVar6")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wfilebuf::xsgetn(wchar_t*, int) */

int __thiscall std::type_1::function_1(type_1 *var_1,type_2 *var_6,int var_3)

{
  type_2 *var_4;
  type_2 *var_5;
  int *var_9;
  type_3 uVar4;
  char var_12;
  type_2 *var_7;
  int var_8;
  type_2 *var_13;
  size_t var_15;
  int var_2;
  type_4 var_11;
  
  if (var_1[0x74] == (type_1)0x0) {
    if (var_1[0x66] == (type_1)0x0) {
      var_11 = *(type_4 *)(var_1 + 0x40);
      var_2 = 0;
    }
    else {
      var_2 = (**(type_5 **)(*(int *)var_1 + 0x34))(var_1,0xffffffff);
      if (var_2 == -1) {
        return 0;
      }
      var_11 = *(type_4 *)(var_1 + 0x40);
      *(type_3 *)(var_1 + 0x14) = 0;
      var_2 = 0;
      *(type_3 *)(var_1 + 0x10) = 0;
      uVar4 = *(type_3 *)(var_1 + 0x5c);
      *(type_3 *)(var_1 + 0x18) = 0;
      *(type_3 *)(var_1 + 4) = uVar4;
      *(type_3 *)(var_1 + 8) = uVar4;
      *(type_3 *)(var_1 + 0xc) = uVar4;
      var_1[0x66] = (type_1)0x0;
    }
  }
  else {
    var_4 = *(type_2 **)(var_1 + 8);
    var_5 = *(type_2 **)(var_1 + 4);
    var_2 = 0;
    var_7 = var_4;
    var_13 = var_6;
    if ((0 < var_3) && (var_4 == var_5)) {
      var_13 = var_6 + 1;
      var_7 = var_4 + 1;
      var_3 = var_3 + -1;
      *var_6 = *var_4;
      *(type_2 **)(var_1 + 8) = var_7;
      if (var_1[0x74] == (type_1)0x0) {
        var_11 = *(type_4 *)(var_1 + 0x40);
        var_2 = 1;
        var_6 = var_13;
        goto LAB_0022943f;
      }
      var_2 = 1;
    }
    var_1[0x74] = (type_1)0x0;
    var_8 = *(int *)(var_1 + 0x6c) + (type_4)(var_5 != var_7) * 4;
    *(int *)(var_1 + 0x6c) = var_8;
    *(int *)(var_1 + 8) = var_8;
    *(type_3 *)(var_1 + 4) = *(type_3 *)(var_1 + 0x5c);
    *(type_3 *)(var_1 + 0xc) = *(type_3 *)(var_1 + 0x70);
    var_11 = *(type_4 *)(var_1 + 0x40);
    var_6 = var_13;
  }
LAB_0022943f:
  var_8 = 2;
  if (1 < *(type_4 *)(var_1 + 0x60)) {
    var_8 = *(int *)(var_1 + 0x60);
  }
  if (var_8 + -1 < var_3) {
    var_9 = *(int **)(var_1 + 0x78);
    if (var_9 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
      var_10();
    }
    var_12 = (**(type_5 **)(*var_9 + 0x18))(var_9);
    if (((var_11 & 8) != 0) && (var_12 != '\0')) {
      var_13 = *(type_2 **)(var_1 + 8);
      if (var_13 != *(type_2 **)(var_1 + 0xc)) {
        var_8 = (int)*(type_2 **)(var_1 + 0xc) - (int)var_13;
        var_15 = var_8 >> 2;
        var_14(var_6,var_13,var_15);
        *(int *)(var_1 + 8) = *(int *)(var_1 + 8) + var_8;
        var_6 = (type_2 *)((int)var_6 + var_8);
        var_2 = var_2 + var_15;
        var_3 = var_3 - var_15;
      }
      while( true ) {
        var_8 = var_16<var_17>::function_1
                          ((var_16<var_17> *)(var_1 + 0x38),(char *)var_6,var_3);
        if (var_8 == -1) {
                    /* WARNING: Subroutine does not return */
          var_18("basic_filebuf::xsgetn error reading the file");
        }
        if (var_8 == 0) break;
        var_2 = var_2 + var_8;
        var_3 = var_3 - var_8;
        if (var_3 == 0) goto LAB_002295cb;
        var_6 = var_6 + var_8;
      }
      if (var_3 != 0) {
        uVar4 = *(type_3 *)(var_1 + 0x5c);
        *(type_3 *)(var_1 + 0x14) = 0;
        *(type_3 *)(var_1 + 0x10) = 0;
        *(type_3 *)(var_1 + 4) = uVar4;
        *(type_3 *)(var_1 + 8) = uVar4;
        *(type_3 *)(var_1 + 0xc) = uVar4;
        *(type_3 *)(var_1 + 0x18) = 0;
        var_1[0x65] = (type_1)0x0;
        return var_2;
      }
LAB_002295cb:
      var_1[0x65] = (type_1)0x1;
      return var_2;
    }
  }
  var_8 = type_6::function_1((type_6 *)var_1,var_6,var_3);
  return var_2 + var_8;
}


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

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

int MASKED(int *param_1,wchar_t *param_2,int param_3)

{
  wchar_t *pwVar1;
  wchar_t *pwVar2;
  int *piVar3;
  char cVar4;
  wchar_t *pwVar5;
  int iVar6;
  wchar_t *pwVar7;
  size_t __n;
  int iVar8;
  uint local_24;
  
  if ((char)param_1[0x1d] == '\0') {
    if (*(char *)((int)param_1 + 0x66) == '\0') {
      local_24 = param_1[0x10];
      iVar8 = 0;
    }
    else {
      iVar6 = (**(code **)(*param_1 + 0x34))(param_1,0xffffffff);
      if (iVar6 == -1) {
        return 0;
      }
      local_24 = param_1[0x10];
      param_1[5] = 0;
      iVar8 = 0;
      param_1[4] = 0;
      iVar6 = param_1[0x17];
      param_1[6] = 0;
      param_1[1] = iVar6;
      param_1[2] = iVar6;
      param_1[3] = iVar6;
      *(undefined1 *)((int)param_1 + 0x66) = 0;
    }
  }
  else {
    pwVar1 = (wchar_t *)param_1[2];
    pwVar2 = (wchar_t *)param_1[1];
    iVar8 = 0;
    pwVar5 = pwVar1;
    pwVar7 = param_2;
    if ((0 < param_3) && (pwVar1 == pwVar2)) {
      pwVar7 = param_2 + 1;
      pwVar5 = pwVar1 + 1;
      param_3 = param_3 + -1;
      *param_2 = *pwVar1;
      param_1[2] = (int)pwVar5;
      if ((char)param_1[0x1d] == '\0') {
        local_24 = param_1[0x10];
        iVar8 = 1;
        param_2 = pwVar7;
        goto LAB_0022943f;
      }
      iVar8 = 1;
    }
    *(undefined1 *)(param_1 + 0x1d) = 0;
    iVar6 = param_1[0x1b] + (uint)(pwVar2 != pwVar5) * 4;
    param_1[0x1b] = iVar6;
    param_1[2] = iVar6;
    param_1[1] = param_1[0x17];
    param_1[3] = param_1[0x1c];
    local_24 = param_1[0x10];
    param_2 = pwVar7;
  }
LAB_0022943f:
  iVar6 = 2;
  if (1 < (uint)param_1[0x18]) {
    iVar6 = param_1[0x18];
  }
  if (iVar6 + -1 < param_3) {
    piVar3 = (int *)param_1[0x1e];
    if (piVar3 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
      FUN_002428a0();
    }
    cVar4 = (**(code **)(*piVar3 + 0x18))(piVar3);
    if (((local_24 & 8) != 0) && (cVar4 != '\0')) {
      pwVar7 = (wchar_t *)param_1[2];
      if (pwVar7 != (wchar_t *)param_1[3]) {
        iVar6 = param_1[3] - (int)pwVar7;
        __n = iVar6 >> 2;
        wmemcpy(param_2,pwVar7,__n);
        param_1[2] = param_1[2] + iVar6;
        param_2 = (wchar_t *)((int)param_2 + iVar6);
        iVar8 = iVar8 + __n;
        param_3 = param_3 - __n;
      }
      while( true ) {
        iVar6 = FUN_001fd880(param_1 + 0xe,param_2,param_3);
        if (iVar6 == -1) {
                    /* WARNING: Subroutine does not return */
          FUN_0023cd60("basic_filebuf::xsgetn error reading the file");
        }
        if (iVar6 == 0) break;
        iVar8 = iVar8 + iVar6;
        param_3 = param_3 - iVar6;
        if (param_3 == 0) goto LAB_002295cb;
        param_2 = param_2 + iVar6;
      }
      if (param_3 != 0) {
        iVar6 = param_1[0x17];
        param_1[5] = 0;
        param_1[4] = 0;
        param_1[1] = iVar6;
        param_1[2] = iVar6;
        param_1[3] = iVar6;
        param_1[6] = 0;
        *(undefined1 *)((int)param_1 + 0x65) = 0;
        return iVar8;
      }
LAB_002295cb:
      *(undefined1 *)((int)param_1 + 0x65) = 1;
      return iVar8;
    }
  }
  iVar6 = FUN_00208330(param_1,param_2,param_3);
  return iVar8 + iVar6;
}

