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

void __regparm3 zeroPage(MemPage *pPage,int flags)

{
  u8 *puVar1;
  int iVar2;
  byte bVar3;
  u8 *puVar4;
  BtShared *pBVar5;
  u32 uVar6;
  u16 uVar7;
  uint uVar8;
  
  bVar3 = pPage->hdrOffset;
  uVar8 = (uint)bVar3;
  puVar4 = pPage->aData;
  pBVar5 = pPage->pBt;
  if ((pBVar5->btsFlags & 0xc) != 0) {
    memset(puVar4 + uVar8,0,pBVar5->usableSize - uVar8);
  }
  puVar4[uVar8] = (u8)flags;
  puVar1 = puVar4 + uVar8 + 1;
  puVar1[0] = '\0';
  puVar1[1] = '\0';
  puVar1[2] = '\0';
  puVar1[3] = '\0';
  puVar4[uVar8 + 7] = '\0';
  iVar2 = bVar3 + 8 + (-(uint)((flags & 8U) == 0) & 4);
  puVar4[uVar8 + 5] = (u8)(pBVar5->usableSize >> 8);
  puVar4[uVar8 + 6] = (u8)pBVar5->usableSize;
  uVar7 = (u16)iVar2;
  pPage->nFree = (short)pBVar5->usableSize - uVar7;
  decodeFlags(pPage,flags);
  pPage->cellOffset = uVar7;
  uVar6 = pBVar5->usableSize;
  pPage->nOverflow = '\0';
  pPage->aCellIdx = puVar4 + iVar2;
  pPage->aDataEnd = puVar4 + uVar6;
  pPage->aDataOfst = puVar4 + pPage->childPtrSize;
  uVar6 = pBVar5->pageSize;
  pPage->isInit = '\x01';
  pPage->maskPage = (short)uVar6 - 1;
  pPage->nCell = 0;
  return;
}



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

void __regparm3 FUN_0006eb50(undefined1 *param_1,byte param_2)

