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

int fts5ParseTokenize(void *pContext,int tflags,char *pToken,int nToken,int iUnused1,int iUnused2)

{
  undefined4 *pOld;
  char *pcVar1;
  void *__s;
  size_t __n;
  uint uVar2;
  int iVar3;
  undefined4 *puVar4;
  int in_GS_OFFSET;
  byte bVar5;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  bVar5 = 0;
  uStack_14 = 0x6a889;
  iVar3 = *(int *)((int)pContext + 4);
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_24 = 0;
  if (iVar3 != 0) goto LAB_0006a929;
                    /* WARNING: Load size is inaccurate */
  pOld = *pContext;
  __n = 0x8000;
  if (nToken < 0x8001) {
    __n = nToken;
  }
  if (pOld == (undefined4 *)0x0) {
    pOld = (undefined4 *)sqlite3_realloc64((void *)0x0,0xa4);
    if (pOld == (undefined4 *)0x0) goto LAB_0006a9b2;
    *pOld = 0;
    pOld[8] = 0;
    puVar4 = (undefined4 *)((uint)(pOld + 1) & 0xfffffffc);
    for (uVar2 = (uint)((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))) >> 2; uVar2 != 0;
        uVar2 = uVar2 - 1) {
      *puVar4 = 0;
      puVar4 = puVar4 + (uint)bVar5 * -2 + 1;
    }
    uVar2 = 0;
LAB_0006a918:
    *(undefined4 **)pContext = pOld;
    pOld[4] = uVar2;
    iVar3 = local_24;
    if (local_24 == 0) {
LAB_0006a948:
      iVar3 = uVar2 + 1;
      pOld[4] = iVar3;
      puVar4 = pOld + iVar3 * 4 + 1;
      *puVar4 = 0;
      puVar4[1] = 0;
      puVar4[2] = 0;
      puVar4[3] = 0;
      pcVar1 = sqlite3Fts5Strndup(&local_24,pToken,__n);
      pOld[iVar3 * 4 + 2] = pcVar1;
      iVar3 = local_24;
    }
  }
  else {
    uVar2 = pOld[4];
    if (((int)uVar2 < 1) || ((tflags & 1U) == 0)) {
      if ((uVar2 & 7) != 0) goto LAB_0006a948;
      pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4));
      if (pOld != (undefined4 *)0x0) goto LAB_0006a918;
    }
    else {
      __s = sqlite3_malloc64((ulonglong)(__n + 0x1d));
      if (__s != (void *)0x0) {
        memset(__s,0,__n + 0x1d);
        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);
        memcpy((void *)((int)__s + 0x1c),pToken,__n);
        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];
        pOld[pOld[4] * 4 + 4] = __s;
        iVar3 = local_24;
        goto LAB_0006a926;
      }
    }
LAB_0006a9b2:
    iVar3 = 7;
  }
LAB_0006a926:
  *(int *)((int)pContext + 4) = iVar3;
LAB_0006a929:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int FUN_0006a880(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  void *__s;
  size_t __n;
  uint uVar4;
  int iVar5;
  undefined4 *puVar6;
  int in_GS_OFFSET;
  byte bVar7;
  int local_24;
  
  bVar7 = 0;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  local_24 = 0;
  iVar5 = param_1[1];
  if (param_1[1] != 0) goto LAB_0006a929;
  puVar2 = (undefined4 *)*param_1;
  __n = 0x8000;
  if ((int)param_4 < 0x8001) {
    __n = param_4;
  }
  if (puVar2 == (undefined4 *)0x0) {
    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);
    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;
    *puVar2 = 0;
    puVar2[8] = 0;
    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);
    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;
        uVar4 != 0; uVar4 = uVar4 - 1) {
      *puVar6 = 0;
      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;
    }
    uVar4 = 0;
LAB_0006a918:
    *param_1 = puVar2;
    puVar2[4] = uVar4;
LAB_0006a948:
    iVar5 = uVar4 + 1;
    puVar2[4] = iVar5;
    puVar6 = puVar2 + iVar5 * 4 + 1;
    *puVar6 = 0;
    puVar6[1] = 0;
    puVar6[2] = 0;
    puVar6[3] = 0;
    uVar3 = FUN_0003fd80();
    puVar2[iVar5 * 4 + 2] = uVar3;
  }
  else {
    uVar4 = puVar2[4];
    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {
      if ((uVar4 & 7) != 0) goto LAB_0006a948;
      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);
      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;
    }
    else {
      __s = (void *)FUN_000408d0(__n + 0x1d,0);
      if (__s != (void *)0x0) {
        memset(__s,0,__n + 0x1d);
        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);
        memcpy((void *)((int)__s + 0x1c),param_3,__n);
        local_24 = 0;
        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];
        puVar2[puVar2[4] * 4 + 4] = __s;
        goto LAB_0006a926;
      }
    }
LAB_0006a9b2:
    local_24 = 7;
  }
LAB_0006a926:
  param_1[1] = local_24;
  iVar5 = local_24;
LAB_0006a929:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000f6410();
  }
  return iVar5;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014d20