{
  int iVar1;
  byte bVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined4 uVar6;
  short sVar7;
  uint uVar8;
  
  bVar2 = param_1[9];
  uVar8 = (uint)bVar2;
  iVar3 = *(int *)(param_1 + 0x38);
  iVar4 = *(int *)(param_1 + 0x34);
  if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {
    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);
  }
  *(byte *)(iVar3 + uVar8) = param_2;
  *(undefined4 *)(iVar3 + 1 + uVar8) = 0;
  *(undefined1 *)(iVar3 + 7 + uVar8) = 0;
  iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);
  *(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);
  *(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);
  sVar7 = (short)iVar1;
  *(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;
  FUN_0006ea60();
  *(short *)(param_1 + 0x12) = sVar7;
  iVar5 = *(int *)(iVar4 + 0x24);
  param_1[0xc] = 0;
  *(int *)(param_1 + 0x40) = iVar1 + iVar3;
  *(int *)(param_1 + 0x3c) = iVar5 + iVar3;
  *(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];
  uVar6 = *(undefined4 *)(iVar4 + 0x20);
  *param_1 = 1;
  *(short *)(param_1 + 0x18) = (short)uVar6 + -1;
  *(undefined2 *)(param_1 + 0x16) = 0;
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00017230
ADD EBX,0x10d2cd
SUB ESP,0x1c
MOVZX ECX,byte ptr [EAX + 0x9]
MOV EDI,dword ptr [EAX + 0x38]
MOV EBP,dword ptr [EAX + 0x34]
LEA EAX,[EDI + ECX*0x1]
MOV byte ptr [ESP + 0x7],CL
MOV dword ptr [ESP],EAX
TEST byte ptr [EBP + 0x16],0xc
JNZ 0x0006ec08
MOV EAX,dword ptr [ESP]
MOVZX EBX,byte ptr [ESP + 0x7]
MOV byte ptr [EAX],DL
MOV EAX,EDX
AND EAX,0x8
MOV dword ptr [EDI + ECX*0x1 + 0x1],0x0
CMP EAX,0x1
MOV byte ptr [EDI + ECX*0x1 + 0x7],0x0
SBB EAX,EAX
AND EAX,0x4
LEA EBX,[EBX + EAX*0x1 + 0x8]
MOV EAX,dword ptr [EBP + 0x24]
MOV byte ptr [EDI + ECX*0x1 + 0x5],AH
MOV EAX,dword ptr [EBP + 0x24]
MOV byte ptr [EDI + ECX*0x1 + 0x6],AL
MOVZX EAX,word ptr [EBP + 0x24]
SUB EAX,EBX
MOV word ptr [ESI + 0x14],AX
MOV EAX,ESI
CALL 0x0006ea60
MOV word ptr [ESI + 0x12],BX
MOV EAX,dword ptr [EBP + 0x24]
MOVZX EBX,BX
ADD EBX,EDI
MOV byte ptr [ESI + 0xc],0x0
ADD EAX,EDI
MOV dword ptr [ESI + 0x40],EBX
MOV dword ptr [ESI + 0x3c],EAX
MOVZX EAX,byte ptr [ESI + 0xa]
ADD EDI,EAX
MOV dword ptr [ESI + 0x44],EDI
MOV EAX,dword ptr [EBP + 0x20]
MOV byte ptr [ESI],0x1
SUB EAX,0x1
MOV word ptr [ESI + 0x18],AX
XOR EAX,EAX
MOV word ptr [ESI + 0x16],AX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EBP + 0x24]
MOV dword ptr [ESP + 0xc],EDX
SUB ESP,0x4
MOV dword ptr [ESP + 0xc],ECX
SUB EAX,ECX
PUSH EAX
PUSH 0x0
PUSH dword ptr [ESP + 0xc]
CALL 0x00015440
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0xc]
MOV ECX,dword ptr [ESP + 0x8]
JMP 0x0006eb82
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_0006eb50(undefined1 *param_1,byte param_2)\n\n{\n  int iVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  short sVar7;\n  uint uVar8;\n  \n  bVar2 = param_1[9];\n  uVar8 = (uint)bVar2;\n  iVar3 = *(int *)(param_1 + 0x38);\n  iVar4 = *(int *)(param_1 + 0x34);\n  if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }\n  *(byte *)(iVar3 + uVar8) = param_2;\n  *(undefined4 *)(iVar3 + 1 + uVar8) = 0;\n  *(undefined1 *)(iVar3 + 7 + uVar8) = 0;\n  iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);\n  *(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);\n  *(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);\n  sVar7 = (short)iVar1;\n  *(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;\n  FUN_0006ea60();\n  *(short *)(param_1 + 0x12) = sVar7;\n  iVar5 = *(int *)(iVar4 + 0x24);\n  param_1[0xc] = 0;\n  *(int *)(param_1 + 0x40) = iVar1 + iVar3;\n  *(int *)(param_1 + 0x3c) = iVar5 + iVar3;\n  *(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];\n  uVar6 = *(undefined4 *)(iVar4 + 0x20);\n  *param_1 = 1;\n  *(short *)(param_1 + 0x18) = (short)uVar6 + -1;\n  *(undefined2 *)(param_1 + 0x16) = 0;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_0006eb50(undefined1 *param_1,byte param_2)\n\n{\n  int iVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  short sVar7;\n  uint uVar8;\n  \n  bVar2 = param_1[9];\n  uVar8 = (uint)bVar2;\n  iVar3 = *(int *)(param_1 + 0x38);\n  iVar4 = *(int *)(param_1 + 0x34);\n  if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }\n  *(byte *)(iVar3 + uVar8) = param_2;\n  *(undefined4 *)(iVar3 + 1 + uVar8) = 0;\n  *(undefined1 *)(iVar3 + 7 + uVar8) = 0;\n  iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);\n  *(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);\n  *(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);\n  sVar7 = (short)iVar1;\n  *(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;\n  FUN_0006ea60();\n  *(short *)(param_1 + 0x12) = sVar7;\n  iVar5 = *(int *)(iVar4 + 0x24);\n  param_1[0xc] = 0;\n  *(int *)(param_1 + 0x40) = iVar1 + iVar3;\n  *(int *)(param_1 + 0x3c) = iVar5 + iVar3;\n  *(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];\n  uVar6 = *(undefined4 *)(iVar4 + 0x20);\n  *param_1 = 1;\n  *(short *)(param_1 + 0x18) = (short)uVar6 + -1;\n  *(undefined2 *)(param_1 + 0x16) = 0;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0006eb50(undefined1 *param_1,byte param_2)" identifier (parameter_list "(undefined1 *param_1,byte param_2)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  short sVar7;\n  uint uVar8;\n  \n  bVar2 = param_1[9];\n  uVar8 = (uint)bVar2;\n  iVar3 = *(int *)(param_1 + 0x38);\n  iVar4 = *(int *)(param_1 + 0x34);\n  if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }\n  *(byte *)(iVar3 + uVar8) = param_2;\n  *(undefined4 *)(iVar3 + 1 + uVar8) = 0;\n  *(undefined1 *)(iVar3 + 7 + uVar8) = 0;\n  iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);\n  *(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);\n  *(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);\n  sVar7 = (short)iVar1;\n  *(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;\n  FUN_0006ea60();\n  *(short *)(param_1 + 0x12) = sVar7;\n  iVar5 = *(int *)(iVar4 + 0x24);\n  param_1[0xc] = 0;\n  *(int *)(param_1 + 0x40) = iVar1 + iVar3;\n  *(int *)(param_1 + 0x3c) = iVar5 + iVar3;\n  *(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];\n  uVar6 = *(undefined4 *)(iVar4 + 0x20);\n  *param_1 = 1;\n  *(short *)(param_1 + 0x18) = (short)uVar6 + -1;\n  *(undefined2 *)(param_1 + 0x16) = 0;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "short sVar7;" (sized_type_specifier "short" short) identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (expression_statement "bVar2 = param_1[9];" (assignment_expression "bVar2 = param_1[9]" identifier = (subscript_expression "param_1[9]" identifier [ number_literal ])) ;) (expression_statement "uVar8 = (uint)bVar2;" (assignment_expression "uVar8 = (uint)bVar2" identifier = (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x38)" identifier = (pointer_expression "*(int *)(param_1 + 0x38)" * (cast_expression "(int *)(param_1 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x34)" identifier = (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) ))))) ;) (if_statement "if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }" if (parenthesized_expression "((*(byte *)(iVar4 + 0x16) & 0xc) != 0)" ( (binary_expression "(*(byte *)(iVar4 + 0x16) & 0xc) != 0" (parenthesized_expression "(*(byte *)(iVar4 + 0x16) & 0xc)" ( (binary_expression "*(byte *)(iVar4 + 0x16) & 0xc" (pointer_expression "*(byte *)(iVar4 + 0x16)" * (cast_expression "(byte *)(iVar4 + 0x16)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x16)" ( (binary_expression "iVar4 + 0x16" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }" { (expression_statement "memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);" (call_expression "memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8)" identifier (argument_list "((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8)" ( (cast_expression "(byte *)(iVar3 + uVar8)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + uVar8)" ( (binary_expression "iVar3 + uVar8" identifier + identifier) ))) , number_literal , (binary_expression "*(int *)(iVar4 + 0x24) - uVar8" (pointer_expression "*(int *)(iVar4 + 0x24)" * (cast_expression "(int *)(iVar4 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x24)" ( (binary_expression "iVar4 + 0x24" identifier + number_literal) )))) - identifier) ))) ;) })) (expression_statement "*(byte *)(iVar3 + uVar8) = param_2;" (assignment_expression "*(byte *)(iVar3 + uVar8) = param_2" (pointer_expression "*(byte *)(iVar3 + uVar8)" * (cast_expression "(byte *)(iVar3 + uVar8)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + uVar8)" ( (binary_expression "iVar3 + uVar8" identifier + identifier) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar3 + 1 + uVar8) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 1 + uVar8) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 1 + uVar8)" * (cast_expression "(undefined4 *)(iVar3 + 1 + uVar8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 1 + uVar8)" ( (binary_expression "iVar3 + 1 + uVar8" (binary_expression "iVar3 + 1" identifier + number_literal) + identifier) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(iVar3 + 7 + uVar8) = 0;" (assignment_expression "*(undefined1 *)(iVar3 + 7 + uVar8) = 0" (pointer_expression "*(undefined1 *)(iVar3 + 7 + uVar8)" * (cast_expression "(undefined1 *)(iVar3 + 7 + uVar8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 7 + uVar8)" ( (binary_expression "iVar3 + 7 + uVar8" (binary_expression "iVar3 + 7" identifier + number_literal) + identifier) )))) = number_literal) ;) (expression_statement "iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);" (assignment_expression "iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4)" identifier = (binary_expression "bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4)" (binary_expression "bVar2 + 8" identifier + number_literal) + (parenthesized_expression "(-(uint)((param_2 & 8) == 0) & 4)" ( (binary_expression "-(uint)((param_2 & 8) == 0) & 4" (unary_expression "-(uint)((param_2 & 8) == 0)" - (call_expression "(uint)((param_2 & 8) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((param_2 & 8) == 0)" ( (binary_expression "(param_2 & 8) == 0" (parenthesized_expression "(param_2 & 8)" ( (binary_expression "param_2 & 8" identifier & number_literal) )) == number_literal) )))) & number_literal) )))) ;) (expression_statement "*(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);" (assignment_expression "*(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8)" (pointer_expression "*(char *)(iVar3 + 5 + uVar8)" * (cast_expression "(char *)(iVar3 + 5 + uVar8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 5 + uVar8)" ( (binary_expression "iVar3 + 5 + uVar8" (binary_expression "iVar3 + 5" identifier + number_literal) + identifier) )))) = (cast_expression "(char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*(undefined4 *)(iVar4 + 0x24) >> 8)" ( (binary_expression "(uint)*(undefined4 *)(iVar4 + 0x24) >> 8" (binary_expression "(uint)*(undefined4 *)(iVar4 + 0x24)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(undefined4 *)(iVar4 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x24)" ( (binary_expression "iVar4 + 0x24" identifier + number_literal) )))) >> number_literal) )))) ;) (expression_statement "*(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);" (assignment_expression "*(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24)" (pointer_expression "*(char *)(iVar3 + 6 + uVar8)" * (cast_expression "(char *)(iVar3 + 6 + uVar8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 6 + uVar8)" ( (binary_expression "iVar3 + 6 + uVar8" (binary_expression "iVar3 + 6" identifier + number_literal) + identifier) )))) = (cast_expression "(char)*(undefined4 *)(iVar4 + 0x24)" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*(undefined4 *)(iVar4 + 0x24)" * (cast_expression "(undefined4 *)(iVar4 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x24)" ( (binary_expression "iVar4 + 0x24" identifier + number_literal) )))))) ;) (expression_statement "sVar7 = (short)iVar1;" (assignment_expression "sVar7 = (short)iVar1" identifier = (cast_expression "(short)iVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "*(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;" (assignment_expression "*(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7" (pointer_expression "*(short *)(param_1 + 0x14)" * (cast_expression "(short *)(param_1 + 0x14)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "*(short *)(iVar4 + 0x24) - sVar7" (pointer_expression "*(short *)(iVar4 + 0x24)" * (cast_expression "(short *)(iVar4 + 0x24)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x24)" ( (binary_expression "iVar4 + 0x24" identifier + number_literal) )))) - identifier)) ;) (expression_statement "FUN_0006ea60();" (call_expression "FUN_0006ea60()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(short *)(param_1 + 0x12) = sVar7;" (assignment_expression "*(short *)(param_1 + 0x12) = sVar7" (pointer_expression "*(short *)(param_1 + 0x12)" * (cast_expression "(short *)(param_1 + 0x12)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar5 = *(int *)(iVar4 + 0x24);" (assignment_expression "iVar5 = *(int *)(iVar4 + 0x24)" identifier = (pointer_expression "*(int *)(iVar4 + 0x24)" * (cast_expression "(int *)(iVar4 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x24)" ( (binary_expression "iVar4 + 0x24" identifier + number_literal) ))))) ;) (expression_statement "param_1[0xc] = 0;" (assignment_expression "param_1[0xc] = 0" (subscript_expression "param_1[0xc]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(int *)(param_1 + 0x40) = iVar1 + iVar3;" (assignment_expression "*(int *)(param_1 + 0x40) = iVar1 + iVar3" (pointer_expression "*(int *)(param_1 + 0x40)" * (cast_expression "(int *)(param_1 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) = (binary_expression "iVar1 + iVar3" identifier + identifier)) ;) (expression_statement "*(int *)(param_1 + 0x3c) = iVar5 + iVar3;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar5 + iVar3" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = (binary_expression "iVar5 + iVar3" identifier + identifier)) ;) (expression_statement "*(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];" (assignment_expression "*(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10]" (pointer_expression "*(uint *)(param_1 + 0x44)" * (cast_expression "(uint *)(param_1 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) = (binary_expression "iVar3 + (uint)(byte)param_1[10]" identifier + (cast_expression "(uint)(byte)param_1[10]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)param_1[10]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "param_1[10]" identifier [ number_literal ]))))) ;) (expression_statement "uVar6 = *(undefined4 *)(iVar4 + 0x20);" (assignment_expression "uVar6 = *(undefined4 *)(iVar4 + 0x20)" identifier = (pointer_expression "*(undefined4 *)(iVar4 + 0x20)" * (cast_expression "(undefined4 *)(iVar4 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x20)" ( (binary_expression "iVar4 + 0x20" identifier + number_literal) ))))) ;) (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "*(short *)(param_1 + 0x18) = (short)uVar6 + -1;" (assignment_expression "*(short *)(param_1 + 0x18) = (short)uVar6 + -1" (pointer_expression "*(short *)(param_1 + 0x18)" * (cast_expression "(short *)(param_1 + 0x18)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = (binary_expression "(short)uVar6 + -1" (cast_expression "(short)uVar6" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) + number_literal)) ;) (expression_statement "*(undefined2 *)(param_1 + 0x16) = 0;" (assignment_expression "*(undefined2 *)(param_1 + 0x16) = 0" (pointer_expression "*(undefined2 *)(param_1 + 0x16)" * (cast_expression "(undefined2 *)(param_1 + 0x16)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x16)" ( (binary_expression "param_1 + 0x16" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 zeroPage(MemPage *pPage,int flags)\n\n{\n  u8 *puVar1;\n  int iVar2;\n  byte bVar3;\n  u8 *puVar4;\n  BtShared *pBVar5;\n  u32 uVar6;\n  u16 uVar7;\n  uint uVar8;\n  \n  bVar3 = pPage->hdrOffset;\n  uVar8 = (uint)bVar3;\n  puVar4 = pPage->aData;\n  pBVar5 = pPage->pBt;\n  if ((pBVar5->btsFlags & 0xc) != 0) {\n    memset(puVar4 + uVar8,0,pBVar5->usableSize - uVar8);\n  }\n  puVar4[uVar8] = (u8)flags;\n  puVar1 = puVar4 + uVar8 + 1;\n  puVar1[0] = '\0';\n  puVar1[1] = '\0';\n  puVar1[2] = '\0';\n  puVar1[3] = '\0';\n  puVar4[uVar8 + 7] = '\0';\n  iVar2 = bVar3 + 8 + (-(uint)((flags & 8U) == 0) & 4);\n  puVar4[uVar8 + 5] = (u8)(pBVar5->usableSize >> 8);\n  puVar4[uVar8 + 6] = (u8)pBVar5->usableSize;\n  uVar7 = (u16)iVar2;\n  pPage->nFree = (short)pBVar5->usableSize - uVar7;\n  decodeFlags(pPage,flags);\n  pPage->cellOffset = uVar7;\n  uVar6 = pBVar5->usableSize;\n  pPage->nOverflow = '\0';\n  pPage->aCellIdx = puVar4 + iVar2;\n  pPage->aDataEnd = puVar4 + uVar6;\n  pPage->aDataOfst = puVar4 + pPage->childPtrSize;\n  uVar6 = pBVar5->pageSize;\n  pPage->isInit = '\x01';\n  pPage->maskPage = (short)uVar6 - 1;\n  pPage->nCell = 0;\n  return;\n}\n\n" comment (function_definition "void __regparm3 zeroPage(MemPage *pPage,int flags)\n\n{\n  u8 *puVar1;\n  int iVar2;\n  byte bVar3;\n  u8 *puVar4;\n  BtShared *pBVar5;\n  u32 uVar6;\n  u16 uVar7;\n  uint uVar8;\n  \n  bVar3 = pPage->hdrOffset;\n  uVar8 = (uint)bVar3;\n  puVar4 = pPage->aData;\n  pBVar5 = pPage->pBt;\n  if ((pBVar5->btsFlags & 0xc) != 0) {\n    memset(puVar4 + uVar8,0,pBVar5->usableSize - uVar8);\n  }\n  puVar4[uVar8] = (u8)flags;\n  puVar1 = puVar4 + uVar8 + 1;\n  puVar1[0] = '\0';\n  puVar1[1] = '\0';\n  puVar1[2] = '\0';\n  puVar1[3] = '\0';\n  puVar4[uVar8 + 7] = '\0';\n  iVar2 = bVar3 + 8 + (-(uint)((flags & 8U) == 0) & 4);\n  puVar4[uVar8 + 5] = (u8)(pBVar5->usableSize >> 8);\n  puVar4[uVar8 + 6] = (u8)pBVar5->usableSize;\n  uVar7 = (u16)iVar2;\n  pPage->nFree = (short)pBVar5->usableSize - uVar7;\n  decodeFlags(pPage,flags);\n  pPage->cellOffset = uVar7;\n  uVar6 = pBVar5->usableSize;\n  pPage->nOverflow = '\0';\n  pPage->aCellIdx = puVar4 + iVar2;\n  pPage->aDataEnd = puVar4 + uVar6;\n  pPage->aDataOfst = puVar4 + pPage->childPtrSize;\n  uVar6 = pBVar5->pageSize;\n  pPage->isInit = '\x01';\n  pPage->maskPage = (short)uVar6 - 1;\n  pPage->nCell = 0;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "zeroPage(MemPage *pPage,int flags)" identifier (parameter_list "(MemPage *pPage,int flags)" ( (parameter_declaration "MemPage *pPage" type_identifier (pointer_declarator "*pPage" * identifier)) , (parameter_declaration "int flags" primitive_type identifier) ))) (compound_statement "{\n  u8 *puVar1;\n  int iVar2;\n  byte bVar3;\n  u8 *puVar4;\n  BtShared *pBVar5;\n  u32 uVar6;\n  u16 uVar7;\n  uint uVar8;\n  \n  bVar3 = pPage->hdrOffset;\n  uVar8 = (uint)bVar3;\n  puVar4 = pPage->aData;\n  pBVar5 = pPage->pBt;\n  if ((pBVar5->btsFlags & 0xc) != 0) {\n    memset(puVar4 + uVar8,0,pBVar5->usableSize - uVar8);\n  }\n  puVar4[uVar8] = (u8)flags;\n  puVar1 = puVar4 + uVar8 + 1;\n  puVar1[0] = '\0';\n  puVar1[1] = '\0';\n  puVar1[2] = '\0';\n  puVar1[3] = '\0';\n  puVar4[uVar8 + 7] = '\0';\n  iVar2 = bVar3 + 8 + (-(uint)((flags & 8U) == 0) & 4);\n  puVar4[uVar8 + 5] = (u8)(pBVar5->usableSize >> 8);\n  puVar4[uVar8 + 6] = (u8)pBVar5->usableSize;\n  uVar7 = (u16)iVar2;\n  pPage->nFree = (short)pBVar5->usableSize - uVar7;\n  decodeFlags(pPage,flags);\n  pPage->cellOffset = uVar7;\n  uVar6 = pBVar5->usableSize;\n  pPage->nOverflow = '\0';\n  pPage->aCellIdx = puVar4 + iVar2;\n  pPage->aDataEnd = puVar4 + uVar6;\n  pPage->aDataOfst = puVar4 + pPage->childPtrSize;\n  uVar6 = pBVar5->pageSize;\n  pPage->isInit = '\x01';\n  pPage->maskPage = (short)uVar6 - 1;\n  pPage->nCell = 0;\n  return;\n}" { (declaration "u8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "u8 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "BtShared *pBVar5;" type_identifier (pointer_declarator "*pBVar5" * identifier) ;) (declaration "u32 uVar6;" type_identifier identifier ;) (declaration "u16 uVar7;" type_identifier identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (expression_statement "bVar3 = pPage->hdrOffset;" (assignment_expression "bVar3 = pPage->hdrOffset" identifier = (field_expression "pPage->hdrOffset" identifier -> field_identifier)) ;) (expression_statement "uVar8 = (uint)bVar3;" (assignment_expression "uVar8 = (uint)bVar3" identifier = (cast_expression "(uint)bVar3" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "puVar4 = pPage->aData;" (assignment_expression "puVar4 = pPage->aData" identifier = (field_expression "pPage->aData" identifier -> field_identifier)) ;) (expression_statement "pBVar5 = pPage->pBt;" (assignment_expression "pBVar5 = pPage->pBt" identifier = (field_expression "pPage->pBt" identifier -> field_identifier)) ;) (if_statement "if ((pBVar5->btsFlags & 0xc) != 0) {\n    memset(puVar4 + uVar8,0,pBVar5->usableSize - uVar8);\n  }" if (parenthesized_expression "((pBVar5->btsFlags & 0xc) != 0)" ( (binary_expression "(pBVar5->btsFlags & 0xc) != 0" (parenthesized_expression "(pBVar5->btsFlags & 0xc)" ( (binary_expression "pBVar5->btsFlags & 0xc" (field_expression "pBVar5->btsFlags" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    memset(puVar4 + uVar8,0,pBVar5->usableSize - uVar8);\n  }" { (expression_statement "memset(puVar4 + uVar8,0,pBVar5->usableSize - uVar8);" (call_expression "memset(puVar4 + uVar8,0,pBVar5->usableSize - uVar8)" identifier (argument_list "(puVar4 + uVar8,0,pBVar5->usableSize - uVar8)" ( (binary_expression "puVar4 + uVar8" identifier + identifier) , number_literal , (binary_expression "pBVar5->usableSize - uVar8" (field_expression "pBVar5->usableSize" identifier -> field_identifier) - identifier) ))) ;) })) (expression_statement "puVar4[uVar8] = (u8)flags;" (assignment_expression "puVar4[uVar8] = (u8)flags" (subscript_expression "puVar4[uVar8]" identifier [ identifier ]) = (cast_expression "(u8)flags" ( (type_descriptor "u8" type_identifier) ) identifier)) ;) (expression_statement "puVar1 = puVar4 + uVar8 + 1;" (assignment_expression "puVar1 = puVar4 + uVar8 + 1" identifier = (binary_expression "puVar4 + uVar8 + 1" (binary_expression "puVar4 + uVar8" identifier + identifier) + number_literal)) ;) (expression_statement "puVar1[0] = '\0';" (assignment_expression "puVar1[0] = '\0'" (subscript_expression "puVar1[0]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar1[1] = '\0';" (assignment_expression "puVar1[1] = '\0'" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar1[2] = '\0';" (assignment_expression "puVar1[2] = '\0'" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar1[3] = '\0';" (assignment_expression "puVar1[3] = '\0'" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar4[uVar8 + 7] = '\0';" (assignment_expression "puVar4[uVar8 + 7] = '\0'" (subscript_expression "puVar4[uVar8 + 7]" identifier [ (binary_expression "uVar8 + 7" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar2 = bVar3 + 8 + (-(uint)((flags & 8U) == 0) & 4);" (assignment_expression "iVar2 = bVar3 + 8 + (-(uint)((flags & 8U) == 0) & 4)" identifier = (binary_expression "bVar3 + 8 + (-(uint)((flags & 8U) == 0) & 4)" (binary_expression "bVar3 + 8" identifier + number_literal) + (parenthesized_expression "(-(uint)((flags & 8U) == 0) & 4)" ( (binary_expression "-(uint)((flags & 8U) == 0) & 4" (unary_expression "-(uint)((flags & 8U) == 0)" - (call_expression "(uint)((flags & 8U) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((flags & 8U) == 0)" ( (binary_expression "(flags & 8U) == 0" (parenthesized_expression "(flags & 8U)" ( (binary_expression "flags & 8U" identifier & number_literal) )) == number_literal) )))) & number_literal) )))) ;) (expression_statement "puVar4[uVar8 + 5] = (u8)(pBVar5->usableSize >> 8);" (assignment_expression "puVar4[uVar8 + 5] = (u8)(pBVar5->usableSize >> 8)" (subscript_expression "puVar4[uVar8 + 5]" identifier [ (binary_expression "uVar8 + 5" identifier + number_literal) ]) = (call_expression "(u8)(pBVar5->usableSize >> 8)" (parenthesized_expression "(u8)" ( identifier )) (argument_list "(pBVar5->usableSize >> 8)" ( (binary_expression "pBVar5->usableSize >> 8" (field_expression "pBVar5->usableSize" identifier -> field_identifier) >> number_literal) )))) ;) (expression_statement "puVar4[uVar8 + 6] = (u8)pBVar5->usableSize;" (assignment_expression "puVar4[uVar8 + 6] = (u8)pBVar5->usableSize" (subscript_expression "puVar4[uVar8 + 6]" identifier [ (binary_expression "uVar8 + 6" identifier + number_literal) ]) = (cast_expression "(u8)pBVar5->usableSize" ( (type_descriptor "u8" type_identifier) ) (field_expression "pBVar5->usableSize" identifier -> field_identifier))) ;) (expression_statement "uVar7 = (u16)iVar2;" (assignment_expression "uVar7 = (u16)iVar2" identifier = (cast_expression "(u16)iVar2" ( (type_descriptor "u16" type_identifier) ) identifier)) ;) (expression_statement "pPage->nFree = (short)pBVar5->usableSize - uVar7;" (assignment_expression "pPage->nFree = (short)pBVar5->usableSize - uVar7" (field_expression "pPage->nFree" identifier -> field_identifier) = (binary_expression "(short)pBVar5->usableSize - uVar7" (cast_expression "(short)pBVar5->usableSize" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (field_expression "pBVar5->usableSize" identifier -> field_identifier)) - identifier)) ;) (expression_statement "decodeFlags(pPage,flags);" (call_expression "decodeFlags(pPage,flags)" identifier (argument_list "(pPage,flags)" ( identifier , identifier ))) ;) (expression_statement "pPage->cellOffset = uVar7;" (assignment_expression "pPage->cellOffset = uVar7" (field_expression "pPage->cellOffset" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar6 = pBVar5->usableSize;" (assignment_expression "uVar6 = pBVar5->usableSize" identifier = (field_expression "pBVar5->usableSize" identifier -> field_identifier)) ;) (expression_statement "pPage->nOverflow = '\0';" (assignment_expression "pPage->nOverflow = '\0'" (field_expression "pPage->nOverflow" identifier -> field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pPage->aCellIdx = puVar4 + iVar2;" (assignment_expression "pPage->aCellIdx = puVar4 + iVar2" (field_expression "pPage->aCellIdx" identifier -> field_identifier) = (binary_expression "puVar4 + iVar2" identifier + identifier)) ;) (expression_statement "pPage->aDataEnd = puVar4 + uVar6;" (assignment_expression "pPage->aDataEnd = puVar4 + uVar6" (field_expression "pPage->aDataEnd" identifier -> field_identifier) = (binary_expression "puVar4 + uVar6" identifier + identifier)) ;) (expression_statement "pPage->aDataOfst = puVar4 + pPage->childPtrSize;" (assignment_expression "pPage->aDataOfst = puVar4 + pPage->childPtrSize" (field_expression "pPage->aDataOfst" identifier -> field_identifier) = (binary_expression "puVar4 + pPage->childPtrSize" identifier + (field_expression "pPage->childPtrSize" identifier -> field_identifier))) ;) (expression_statement "uVar6 = pBVar5->pageSize;" (assignment_expression "uVar6 = pBVar5->pageSize" identifier = (field_expression "pBVar5->pageSize" identifier -> field_identifier)) ;) (expression_statement "pPage->isInit = '\x01';" (assignment_expression "pPage->isInit = '\x01'" (field_expression "pPage->isInit" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "pPage->maskPage = (short)uVar6 - 1;" (assignment_expression "pPage->maskPage = (short)uVar6 - 1" (field_expression "pPage->maskPage" identifier -> field_identifier) = (binary_expression "(short)uVar6 - 1" (cast_expression "(short)uVar6" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) - number_literal)) ;) (expression_statement "pPage->nCell = 0;" (assignment_expression "pPage->nCell = 0" (field_expression "pPage->nCell" identifier -> field_identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0006eb50(undefined1 *param_1,byte param_2)\n\n{\n  int iVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  short sVar7;\n  uint uVar8;\n  \n  bVar2 = param_1[9];\n  uVar8 = (uint)bVar2;\n  iVar3 = *(int *)(param_1 + 0x38);\n  iVar4 = *(int *)(param_1 + 0x34);\n  if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }\n  *(byte *)(iVar3 + uVar8) = param_2;\n  *(undefined4 *)(iVar3 + 1 + uVar8) = 0;\n  *(undefined1 *)(iVar3 + 7 + uVar8) = 0;\n  iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);\n  *(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);\n  *(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);\n  sVar7 = (short)iVar1;\n  *(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;\n  FUN_0006ea60();\n  *(short *)(param_1 + 0x12) = sVar7;\n  iVar5 = *(int *)(iVar4 + 0x24);\n  param_1[0xc] = 0;\n  *(int *)(param_1 + 0x40) = iVar1 + iVar3;\n  *(int *)(param_1 + 0x3c) = iVar5 + iVar3;\n  *(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];\n  uVar6 = *(undefined4 *)(iVar4 + 0x20);\n  *param_1 = 1;\n  *(short *)(param_1 + 0x18) = (short)uVar6 + -1;\n  *(undefined2 *)(param_1 + 0x16) = 0;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0006eb50(undefined1 *param_1,byte param_2)\n\n{\n  int iVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  short sVar7;\n  uint uVar8;\n  \n  bVar2 = param_1[9];\n  uVar8 = (uint)bVar2;\n  iVar3 = *(int *)(param_1 + 0x38);\n  iVar4 = *(int *)(param_1 + 0x34);\n  if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }\n  *(byte *)(iVar3 + uVar8) = param_2;\n  *(undefined4 *)(iVar3 + 1 + uVar8) = 0;\n  *(undefined1 *)(iVar3 + 7 + uVar8) = 0;\n  iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);\n  *(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);\n  *(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);\n  sVar7 = (short)iVar1;\n  *(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;\n  FUN_0006ea60();\n  *(short *)(param_1 + 0x12) = sVar7;\n  iVar5 = *(int *)(iVar4 + 0x24);\n  param_1[0xc] = 0;\n  *(int *)(param_1 + 0x40) = iVar1 + iVar3;\n  *(int *)(param_1 + 0x3c) = iVar5 + iVar3;\n  *(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];\n  uVar6 = *(undefined4 *)(iVar4 + 0x20);\n  *param_1 = 1;\n  *(short *)(param_1 + 0x18) = (short)uVar6 + -1;\n  *(undefined2 *)(param_1 + 0x16) = 0;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0006eb50(undefined1 *param_1,byte param_2)" identifier (parameter_list "(undefined1 *param_1,byte param_2)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  short sVar7;\n  uint uVar8;\n  \n  bVar2 = param_1[9];\n  uVar8 = (uint)bVar2;\n  iVar3 = *(int *)(param_1 + 0x38);\n  iVar4 = *(int *)(param_1 + 0x34);\n  if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }\n  *(byte *)(iVar3 + uVar8) = param_2;\n  *(undefined4 *)(iVar3 + 1 + uVar8) = 0;\n  *(undefined1 *)(iVar3 + 7 + uVar8) = 0;\n  iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);\n  *(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);\n  *(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);\n  sVar7 = (short)iVar1;\n  *(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;\n  FUN_0006ea60();\n  *(short *)(param_1 + 0x12) = sVar7;\n  iVar5 = *(int *)(iVar4 + 0x24);\n  param_1[0xc] = 0;\n  *(int *)(param_1 + 0x40) = iVar1 + iVar3;\n  *(int *)(param_1 + 0x3c) = iVar5 + iVar3;\n  *(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];\n  uVar6 = *(undefined4 *)(iVar4 + 0x20);\n  *param_1 = 1;\n  *(short *)(param_1 + 0x18) = (short)uVar6 + -1;\n  *(undefined2 *)(param_1 + 0x16) = 0;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "short sVar7;" (sized_type_specifier "short" short) identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (expression_statement "bVar2 = param_1[9];" (assignment_expression "bVar2 = param_1[9]" identifier = (subscript_expression "param_1[9]" identifier [ number_literal ])) ;) (expression_statement "uVar8 = (uint)bVar2;" (assignment_expression "uVar8 = (uint)bVar2" identifier = (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x38)" identifier = (pointer_expression "*(int *)(param_1 + 0x38)" * (cast_expression "(int *)(param_1 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x34)" identifier = (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) ))))) ;) (if_statement "if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }" if (parenthesized_expression "((*(byte *)(iVar4 + 0x16) & 0xc) != 0)" ( (binary_expression "(*(byte *)(iVar4 + 0x16) & 0xc) != 0" (parenthesized_expression "(*(byte *)(iVar4 + 0x16) & 0xc)" ( (binary_expression "*(byte *)(iVar4 + 0x16) & 0xc" (pointer_expression "*(byte *)(iVar4 + 0x16)" * (cast_expression "(byte *)(iVar4 + 0x16)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x16)" ( (binary_expression "iVar4 + 0x16" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }" { (expression_statement "memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);" (call_expression "memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8)" identifier (argument_list "((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8)" ( (cast_expression "(byte *)(iVar3 + uVar8)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + uVar8)" ( (binary_expression "iVar3 + uVar8" identifier + identifier) ))) , number_literal , (binary_expression "*(int *)(iVar4 + 0x24) - uVar8" (pointer_expression "*(int *)(iVar4 + 0x24)" * (cast_expression "(int *)(iVar4 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x24)" ( (binary_expression "iVar4 + 0x24" identifier + number_literal) )))) - identifier) ))) ;) })) (expression_statement "*(byte *)(iVar3 + uVar8) = param_2;" (assignment_expression "*(byte *)(iVar3 + uVar8) = param_2" (pointer_expression "*(byte *)(iVar3 + uVar8)" * (cast_expression "(byte *)(iVar3 + uVar8)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + uVar8)" ( (binary_expression "iVar3 + uVar8" identifier + identifier) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar3 + 1 + uVar8) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 1 + uVar8) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 1 + uVar8)" * (cast_expression "(undefined4 *)(iVar3 + 1 + uVar8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 1 + uVar8)" ( (binary_expression "iVar3 + 1 + uVar8" (binary_expression "iVar3 + 1" identifier + number_literal) + identifier) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(iVar3 + 7 + uVar8) = 0;" (assignment_expression "*(undefined1 *)(iVar3 + 7 + uVar8) = 0" (pointer_expression "*(undefined1 *)(iVar3 + 7 + uVar8)" * (cast_expression "(undefined1 *)(iVar3 + 7 + uVar8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 7 + uVar8)" ( (binary_expression "iVar3 + 7 + uVar8" (binary_expression "iVar3 + 7" identifier + number_literal) + identifier) )))) = number_literal) ;) (expression_statement "iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);" (assignment_expression "iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4)" identifier = (binary_expression "bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4)" (binary_expression "bVar2 + 8" identifier + number_literal) + (parenthesized_expression "(-(uint)((param_2 & 8) == 0) & 4)" ( (binary_expression "-(uint)((param_2 & 8) == 0) & 4" (unary_expression "-(uint)((param_2 & 8) == 0)" - (call_expression "(uint)((param_2 & 8) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((param_2 & 8) == 0)" ( (binary_expression "(param_2 & 8) == 0" (parenthesized_expression "(param_2 & 8)" ( (binary_expression "param_2 & 8" identifier & number_literal) )) == number_literal) )))) & number_literal) )))) ;) (expression_statement "*(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);" (assignment_expression "*(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8)" (pointer_expression "*(char *)(iVar3 + 5 + uVar8)" * (cast_expression "(char *)(iVar3 + 5 + uVar8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 5 + uVar8)" ( (binary_expression "iVar3 + 5 + uVar8" (binary_expression "iVar3 + 5" identifier + number_literal) + identifier) )))) = (cast_expression "(char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*(undefined4 *)(iVar4 + 0x24) >> 8)" ( (binary_expression "(uint)*(undefined4 *)(iVar4 + 0x24) >> 8" (binary_expression "(uint)*(undefined4 *)(iVar4 + 0x24)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(undefined4 *)(iVar4 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x24)" ( (binary_expression "iVar4 + 0x24" identifier + number_literal) )))) >> number_literal) )))) ;) (expression_statement "*(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);" (assignment_expression "*(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24)" (pointer_expression "*(char *)(iVar3 + 6 + uVar8)" * (cast_expression "(char *)(iVar3 + 6 + uVar8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 6 + uVar8)" ( (binary_expression "iVar3 + 6 + uVar8" (binary_expression "iVar3 + 6" identifier + number_literal) + identifier) )))) = (cast_expression "(char)*(undefined4 *)(iVar4 + 0x24)" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*(undefined4 *)(iVar4 + 0x24)" * (cast_expression "(undefined4 *)(iVar4 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x24)" ( (binary_expression "iVar4 + 0x24" identifier + number_literal) )))))) ;) (expression_statement "sVar7 = (short)iVar1;" (assignment_expression "sVar7 = (short)iVar1" identifier = (cast_expression "(short)iVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "*(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;" (assignment_expression "*(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7" (pointer_expression "*(short *)(param_1 + 0x14)" * (cast_expression "(short *)(param_1 + 0x14)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "*(short *)(iVar4 + 0x24) - sVar7" (pointer_expression "*(short *)(iVar4 + 0x24)" * (cast_expression "(short *)(iVar4 + 0x24)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x24)" ( (binary_expression "iVar4 + 0x24" identifier + number_literal) )))) - identifier)) ;) (expression_statement "FUN_0006ea60();" (call_expression "FUN_0006ea60()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(short *)(param_1 + 0x12) = sVar7;" (assignment_expression "*(short *)(param_1 + 0x12) = sVar7" (pointer_expression "*(short *)(param_1 + 0x12)" * (cast_expression "(short *)(param_1 + 0x12)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar5 = *(int *)(iVar4 + 0x24);" (assignment_expression "iVar5 = *(int *)(iVar4 + 0x24)" identifier = (pointer_expression "*(int *)(iVar4 + 0x24)" * (cast_expression "(int *)(iVar4 + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x24)" ( (binary_expression "iVar4 + 0x24" identifier + number_literal) ))))) ;) (expression_statement "param_1[0xc] = 0;" (assignment_expression "param_1[0xc] = 0" (subscript_expression "param_1[0xc]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(int *)(param_1 + 0x40) = iVar1 + iVar3;" (assignment_expression "*(int *)(param_1 + 0x40) = iVar1 + iVar3" (pointer_expression "*(int *)(param_1 + 0x40)" * (cast_expression "(int *)(param_1 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) = (binary_expression "iVar1 + iVar3" identifier + identifier)) ;) (expression_statement "*(int *)(param_1 + 0x3c) = iVar5 + iVar3;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar5 + iVar3" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = (binary_expression "iVar5 + iVar3" identifier + identifier)) ;) (expression_statement "*(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];" (assignment_expression "*(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10]" (pointer_expression "*(uint *)(param_1 + 0x44)" * (cast_expression "(uint *)(param_1 + 0x44)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) = (binary_expression "iVar3 + (uint)(byte)param_1[10]" identifier + (cast_expression "(uint)(byte)param_1[10]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)param_1[10]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "param_1[10]" identifier [ number_literal ]))))) ;) (expression_statement "uVar6 = *(undefined4 *)(iVar4 + 0x20);" (assignment_expression "uVar6 = *(undefined4 *)(iVar4 + 0x20)" identifier = (pointer_expression "*(undefined4 *)(iVar4 + 0x20)" * (cast_expression "(undefined4 *)(iVar4 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x20)" ( (binary_expression "iVar4 + 0x20" identifier + number_literal) ))))) ;) (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "*(short *)(param_1 + 0x18) = (short)uVar6 + -1;" (assignment_expression "*(short *)(param_1 + 0x18) = (short)uVar6 + -1" (pointer_expression "*(short *)(param_1 + 0x18)" * (cast_expression "(short *)(param_1 + 0x18)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = (binary_expression "(short)uVar6 + -1" (cast_expression "(short)uVar6" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) + number_literal)) ;) (expression_statement "*(undefined2 *)(param_1 + 0x16) = 0;" (assignment_expression "*(undefined2 *)(param_1 + 0x16) = 0" (pointer_expression "*(undefined2 *)(param_1 + 0x16)" * (cast_expression "(undefined2 *)(param_1 + 0x16)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x16)" ( (binary_expression "param_1 + 0x16" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier short) IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) , LIT , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - IDENT) ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (parenthesized_expression ( (binary_expression (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )))) & LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (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 (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_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 (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT) + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0006eb50(undefined1 *param_1,byte param_2)\n\n{\n  int iVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  short sVar7;\n  uint uVar8;\n  \n  bVar2 = param_1[9];\n  uVar8 = (uint)bVar2;\n  iVar3 = *(int *)(param_1 + 0x38);\n  iVar4 = *(int *)(param_1 + 0x34);\n  if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }\n  *(byte *)(iVar3 + uVar8) = param_2;\n  *(undefined4 *)(iVar3 + 1 + uVar8) = 0;\n  *(undefined1 *)(iVar3 + 7 + uVar8) = 0;\n  iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);\n  *(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);\n  *(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);\n  sVar7 = (short)iVar1;\n  *(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;\n  FUN_0006ea60();\n  *(short *)(param_1 + 0x12) = sVar7;\n  iVar5 = *(int *)(iVar4 + 0x24);\n  param_1[0xc] = 0;\n  *(int *)(param_1 + 0x40) = iVar1 + iVar3;\n  *(int *)(param_1 + 0x3c) = iVar5 + iVar3;\n  *(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];\n  uVar6 = *(undefined4 *)(iVar4 + 0x20);\n  *param_1 = 1;\n  *(short *)(param_1 + 0x18) = (short)uVar6 + -1;\n  *(undefined2 *)(param_1 + 0x16) = 0;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0006eb50(undefined1 *param_1,byte param_2)" (identifier "FUN_0006eb50") (parameter_list "(undefined1 *param_1,byte param_2)" (( "(") (parameter_declaration "undefined1 *param_1" (type_identifier "undefined1") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "byte param_2" (type_identifier "byte") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  byte bVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 uVar6;\n  short sVar7;\n  uint uVar8;\n  \n  bVar2 = param_1[9];\n  uVar8 = (uint)bVar2;\n  iVar3 = *(int *)(param_1 + 0x38);\n  iVar4 = *(int *)(param_1 + 0x34);\n  if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }\n  *(byte *)(iVar3 + uVar8) = param_2;\n  *(undefined4 *)(iVar3 + 1 + uVar8) = 0;\n  *(undefined1 *)(iVar3 + 7 + uVar8) = 0;\n  iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);\n  *(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);\n  *(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);\n  sVar7 = (short)iVar1;\n  *(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;\n  FUN_0006ea60();\n  *(short *)(param_1 + 0x12) = sVar7;\n  iVar5 = *(int *)(iVar4 + 0x24);\n  param_1[0xc] = 0;\n  *(int *)(param_1 + 0x40) = iVar1 + iVar3;\n  *(int *)(param_1 + 0x3c) = iVar5 + iVar3;\n  *(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];\n  uVar6 = *(undefined4 *)(iVar4 + 0x20);\n  *param_1 = 1;\n  *(short *)(param_1 + 0x18) = (short)uVar6 + -1;\n  *(undefined2 *)(param_1 + 0x16) = 0;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined4 uVar6;" (type_identifier "undefined4") (identifier "uVar6") (; ";")) (declaration "short sVar7;" (sized_type_specifier "short" (short "short")) (identifier "sVar7") (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (expression_statement "bVar2 = param_1[9];" (assignment_expression "bVar2 = param_1[9]" (identifier "bVar2") (= "=") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]"))) (; ";")) (expression_statement "uVar8 = (uint)bVar2;" (assignment_expression "uVar8 = (uint)bVar2" (identifier "uVar8") (= "=") (cast_expression "(uint)bVar2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar2"))) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x38)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x38)" (* "*") (cast_expression "(int *)(param_1 + 0x38)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x38)" (( "(") (binary_expression "param_1 + 0x38" (identifier "param_1") (+ "+") (number_literal "0x38")) () ")"))))) (; ";")) (expression_statement "iVar4 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x34)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")"))))) (; ";")) (if_statement "if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }" (if "if") (parenthesized_expression "((*(byte *)(iVar4 + 0x16) & 0xc) != 0)" (( "(") (binary_expression "(*(byte *)(iVar4 + 0x16) & 0xc) != 0" (parenthesized_expression "(*(byte *)(iVar4 + 0x16) & 0xc)" (( "(") (binary_expression "*(byte *)(iVar4 + 0x16) & 0xc" (pointer_expression "*(byte *)(iVar4 + 0x16)" (* "*") (cast_expression "(byte *)(iVar4 + 0x16)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x16)" (( "(") (binary_expression "iVar4 + 0x16" (identifier "iVar4") (+ "+") (number_literal "0x16")) () ")")))) (& "&") (number_literal "0xc")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);\n  }" ({ "{") (expression_statement "memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);" (call_expression "memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8)" (identifier "memset") (argument_list "((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8)" (( "(") (cast_expression "(byte *)(iVar3 + uVar8)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + uVar8)" (( "(") (binary_expression "iVar3 + uVar8" (identifier "iVar3") (+ "+") (identifier "uVar8")) () ")"))) (, ",") (number_literal "0") (, ",") (binary_expression "*(int *)(iVar4 + 0x24) - uVar8" (pointer_expression "*(int *)(iVar4 + 0x24)" (* "*") (cast_expression "(int *)(iVar4 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x24)" (( "(") (binary_expression "iVar4 + 0x24" (identifier "iVar4") (+ "+") (number_literal "0x24")) () ")")))) (- "-") (identifier "uVar8")) () ")"))) (; ";")) (} "}"))) (expression_statement "*(byte *)(iVar3 + uVar8) = param_2;" (assignment_expression "*(byte *)(iVar3 + uVar8) = param_2" (pointer_expression "*(byte *)(iVar3 + uVar8)" (* "*") (cast_expression "(byte *)(iVar3 + uVar8)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + uVar8)" (( "(") (binary_expression "iVar3 + uVar8" (identifier "iVar3") (+ "+") (identifier "uVar8")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + 1 + uVar8) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 1 + uVar8) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 1 + uVar8)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 1 + uVar8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 1 + uVar8)" (( "(") (binary_expression "iVar3 + 1 + uVar8" (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1")) (+ "+") (identifier "uVar8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined1 *)(iVar3 + 7 + uVar8) = 0;" (assignment_expression "*(undefined1 *)(iVar3 + 7 + uVar8) = 0" (pointer_expression "*(undefined1 *)(iVar3 + 7 + uVar8)" (* "*") (cast_expression "(undefined1 *)(iVar3 + 7 + uVar8)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 7 + uVar8)" (( "(") (binary_expression "iVar3 + 7 + uVar8" (binary_expression "iVar3 + 7" (identifier "iVar3") (+ "+") (number_literal "7")) (+ "+") (identifier "uVar8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);" (assignment_expression "iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4)" (identifier "iVar1") (= "=") (binary_expression "bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4)" (binary_expression "bVar2 + 8" (identifier "bVar2") (+ "+") (number_literal "8")) (+ "+") (parenthesized_expression "(-(uint)((param_2 & 8) == 0) & 4)" (( "(") (binary_expression "-(uint)((param_2 & 8) == 0) & 4" (unary_expression "-(uint)((param_2 & 8) == 0)" (- "-") (call_expression "(uint)((param_2 & 8) == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((param_2 & 8) == 0)" (( "(") (binary_expression "(param_2 & 8) == 0" (parenthesized_expression "(param_2 & 8)" (( "(") (binary_expression "param_2 & 8" (identifier "param_2") (& "&") (number_literal "8")) () ")")) (== "==") (number_literal "0")) () ")")))) (& "&") (number_literal "4")) () ")")))) (; ";")) (expression_statement "*(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);" (assignment_expression "*(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8)" (pointer_expression "*(char *)(iVar3 + 5 + uVar8)" (* "*") (cast_expression "(char *)(iVar3 + 5 + uVar8)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 5 + uVar8)" (( "(") (binary_expression "iVar3 + 5 + uVar8" (binary_expression "iVar3 + 5" (identifier "iVar3") (+ "+") (number_literal "5")) (+ "+") (identifier "uVar8")) () ")")))) (= "=") (cast_expression "(char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)*(undefined4 *)(iVar4 + 0x24) >> 8)" (( "(") (binary_expression "(uint)*(undefined4 *)(iVar4 + 0x24) >> 8" (binary_expression "(uint)*(undefined4 *)(iVar4 + 0x24)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x24)" (( "(") (binary_expression "iVar4 + 0x24" (identifier "iVar4") (+ "+") (number_literal "0x24")) () ")")))) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "*(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);" (assignment_expression "*(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24)" (pointer_expression "*(char *)(iVar3 + 6 + uVar8)" (* "*") (cast_expression "(char *)(iVar3 + 6 + uVar8)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 6 + uVar8)" (( "(") (binary_expression "iVar3 + 6 + uVar8" (binary_expression "iVar3 + 6" (identifier "iVar3") (+ "+") (number_literal "6")) (+ "+") (identifier "uVar8")) () ")")))) (= "=") (cast_expression "(char)*(undefined4 *)(iVar4 + 0x24)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*(undefined4 *)(iVar4 + 0x24)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x24)" (( "(") (binary_expression "iVar4 + 0x24" (identifier "iVar4") (+ "+") (number_literal "0x24")) () ")")))))) (; ";")) (expression_statement "sVar7 = (short)iVar1;" (assignment_expression "sVar7 = (short)iVar1" (identifier "sVar7") (= "=") (cast_expression "(short)iVar1" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "iVar1"))) (; ";")) (expression_statement "*(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;" (assignment_expression "*(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7" (pointer_expression "*(short *)(param_1 + 0x14)" (* "*") (cast_expression "(short *)(param_1 + 0x14)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (binary_expression "*(short *)(iVar4 + 0x24) - sVar7" (pointer_expression "*(short *)(iVar4 + 0x24)" (* "*") (cast_expression "(short *)(iVar4 + 0x24)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x24)" (( "(") (binary_expression "iVar4 + 0x24" (identifier "iVar4") (+ "+") (number_literal "0x24")) () ")")))) (- "-") (identifier "sVar7"))) (; ";")) (expression_statement "FUN_0006ea60();" (call_expression "FUN_0006ea60()" (identifier "FUN_0006ea60") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*(short *)(param_1 + 0x12) = sVar7;" (assignment_expression "*(short *)(param_1 + 0x12) = sVar7" (pointer_expression "*(short *)(param_1 + 0x12)" (* "*") (cast_expression "(short *)(param_1 + 0x12)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x12)" (( "(") (binary_expression "param_1 + 0x12" (identifier "param_1") (+ "+") (number_literal "0x12")) () ")")))) (= "=") (identifier "sVar7")) (; ";")) (expression_statement "iVar5 = *(int *)(iVar4 + 0x24);" (assignment_expression "iVar5 = *(int *)(iVar4 + 0x24)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(iVar4 + 0x24)" (* "*") (cast_expression "(int *)(iVar4 + 0x24)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x24)" (( "(") (binary_expression "iVar4 + 0x24" (identifier "iVar4") (+ "+") (number_literal "0x24")) () ")"))))) (; ";")) (expression_statement "param_1[0xc] = 0;" (assignment_expression "param_1[0xc] = 0" (subscript_expression "param_1[0xc]" (identifier "param_1") ([ "[") (number_literal "0xc") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(int *)(param_1 + 0x40) = iVar1 + iVar3;" (assignment_expression "*(int *)(param_1 + 0x40) = iVar1 + iVar3" (pointer_expression "*(int *)(param_1 + 0x40)" (* "*") (cast_expression "(int *)(param_1 + 0x40)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) (= "=") (binary_expression "iVar1 + iVar3" (identifier "iVar1") (+ "+") (identifier "iVar3"))) (; ";")) (expression_statement "*(int *)(param_1 + 0x3c) = iVar5 + iVar3;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar5 + iVar3" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (binary_expression "iVar5 + iVar3" (identifier "iVar5") (+ "+") (identifier "iVar3"))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];" (assignment_expression "*(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10]" (pointer_expression "*(uint *)(param_1 + 0x44)" (* "*") (cast_expression "(uint *)(param_1 + 0x44)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (binary_expression "iVar3 + (uint)(byte)param_1[10]" (identifier "iVar3") (+ "+") (cast_expression "(uint)(byte)param_1[10]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(byte)param_1[10]" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (subscript_expression "param_1[10]" (identifier "param_1") ([ "[") (number_literal "10") (] "]")))))) (; ";")) (expression_statement "uVar6 = *(undefined4 *)(iVar4 + 0x20);" (assignment_expression "uVar6 = *(undefined4 *)(iVar4 + 0x20)" (identifier "uVar6") (= "=") (pointer_expression "*(undefined4 *)(iVar4 + 0x20)" (* "*") (cast_expression "(undefined4 *)(iVar4 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x20)" (( "(") (binary_expression "iVar4 + 0x20" (identifier "iVar4") (+ "+") (number_literal "0x20")) () ")"))))) (; ";")) (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(short *)(param_1 + 0x18) = (short)uVar6 + -1;" (assignment_expression "*(short *)(param_1 + 0x18) = (short)uVar6 + -1" (pointer_expression "*(short *)(param_1 + 0x18)" (* "*") (cast_expression "(short *)(param_1 + 0x18)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (binary_expression "(short)uVar6 + -1" (cast_expression "(short)uVar6" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "uVar6")) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*(undefined2 *)(param_1 + 0x16) = 0;" (assignment_expression "*(undefined2 *)(param_1 + 0x16) = 0" (pointer_expression "*(undefined2 *)(param_1 + 0x16)" (* "*") (cast_expression "(undefined2 *)(param_1 + 0x16)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x16)" (( "(") (binary_expression "param_1 + 0x16" (identifier "param_1") (+ "+") (number_literal "0x16")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *pPage,int var_5)

{
  type_2 *puVar1;
  int var_8;
  type_3 var_4;
  type_2 *var_2;
  type_4 *pBVar5;
  type_5 var_9;
  type_6 var_6;
  type_7 var_3;
  
  var_4 = pPage->hdrOffset;
  var_3 = (type_7)var_4;
  var_2 = pPage->aData;
  pBVar5 = pPage->pBt;
  if ((pBVar5->btsFlags & 0xc) != 0) {
    var_1(var_2 + var_3,0,pBVar5->usableSize - var_3);
  }
  var_2[var_3] = (type_2)var_5;
  puVar1 = var_2 + var_3 + 1;
  puVar1[0] = '\0';
  puVar1[1] = '\0';
  puVar1[2] = '\0';
  puVar1[3] = '\0';
  var_2[var_3 + 7] = '\0';
  var_8 = var_4 + 8 + (-(type_7)((var_5 & 8U) == 0) & 4);
  var_2[var_3 + 5] = (type_2)(pBVar5->usableSize >> 8);
  var_2[var_3 + 6] = (type_2)pBVar5->usableSize;
  var_6 = (type_6)var_8;
  pPage->nFree = (short)pBVar5->usableSize - var_6;
  var_7(pPage,var_5);
  pPage->cellOffset = var_6;
  var_9 = pBVar5->usableSize;
  pPage->nOverflow = '\0';
  pPage->aCellIdx = var_2 + var_8;
  pPage->aDataEnd = var_2 + var_9;
  pPage->aDataOfst = var_2 + pPage->childPtrSize;
  var_9 = pBVar5->pageSize;
  pPage->isInit = '\x01';
  pPage->maskPage = (short)var_9 - 1;
  pPage->nCell = 0;
  return;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) 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)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) (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: (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (number_literal) (binary_expression left: (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))))) right: (identifier))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (unary_expression argument: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (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: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))))

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

void __regparm3 MASKED(undefined1 *param_1,byte param_2)

{
  int iVar1;
  byte bVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined4 uVar6;
  short sVar7;
  uint uVar8;
  
  bVar2 = param_1[9];
  uVar8 = (uint)bVar2;
  iVar3 = *(int *)(param_1 + 0x38);
  iVar4 = *(int *)(param_1 + 0x34);
  if ((*(byte *)(iVar4 + 0x16) & 0xc) != 0) {
    memset((byte *)(iVar3 + uVar8),0,*(int *)(iVar4 + 0x24) - uVar8);
  }
  *(byte *)(iVar3 + uVar8) = param_2;
  *(undefined4 *)(iVar3 + 1 + uVar8) = 0;
  *(undefined1 *)(iVar3 + 7 + uVar8) = 0;
  iVar1 = bVar2 + 8 + (-(uint)((param_2 & 8) == 0) & 4);
  *(char *)(iVar3 + 5 + uVar8) = (char)((uint)*(undefined4 *)(iVar4 + 0x24) >> 8);
  *(char *)(iVar3 + 6 + uVar8) = (char)*(undefined4 *)(iVar4 + 0x24);
  sVar7 = (short)iVar1;
  *(short *)(param_1 + 0x14) = *(short *)(iVar4 + 0x24) - sVar7;
  FUN_0006ea60();
  *(short *)(param_1 + 0x12) = sVar7;
  iVar5 = *(int *)(iVar4 + 0x24);
  param_1[0xc] = 0;
  *(int *)(param_1 + 0x40) = iVar1 + iVar3;
  *(int *)(param_1 + 0x3c) = iVar5 + iVar3;
  *(uint *)(param_1 + 0x44) = iVar3 + (uint)(byte)param_1[10];
  uVar6 = *(undefined4 *)(iVar4 + 0x20);
  *param_1 = 1;
  *(short *)(param_1 + 0x18) = (short)uVar6 + -1;
  *(undefined2 *)(param_1 + 0x16) = 0;
  return;
}