ADD EBX,0xe064b
SUB ESP,0x2c
MOV EAX,dword ptr [ESP + 0x48]
MOV EBP,dword ptr [ESP + 0x40]
MOV dword ptr [ESP + 0x4],EAX
MOV EDX,dword ptr [EBP + 0x4]
MOV EAX,dword ptr [ESP + 0x4c]
MOV EDI,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x1c],EDI
XOR EDI,EDI
MOV dword ptr [ESP + 0x18],0x0
TEST EDX,EDX
JNZ 0x0006a929
CMP EAX,0x8000
MOV ECX,0x8000
MOV ESI,dword ptr [EBP]
CMOVLE ECX,EAX
MOV dword ptr [ESP + 0x8],ECX
TEST ESI,ESI
JZ 0x0006a990
MOV EDI,dword ptr [ESI + 0x10]
TEST EDI,EDI
JLE 0x0006a8ec
TEST byte ptr [ESP + 0x44],0x1
JNZ 0x0006a9c0
TEST EDI,0x7
JNZ 0x0006a948
MOV EAX,EDI
SUB ESP,0x4
XOR EDX,EDX
SHL EAX,0x4
PUSH EDX
ADD EAX,0xa4
PUSH EAX
PUSH ESI
CALL 0x00045d10
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0006a9b2
MOV EDX,dword ptr [ESP + 0x18]
MOV dword ptr [EBP],ESI
MOV dword ptr [ESI + 0x10],EDI
TEST EDX,EDX
JZ 0x0006a948
MOV dword ptr [EBP + 0x4],EDX
MOV EBX,dword ptr [ESP + 0x1c]
XOR EBX,dword ptr GS:[0x14]
MOV EAX,EDX
JNZ 0x0006aa5c
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD EDI,0x1
MOV EDX,dword ptr [ESP + 0x4]
MOV ECX,dword ptr [ESP + 0x8]
MOV dword ptr [ESI + 0x10],EDI
SHL EDI,0x4
LEA EAX,[ESI + EDI*0x1 + 0x4]
MOV dword ptr [EAX],0x0
MOV dword ptr [EAX + 0x4],0x0
MOV dword ptr [EAX + 0x8],0x0
MOV dword ptr [EAX + 0xc],0x0
LEA EAX,[ESP + 0x18]
CALL 0x0003fd80
MOV EDX,dword ptr [ESP + 0x18]
MOV dword ptr [ESI + EDI*0x1 + 0x8],EAX
JMP 0x0006a926
MOV dword ptr [ESP + 0xc],EDX
SUB ESP,0x4
PUSH 0x0
PUSH 0xa4
PUSH 0x0
CALL 0x00045d10
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JNZ 0x0006aa30
MOV EDX,0x7
JMP 0x0006a926
SUB ESP,0x8
LEA ECX,[ECX + 0x1d]
XOR EDX,EDX
MOV dword ptr [ESP + 0x14],ECX
PUSH EDX
PUSH ECX
CALL 0x000408d0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
TEST EAX,EAX
MOV EDI,EAX
JZ 0x0006a9b2
SUB ESP,0x4
PUSH ECX
PUSH 0x0
PUSH EAX
CALL 0x00014280
ADD ESP,0xc
LEA EAX,[EDI + 0x1c]
MOV dword ptr [EDI + 0x4],EAX
PUSH dword ptr [ESP + 0xc]
PUSH dword ptr [ESP + 0xc]
PUSH EAX
CALL 0x000140d0
MOV EAX,dword ptr [ESI + 0x10]
MOV EDX,dword ptr [ESP + 0x28]
ADD ESP,0x10
SHL EAX,0x4
MOV EAX,dword ptr [ESI + EAX*0x1 + 0x10]
MOV dword ptr [EDI + 0xc],EAX
MOV EAX,dword ptr [ESI + 0x10]
SHL EAX,0x4
MOV dword ptr [ESI + EAX*0x1 + 0x10],EDI
JMP 0x0006a926
LEA EDI,[ESI + 0x4]
MOV ECX,ESI
MOV EDX,dword ptr [ESP + 0xc]
MOV dword ptr [ESI],0x0
AND EDI,0xfffffffc
MOV dword ptr [ESI + 0x20],0x0
SUB ECX,EDI
MOV EAX,EDX
ADD ECX,0x24
SHR ECX,0x2
STOSD.REP ES:EDI
XOR EDI,EDI
JMP 0x0006a918
CALL 0x000f6410
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0006a880(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  void *__s;\n  size_t __n;\n  uint uVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  int in_GS_OFFSET;\n  byte bVar7;\n  int local_24;\n  \n  bVar7 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  iVar5 = param_1[1];\n  if (param_1[1] != 0) goto LAB_0006a929;\n  puVar2 = (undefined4 *)*param_1;\n  __n = 0x8000;\n  if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }\nLAB_0006a926:\n  param_1[1] = local_24;\n  iVar5 = local_24;\nLAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }\n  return iVar5;\n}\n\n" comment (function_definition "int FUN_0006a880(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  void *__s;\n  size_t __n;\n  uint uVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  int in_GS_OFFSET;\n  byte bVar7;\n  int local_24;\n  \n  bVar7 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  iVar5 = param_1[1];\n  if (param_1[1] != 0) goto LAB_0006a929;\n  puVar2 = (undefined4 *)*param_1;\n  __n = 0x8000;\n  if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }\nLAB_0006a926:\n  param_1[1] = local_24;\n  iVar5 = local_24;\nLAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }\n  return iVar5;\n}" primitive_type (function_declarator "FUN_0006a880(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)" identifier (parameter_list "(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte param_2" type_identifier identifier) , (parameter_declaration "void *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "size_t param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  void *__s;\n  size_t __n;\n  uint uVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  int in_GS_OFFSET;\n  byte bVar7;\n  int local_24;\n  \n  bVar7 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  iVar5 = param_1[1];\n  if (param_1[1] != 0) goto LAB_0006a929;\n  puVar2 = (undefined4 *)*param_1;\n  __n = 0x8000;\n  if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }\nLAB_0006a926:\n  param_1[1] = local_24;\n  iVar5 = local_24;\nLAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }\n  return iVar5;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "void *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar7;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (expression_statement "bVar7 = 0;" (assignment_expression "bVar7 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "iVar5 = param_1[1];" (assignment_expression "iVar5 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (param_1[1] != 0) goto LAB_0006a929;" if (parenthesized_expression "(param_1[1] != 0)" ( (binary_expression "param_1[1] != 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) != number_literal) )) (goto_statement "goto LAB_0006a929;" goto statement_identifier ;)) (expression_statement "puVar2 = (undefined4 *)*param_1;" (assignment_expression "puVar2 = (undefined4 *)*param_1" identifier = (cast_expression "(undefined4 *)*param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "__n = 0x8000;" (assignment_expression "__n = 0x8000" identifier = number_literal) ;) (if_statement "if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }" if (parenthesized_expression "((int)param_4 < 0x8001)" ( (binary_expression "(int)param_4 < 0x8001" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    __n = param_4;\n  }" { (expression_statement "__n = param_4;" (assignment_expression "__n = param_4" identifier = identifier) ;) })) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }" { (expression_statement "puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);" (assignment_expression "puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0)" identifier = (cast_expression "(undefined4 *)FUN_00045d10(0,0xa4,0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00045d10(0,0xa4,0)" identifier (argument_list "(0,0xa4,0)" ( number_literal , number_literal , number_literal ))))) ;) (if_statement "if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0006a9b2;" goto statement_identifier ;)) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2[8] = 0;" (assignment_expression "puVar2[8] = 0" (subscript_expression "puVar2[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);" (assignment_expression "puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(puVar2 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar2 + 1) & 0xfffffffc" (call_expression "(uint)(puVar2 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar2 + 1)" ( (binary_expression "puVar2 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }" for ( (assignment_expression "uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2" identifier = (binary_expression "(uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc)))" ( (binary_expression "(int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))" (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))" ( (binary_expression "0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc)" number_literal - (cast_expression "(int)((uint)(puVar2 + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(puVar2 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar2 + 1) & 0xfffffffc" (call_expression "(uint)(puVar2 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar2 + 1)" ( (binary_expression "puVar2 + 1" identifier + number_literal) ))) & number_literal) )))) ))) ))) >> number_literal)) ; (binary_expression "uVar4 != 0" identifier != number_literal) ; (assignment_expression "uVar4 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }" { (expression_statement "*puVar6 = 0;" (assignment_expression "*puVar6 = 0" (pointer_expression "*puVar6" * identifier) = number_literal) ;) (expression_statement "puVar6 = puVar6 + (uint)bVar7 * -2 + 1;" (assignment_expression "puVar6 = puVar6 + (uint)bVar7 * -2 + 1" identifier = (binary_expression "puVar6 + (uint)bVar7 * -2 + 1" (binary_expression "puVar6 + (uint)bVar7 * -2" identifier + (binary_expression "(uint)bVar7 * -2" (cast_expression "(uint)bVar7" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0006a918:\n    *param_1 = puVar2;" statement_identifier : (expression_statement "*param_1 = puVar2;" (assignment_expression "*param_1 = puVar2" (pointer_expression "*param_1" * identifier) = identifier) ;)) (expression_statement "puVar2[4] = uVar4;" (assignment_expression "puVar2[4] = uVar4" (subscript_expression "puVar2[4]" identifier [ number_literal ]) = identifier) ;) (labeled_statement "LAB_0006a948:\n    iVar5 = uVar4 + 1;" statement_identifier : (expression_statement "iVar5 = uVar4 + 1;" (assignment_expression "iVar5 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;)) (expression_statement "puVar2[4] = iVar5;" (assignment_expression "puVar2[4] = iVar5" (subscript_expression "puVar2[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar6 = puVar2 + iVar5 * 4 + 1;" (assignment_expression "puVar6 = puVar2 + iVar5 * 4 + 1" identifier = (binary_expression "puVar2 + iVar5 * 4 + 1" (binary_expression "puVar2 + iVar5 * 4" identifier + (binary_expression "iVar5 * 4" identifier * number_literal)) + number_literal)) ;) (expression_statement "*puVar6 = 0;" (assignment_expression "*puVar6 = 0" (pointer_expression "*puVar6" * identifier) = number_literal) ;) (expression_statement "puVar6[1] = 0;" (assignment_expression "puVar6[1] = 0" (subscript_expression "puVar6[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar6[2] = 0;" (assignment_expression "puVar6[2] = 0" (subscript_expression "puVar6[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar6[3] = 0;" (assignment_expression "puVar6[3] = 0" (subscript_expression "puVar6[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar3 = FUN_0003fd80();" (assignment_expression "uVar3 = FUN_0003fd80()" identifier = (call_expression "FUN_0003fd80()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar2[iVar5 * 4 + 2] = uVar3;" (assignment_expression "puVar2[iVar5 * 4 + 2] = uVar3" (subscript_expression "puVar2[iVar5 * 4 + 2]" identifier [ (binary_expression "iVar5 * 4 + 2" (binary_expression "iVar5 * 4" identifier * number_literal) + number_literal) ]) = identifier) ;) }) (else_clause "else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }" else (compound_statement "{\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }" { (expression_statement "uVar4 = puVar2[4];" (assignment_expression "uVar4 = puVar2[4]" identifier = (subscript_expression "puVar2[4]" identifier [ number_literal ])) ;) (if_statement "if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }" if (parenthesized_expression "(((int)uVar4 < 1) || ((param_2 & 1) == 0))" ( (binary_expression "((int)uVar4 < 1) || ((param_2 & 1) == 0)" (parenthesized_expression "((int)uVar4 < 1)" ( (binary_expression "(int)uVar4 < 1" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }" { (if_statement "if ((uVar4 & 7) != 0) goto LAB_0006a948;" if (parenthesized_expression "((uVar4 & 7) != 0)" ( (binary_expression "(uVar4 & 7) != 0" (parenthesized_expression "(uVar4 & 7)" ( (binary_expression "uVar4 & 7" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_0006a948;" goto statement_identifier ;)) (expression_statement "puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);" (assignment_expression "puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0)" identifier = (cast_expression "(undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0)" identifier (argument_list "(puVar2,uVar4 * 0x10 + 0xa4,0)" ( identifier , (binary_expression "uVar4 * 0x10 + 0xa4" (binary_expression "uVar4 * 0x10" identifier * number_literal) + number_literal) , number_literal ))))) ;) (if_statement "if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;" if (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" ( (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0006a918;" goto statement_identifier ;)) }) (else_clause "else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }" else (compound_statement "{\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }" { (expression_statement "__s = (void *)FUN_000408d0(__n + 0x1d,0);" (assignment_expression "__s = (void *)FUN_000408d0(__n + 0x1d,0)" identifier = (cast_expression "(void *)FUN_000408d0(__n + 0x1d,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000408d0(__n + 0x1d,0)" identifier (argument_list "(__n + 0x1d,0)" ( (binary_expression "__n + 0x1d" identifier + number_literal) , number_literal ))))) ;) (if_statement "if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }" if (parenthesized_expression "(__s != (void *)0x0)" ( (binary_expression "__s != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }" { (expression_statement "memset(__s,0,__n + 0x1d);" (call_expression "memset(__s,0,__n + 0x1d)" identifier (argument_list "(__s,0,__n + 0x1d)" ( identifier , number_literal , (binary_expression "__n + 0x1d" identifier + number_literal) ))) ;) (expression_statement "*(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);" (assignment_expression "*(void **)((int)__s + 4) = (void *)((int)__s + 0x1c)" (pointer_expression "*(void **)((int)__s + 4)" * (cast_expression "(void **)((int)__s + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)__s + 4)" ( (binary_expression "(int)__s + 4" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (cast_expression "(void *)((int)__s + 0x1c)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + 0x1c)" ( (binary_expression "(int)__s + 0x1c" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "memcpy((void *)((int)__s + 0x1c),param_3,__n);" (call_expression "memcpy((void *)((int)__s + 0x1c),param_3,__n)" identifier (argument_list "((void *)((int)__s + 0x1c),param_3,__n)" ( (cast_expression "(void *)((int)__s + 0x1c)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + 0x1c)" ( (binary_expression "(int)__s + 0x1c" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) , identifier , identifier ))) ;) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "*(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];" (assignment_expression "*(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4]" (pointer_expression "*(undefined4 *)((int)__s + 0xc)" * (cast_expression "(undefined4 *)((int)__s + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + 0xc)" ( (binary_expression "(int)__s + 0xc" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (subscript_expression "puVar2[puVar2[4] * 4 + 4]" identifier [ (binary_expression "puVar2[4] * 4 + 4" (binary_expression "puVar2[4] * 4" (subscript_expression "puVar2[4]" identifier [ number_literal ]) * number_literal) + number_literal) ])) ;) (expression_statement "puVar2[puVar2[4] * 4 + 4] = __s;" (assignment_expression "puVar2[puVar2[4] * 4 + 4] = __s" (subscript_expression "puVar2[puVar2[4] * 4 + 4]" identifier [ (binary_expression "puVar2[4] * 4 + 4" (binary_expression "puVar2[4] * 4" (subscript_expression "puVar2[4]" identifier [ number_literal ]) * number_literal) + number_literal) ]) = identifier) ;) (goto_statement "goto LAB_0006a926;" goto statement_identifier ;) })) }))) (labeled_statement "LAB_0006a9b2:\n    local_24 = 7;" statement_identifier : (expression_statement "local_24 = 7;" (assignment_expression "local_24 = 7" identifier = number_literal) ;)) }))) (labeled_statement "LAB_0006a926:\n  param_1[1] = local_24;" statement_identifier : (expression_statement "param_1[1] = local_24;" (assignment_expression "param_1[1] = local_24" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;)) (expression_statement "iVar5 = local_24;" (assignment_expression "iVar5 = local_24" identifier = identifier) ;) (labeled_statement "LAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_000f6410();\n  }" { comment (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint fts5ParseTokenize(void *pContext,int tflags,char *pToken,int nToken,int iUnused1,int iUnused2)\n\n{\n  undefined4 *pOld;\n  char *pcVar1;\n  void *__s;\n  size_t __n;\n  uint uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar5 = 0;\n  uStack_14 = 0x6a889;\n  iVar3 = *(int *)((int)pContext + 4);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  if (iVar3 != 0) goto LAB_0006a929;\n                    /* WARNING: Load size is inaccurate */\n  pOld = *pContext;\n  __n = 0x8000;\n  if (nToken < 0x8001) {\n    __n = nToken;\n  }\n  if (pOld == (undefined4 *)0x0) {\n    pOld = (undefined4 *)sqlite3_realloc64((void *)0x0,0xa4);\n    if (pOld == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *pOld = 0;\n    pOld[8] = 0;\n    puVar4 = (undefined4 *)((uint)(pOld + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))) >> 2; uVar2 != 0;\n        uVar2 = uVar2 - 1) {\n      *puVar4 = 0;\n      puVar4 = puVar4 + (uint)bVar5 * -2 + 1;\n    }\n    uVar2 = 0;\nLAB_0006a918:\n    *(undefined4 **)pContext = pOld;\n    pOld[4] = uVar2;\n    iVar3 = local_24;\n    if (local_24 == 0) {\nLAB_0006a948:\n      iVar3 = uVar2 + 1;\n      pOld[4] = iVar3;\n      puVar4 = pOld + iVar3 * 4 + 1;\n      *puVar4 = 0;\n      puVar4[1] = 0;\n      puVar4[2] = 0;\n      puVar4[3] = 0;\n      pcVar1 = sqlite3Fts5Strndup(&local_24,pToken,__n);\n      pOld[iVar3 * 4 + 2] = pcVar1;\n      iVar3 = local_24;\n    }\n  }\n  else {\n    uVar2 = pOld[4];\n    if (((int)uVar2 < 1) || ((tflags & 1U) == 0)) {\n      if ((uVar2 & 7) != 0) goto LAB_0006a948;\n      pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4));\n      if (pOld != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = sqlite3_malloc64((ulonglong)(__n + 0x1d));\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    iVar3 = 7;\n  }\nLAB_0006a926:\n  *(int *)((int)pContext + 4) = iVar3;\nLAB_0006a929:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "int fts5ParseTokenize(void *pContext,int tflags,char *pToken,int nToken,int iUnused1,int iUnused2)\n\n{\n  undefined4 *pOld;\n  char *pcVar1;\n  void *__s;\n  size_t __n;\n  uint uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar5 = 0;\n  uStack_14 = 0x6a889;\n  iVar3 = *(int *)((int)pContext + 4);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  if (iVar3 != 0) goto LAB_0006a929;\n                    /* WARNING: Load size is inaccurate */\n  pOld = *pContext;\n  __n = 0x8000;\n  if (nToken < 0x8001) {\n    __n = nToken;\n  }\n  if (pOld == (undefined4 *)0x0) {\n    pOld = (undefined4 *)sqlite3_realloc64((void *)0x0,0xa4);\n    if (pOld == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *pOld = 0;\n    pOld[8] = 0;\n    puVar4 = (undefined4 *)((uint)(pOld + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))) >> 2; uVar2 != 0;\n        uVar2 = uVar2 - 1) {\n      *puVar4 = 0;\n      puVar4 = puVar4 + (uint)bVar5 * -2 + 1;\n    }\n    uVar2 = 0;\nLAB_0006a918:\n    *(undefined4 **)pContext = pOld;\n    pOld[4] = uVar2;\n    iVar3 = local_24;\n    if (local_24 == 0) {\nLAB_0006a948:\n      iVar3 = uVar2 + 1;\n      pOld[4] = iVar3;\n      puVar4 = pOld + iVar3 * 4 + 1;\n      *puVar4 = 0;\n      puVar4[1] = 0;\n      puVar4[2] = 0;\n      puVar4[3] = 0;\n      pcVar1 = sqlite3Fts5Strndup(&local_24,pToken,__n);\n      pOld[iVar3 * 4 + 2] = pcVar1;\n      iVar3 = local_24;\n    }\n  }\n  else {\n    uVar2 = pOld[4];\n    if (((int)uVar2 < 1) || ((tflags & 1U) == 0)) {\n      if ((uVar2 & 7) != 0) goto LAB_0006a948;\n      pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4));\n      if (pOld != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = sqlite3_malloc64((ulonglong)(__n + 0x1d));\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    iVar3 = 7;\n  }\nLAB_0006a926:\n  *(int *)((int)pContext + 4) = iVar3;\nLAB_0006a929:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "fts5ParseTokenize(void *pContext,int tflags,char *pToken,int nToken,int iUnused1,int iUnused2)" identifier (parameter_list "(void *pContext,int tflags,char *pToken,int nToken,int iUnused1,int iUnused2)" ( (parameter_declaration "void *pContext" primitive_type (pointer_declarator "*pContext" * identifier)) , (parameter_declaration "int tflags" primitive_type identifier) , (parameter_declaration "char *pToken" primitive_type (pointer_declarator "*pToken" * identifier)) , (parameter_declaration "int nToken" primitive_type identifier) , (parameter_declaration "int iUnused1" primitive_type identifier) , (parameter_declaration "int iUnused2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *pOld;\n  char *pcVar1;\n  void *__s;\n  size_t __n;\n  uint uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar5 = 0;\n  uStack_14 = 0x6a889;\n  iVar3 = *(int *)((int)pContext + 4);\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  if (iVar3 != 0) goto LAB_0006a929;\n                    /* WARNING: Load size is inaccurate */\n  pOld = *pContext;\n  __n = 0x8000;\n  if (nToken < 0x8001) {\n    __n = nToken;\n  }\n  if (pOld == (undefined4 *)0x0) {\n    pOld = (undefined4 *)sqlite3_realloc64((void *)0x0,0xa4);\n    if (pOld == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *pOld = 0;\n    pOld[8] = 0;\n    puVar4 = (undefined4 *)((uint)(pOld + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))) >> 2; uVar2 != 0;\n        uVar2 = uVar2 - 1) {\n      *puVar4 = 0;\n      puVar4 = puVar4 + (uint)bVar5 * -2 + 1;\n    }\n    uVar2 = 0;\nLAB_0006a918:\n    *(undefined4 **)pContext = pOld;\n    pOld[4] = uVar2;\n    iVar3 = local_24;\n    if (local_24 == 0) {\nLAB_0006a948:\n      iVar3 = uVar2 + 1;\n      pOld[4] = iVar3;\n      puVar4 = pOld + iVar3 * 4 + 1;\n      *puVar4 = 0;\n      puVar4[1] = 0;\n      puVar4[2] = 0;\n      puVar4[3] = 0;\n      pcVar1 = sqlite3Fts5Strndup(&local_24,pToken,__n);\n      pOld[iVar3 * 4 + 2] = pcVar1;\n      iVar3 = local_24;\n    }\n  }\n  else {\n    uVar2 = pOld[4];\n    if (((int)uVar2 < 1) || ((tflags & 1U) == 0)) {\n      if ((uVar2 & 7) != 0) goto LAB_0006a948;\n      pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4));\n      if (pOld != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = sqlite3_malloc64((ulonglong)(__n + 0x1d));\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    iVar3 = 7;\n  }\nLAB_0006a926:\n  *(int *)((int)pContext + 4) = iVar3;\nLAB_0006a929:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "undefined4 *pOld;" type_identifier (pointer_declarator "*pOld" * identifier) ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "void *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar5;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "bVar5 = 0;" (assignment_expression "bVar5 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x6a889;" (assignment_expression "uStack_14 = 0x6a889" identifier = number_literal) ;) (expression_statement "iVar3 = *(int *)((int)pContext + 4);" (assignment_expression "iVar3 = *(int *)((int)pContext + 4)" identifier = (pointer_expression "*(int *)((int)pContext + 4)" * (cast_expression "(int *)((int)pContext + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pContext + 4)" ( (binary_expression "(int)pContext + 4" (cast_expression "(int)pContext" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (if_statement "if (iVar3 != 0) goto LAB_0006a929;" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0006a929;" goto statement_identifier ;)) comment (expression_statement "pOld = *pContext;" (assignment_expression "pOld = *pContext" identifier = (pointer_expression "*pContext" * identifier)) ;) (expression_statement "__n = 0x8000;" (assignment_expression "__n = 0x8000" identifier = number_literal) ;) (if_statement "if (nToken < 0x8001) {\n    __n = nToken;\n  }" if (parenthesized_expression "(nToken < 0x8001)" ( (binary_expression "nToken < 0x8001" identifier < number_literal) )) (compound_statement "{\n    __n = nToken;\n  }" { (expression_statement "__n = nToken;" (assignment_expression "__n = nToken" identifier = identifier) ;) })) (if_statement "if (pOld == (undefined4 *)0x0) {\n    pOld = (undefined4 *)sqlite3_realloc64((void *)0x0,0xa4);\n    if (pOld == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *pOld = 0;\n    pOld[8] = 0;\n    puVar4 = (undefined4 *)((uint)(pOld + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))) >> 2; uVar2 != 0;\n        uVar2 = uVar2 - 1) {\n      *puVar4 = 0;\n      puVar4 = puVar4 + (uint)bVar5 * -2 + 1;\n    }\n    uVar2 = 0;\nLAB_0006a918:\n    *(undefined4 **)pContext = pOld;\n    pOld[4] = uVar2;\n    iVar3 = local_24;\n    if (local_24 == 0) {\nLAB_0006a948:\n      iVar3 = uVar2 + 1;\n      pOld[4] = iVar3;\n      puVar4 = pOld + iVar3 * 4 + 1;\n      *puVar4 = 0;\n      puVar4[1] = 0;\n      puVar4[2] = 0;\n      puVar4[3] = 0;\n      pcVar1 = sqlite3Fts5Strndup(&local_24,pToken,__n);\n      pOld[iVar3 * 4 + 2] = pcVar1;\n      iVar3 = local_24;\n    }\n  }\n  else {\n    uVar2 = pOld[4];\n    if (((int)uVar2 < 1) || ((tflags & 1U) == 0)) {\n      if ((uVar2 & 7) != 0) goto LAB_0006a948;\n      pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4));\n      if (pOld != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = sqlite3_malloc64((ulonglong)(__n + 0x1d));\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    iVar3 = 7;\n  }" if (parenthesized_expression "(pOld == (undefined4 *)0x0)" ( (binary_expression "pOld == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pOld = (undefined4 *)sqlite3_realloc64((void *)0x0,0xa4);\n    if (pOld == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *pOld = 0;\n    pOld[8] = 0;\n    puVar4 = (undefined4 *)((uint)(pOld + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))) >> 2; uVar2 != 0;\n        uVar2 = uVar2 - 1) {\n      *puVar4 = 0;\n      puVar4 = puVar4 + (uint)bVar5 * -2 + 1;\n    }\n    uVar2 = 0;\nLAB_0006a918:\n    *(undefined4 **)pContext = pOld;\n    pOld[4] = uVar2;\n    iVar3 = local_24;\n    if (local_24 == 0) {\nLAB_0006a948:\n      iVar3 = uVar2 + 1;\n      pOld[4] = iVar3;\n      puVar4 = pOld + iVar3 * 4 + 1;\n      *puVar4 = 0;\n      puVar4[1] = 0;\n      puVar4[2] = 0;\n      puVar4[3] = 0;\n      pcVar1 = sqlite3Fts5Strndup(&local_24,pToken,__n);\n      pOld[iVar3 * 4 + 2] = pcVar1;\n      iVar3 = local_24;\n    }\n  }" { (expression_statement "pOld = (undefined4 *)sqlite3_realloc64((void *)0x0,0xa4);" (assignment_expression "pOld = (undefined4 *)sqlite3_realloc64((void *)0x0,0xa4)" identifier = (cast_expression "(undefined4 *)sqlite3_realloc64((void *)0x0,0xa4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_realloc64((void *)0x0,0xa4)" identifier (argument_list "((void *)0x0,0xa4)" ( (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , number_literal ))))) ;) (if_statement "if (pOld == (undefined4 *)0x0) goto LAB_0006a9b2;" if (parenthesized_expression "(pOld == (undefined4 *)0x0)" ( (binary_expression "pOld == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0006a9b2;" goto statement_identifier ;)) (expression_statement "*pOld = 0;" (assignment_expression "*pOld = 0" (pointer_expression "*pOld" * identifier) = number_literal) ;) (expression_statement "pOld[8] = 0;" (assignment_expression "pOld[8] = 0" (subscript_expression "pOld[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4 = (undefined4 *)((uint)(pOld + 1) & 0xfffffffc);" (assignment_expression "puVar4 = (undefined4 *)((uint)(pOld + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(pOld + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(pOld + 1) & 0xfffffffc)" ( (binary_expression "(uint)(pOld + 1) & 0xfffffffc" (call_expression "(uint)(pOld + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pOld + 1)" ( (binary_expression "pOld + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar2 = (uint)((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))) >> 2; uVar2 != 0;\n        uVar2 = uVar2 - 1) {\n      *puVar4 = 0;\n      puVar4 = puVar4 + (uint)bVar5 * -2 + 1;\n    }" for ( (assignment_expression "uVar2 = (uint)((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))) >> 2" identifier = (binary_expression "(uint)((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc)))" ( (binary_expression "(int)pOld + (0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))" (cast_expression "(int)pOld" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x24 - (int)((uint)(pOld + 1) & 0xfffffffc))" ( (binary_expression "0x24 - (int)((uint)(pOld + 1) & 0xfffffffc)" number_literal - (cast_expression "(int)((uint)(pOld + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(pOld + 1) & 0xfffffffc)" ( (binary_expression "(uint)(pOld + 1) & 0xfffffffc" (call_expression "(uint)(pOld + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pOld + 1)" ( (binary_expression "pOld + 1" identifier + number_literal) ))) & number_literal) )))) ))) ))) >> number_literal)) ; (binary_expression "uVar2 != 0" identifier != number_literal) ; (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar4 = 0;\n      puVar4 = puVar4 + (uint)bVar5 * -2 + 1;\n    }" { (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "puVar4 = puVar4 + (uint)bVar5 * -2 + 1;" (assignment_expression "puVar4 = puVar4 + (uint)bVar5 * -2 + 1" identifier = (binary_expression "puVar4 + (uint)bVar5 * -2 + 1" (binary_expression "puVar4 + (uint)bVar5 * -2" identifier + (binary_expression "(uint)bVar5 * -2" (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0006a918:\n    *(undefined4 **)pContext = pOld;" statement_identifier : (expression_statement "*(undefined4 **)pContext = pOld;" (assignment_expression "*(undefined4 **)pContext = pOld" (pointer_expression "*(undefined4 **)pContext" * (cast_expression "(undefined4 **)pContext" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;)) (expression_statement "pOld[4] = uVar2;" (assignment_expression "pOld[4] = uVar2" (subscript_expression "pOld[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar3 = local_24;" (assignment_expression "iVar3 = local_24" identifier = identifier) ;) (if_statement "if (local_24 == 0) {\nLAB_0006a948:\n      iVar3 = uVar2 + 1;\n      pOld[4] = iVar3;\n      puVar4 = pOld + iVar3 * 4 + 1;\n      *puVar4 = 0;\n      puVar4[1] = 0;\n      puVar4[2] = 0;\n      puVar4[3] = 0;\n      pcVar1 = sqlite3Fts5Strndup(&local_24,pToken,__n);\n      pOld[iVar3 * 4 + 2] = pcVar1;\n      iVar3 = local_24;\n    }" if (parenthesized_expression "(local_24 == 0)" ( (binary_expression "local_24 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0006a948:\n      iVar3 = uVar2 + 1;\n      pOld[4] = iVar3;\n      puVar4 = pOld + iVar3 * 4 + 1;\n      *puVar4 = 0;\n      puVar4[1] = 0;\n      puVar4[2] = 0;\n      puVar4[3] = 0;\n      pcVar1 = sqlite3Fts5Strndup(&local_24,pToken,__n);\n      pOld[iVar3 * 4 + 2] = pcVar1;\n      iVar3 = local_24;\n    }" { (labeled_statement "LAB_0006a948:\n      iVar3 = uVar2 + 1;" statement_identifier : (expression_statement "iVar3 = uVar2 + 1;" (assignment_expression "iVar3 = uVar2 + 1" identifier = (binary_expression "uVar2 + 1" identifier + number_literal)) ;)) (expression_statement "pOld[4] = iVar3;" (assignment_expression "pOld[4] = iVar3" (subscript_expression "pOld[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar4 = pOld + iVar3 * 4 + 1;" (assignment_expression "puVar4 = pOld + iVar3 * 4 + 1" identifier = (binary_expression "pOld + iVar3 * 4 + 1" (binary_expression "pOld + iVar3 * 4" identifier + (binary_expression "iVar3 * 4" identifier * number_literal)) + number_literal)) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "puVar4[1] = 0;" (assignment_expression "puVar4[1] = 0" (subscript_expression "puVar4[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[2] = 0;" (assignment_expression "puVar4[2] = 0" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[3] = 0;" (assignment_expression "puVar4[3] = 0" (subscript_expression "puVar4[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "pcVar1 = sqlite3Fts5Strndup(&local_24,pToken,__n);" (assignment_expression "pcVar1 = sqlite3Fts5Strndup(&local_24,pToken,__n)" identifier = (call_expression "sqlite3Fts5Strndup(&local_24,pToken,__n)" identifier (argument_list "(&local_24,pToken,__n)" ( (pointer_expression "&local_24" & identifier) , identifier , identifier )))) ;) (expression_statement "pOld[iVar3 * 4 + 2] = pcVar1;" (assignment_expression "pOld[iVar3 * 4 + 2] = pcVar1" (subscript_expression "pOld[iVar3 * 4 + 2]" identifier [ (binary_expression "iVar3 * 4 + 2" (binary_expression "iVar3 * 4" identifier * number_literal) + number_literal) ]) = identifier) ;) (expression_statement "iVar3 = local_24;" (assignment_expression "iVar3 = local_24" identifier = identifier) ;) })) }) (else_clause "else {\n    uVar2 = pOld[4];\n    if (((int)uVar2 < 1) || ((tflags & 1U) == 0)) {\n      if ((uVar2 & 7) != 0) goto LAB_0006a948;\n      pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4));\n      if (pOld != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = sqlite3_malloc64((ulonglong)(__n + 0x1d));\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    iVar3 = 7;\n  }" else (compound_statement "{\n    uVar2 = pOld[4];\n    if (((int)uVar2 < 1) || ((tflags & 1U) == 0)) {\n      if ((uVar2 & 7) != 0) goto LAB_0006a948;\n      pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4));\n      if (pOld != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = sqlite3_malloc64((ulonglong)(__n + 0x1d));\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    iVar3 = 7;\n  }" { (expression_statement "uVar2 = pOld[4];" (assignment_expression "uVar2 = pOld[4]" identifier = (subscript_expression "pOld[4]" identifier [ number_literal ])) ;) (if_statement "if (((int)uVar2 < 1) || ((tflags & 1U) == 0)) {\n      if ((uVar2 & 7) != 0) goto LAB_0006a948;\n      pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4));\n      if (pOld != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = sqlite3_malloc64((ulonglong)(__n + 0x1d));\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }\n    }" if (parenthesized_expression "(((int)uVar2 < 1) || ((tflags & 1U) == 0))" ( (binary_expression "((int)uVar2 < 1) || ((tflags & 1U) == 0)" (parenthesized_expression "((int)uVar2 < 1)" ( (binary_expression "(int)uVar2 < 1" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "((tflags & 1U) == 0)" ( (binary_expression "(tflags & 1U) == 0" (parenthesized_expression "(tflags & 1U)" ( (binary_expression "tflags & 1U" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      if ((uVar2 & 7) != 0) goto LAB_0006a948;\n      pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4));\n      if (pOld != (undefined4 *)0x0) goto LAB_0006a918;\n    }" { (if_statement "if ((uVar2 & 7) != 0) goto LAB_0006a948;" if (parenthesized_expression "((uVar2 & 7) != 0)" ( (binary_expression "(uVar2 & 7) != 0" (parenthesized_expression "(uVar2 & 7)" ( (binary_expression "uVar2 & 7" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_0006a948;" goto statement_identifier ;)) (expression_statement "pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4));" (assignment_expression "pOld = (undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4))" identifier = (cast_expression "(undefined4 *)sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_realloc64(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4))" identifier (argument_list "(pOld,(ulonglong)(uVar2 * 0x10 + 0xa4))" ( identifier , (call_expression "(ulonglong)(uVar2 * 0x10 + 0xa4)" (parenthesized_expression "(ulonglong)" ( identifier )) (argument_list "(uVar2 * 0x10 + 0xa4)" ( (binary_expression "uVar2 * 0x10 + 0xa4" (binary_expression "uVar2 * 0x10" identifier * number_literal) + number_literal) ))) ))))) ;) (if_statement "if (pOld != (undefined4 *)0x0) goto LAB_0006a918;" if (parenthesized_expression "(pOld != (undefined4 *)0x0)" ( (binary_expression "pOld != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0006a918;" goto statement_identifier ;)) }) (else_clause "else {\n      __s = sqlite3_malloc64((ulonglong)(__n + 0x1d));\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }\n    }" else (compound_statement "{\n      __s = sqlite3_malloc64((ulonglong)(__n + 0x1d));\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }\n    }" { (expression_statement "__s = sqlite3_malloc64((ulonglong)(__n + 0x1d));" (assignment_expression "__s = sqlite3_malloc64((ulonglong)(__n + 0x1d))" identifier = (call_expression "sqlite3_malloc64((ulonglong)(__n + 0x1d))" identifier (argument_list "((ulonglong)(__n + 0x1d))" ( (call_expression "(ulonglong)(__n + 0x1d)" (parenthesized_expression "(ulonglong)" ( identifier )) (argument_list "(__n + 0x1d)" ( (binary_expression "__n + 0x1d" identifier + number_literal) ))) )))) ;) (if_statement "if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }" if (parenthesized_expression "(__s != (void *)0x0)" ( (binary_expression "__s != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),pToken,__n);\n        *(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];\n        pOld[pOld[4] * 4 + 4] = __s;\n        iVar3 = local_24;\n        goto LAB_0006a926;\n      }" { (expression_statement "memset(__s,0,__n + 0x1d);" (call_expression "memset(__s,0,__n + 0x1d)" identifier (argument_list "(__s,0,__n + 0x1d)" ( identifier , number_literal , (binary_expression "__n + 0x1d" identifier + number_literal) ))) ;) (expression_statement "*(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);" (assignment_expression "*(void **)((int)__s + 4) = (void *)((int)__s + 0x1c)" (pointer_expression "*(void **)((int)__s + 4)" * (cast_expression "(void **)((int)__s + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)__s + 4)" ( (binary_expression "(int)__s + 4" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (cast_expression "(void *)((int)__s + 0x1c)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + 0x1c)" ( (binary_expression "(int)__s + 0x1c" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "memcpy((void *)((int)__s + 0x1c),pToken,__n);" (call_expression "memcpy((void *)((int)__s + 0x1c),pToken,__n)" identifier (argument_list "((void *)((int)__s + 0x1c),pToken,__n)" ( (cast_expression "(void *)((int)__s + 0x1c)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + 0x1c)" ( (binary_expression "(int)__s + 0x1c" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) , identifier , identifier ))) ;) (expression_statement "*(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4];" (assignment_expression "*(undefined4 *)((int)__s + 0xc) = pOld[pOld[4] * 4 + 4]" (pointer_expression "*(undefined4 *)((int)__s + 0xc)" * (cast_expression "(undefined4 *)((int)__s + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + 0xc)" ( (binary_expression "(int)__s + 0xc" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (subscript_expression "pOld[pOld[4] * 4 + 4]" identifier [ (binary_expression "pOld[4] * 4 + 4" (binary_expression "pOld[4] * 4" (subscript_expression "pOld[4]" identifier [ number_literal ]) * number_literal) + number_literal) ])) ;) (expression_statement "pOld[pOld[4] * 4 + 4] = __s;" (assignment_expression "pOld[pOld[4] * 4 + 4] = __s" (subscript_expression "pOld[pOld[4] * 4 + 4]" identifier [ (binary_expression "pOld[4] * 4 + 4" (binary_expression "pOld[4] * 4" (subscript_expression "pOld[4]" identifier [ number_literal ]) * number_literal) + number_literal) ]) = identifier) ;) (expression_statement "iVar3 = local_24;" (assignment_expression "iVar3 = local_24" identifier = identifier) ;) (goto_statement "goto LAB_0006a926;" goto statement_identifier ;) })) }))) (labeled_statement "LAB_0006a9b2:\n    iVar3 = 7;" statement_identifier : (expression_statement "iVar3 = 7;" (assignment_expression "iVar3 = 7" identifier = number_literal) ;)) }))) (labeled_statement "LAB_0006a926:\n  *(int *)((int)pContext + 4) = iVar3;" statement_identifier : (expression_statement "*(int *)((int)pContext + 4) = iVar3;" (assignment_expression "*(int *)((int)pContext + 4) = iVar3" (pointer_expression "*(int *)((int)pContext + 4)" * (cast_expression "(int *)((int)pContext + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pContext + 4)" ( (binary_expression "(int)pContext + 4" (cast_expression "(int)pContext" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;)) (labeled_statement "LAB_0006a929:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_0006a880(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  void *__s;\n  size_t __n;\n  uint uVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  int in_GS_OFFSET;\n  byte bVar7;\n  int local_24;\n  \n  bVar7 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  iVar5 = param_1[1];\n  if (param_1[1] != 0) goto LAB_0006a929;\n  puVar2 = (undefined4 *)*param_1;\n  __n = 0x8000;\n  if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }\nLAB_0006a926:\n  param_1[1] = local_24;\n  iVar5 = local_24;\nLAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }\n  return iVar5;\n}\n\n" (function_definition "int FUN_0006a880(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  void *__s;\n  size_t __n;\n  uint uVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  int in_GS_OFFSET;\n  byte bVar7;\n  int local_24;\n  \n  bVar7 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  iVar5 = param_1[1];\n  if (param_1[1] != 0) goto LAB_0006a929;\n  puVar2 = (undefined4 *)*param_1;\n  __n = 0x8000;\n  if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }\nLAB_0006a926:\n  param_1[1] = local_24;\n  iVar5 = local_24;\nLAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }\n  return iVar5;\n}" primitive_type (function_declarator "FUN_0006a880(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)" identifier (parameter_list "(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte param_2" type_identifier identifier) , (parameter_declaration "void *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "size_t param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  void *__s;\n  size_t __n;\n  uint uVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  int in_GS_OFFSET;\n  byte bVar7;\n  int local_24;\n  \n  bVar7 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  iVar5 = param_1[1];\n  if (param_1[1] != 0) goto LAB_0006a929;\n  puVar2 = (undefined4 *)*param_1;\n  __n = 0x8000;\n  if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }\nLAB_0006a926:\n  param_1[1] = local_24;\n  iVar5 = local_24;\nLAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }\n  return iVar5;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "void *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar7;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (expression_statement "bVar7 = 0;" (assignment_expression "bVar7 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "iVar5 = param_1[1];" (assignment_expression "iVar5 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (param_1[1] != 0) goto LAB_0006a929;" if (parenthesized_expression "(param_1[1] != 0)" ( (binary_expression "param_1[1] != 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) != number_literal) )) (goto_statement "goto LAB_0006a929;" goto statement_identifier ;)) (expression_statement "puVar2 = (undefined4 *)*param_1;" (assignment_expression "puVar2 = (undefined4 *)*param_1" identifier = (cast_expression "(undefined4 *)*param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "__n = 0x8000;" (assignment_expression "__n = 0x8000" identifier = number_literal) ;) (if_statement "if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }" if (parenthesized_expression "((int)param_4 < 0x8001)" ( (binary_expression "(int)param_4 < 0x8001" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n    __n = param_4;\n  }" { (expression_statement "__n = param_4;" (assignment_expression "__n = param_4" identifier = identifier) ;) })) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }" { (expression_statement "puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);" (assignment_expression "puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0)" identifier = (cast_expression "(undefined4 *)FUN_00045d10(0,0xa4,0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00045d10(0,0xa4,0)" identifier (argument_list "(0,0xa4,0)" ( number_literal , number_literal , number_literal ))))) ;) (if_statement "if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0006a9b2;" goto statement_identifier ;)) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2[8] = 0;" (assignment_expression "puVar2[8] = 0" (subscript_expression "puVar2[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);" (assignment_expression "puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(puVar2 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar2 + 1) & 0xfffffffc" (call_expression "(uint)(puVar2 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar2 + 1)" ( (binary_expression "puVar2 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }" for ( (assignment_expression "uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2" identifier = (binary_expression "(uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc)))" ( (binary_expression "(int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))" (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))" ( (binary_expression "0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc)" number_literal - (cast_expression "(int)((uint)(puVar2 + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(puVar2 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar2 + 1) & 0xfffffffc" (call_expression "(uint)(puVar2 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar2 + 1)" ( (binary_expression "puVar2 + 1" identifier + number_literal) ))) & number_literal) )))) ))) ))) >> number_literal)) ; (binary_expression "uVar4 != 0" identifier != number_literal) ; (assignment_expression "uVar4 = uVar4 - 1" identifier = (binary_expression "uVar4 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }" { (expression_statement "*puVar6 = 0;" (assignment_expression "*puVar6 = 0" (pointer_expression "*puVar6" * identifier) = number_literal) ;) (expression_statement "puVar6 = puVar6 + (uint)bVar7 * -2 + 1;" (assignment_expression "puVar6 = puVar6 + (uint)bVar7 * -2 + 1" identifier = (binary_expression "puVar6 + (uint)bVar7 * -2 + 1" (binary_expression "puVar6 + (uint)bVar7 * -2" identifier + (binary_expression "(uint)bVar7 * -2" (cast_expression "(uint)bVar7" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0006a918:\n    *param_1 = puVar2;" statement_identifier : (expression_statement "*param_1 = puVar2;" (assignment_expression "*param_1 = puVar2" (pointer_expression "*param_1" * identifier) = identifier) ;)) (expression_statement "puVar2[4] = uVar4;" (assignment_expression "puVar2[4] = uVar4" (subscript_expression "puVar2[4]" identifier [ number_literal ]) = identifier) ;) (labeled_statement "LAB_0006a948:\n    iVar5 = uVar4 + 1;" statement_identifier : (expression_statement "iVar5 = uVar4 + 1;" (assignment_expression "iVar5 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;)) (expression_statement "puVar2[4] = iVar5;" (assignment_expression "puVar2[4] = iVar5" (subscript_expression "puVar2[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar6 = puVar2 + iVar5 * 4 + 1;" (assignment_expression "puVar6 = puVar2 + iVar5 * 4 + 1" identifier = (binary_expression "puVar2 + iVar5 * 4 + 1" (binary_expression "puVar2 + iVar5 * 4" identifier + (binary_expression "iVar5 * 4" identifier * number_literal)) + number_literal)) ;) (expression_statement "*puVar6 = 0;" (assignment_expression "*puVar6 = 0" (pointer_expression "*puVar6" * identifier) = number_literal) ;) (expression_statement "puVar6[1] = 0;" (assignment_expression "puVar6[1] = 0" (subscript_expression "puVar6[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar6[2] = 0;" (assignment_expression "puVar6[2] = 0" (subscript_expression "puVar6[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar6[3] = 0;" (assignment_expression "puVar6[3] = 0" (subscript_expression "puVar6[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar3 = FUN_0003fd80();" (assignment_expression "uVar3 = FUN_0003fd80()" identifier = (call_expression "FUN_0003fd80()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar2[iVar5 * 4 + 2] = uVar3;" (assignment_expression "puVar2[iVar5 * 4 + 2] = uVar3" (subscript_expression "puVar2[iVar5 * 4 + 2]" identifier [ (binary_expression "iVar5 * 4 + 2" (binary_expression "iVar5 * 4" identifier * number_literal) + number_literal) ]) = identifier) ;) }) (else_clause "else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }" else (compound_statement "{\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }" { (expression_statement "uVar4 = puVar2[4];" (assignment_expression "uVar4 = puVar2[4]" identifier = (subscript_expression "puVar2[4]" identifier [ number_literal ])) ;) (if_statement "if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }" if (parenthesized_expression "(((int)uVar4 < 1) || ((param_2 & 1) == 0))" ( (binary_expression "((int)uVar4 < 1) || ((param_2 & 1) == 0)" (parenthesized_expression "((int)uVar4 < 1)" ( (binary_expression "(int)uVar4 < 1" (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) || (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }" { (if_statement "if ((uVar4 & 7) != 0) goto LAB_0006a948;" if (parenthesized_expression "((uVar4 & 7) != 0)" ( (binary_expression "(uVar4 & 7) != 0" (parenthesized_expression "(uVar4 & 7)" ( (binary_expression "uVar4 & 7" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_0006a948;" goto statement_identifier ;)) (expression_statement "puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);" (assignment_expression "puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0)" identifier = (cast_expression "(undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0)" identifier (argument_list "(puVar2,uVar4 * 0x10 + 0xa4,0)" ( identifier , (binary_expression "uVar4 * 0x10 + 0xa4" (binary_expression "uVar4 * 0x10" identifier * number_literal) + number_literal) , number_literal ))))) ;) (if_statement "if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;" if (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" ( (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0006a918;" goto statement_identifier ;)) }) (else_clause "else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }" else (compound_statement "{\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }" { (expression_statement "__s = (void *)FUN_000408d0(__n + 0x1d,0);" (assignment_expression "__s = (void *)FUN_000408d0(__n + 0x1d,0)" identifier = (cast_expression "(void *)FUN_000408d0(__n + 0x1d,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000408d0(__n + 0x1d,0)" identifier (argument_list "(__n + 0x1d,0)" ( (binary_expression "__n + 0x1d" identifier + number_literal) , number_literal ))))) ;) (if_statement "if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }" if (parenthesized_expression "(__s != (void *)0x0)" ( (binary_expression "__s != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }" { (expression_statement "memset(__s,0,__n + 0x1d);" (call_expression "memset(__s,0,__n + 0x1d)" identifier (argument_list "(__s,0,__n + 0x1d)" ( identifier , number_literal , (binary_expression "__n + 0x1d" identifier + number_literal) ))) ;) (expression_statement "*(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);" (assignment_expression "*(void **)((int)__s + 4) = (void *)((int)__s + 0x1c)" (pointer_expression "*(void **)((int)__s + 4)" * (cast_expression "(void **)((int)__s + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)__s + 4)" ( (binary_expression "(int)__s + 4" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (cast_expression "(void *)((int)__s + 0x1c)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + 0x1c)" ( (binary_expression "(int)__s + 0x1c" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "memcpy((void *)((int)__s + 0x1c),param_3,__n);" (call_expression "memcpy((void *)((int)__s + 0x1c),param_3,__n)" identifier (argument_list "((void *)((int)__s + 0x1c),param_3,__n)" ( (cast_expression "(void *)((int)__s + 0x1c)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + 0x1c)" ( (binary_expression "(int)__s + 0x1c" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) , identifier , identifier ))) ;) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "*(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];" (assignment_expression "*(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4]" (pointer_expression "*(undefined4 *)((int)__s + 0xc)" * (cast_expression "(undefined4 *)((int)__s + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + 0xc)" ( (binary_expression "(int)__s + 0xc" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (subscript_expression "puVar2[puVar2[4] * 4 + 4]" identifier [ (binary_expression "puVar2[4] * 4 + 4" (binary_expression "puVar2[4] * 4" (subscript_expression "puVar2[4]" identifier [ number_literal ]) * number_literal) + number_literal) ])) ;) (expression_statement "puVar2[puVar2[4] * 4 + 4] = __s;" (assignment_expression "puVar2[puVar2[4] * 4 + 4] = __s" (subscript_expression "puVar2[puVar2[4] * 4 + 4]" identifier [ (binary_expression "puVar2[4] * 4 + 4" (binary_expression "puVar2[4] * 4" (subscript_expression "puVar2[4]" identifier [ number_literal ]) * number_literal) + number_literal) ]) = identifier) ;) (goto_statement "goto LAB_0006a926;" goto statement_identifier ;) })) }))) (labeled_statement "LAB_0006a9b2:\n    local_24 = 7;" statement_identifier : (expression_statement "local_24 = 7;" (assignment_expression "local_24 = 7" identifier = number_literal) ;)) }))) (labeled_statement "LAB_0006a926:\n  param_1[1] = local_24;" statement_identifier : (expression_statement "param_1[1] = local_24;" (assignment_expression "param_1[1] = local_24" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;)) (expression_statement "iVar5 = local_24;" (assignment_expression "iVar5 = local_24" identifier = identifier) ;) (labeled_statement "LAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_000f6410();\n  }" { (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (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 ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ;) (for_statement for ( (assignment_expression IDENT = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ))) ))) >> LIT)) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT - LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;)) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT)) ;) (expression_statement (assignment_expression (pointer_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 ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression (binary_expression IDENT * LIT) + LIT) ]) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) || (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (binary_expression (binary_expression IDENT * LIT) + LIT) , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , 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 ( IDENT , LIT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ))) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = 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) )))) = (subscript_expression IDENT [ (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) * LIT) + LIT) ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) * LIT) + LIT) ]) = IDENT) ;) (goto_statement goto statement_identifier ;) })) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int FUN_0006a880(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  void *__s;\n  size_t __n;\n  uint uVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  int in_GS_OFFSET;\n  byte bVar7;\n  int local_24;\n  \n  bVar7 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  iVar5 = param_1[1];\n  if (param_1[1] != 0) goto LAB_0006a929;\n  puVar2 = (undefined4 *)*param_1;\n  __n = 0x8000;\n  if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }\nLAB_0006a926:\n  param_1[1] = local_24;\n  iVar5 = local_24;\nLAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }\n  return iVar5;\n}" (primitive_type "int") (function_declarator "FUN_0006a880(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)" (identifier "FUN_0006a880") (parameter_list "(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "byte param_2" (type_identifier "byte") (identifier "param_2")) (, ",") (parameter_declaration "void *param_3" (primitive_type "void") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "size_t param_4" (primitive_type "size_t") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  void *__s;\n  size_t __n;\n  uint uVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  int in_GS_OFFSET;\n  byte bVar7;\n  int local_24;\n  \n  bVar7 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  local_24 = 0;\n  iVar5 = param_1[1];\n  if (param_1[1] != 0) goto LAB_0006a929;\n  puVar2 = (undefined4 *)*param_1;\n  __n = 0x8000;\n  if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }\n  if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }\nLAB_0006a926:\n  param_1[1] = local_24;\n  iVar5 = local_24;\nLAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }\n  return iVar5;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "void *__s;" (primitive_type "void") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined4 *puVar6;" (type_identifier "undefined4") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "byte bVar7;" (type_identifier "byte") (identifier "bVar7") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (expression_statement "bVar7 = 0;" (assignment_expression "bVar7 = 0" (identifier "bVar7") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" (identifier "local_24") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar5 = param_1[1];" (assignment_expression "iVar5 = param_1[1]" (identifier "iVar5") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (param_1[1] != 0) goto LAB_0006a929;" (if "if") (parenthesized_expression "(param_1[1] != 0)" (( "(") (binary_expression "param_1[1] != 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0006a929;" (goto "goto") (statement_identifier "LAB_0006a929") (; ";"))) (expression_statement "puVar2 = (undefined4 *)*param_1;" (assignment_expression "puVar2 = (undefined4 *)*param_1" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)*param_1" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "__n = 0x8000;" (assignment_expression "__n = 0x8000" (identifier "__n") (= "=") (number_literal "0x8000")) (; ";")) (if_statement "if ((int)param_4 < 0x8001) {\n    __n = param_4;\n  }" (if "if") (parenthesized_expression "((int)param_4 < 0x8001)" (( "(") (binary_expression "(int)param_4 < 0x8001" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (< "<") (number_literal "0x8001")) () ")")) (compound_statement "{\n    __n = param_4;\n  }" ({ "{") (expression_statement "__n = param_4;" (assignment_expression "__n = param_4" (identifier "__n") (= "=") (identifier "param_4")) (; ";")) (} "}"))) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }\n  else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }" (if "if") (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 == (undefined4 *)0x0" (identifier "puVar2") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);\n    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;\n    *puVar2 = 0;\n    puVar2[8] = 0;\n    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);\n    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }\n    uVar4 = 0;\nLAB_0006a918:\n    *param_1 = puVar2;\n    puVar2[4] = uVar4;\nLAB_0006a948:\n    iVar5 = uVar4 + 1;\n    puVar2[4] = iVar5;\n    puVar6 = puVar2 + iVar5 * 4 + 1;\n    *puVar6 = 0;\n    puVar6[1] = 0;\n    puVar6[2] = 0;\n    puVar6[3] = 0;\n    uVar3 = FUN_0003fd80();\n    puVar2[iVar5 * 4 + 2] = uVar3;\n  }" ({ "{") (expression_statement "puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);" (assignment_expression "puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)FUN_00045d10(0,0xa4,0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00045d10(0,0xa4,0)" (identifier "FUN_00045d10") (argument_list "(0,0xa4,0)" (( "(") (number_literal "0") (, ",") (number_literal "0xa4") (, ",") (number_literal "0") () ")"))))) (; ";")) (if_statement "if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;" (if "if") (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 == (undefined4 *)0x0" (identifier "puVar2") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_0006a9b2;" (goto "goto") (statement_identifier "LAB_0006a9b2") (; ";"))) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[8] = 0;" (assignment_expression "puVar2[8] = 0" (subscript_expression "puVar2[8]" (identifier "puVar2") ([ "[") (number_literal "8") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);" (assignment_expression "puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc)" (identifier "puVar6") (= "=") (cast_expression "(undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((uint)(puVar2 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar2 + 1) & 0xfffffffc" (call_expression "(uint)(puVar2 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar2 + 1)" (( "(") (binary_expression "puVar2 + 1" (identifier "puVar2") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) (; ";")) (for_statement "for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;\n        uVar4 != 0; uVar4 = uVar4 - 1) {\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }" (for "for") (( "(") (assignment_expression "uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2" (identifier "uVar4") (= "=") (binary_expression "(uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc)))" (( "(") (binary_expression "(int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))" (cast_expression "(int)puVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar2")) (+ "+") (parenthesized_expression "(0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))" (( "(") (binary_expression "0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc)" (number_literal "0x24") (- "-") (cast_expression "(int)((uint)(puVar2 + 1) & 0xfffffffc)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((uint)(puVar2 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar2 + 1) & 0xfffffffc" (call_expression "(uint)(puVar2 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar2 + 1)" (( "(") (binary_expression "puVar2 + 1" (identifier "puVar2") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) () ")"))) () ")"))) (>> ">>") (number_literal "2"))) (; ";") (binary_expression "uVar4 != 0" (identifier "uVar4") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "uVar4 = uVar4 - 1" (identifier "uVar4") (= "=") (binary_expression "uVar4 - 1" (identifier "uVar4") (- "-") (number_literal "1"))) () ")") (compound_statement "{\n      *puVar6 = 0;\n      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;\n    }" ({ "{") (expression_statement "*puVar6 = 0;" (assignment_expression "*puVar6 = 0" (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar6 = puVar6 + (uint)bVar7 * -2 + 1;" (assignment_expression "puVar6 = puVar6 + (uint)bVar7 * -2 + 1" (identifier "puVar6") (= "=") (binary_expression "puVar6 + (uint)bVar7 * -2 + 1" (binary_expression "puVar6 + (uint)bVar7 * -2" (identifier "puVar6") (+ "+") (binary_expression "(uint)bVar7 * -2" (cast_expression "(uint)bVar7" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar7")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_0006a918:\n    *param_1 = puVar2;" (statement_identifier "LAB_0006a918") (: ":") (expression_statement "*param_1 = puVar2;" (assignment_expression "*param_1 = puVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "puVar2")) (; ";"))) (expression_statement "puVar2[4] = uVar4;" (assignment_expression "puVar2[4] = uVar4" (subscript_expression "puVar2[4]" (identifier "puVar2") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "uVar4")) (; ";")) (labeled_statement "LAB_0006a948:\n    iVar5 = uVar4 + 1;" (statement_identifier "LAB_0006a948") (: ":") (expression_statement "iVar5 = uVar4 + 1;" (assignment_expression "iVar5 = uVar4 + 1" (identifier "iVar5") (= "=") (binary_expression "uVar4 + 1" (identifier "uVar4") (+ "+") (number_literal "1"))) (; ";"))) (expression_statement "puVar2[4] = iVar5;" (assignment_expression "puVar2[4] = iVar5" (subscript_expression "puVar2[4]" (identifier "puVar2") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "iVar5")) (; ";")) (expression_statement "puVar6 = puVar2 + iVar5 * 4 + 1;" (assignment_expression "puVar6 = puVar2 + iVar5 * 4 + 1" (identifier "puVar6") (= "=") (binary_expression "puVar2 + iVar5 * 4 + 1" (binary_expression "puVar2 + iVar5 * 4" (identifier "puVar2") (+ "+") (binary_expression "iVar5 * 4" (identifier "iVar5") (* "*") (number_literal "4"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*puVar6 = 0;" (assignment_expression "*puVar6 = 0" (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar6[1] = 0;" (assignment_expression "puVar6[1] = 0" (subscript_expression "puVar6[1]" (identifier "puVar6") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar6[2] = 0;" (assignment_expression "puVar6[2] = 0" (subscript_expression "puVar6[2]" (identifier "puVar6") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar6[3] = 0;" (assignment_expression "puVar6[3] = 0" (subscript_expression "puVar6[3]" (identifier "puVar6") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar3 = FUN_0003fd80();" (assignment_expression "uVar3 = FUN_0003fd80()" (identifier "uVar3") (= "=") (call_expression "FUN_0003fd80()" (identifier "FUN_0003fd80") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "puVar2[iVar5 * 4 + 2] = uVar3;" (assignment_expression "puVar2[iVar5 * 4 + 2] = uVar3" (subscript_expression "puVar2[iVar5 * 4 + 2]" (identifier "puVar2") ([ "[") (binary_expression "iVar5 * 4 + 2" (binary_expression "iVar5 * 4" (identifier "iVar5") (* "*") (number_literal "4")) (+ "+") (number_literal "2")) (] "]")) (= "=") (identifier "uVar3")) (; ";")) (} "}")) (else_clause "else {\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }" (else "else") (compound_statement "{\n    uVar4 = puVar2[4];\n    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }\nLAB_0006a9b2:\n    local_24 = 7;\n  }" ({ "{") (expression_statement "uVar4 = puVar2[4];" (assignment_expression "uVar4 = puVar2[4]" (identifier "uVar4") (= "=") (subscript_expression "puVar2[4]" (identifier "puVar2") ([ "[") (number_literal "4") (] "]"))) (; ";")) (if_statement "if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }\n    else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }" (if "if") (parenthesized_expression "(((int)uVar4 < 1) || ((param_2 & 1) == 0))" (( "(") (binary_expression "((int)uVar4 < 1) || ((param_2 & 1) == 0)" (parenthesized_expression "((int)uVar4 < 1)" (( "(") (binary_expression "(int)uVar4 < 1" (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4")) (< "<") (number_literal "1")) () ")")) (|| "||") (parenthesized_expression "((param_2 & 1) == 0)" (( "(") (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" (( "(") (binary_expression "param_2 & 1" (identifier "param_2") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      if ((uVar4 & 7) != 0) goto LAB_0006a948;\n      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);\n      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;\n    }" ({ "{") (if_statement "if ((uVar4 & 7) != 0) goto LAB_0006a948;" (if "if") (parenthesized_expression "((uVar4 & 7) != 0)" (( "(") (binary_expression "(uVar4 & 7) != 0" (parenthesized_expression "(uVar4 & 7)" (( "(") (binary_expression "uVar4 & 7" (identifier "uVar4") (& "&") (number_literal "7")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0006a948;" (goto "goto") (statement_identifier "LAB_0006a948") (; ";"))) (expression_statement "puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);" (assignment_expression "puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0)" (identifier "FUN_00045d10") (argument_list "(puVar2,uVar4 * 0x10 + 0xa4,0)" (( "(") (identifier "puVar2") (, ",") (binary_expression "uVar4 * 0x10 + 0xa4" (binary_expression "uVar4 * 0x10" (identifier "uVar4") (* "*") (number_literal "0x10")) (+ "+") (number_literal "0xa4")) (, ",") (number_literal "0") () ")"))))) (; ";")) (if_statement "if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;" (if "if") (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 != (undefined4 *)0x0" (identifier "puVar2") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_0006a918;" (goto "goto") (statement_identifier "LAB_0006a918") (; ";"))) (} "}")) (else_clause "else {\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }" (else "else") (compound_statement "{\n      __s = (void *)FUN_000408d0(__n + 0x1d,0);\n      if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }\n    }" ({ "{") (expression_statement "__s = (void *)FUN_000408d0(__n + 0x1d,0);" (assignment_expression "__s = (void *)FUN_000408d0(__n + 0x1d,0)" (identifier "__s") (= "=") (cast_expression "(void *)FUN_000408d0(__n + 0x1d,0)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000408d0(__n + 0x1d,0)" (identifier "FUN_000408d0") (argument_list "(__n + 0x1d,0)" (( "(") (binary_expression "__n + 0x1d" (identifier "__n") (+ "+") (number_literal "0x1d")) (, ",") (number_literal "0") () ")"))))) (; ";")) (if_statement "if (__s != (void *)0x0) {\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }" (if "if") (parenthesized_expression "(__s != (void *)0x0)" (( "(") (binary_expression "__s != (void *)0x0" (identifier "__s") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        memset(__s,0,__n + 0x1d);\n        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);\n        memcpy((void *)((int)__s + 0x1c),param_3,__n);\n        local_24 = 0;\n        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];\n        puVar2[puVar2[4] * 4 + 4] = __s;\n        goto LAB_0006a926;\n      }" ({ "{") (expression_statement "memset(__s,0,__n + 0x1d);" (call_expression "memset(__s,0,__n + 0x1d)" (identifier "memset") (argument_list "(__s,0,__n + 0x1d)" (( "(") (identifier "__s") (, ",") (number_literal "0") (, ",") (binary_expression "__n + 0x1d" (identifier "__n") (+ "+") (number_literal "0x1d")) () ")"))) (; ";")) (expression_statement "*(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);" (assignment_expression "*(void **)((int)__s + 4) = (void *)((int)__s + 0x1c)" (pointer_expression "*(void **)((int)__s + 4)" (* "*") (cast_expression "(void **)((int)__s + 4)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)__s + 4)" (( "(") (binary_expression "(int)__s + 4" (cast_expression "(int)__s" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s")) (+ "+") (number_literal "4")) () ")")))) (= "=") (cast_expression "(void *)((int)__s + 0x1c)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)__s + 0x1c)" (( "(") (binary_expression "(int)__s + 0x1c" (cast_expression "(int)__s" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s")) (+ "+") (number_literal "0x1c")) () ")")))) (; ";")) (expression_statement "memcpy((void *)((int)__s + 0x1c),param_3,__n);" (call_expression "memcpy((void *)((int)__s + 0x1c),param_3,__n)" (identifier "memcpy") (argument_list "((void *)((int)__s + 0x1c),param_3,__n)" (( "(") (cast_expression "(void *)((int)__s + 0x1c)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)__s + 0x1c)" (( "(") (binary_expression "(int)__s + 0x1c" (cast_expression "(int)__s" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s")) (+ "+") (number_literal "0x1c")) () ")"))) (, ",") (identifier "param_3") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" (identifier "local_24") (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];" (assignment_expression "*(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4]" (pointer_expression "*(undefined4 *)((int)__s + 0xc)" (* "*") (cast_expression "(undefined4 *)((int)__s + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)__s + 0xc)" (( "(") (binary_expression "(int)__s + 0xc" (cast_expression "(int)__s" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s")) (+ "+") (number_literal "0xc")) () ")")))) (= "=") (subscript_expression "puVar2[puVar2[4] * 4 + 4]" (identifier "puVar2") ([ "[") (binary_expression "puVar2[4] * 4 + 4" (binary_expression "puVar2[4] * 4" (subscript_expression "puVar2[4]" (identifier "puVar2") ([ "[") (number_literal "4") (] "]")) (* "*") (number_literal "4")) (+ "+") (number_literal "4")) (] "]"))) (; ";")) (expression_statement "puVar2[puVar2[4] * 4 + 4] = __s;" (assignment_expression "puVar2[puVar2[4] * 4 + 4] = __s" (subscript_expression "puVar2[puVar2[4] * 4 + 4]" (identifier "puVar2") ([ "[") (binary_expression "puVar2[4] * 4 + 4" (binary_expression "puVar2[4] * 4" (subscript_expression "puVar2[4]" (identifier "puVar2") ([ "[") (number_literal "4") (] "]")) (* "*") (number_literal "4")) (+ "+") (number_literal "4")) (] "]")) (= "=") (identifier "__s")) (; ";")) (goto_statement "goto LAB_0006a926;" (goto "goto") (statement_identifier "LAB_0006a926") (; ";")) (} "}"))) (} "}")))) (labeled_statement "LAB_0006a9b2:\n    local_24 = 7;" (statement_identifier "LAB_0006a9b2") (: ":") (expression_statement "local_24 = 7;" (assignment_expression "local_24 = 7" (identifier "local_24") (= "=") (number_literal "7")) (; ";"))) (} "}")))) (labeled_statement "LAB_0006a926:\n  param_1[1] = local_24;" (statement_identifier "LAB_0006a926") (: ":") (expression_statement "param_1[1] = local_24;" (assignment_expression "param_1[1] = local_24" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "local_24")) (; ";"))) (expression_statement "iVar5 = local_24;" (assignment_expression "iVar5 = local_24" (identifier "iVar5") (= "=") (identifier "local_24")) (; ";")) (labeled_statement "LAB_0006a929:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }" (statement_identifier "LAB_0006a929") (: ":") (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000f6410();\n  }" (if "if") (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_000f6410();\n  }" ({ "{") (expression_statement "FUN_000f6410();" (call_expression "FUN_000f6410()" (identifier "FUN_000f6410") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return iVar5;" (return "return") (identifier "iVar5") (; ";")) (} "}")))

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

int function_1(void *pContext,int var_10,char *pToken,int var_3,int iUnused1,int iUnused2)

{
  type_1 *var_4;
  char *pcVar1;
  void *var_13;
  size_t var_12;
  type_2 var_6;
  int var_2;
  type_1 *var_7;
  int var_1;
  type_3 bVar5;
  int var_8;
  int var_16;
  type_1 uStack_14;
  
  bVar5 = 0;
  uStack_14 = 0x6a889;
  var_2 = *(int *)((int)pContext + 4);
  var_16 = *(int *)(var_1 + 0x14);
  var_8 = 0;
  if (var_2 != 0) goto LAB_0006a929;
                    /* WARNING: Load size is inaccurate */
  var_4 = *pContext;
  var_12 = 0x8000;
  if (var_3 < 0x8001) {
    var_12 = var_3;
  }
  if (var_4 == (type_1 *)0x0) {
    var_4 = (type_1 *)var_5((void *)0x0,0xa4);
    if (var_4 == (type_1 *)0x0) goto LAB_0006a9b2;
    *var_4 = 0;
    var_4[8] = 0;
    var_7 = (type_1 *)((type_2)(var_4 + 1) & 0xfffffffc);
    for (var_6 = (type_2)((int)var_4 + (0x24 - (int)((type_2)(var_4 + 1) & 0xfffffffc))) >> 2; var_6 != 0;
        var_6 = var_6 - 1) {
      *var_7 = 0;
      var_7 = var_7 + (type_2)bVar5 * -2 + 1;
    }
    var_6 = 0;
LAB_0006a918:
    *(type_1 **)pContext = var_4;
    var_4[4] = var_6;
    var_2 = var_8;
    if (var_8 == 0) {
LAB_0006a948:
      var_2 = var_6 + 1;
      var_4[4] = var_2;
      var_7 = var_4 + var_2 * 4 + 1;
      *var_7 = 0;
      var_7[1] = 0;
      var_7[2] = 0;
      var_7[3] = 0;
      pcVar1 = var_9(&var_8,pToken,var_12);
      var_4[var_2 * 4 + 2] = pcVar1;
      var_2 = var_8;
    }
  }
  else {
    var_6 = var_4[4];
    if (((int)var_6 < 1) || ((var_10 & 1U) == 0)) {
      if ((var_6 & 7) != 0) goto LAB_0006a948;
      var_4 = (type_1 *)var_5(var_4,(ulonglong)(var_6 * 0x10 + 0xa4));
      if (var_4 != (type_1 *)0x0) goto LAB_0006a918;
    }
    else {
      var_13 = var_11((ulonglong)(var_12 + 0x1d));
      if (var_13 != (void *)0x0) {
        var_14(var_13,0,var_12 + 0x1d);
        *(void **)((int)var_13 + 4) = (void *)((int)var_13 + 0x1c);
        var_15((void *)((int)var_13 + 0x1c),pToken,var_12);
        *(type_1 *)((int)var_13 + 0xc) = var_4[var_4[4] * 4 + 4];
        var_4[var_4[4] * 4 + 4] = var_13;
        var_2 = var_8;
        goto LAB_0006a926;
      }
    }
LAB_0006a9b2:
    var_2 = 7;
  }
LAB_0006a926:
  *(int *)((int)pContext + 4) = var_2;
LAB_0006a929:
  if (var_16 == *(int *)(var_1 + 0x14)) {
    return var_2;
  }
                    /* WARNING: Subroutine does not return */
  var_17();
}


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

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

int MASKED(undefined4 *param_1,byte param_2,void *param_3,size_t param_4)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  void *__s;
  size_t __n;
  uint uVar4;
  int iVar5;
  undefined4 *puVar6;
  int in_GS_OFFSET;
  byte bVar7;
  int local_24;
  
  bVar7 = 0;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  local_24 = 0;
  iVar5 = param_1[1];
  if (param_1[1] != 0) goto LAB_0006a929;
  puVar2 = (undefined4 *)*param_1;
  __n = 0x8000;
  if ((int)param_4 < 0x8001) {
    __n = param_4;
  }
  if (puVar2 == (undefined4 *)0x0) {
    puVar2 = (undefined4 *)FUN_00045d10(0,0xa4,0);
    if (puVar2 == (undefined4 *)0x0) goto LAB_0006a9b2;
    *puVar2 = 0;
    puVar2[8] = 0;
    puVar6 = (undefined4 *)((uint)(puVar2 + 1) & 0xfffffffc);
    for (uVar4 = (uint)((int)puVar2 + (0x24 - (int)((uint)(puVar2 + 1) & 0xfffffffc))) >> 2;
        uVar4 != 0; uVar4 = uVar4 - 1) {
      *puVar6 = 0;
      puVar6 = puVar6 + (uint)bVar7 * -2 + 1;
    }
    uVar4 = 0;
LAB_0006a918:
    *param_1 = puVar2;
    puVar2[4] = uVar4;
LAB_0006a948:
    iVar5 = uVar4 + 1;
    puVar2[4] = iVar5;
    puVar6 = puVar2 + iVar5 * 4 + 1;
    *puVar6 = 0;
    puVar6[1] = 0;
    puVar6[2] = 0;
    puVar6[3] = 0;
    uVar3 = FUN_0003fd80();
    puVar2[iVar5 * 4 + 2] = uVar3;
  }
  else {
    uVar4 = puVar2[4];
    if (((int)uVar4 < 1) || ((param_2 & 1) == 0)) {
      if ((uVar4 & 7) != 0) goto LAB_0006a948;
      puVar2 = (undefined4 *)FUN_00045d10(puVar2,uVar4 * 0x10 + 0xa4,0);
      if (puVar2 != (undefined4 *)0x0) goto LAB_0006a918;
    }
    else {
      __s = (void *)FUN_000408d0(__n + 0x1d,0);
      if (__s != (void *)0x0) {
        memset(__s,0,__n + 0x1d);
        *(void **)((int)__s + 4) = (void *)((int)__s + 0x1c);
        memcpy((void *)((int)__s + 0x1c),param_3,__n);
        local_24 = 0;
        *(undefined4 *)((int)__s + 0xc) = puVar2[puVar2[4] * 4 + 4];
        puVar2[puVar2[4] * 4 + 4] = __s;
        goto LAB_0006a926;
      }
    }
LAB_0006a9b2:
    local_24 = 7;
  }
LAB_0006a926:
  param_1[1] = local_24;
  iVar5 = local_24;
LAB_0006a929:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000f6410();
  }
  return iVar5;
}

