
void zeroPage(MemPage *pPage,int flags)

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



void FUN_00044a54(undefined1 *param_1,uint param_2)

{
  undefined1 *puVar1;
  int iVar2;
  undefined4 uVar3;
  undefined1 *puVar4;
  int iVar5;
  uint uVar6;
  int iVar7;
  int iVar8;
  
  iVar8 = *(int *)(param_1 + 0x34);
  iVar7 = *(int *)(param_1 + 0x38);
  uVar6 = (uint)(byte)param_1[9];
  puVar4 = (undefined1 *)(iVar7 + uVar6);
  if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {
    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);
  }
  *puVar4 = (char)param_2;
  puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);
  *puVar1 = 0;
  puVar1[1] = 0;
  puVar1[2] = 0;
  puVar1[3] = 0;
  iVar2 = 0xc;
  puVar4[7] = 0;
  if ((param_2 & 8) != 0) {
    iVar2 = 8;
  }
  puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);
  iVar2 = uVar6 + iVar2;
  puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);
  *(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;
  FUN_0004496c(param_1,param_2);
  iVar5 = *(int *)(iVar8 + 0x28);
  param_1[0xc] = 0;
  uVar3 = *(undefined4 *)(iVar8 + 0x24);
  *(short *)(param_1 + 0x12) = (short)iVar2;
  *(int *)(param_1 + 0x3c) = iVar7 + iVar5;
  *(int *)(param_1 + 0x40) = iVar7 + iVar2;
  *(short *)(param_1 + 0x1a) = (short)uVar3 + -1;
  *(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];
  *param_1 = 1;
  *(undefined2 *)(param_1 + 0x18) = 0;
  return;
}


lui gp,0xc
addiu gp,gp,-0x77b4
addu gp,gp,t9
addiu sp,sp,-0x30
sw s3,0x24(sp)
sw s4,0x28(sp)
or s4,a1,zero
sw s2,0x20(sp)
sw s0,0x18(sp)
or s0,a0,zero
sw gp,0x10(sp)
sw ra,0x2c(sp)
sw s1,0x1c(sp)
lw s3,0x34(a0)
lw s2,0x38(a0)
lbu s1,0x9(a0)
lhu v0,0x18(s3)
andi v0,v0,0xc
bne v0,zero,0x00044b70
_addu v1,s2,s1
addiu v0,s1,0x1
sb s4,0x0(v1)
li t0,0x8
lw t9,-0x7fb8(gp)
addu v0,s2,v0
andi a2,s4,0x8
addiu t9,t9,0x496c
sb zero,0x0(v0)
or a1,s4,zero
sb zero,0x1(v0)
or a0,s0,zero
sb zero,0x2(v0)
sb zero,0x3(v0)
li v0,0xc
sb zero,0x7(v1)
lw a3,0x28(s3)
movn v0,t0,a2
srl a2,a3,0x8
sb a2,0x5(v1)
addu s1,s1,v0
lw v0,0x28(s3)
sb v0,0x6(v1)
lw v0,0x28(s3)
subu v0,v0,s1
andi v0,v0,0xffff
bal 0x0004496c
_sw v0,0x14(s0)
addu a0,s2,s1
lw v1,0x28(s3)
sb zero,0xc(s0)
lw v0,0x24(s3)
lbu a1,0xa(s0)
addu v1,s2,v1
sh s1,0x12(s0)
addiu v0,v0,-0x1
sw v1,0x3c(s0)
addu s2,s2,a1
sw a0,0x40(s0)
sh v0,0x1a(s0)
li v0,0x1
sw s2,0x44(s0)
sb v0,0x0(s0)
sh zero,0x18(s0)
lw ra,0x2c(sp)
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x30
lw a2,0x28(s3)
or a1,zero,zero
lw t9,-0x7e50(gp)
or a0,v1,zero
jalr t9
_subu a2,a2,s1
lw gp,0x10(sp)
b 0x00044aa4
_or v1,v0,zero
(translation_unit "void FUN_00044a54(undefined1 *param_1,uint param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar8 = *(int *)(param_1 + 0x34);\n  iVar7 = *(int *)(param_1 + 0x38);\n  uVar6 = (uint)(byte)param_1[9];\n  puVar4 = (undefined1 *)(iVar7 + uVar6);\n  if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }\n  *puVar4 = (char)param_2;\n  puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);\n  *puVar1 = 0;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  iVar2 = 0xc;\n  puVar4[7] = 0;\n  if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);\n  *(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;\n  FUN_0004496c(param_1,param_2);\n  iVar5 = *(int *)(iVar8 + 0x28);\n  param_1[0xc] = 0;\n  uVar3 = *(undefined4 *)(iVar8 + 0x24);\n  *(short *)(param_1 + 0x12) = (short)iVar2;\n  *(int *)(param_1 + 0x3c) = iVar7 + iVar5;\n  *(int *)(param_1 + 0x40) = iVar7 + iVar2;\n  *(short *)(param_1 + 0x1a) = (short)uVar3 + -1;\n  *(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];\n  *param_1 = 1;\n  *(undefined2 *)(param_1 + 0x18) = 0;\n  return;\n}\n\n" (function_definition "void FUN_00044a54(undefined1 *param_1,uint param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar8 = *(int *)(param_1 + 0x34);\n  iVar7 = *(int *)(param_1 + 0x38);\n  uVar6 = (uint)(byte)param_1[9];\n  puVar4 = (undefined1 *)(iVar7 + uVar6);\n  if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }\n  *puVar4 = (char)param_2;\n  puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);\n  *puVar1 = 0;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  iVar2 = 0xc;\n  puVar4[7] = 0;\n  if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);\n  *(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;\n  FUN_0004496c(param_1,param_2);\n  iVar5 = *(int *)(iVar8 + 0x28);\n  param_1[0xc] = 0;\n  uVar3 = *(undefined4 *)(iVar8 + 0x24);\n  *(short *)(param_1 + 0x12) = (short)iVar2;\n  *(int *)(param_1 + 0x3c) = iVar7 + iVar5;\n  *(int *)(param_1 + 0x40) = iVar7 + iVar2;\n  *(short *)(param_1 + 0x1a) = (short)uVar3 + -1;\n  *(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];\n  *param_1 = 1;\n  *(undefined2 *)(param_1 + 0x18) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_00044a54(undefined1 *param_1,uint param_2)" identifier (parameter_list "(undefined1 *param_1,uint param_2)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar8 = *(int *)(param_1 + 0x34);\n  iVar7 = *(int *)(param_1 + 0x38);\n  uVar6 = (uint)(byte)param_1[9];\n  puVar4 = (undefined1 *)(iVar7 + uVar6);\n  if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }\n  *puVar4 = (char)param_2;\n  puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);\n  *puVar1 = 0;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  iVar2 = 0xc;\n  puVar4[7] = 0;\n  if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);\n  *(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;\n  FUN_0004496c(param_1,param_2);\n  iVar5 = *(int *)(iVar8 + 0x28);\n  param_1[0xc] = 0;\n  uVar3 = *(undefined4 *)(iVar8 + 0x24);\n  *(short *)(param_1 + 0x12) = (short)iVar2;\n  *(int *)(param_1 + 0x3c) = iVar7 + iVar5;\n  *(int *)(param_1 + 0x40) = iVar7 + iVar2;\n  *(short *)(param_1 + 0x1a) = (short)uVar3 + -1;\n  *(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];\n  *param_1 = 1;\n  *(undefined2 *)(param_1 + 0x18) = 0;\n  return;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (expression_statement "iVar8 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar8 = *(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) ))))) ;) (expression_statement "iVar7 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar7 = *(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 "uVar6 = (uint)(byte)param_1[9];" (assignment_expression "uVar6 = (uint)(byte)param_1[9]" identifier = (cast_expression "(uint)(byte)param_1[9]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)param_1[9]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "param_1[9]" identifier [ number_literal ])))) ;) (expression_statement "puVar4 = (undefined1 *)(iVar7 + uVar6);" (assignment_expression "puVar4 = (undefined1 *)(iVar7 + uVar6)" identifier = (cast_expression "(undefined1 *)(iVar7 + uVar6)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + uVar6)" ( (binary_expression "iVar7 + uVar6" identifier + identifier) )))) ;) (if_statement "if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }" if (parenthesized_expression "((*(ushort *)(iVar8 + 0x18) & 0xc) != 0)" ( (binary_expression "(*(ushort *)(iVar8 + 0x18) & 0xc) != 0" (parenthesized_expression "(*(ushort *)(iVar8 + 0x18) & 0xc)" ( (binary_expression "*(ushort *)(iVar8 + 0x18) & 0xc" (pointer_expression "*(ushort *)(iVar8 + 0x18)" * (cast_expression "(ushort *)(iVar8 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x18)" ( (binary_expression "iVar8 + 0x18" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }" { (expression_statement "puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);" (assignment_expression "puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" (parenthesized_expression "(*(code *)PTR_memset_000f5450)" ( (pointer_expression "*(code *)PTR_memset_000f5450" * (cast_expression "(code *)PTR_memset_000f5450" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" ( identifier , number_literal , (binary_expression "*(int *)(iVar8 + 0x28) - uVar6" (pointer_expression "*(int *)(iVar8 + 0x28)" * (cast_expression "(int *)(iVar8 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x28)" ( (binary_expression "iVar8 + 0x28" identifier + number_literal) )))) - identifier) ))))) ;) })) (expression_statement "*puVar4 = (char)param_2;" (assignment_expression "*puVar4 = (char)param_2" (pointer_expression "*puVar4" * identifier) = (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);" (assignment_expression "puVar1 = (undefined1 *)(iVar7 + uVar6 + 1)" identifier = (cast_expression "(undefined1 *)(iVar7 + uVar6 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + uVar6 + 1)" ( (binary_expression "iVar7 + uVar6 + 1" (binary_expression "iVar7 + uVar6" identifier + identifier) + number_literal) )))) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[3] = 0;" (assignment_expression "puVar1[3] = 0" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar2 = 0xc;" (assignment_expression "iVar2 = 0xc" identifier = number_literal) ;) (expression_statement "puVar4[7] = 0;" (assignment_expression "puVar4[7] = 0" (subscript_expression "puVar4[7]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }" if (parenthesized_expression "((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) )) (compound_statement "{\n    iVar2 = 8;\n  }" { (expression_statement "iVar2 = 8;" (assignment_expression "iVar2 = 8" identifier = number_literal) ;) })) (expression_statement "puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);" (assignment_expression "puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8)" (subscript_expression "puVar4[5]" identifier [ number_literal ]) = (cast_expression "(char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*(undefined4 *)(iVar8 + 0x28) >> 8)" ( (binary_expression "(uint)*(undefined4 *)(iVar8 + 0x28) >> 8" (binary_expression "(uint)*(undefined4 *)(iVar8 + 0x28)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(undefined4 *)(iVar8 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x28)" ( (binary_expression "iVar8 + 0x28" identifier + number_literal) )))) >> number_literal) )))) ;) (expression_statement "iVar2 = uVar6 + iVar2;" (assignment_expression "iVar2 = uVar6 + iVar2" identifier = (binary_expression "uVar6 + iVar2" identifier + identifier)) ;) (expression_statement "puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);" (assignment_expression "puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28)" (subscript_expression "puVar4[6]" identifier [ number_literal ]) = (cast_expression "(char)*(undefined4 *)(iVar8 + 0x28)" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*(undefined4 *)(iVar8 + 0x28)" * (cast_expression "(undefined4 *)(iVar8 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x28)" ( (binary_expression "iVar8 + 0x28" identifier + number_literal) )))))) ;) (expression_statement "*(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;" (assignment_expression "*(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff" (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "*(int *)(iVar8 + 0x28) - iVar2 & 0xffff" (binary_expression "*(int *)(iVar8 + 0x28) - iVar2" (pointer_expression "*(int *)(iVar8 + 0x28)" * (cast_expression "(int *)(iVar8 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x28)" ( (binary_expression "iVar8 + 0x28" identifier + number_literal) )))) - identifier) & number_literal)) ;) (expression_statement "FUN_0004496c(param_1,param_2);" (call_expression "FUN_0004496c(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (expression_statement "iVar5 = *(int *)(iVar8 + 0x28);" (assignment_expression "iVar5 = *(int *)(iVar8 + 0x28)" identifier = (pointer_expression "*(int *)(iVar8 + 0x28)" * (cast_expression "(int *)(iVar8 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x28)" ( (binary_expression "iVar8 + 0x28" 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 "uVar3 = *(undefined4 *)(iVar8 + 0x24);" (assignment_expression "uVar3 = *(undefined4 *)(iVar8 + 0x24)" identifier = (pointer_expression "*(undefined4 *)(iVar8 + 0x24)" * (cast_expression "(undefined4 *)(iVar8 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x24)" ( (binary_expression "iVar8 + 0x24" identifier + number_literal) ))))) ;) (expression_statement "*(short *)(param_1 + 0x12) = (short)iVar2;" (assignment_expression "*(short *)(param_1 + 0x12) = (short)iVar2" (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) )))) = (cast_expression "(short)iVar2" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "*(int *)(param_1 + 0x3c) = iVar7 + iVar5;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar7 + iVar5" (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 "iVar7 + iVar5" identifier + identifier)) ;) (expression_statement "*(int *)(param_1 + 0x40) = iVar7 + iVar2;" (assignment_expression "*(int *)(param_1 + 0x40) = iVar7 + iVar2" (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 "iVar7 + iVar2" identifier + identifier)) ;) (expression_statement "*(short *)(param_1 + 0x1a) = (short)uVar3 + -1;" (assignment_expression "*(short *)(param_1 + 0x1a) = (short)uVar3 + -1" (pointer_expression "*(short *)(param_1 + 0x1a)" * (cast_expression "(short *)(param_1 + 0x1a)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1a)" ( (binary_expression "param_1 + 0x1a" identifier + number_literal) )))) = (binary_expression "(short)uVar3 + -1" (cast_expression "(short)uVar3" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) + number_literal)) ;) (expression_statement "*(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];" (assignment_expression "*(uint *)(param_1 + 0x44) = iVar7 + (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 "iVar7 + (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 "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "*(undefined2 *)(param_1 + 0x18) = 0;" (assignment_expression "*(undefined2 *)(param_1 + 0x18) = 0" (pointer_expression "*(undefined2 *)(param_1 + 0x18)" * (cast_expression "(undefined2 *)(param_1 + 0x18)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void zeroPage(MemPage *pPage,int flags)\n\n{\n  u8 *puVar1;\n  int iVar2;\n  u32 uVar3;\n  u8 *puVar4;\n  u32 uVar5;\n  uint uVar6;\n  u8 *puVar7;\n  BtShared *pBVar8;\n  \n  pBVar8 = pPage->pBt;\n  puVar7 = pPage->aData;\n  uVar6 = (uint)pPage->hdrOffset;\n  puVar4 = puVar7 + uVar6;\n  if ((pBVar8->btsFlags & 0xc) != 0) {\n    puVar4 = (u8 *)(*(code *)PTR_memset_000f5450)(puVar4,0,pBVar8->usableSize - uVar6);\n  }\n  *puVar4 = (u8)flags;\n  puVar1 = puVar7 + uVar6 + 1;\n  *puVar1 = '\0';\n  puVar1[1] = '\0';\n  puVar1[2] = '\0';\n  puVar1[3] = '\0';\n  iVar2 = 0xc;\n  puVar4[7] = '\0';\n  if ((flags & 8U) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (u8)(pBVar8->usableSize >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (u8)pBVar8->usableSize;\n  pPage->nFree = pBVar8->usableSize - iVar2 & 0xffff;\n  decodeFlags(pPage,flags);\n  uVar5 = pBVar8->usableSize;\n  pPage->nOverflow = '\0';\n  uVar3 = pBVar8->pageSize;\n  pPage->cellOffset = (u16)iVar2;\n  pPage->aDataEnd = puVar7 + uVar5;\n  pPage->aCellIdx = puVar7 + iVar2;\n  pPage->maskPage = (short)uVar3 - 1;\n  pPage->aDataOfst = puVar7 + pPage->childPtrSize;\n  pPage->isInit = '\x01';\n  pPage->nCell = 0;\n  return;\n}\n\n" (function_definition "void zeroPage(MemPage *pPage,int flags)\n\n{\n  u8 *puVar1;\n  int iVar2;\n  u32 uVar3;\n  u8 *puVar4;\n  u32 uVar5;\n  uint uVar6;\n  u8 *puVar7;\n  BtShared *pBVar8;\n  \n  pBVar8 = pPage->pBt;\n  puVar7 = pPage->aData;\n  uVar6 = (uint)pPage->hdrOffset;\n  puVar4 = puVar7 + uVar6;\n  if ((pBVar8->btsFlags & 0xc) != 0) {\n    puVar4 = (u8 *)(*(code *)PTR_memset_000f5450)(puVar4,0,pBVar8->usableSize - uVar6);\n  }\n  *puVar4 = (u8)flags;\n  puVar1 = puVar7 + uVar6 + 1;\n  *puVar1 = '\0';\n  puVar1[1] = '\0';\n  puVar1[2] = '\0';\n  puVar1[3] = '\0';\n  iVar2 = 0xc;\n  puVar4[7] = '\0';\n  if ((flags & 8U) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (u8)(pBVar8->usableSize >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (u8)pBVar8->usableSize;\n  pPage->nFree = pBVar8->usableSize - iVar2 & 0xffff;\n  decodeFlags(pPage,flags);\n  uVar5 = pBVar8->usableSize;\n  pPage->nOverflow = '\0';\n  uVar3 = pBVar8->pageSize;\n  pPage->cellOffset = (u16)iVar2;\n  pPage->aDataEnd = puVar7 + uVar5;\n  pPage->aCellIdx = puVar7 + iVar2;\n  pPage->maskPage = (short)uVar3 - 1;\n  pPage->aDataOfst = puVar7 + pPage->childPtrSize;\n  pPage->isInit = '\x01';\n  pPage->nCell = 0;\n  return;\n}" primitive_type (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  u32 uVar3;\n  u8 *puVar4;\n  u32 uVar5;\n  uint uVar6;\n  u8 *puVar7;\n  BtShared *pBVar8;\n  \n  pBVar8 = pPage->pBt;\n  puVar7 = pPage->aData;\n  uVar6 = (uint)pPage->hdrOffset;\n  puVar4 = puVar7 + uVar6;\n  if ((pBVar8->btsFlags & 0xc) != 0) {\n    puVar4 = (u8 *)(*(code *)PTR_memset_000f5450)(puVar4,0,pBVar8->usableSize - uVar6);\n  }\n  *puVar4 = (u8)flags;\n  puVar1 = puVar7 + uVar6 + 1;\n  *puVar1 = '\0';\n  puVar1[1] = '\0';\n  puVar1[2] = '\0';\n  puVar1[3] = '\0';\n  iVar2 = 0xc;\n  puVar4[7] = '\0';\n  if ((flags & 8U) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (u8)(pBVar8->usableSize >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (u8)pBVar8->usableSize;\n  pPage->nFree = pBVar8->usableSize - iVar2 & 0xffff;\n  decodeFlags(pPage,flags);\n  uVar5 = pBVar8->usableSize;\n  pPage->nOverflow = '\0';\n  uVar3 = pBVar8->pageSize;\n  pPage->cellOffset = (u16)iVar2;\n  pPage->aDataEnd = puVar7 + uVar5;\n  pPage->aCellIdx = puVar7 + iVar2;\n  pPage->maskPage = (short)uVar3 - 1;\n  pPage->aDataOfst = puVar7 + pPage->childPtrSize;\n  pPage->isInit = '\x01';\n  pPage->nCell = 0;\n  return;\n}" { (declaration "u8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "u32 uVar3;" type_identifier identifier ;) (declaration "u8 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "u32 uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "u8 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "BtShared *pBVar8;" type_identifier (pointer_declarator "*pBVar8" * identifier) ;) (expression_statement "pBVar8 = pPage->pBt;" (assignment_expression "pBVar8 = pPage->pBt" identifier = (field_expression "pPage->pBt" identifier -> field_identifier)) ;) (expression_statement "puVar7 = pPage->aData;" (assignment_expression "puVar7 = pPage->aData" identifier = (field_expression "pPage->aData" identifier -> field_identifier)) ;) (expression_statement "uVar6 = (uint)pPage->hdrOffset;" (assignment_expression "uVar6 = (uint)pPage->hdrOffset" identifier = (cast_expression "(uint)pPage->hdrOffset" ( (type_descriptor "uint" type_identifier) ) (field_expression "pPage->hdrOffset" identifier -> field_identifier))) ;) (expression_statement "puVar4 = puVar7 + uVar6;" (assignment_expression "puVar4 = puVar7 + uVar6" identifier = (binary_expression "puVar7 + uVar6" identifier + identifier)) ;) (if_statement "if ((pBVar8->btsFlags & 0xc) != 0) {\n    puVar4 = (u8 *)(*(code *)PTR_memset_000f5450)(puVar4,0,pBVar8->usableSize - uVar6);\n  }" if (parenthesized_expression "((pBVar8->btsFlags & 0xc) != 0)" ( (binary_expression "(pBVar8->btsFlags & 0xc) != 0" (parenthesized_expression "(pBVar8->btsFlags & 0xc)" ( (binary_expression "pBVar8->btsFlags & 0xc" (field_expression "pBVar8->btsFlags" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    puVar4 = (u8 *)(*(code *)PTR_memset_000f5450)(puVar4,0,pBVar8->usableSize - uVar6);\n  }" { (expression_statement "puVar4 = (u8 *)(*(code *)PTR_memset_000f5450)(puVar4,0,pBVar8->usableSize - uVar6);" (assignment_expression "puVar4 = (u8 *)(*(code *)PTR_memset_000f5450)(puVar4,0,pBVar8->usableSize - uVar6)" identifier = (cast_expression "(u8 *)(*(code *)PTR_memset_000f5450)(puVar4,0,pBVar8->usableSize - uVar6)" ( (type_descriptor "u8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_memset_000f5450)(puVar4,0,pBVar8->usableSize - uVar6)" (parenthesized_expression "(*(code *)PTR_memset_000f5450)" ( (pointer_expression "*(code *)PTR_memset_000f5450" * (cast_expression "(code *)PTR_memset_000f5450" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar4,0,pBVar8->usableSize - uVar6)" ( identifier , number_literal , (binary_expression "pBVar8->usableSize - uVar6" (field_expression "pBVar8->usableSize" identifier -> field_identifier) - identifier) ))))) ;) })) (expression_statement "*puVar4 = (u8)flags;" (assignment_expression "*puVar4 = (u8)flags" (pointer_expression "*puVar4" * identifier) = (cast_expression "(u8)flags" ( (type_descriptor "u8" type_identifier) ) identifier)) ;) (expression_statement "puVar1 = puVar7 + uVar6 + 1;" (assignment_expression "puVar1 = puVar7 + uVar6 + 1" identifier = (binary_expression "puVar7 + uVar6 + 1" (binary_expression "puVar7 + uVar6" identifier + identifier) + number_literal)) ;) (expression_statement "*puVar1 = '\0';" (assignment_expression "*puVar1 = '\0'" (pointer_expression "*puVar1" * identifier) = (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 "iVar2 = 0xc;" (assignment_expression "iVar2 = 0xc" identifier = number_literal) ;) (expression_statement "puVar4[7] = '\0';" (assignment_expression "puVar4[7] = '\0'" (subscript_expression "puVar4[7]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if ((flags & 8U) != 0) {\n    iVar2 = 8;\n  }" if (parenthesized_expression "((flags & 8U) != 0)" ( (binary_expression "(flags & 8U) != 0" (parenthesized_expression "(flags & 8U)" ( (binary_expression "flags & 8U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    iVar2 = 8;\n  }" { (expression_statement "iVar2 = 8;" (assignment_expression "iVar2 = 8" identifier = number_literal) ;) })) (expression_statement "puVar4[5] = (u8)(pBVar8->usableSize >> 8);" (assignment_expression "puVar4[5] = (u8)(pBVar8->usableSize >> 8)" (subscript_expression "puVar4[5]" identifier [ number_literal ]) = (call_expression "(u8)(pBVar8->usableSize >> 8)" (parenthesized_expression "(u8)" ( identifier )) (argument_list "(pBVar8->usableSize >> 8)" ( (binary_expression "pBVar8->usableSize >> 8" (field_expression "pBVar8->usableSize" identifier -> field_identifier) >> number_literal) )))) ;) (expression_statement "iVar2 = uVar6 + iVar2;" (assignment_expression "iVar2 = uVar6 + iVar2" identifier = (binary_expression "uVar6 + iVar2" identifier + identifier)) ;) (expression_statement "puVar4[6] = (u8)pBVar8->usableSize;" (assignment_expression "puVar4[6] = (u8)pBVar8->usableSize" (subscript_expression "puVar4[6]" identifier [ number_literal ]) = (cast_expression "(u8)pBVar8->usableSize" ( (type_descriptor "u8" type_identifier) ) (field_expression "pBVar8->usableSize" identifier -> field_identifier))) ;) (expression_statement "pPage->nFree = pBVar8->usableSize - iVar2 & 0xffff;" (assignment_expression "pPage->nFree = pBVar8->usableSize - iVar2 & 0xffff" (field_expression "pPage->nFree" identifier -> field_identifier) = (binary_expression "pBVar8->usableSize - iVar2 & 0xffff" (binary_expression "pBVar8->usableSize - iVar2" (field_expression "pBVar8->usableSize" identifier -> field_identifier) - identifier) & number_literal)) ;) (expression_statement "decodeFlags(pPage,flags);" (call_expression "decodeFlags(pPage,flags)" identifier (argument_list "(pPage,flags)" ( identifier , identifier ))) ;) (expression_statement "uVar5 = pBVar8->usableSize;" (assignment_expression "uVar5 = pBVar8->usableSize" identifier = (field_expression "pBVar8->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 "uVar3 = pBVar8->pageSize;" (assignment_expression "uVar3 = pBVar8->pageSize" identifier = (field_expression "pBVar8->pageSize" identifier -> field_identifier)) ;) (expression_statement "pPage->cellOffset = (u16)iVar2;" (assignment_expression "pPage->cellOffset = (u16)iVar2" (field_expression "pPage->cellOffset" identifier -> field_identifier) = (cast_expression "(u16)iVar2" ( (type_descriptor "u16" type_identifier) ) identifier)) ;) (expression_statement "pPage->aDataEnd = puVar7 + uVar5;" (assignment_expression "pPage->aDataEnd = puVar7 + uVar5" (field_expression "pPage->aDataEnd" identifier -> field_identifier) = (binary_expression "puVar7 + uVar5" identifier + identifier)) ;) (expression_statement "pPage->aCellIdx = puVar7 + iVar2;" (assignment_expression "pPage->aCellIdx = puVar7 + iVar2" (field_expression "pPage->aCellIdx" identifier -> field_identifier) = (binary_expression "puVar7 + iVar2" identifier + identifier)) ;) (expression_statement "pPage->maskPage = (short)uVar3 - 1;" (assignment_expression "pPage->maskPage = (short)uVar3 - 1" (field_expression "pPage->maskPage" identifier -> field_identifier) = (binary_expression "(short)uVar3 - 1" (cast_expression "(short)uVar3" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) - number_literal)) ;) (expression_statement "pPage->aDataOfst = puVar7 + pPage->childPtrSize;" (assignment_expression "pPage->aDataOfst = puVar7 + pPage->childPtrSize" (field_expression "pPage->aDataOfst" identifier -> field_identifier) = (binary_expression "puVar7 + pPage->childPtrSize" identifier + (field_expression "pPage->childPtrSize" 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->nCell = 0;" (assignment_expression "pPage->nCell = 0" (field_expression "pPage->nCell" identifier -> field_identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00044a54(undefined1 *param_1,uint param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar8 = *(int *)(param_1 + 0x34);\n  iVar7 = *(int *)(param_1 + 0x38);\n  uVar6 = (uint)(byte)param_1[9];\n  puVar4 = (undefined1 *)(iVar7 + uVar6);\n  if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }\n  *puVar4 = (char)param_2;\n  puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);\n  *puVar1 = 0;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  iVar2 = 0xc;\n  puVar4[7] = 0;\n  if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);\n  *(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;\n  FUN_0004496c(param_1,param_2);\n  iVar5 = *(int *)(iVar8 + 0x28);\n  param_1[0xc] = 0;\n  uVar3 = *(undefined4 *)(iVar8 + 0x24);\n  *(short *)(param_1 + 0x12) = (short)iVar2;\n  *(int *)(param_1 + 0x3c) = iVar7 + iVar5;\n  *(int *)(param_1 + 0x40) = iVar7 + iVar2;\n  *(short *)(param_1 + 0x1a) = (short)uVar3 + -1;\n  *(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];\n  *param_1 = 1;\n  *(undefined2 *)(param_1 + 0x18) = 0;\n  return;\n}\n\n" (function_definition "void FUN_00044a54(undefined1 *param_1,uint param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar8 = *(int *)(param_1 + 0x34);\n  iVar7 = *(int *)(param_1 + 0x38);\n  uVar6 = (uint)(byte)param_1[9];\n  puVar4 = (undefined1 *)(iVar7 + uVar6);\n  if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }\n  *puVar4 = (char)param_2;\n  puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);\n  *puVar1 = 0;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  iVar2 = 0xc;\n  puVar4[7] = 0;\n  if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);\n  *(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;\n  FUN_0004496c(param_1,param_2);\n  iVar5 = *(int *)(iVar8 + 0x28);\n  param_1[0xc] = 0;\n  uVar3 = *(undefined4 *)(iVar8 + 0x24);\n  *(short *)(param_1 + 0x12) = (short)iVar2;\n  *(int *)(param_1 + 0x3c) = iVar7 + iVar5;\n  *(int *)(param_1 + 0x40) = iVar7 + iVar2;\n  *(short *)(param_1 + 0x1a) = (short)uVar3 + -1;\n  *(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];\n  *param_1 = 1;\n  *(undefined2 *)(param_1 + 0x18) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_00044a54(undefined1 *param_1,uint param_2)" identifier (parameter_list "(undefined1 *param_1,uint param_2)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar8 = *(int *)(param_1 + 0x34);\n  iVar7 = *(int *)(param_1 + 0x38);\n  uVar6 = (uint)(byte)param_1[9];\n  puVar4 = (undefined1 *)(iVar7 + uVar6);\n  if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }\n  *puVar4 = (char)param_2;\n  puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);\n  *puVar1 = 0;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  iVar2 = 0xc;\n  puVar4[7] = 0;\n  if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);\n  *(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;\n  FUN_0004496c(param_1,param_2);\n  iVar5 = *(int *)(iVar8 + 0x28);\n  param_1[0xc] = 0;\n  uVar3 = *(undefined4 *)(iVar8 + 0x24);\n  *(short *)(param_1 + 0x12) = (short)iVar2;\n  *(int *)(param_1 + 0x3c) = iVar7 + iVar5;\n  *(int *)(param_1 + 0x40) = iVar7 + iVar2;\n  *(short *)(param_1 + 0x1a) = (short)uVar3 + -1;\n  *(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];\n  *param_1 = 1;\n  *(undefined2 *)(param_1 + 0x18) = 0;\n  return;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (expression_statement "iVar8 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar8 = *(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) ))))) ;) (expression_statement "iVar7 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar7 = *(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 "uVar6 = (uint)(byte)param_1[9];" (assignment_expression "uVar6 = (uint)(byte)param_1[9]" identifier = (cast_expression "(uint)(byte)param_1[9]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)param_1[9]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "param_1[9]" identifier [ number_literal ])))) ;) (expression_statement "puVar4 = (undefined1 *)(iVar7 + uVar6);" (assignment_expression "puVar4 = (undefined1 *)(iVar7 + uVar6)" identifier = (cast_expression "(undefined1 *)(iVar7 + uVar6)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + uVar6)" ( (binary_expression "iVar7 + uVar6" identifier + identifier) )))) ;) (if_statement "if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }" if (parenthesized_expression "((*(ushort *)(iVar8 + 0x18) & 0xc) != 0)" ( (binary_expression "(*(ushort *)(iVar8 + 0x18) & 0xc) != 0" (parenthesized_expression "(*(ushort *)(iVar8 + 0x18) & 0xc)" ( (binary_expression "*(ushort *)(iVar8 + 0x18) & 0xc" (pointer_expression "*(ushort *)(iVar8 + 0x18)" * (cast_expression "(ushort *)(iVar8 + 0x18)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x18)" ( (binary_expression "iVar8 + 0x18" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }" { (expression_statement "puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);" (assignment_expression "puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" (parenthesized_expression "(*(code *)PTR_memset_000f5450)" ( (pointer_expression "*(code *)PTR_memset_000f5450" * (cast_expression "(code *)PTR_memset_000f5450" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" ( identifier , number_literal , (binary_expression "*(int *)(iVar8 + 0x28) - uVar6" (pointer_expression "*(int *)(iVar8 + 0x28)" * (cast_expression "(int *)(iVar8 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x28)" ( (binary_expression "iVar8 + 0x28" identifier + number_literal) )))) - identifier) ))))) ;) })) (expression_statement "*puVar4 = (char)param_2;" (assignment_expression "*puVar4 = (char)param_2" (pointer_expression "*puVar4" * identifier) = (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);" (assignment_expression "puVar1 = (undefined1 *)(iVar7 + uVar6 + 1)" identifier = (cast_expression "(undefined1 *)(iVar7 + uVar6 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + uVar6 + 1)" ( (binary_expression "iVar7 + uVar6 + 1" (binary_expression "iVar7 + uVar6" identifier + identifier) + number_literal) )))) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[3] = 0;" (assignment_expression "puVar1[3] = 0" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar2 = 0xc;" (assignment_expression "iVar2 = 0xc" identifier = number_literal) ;) (expression_statement "puVar4[7] = 0;" (assignment_expression "puVar4[7] = 0" (subscript_expression "puVar4[7]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }" if (parenthesized_expression "((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) )) (compound_statement "{\n    iVar2 = 8;\n  }" { (expression_statement "iVar2 = 8;" (assignment_expression "iVar2 = 8" identifier = number_literal) ;) })) (expression_statement "puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);" (assignment_expression "puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8)" (subscript_expression "puVar4[5]" identifier [ number_literal ]) = (cast_expression "(char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*(undefined4 *)(iVar8 + 0x28) >> 8)" ( (binary_expression "(uint)*(undefined4 *)(iVar8 + 0x28) >> 8" (binary_expression "(uint)*(undefined4 *)(iVar8 + 0x28)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(undefined4 *)(iVar8 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x28)" ( (binary_expression "iVar8 + 0x28" identifier + number_literal) )))) >> number_literal) )))) ;) (expression_statement "iVar2 = uVar6 + iVar2;" (assignment_expression "iVar2 = uVar6 + iVar2" identifier = (binary_expression "uVar6 + iVar2" identifier + identifier)) ;) (expression_statement "puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);" (assignment_expression "puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28)" (subscript_expression "puVar4[6]" identifier [ number_literal ]) = (cast_expression "(char)*(undefined4 *)(iVar8 + 0x28)" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*(undefined4 *)(iVar8 + 0x28)" * (cast_expression "(undefined4 *)(iVar8 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x28)" ( (binary_expression "iVar8 + 0x28" identifier + number_literal) )))))) ;) (expression_statement "*(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;" (assignment_expression "*(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff" (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "*(int *)(iVar8 + 0x28) - iVar2 & 0xffff" (binary_expression "*(int *)(iVar8 + 0x28) - iVar2" (pointer_expression "*(int *)(iVar8 + 0x28)" * (cast_expression "(int *)(iVar8 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x28)" ( (binary_expression "iVar8 + 0x28" identifier + number_literal) )))) - identifier) & number_literal)) ;) (expression_statement "FUN_0004496c(param_1,param_2);" (call_expression "FUN_0004496c(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (expression_statement "iVar5 = *(int *)(iVar8 + 0x28);" (assignment_expression "iVar5 = *(int *)(iVar8 + 0x28)" identifier = (pointer_expression "*(int *)(iVar8 + 0x28)" * (cast_expression "(int *)(iVar8 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x28)" ( (binary_expression "iVar8 + 0x28" 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 "uVar3 = *(undefined4 *)(iVar8 + 0x24);" (assignment_expression "uVar3 = *(undefined4 *)(iVar8 + 0x24)" identifier = (pointer_expression "*(undefined4 *)(iVar8 + 0x24)" * (cast_expression "(undefined4 *)(iVar8 + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + 0x24)" ( (binary_expression "iVar8 + 0x24" identifier + number_literal) ))))) ;) (expression_statement "*(short *)(param_1 + 0x12) = (short)iVar2;" (assignment_expression "*(short *)(param_1 + 0x12) = (short)iVar2" (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) )))) = (cast_expression "(short)iVar2" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (expression_statement "*(int *)(param_1 + 0x3c) = iVar7 + iVar5;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar7 + iVar5" (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 "iVar7 + iVar5" identifier + identifier)) ;) (expression_statement "*(int *)(param_1 + 0x40) = iVar7 + iVar2;" (assignment_expression "*(int *)(param_1 + 0x40) = iVar7 + iVar2" (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 "iVar7 + iVar2" identifier + identifier)) ;) (expression_statement "*(short *)(param_1 + 0x1a) = (short)uVar3 + -1;" (assignment_expression "*(short *)(param_1 + 0x1a) = (short)uVar3 + -1" (pointer_expression "*(short *)(param_1 + 0x1a)" * (cast_expression "(short *)(param_1 + 0x1a)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1a)" ( (binary_expression "param_1 + 0x1a" identifier + number_literal) )))) = (binary_expression "(short)uVar3 + -1" (cast_expression "(short)uVar3" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier) + number_literal)) ;) (expression_statement "*(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];" (assignment_expression "*(uint *)(param_1 + 0x44) = iVar7 + (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 "iVar7 + (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 "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "*(undefined2 *)(param_1 + 0x18) = 0;" (assignment_expression "*(undefined2 *)(param_1 + 0x18) = 0" (pointer_expression "*(undefined2 *)(param_1 + 0x18)" * (cast_expression "(undefined2 *)(param_1 + 0x18)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration 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) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (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 (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( 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 * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + 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 = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (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 IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - IDENT) & LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , 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 IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_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) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) 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 + 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 (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) )))) = (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))))) ;) (expression_statement (assignment_expression (pointer_expression * 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 FUN_00044a54(undefined1 *param_1,uint param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar8 = *(int *)(param_1 + 0x34);\n  iVar7 = *(int *)(param_1 + 0x38);\n  uVar6 = (uint)(byte)param_1[9];\n  puVar4 = (undefined1 *)(iVar7 + uVar6);\n  if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }\n  *puVar4 = (char)param_2;\n  puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);\n  *puVar1 = 0;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  iVar2 = 0xc;\n  puVar4[7] = 0;\n  if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);\n  *(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;\n  FUN_0004496c(param_1,param_2);\n  iVar5 = *(int *)(iVar8 + 0x28);\n  param_1[0xc] = 0;\n  uVar3 = *(undefined4 *)(iVar8 + 0x24);\n  *(short *)(param_1 + 0x12) = (short)iVar2;\n  *(int *)(param_1 + 0x3c) = iVar7 + iVar5;\n  *(int *)(param_1 + 0x40) = iVar7 + iVar2;\n  *(short *)(param_1 + 0x1a) = (short)uVar3 + -1;\n  *(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];\n  *param_1 = 1;\n  *(undefined2 *)(param_1 + 0x18) = 0;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00044a54(undefined1 *param_1,uint param_2)" (identifier "FUN_00044a54") (parameter_list "(undefined1 *param_1,uint param_2)" (( "(") (parameter_declaration "undefined1 *param_1" (type_identifier "undefined1") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined1 *puVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar8 = *(int *)(param_1 + 0x34);\n  iVar7 = *(int *)(param_1 + 0x38);\n  uVar6 = (uint)(byte)param_1[9];\n  puVar4 = (undefined1 *)(iVar7 + uVar6);\n  if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }\n  *puVar4 = (char)param_2;\n  puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);\n  *puVar1 = 0;\n  puVar1[1] = 0;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  iVar2 = 0xc;\n  puVar4[7] = 0;\n  if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }\n  puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);\n  iVar2 = uVar6 + iVar2;\n  puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);\n  *(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;\n  FUN_0004496c(param_1,param_2);\n  iVar5 = *(int *)(iVar8 + 0x28);\n  param_1[0xc] = 0;\n  uVar3 = *(undefined4 *)(iVar8 + 0x24);\n  *(short *)(param_1 + 0x12) = (short)iVar2;\n  *(int *)(param_1 + 0x3c) = iVar7 + iVar5;\n  *(int *)(param_1 + 0x40) = iVar7 + iVar2;\n  *(short *)(param_1 + 0x1a) = (short)uVar3 + -1;\n  *(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];\n  *param_1 = 1;\n  *(undefined2 *)(param_1 + 0x18) = 0;\n  return;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (expression_statement "iVar8 = *(int *)(param_1 + 0x34);" (assignment_expression "iVar8 = *(int *)(param_1 + 0x34)" (identifier "iVar8") (= "=") (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")) () ")"))))) (; ";")) (expression_statement "iVar7 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar7 = *(int *)(param_1 + 0x38)" (identifier "iVar7") (= "=") (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 "uVar6 = (uint)(byte)param_1[9];" (assignment_expression "uVar6 = (uint)(byte)param_1[9]" (identifier "uVar6") (= "=") (cast_expression "(uint)(byte)param_1[9]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(byte)param_1[9]" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]"))))) (; ";")) (expression_statement "puVar4 = (undefined1 *)(iVar7 + uVar6);" (assignment_expression "puVar4 = (undefined1 *)(iVar7 + uVar6)" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)(iVar7 + uVar6)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar7 + uVar6)" (( "(") (binary_expression "iVar7 + uVar6" (identifier "iVar7") (+ "+") (identifier "uVar6")) () ")")))) (; ";")) (if_statement "if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }" (if "if") (parenthesized_expression "((*(ushort *)(iVar8 + 0x18) & 0xc) != 0)" (( "(") (binary_expression "(*(ushort *)(iVar8 + 0x18) & 0xc) != 0" (parenthesized_expression "(*(ushort *)(iVar8 + 0x18) & 0xc)" (( "(") (binary_expression "*(ushort *)(iVar8 + 0x18) & 0xc" (pointer_expression "*(ushort *)(iVar8 + 0x18)" (* "*") (cast_expression "(ushort *)(iVar8 + 0x18)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + 0x18)" (( "(") (binary_expression "iVar8 + 0x18" (identifier "iVar8") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "0xc")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);\n  }" ({ "{") (expression_statement "puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);" (assignment_expression "puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" (parenthesized_expression "(*(code *)PTR_memset_000f5450)" (( "(") (pointer_expression "*(code *)PTR_memset_000f5450" (* "*") (cast_expression "(code *)PTR_memset_000f5450" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memset_000f5450"))) () ")")) (argument_list "(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6)" (( "(") (identifier "puVar4") (, ",") (number_literal "0") (, ",") (binary_expression "*(int *)(iVar8 + 0x28) - uVar6" (pointer_expression "*(int *)(iVar8 + 0x28)" (* "*") (cast_expression "(int *)(iVar8 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + 0x28)" (( "(") (binary_expression "iVar8 + 0x28" (identifier "iVar8") (+ "+") (number_literal "0x28")) () ")")))) (- "-") (identifier "uVar6")) () ")"))))) (; ";")) (} "}"))) (expression_statement "*puVar4 = (char)param_2;" (assignment_expression "*puVar4 = (char)param_2" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (cast_expression "(char)param_2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_2"))) (; ";")) (expression_statement "puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);" (assignment_expression "puVar1 = (undefined1 *)(iVar7 + uVar6 + 1)" (identifier "puVar1") (= "=") (cast_expression "(undefined1 *)(iVar7 + uVar6 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar7 + uVar6 + 1)" (( "(") (binary_expression "iVar7 + uVar6 + 1" (binary_expression "iVar7 + uVar6" (identifier "iVar7") (+ "+") (identifier "uVar6")) (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[3] = 0;" (assignment_expression "puVar1[3] = 0" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar2 = 0xc;" (assignment_expression "iVar2 = 0xc" (identifier "iVar2") (= "=") (number_literal "0xc")) (; ";")) (expression_statement "puVar4[7] = 0;" (assignment_expression "puVar4[7] = 0" (subscript_expression "puVar4[7]" (identifier "puVar4") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "0")) (; ";")) (if_statement "if ((param_2 & 8) != 0) {\n    iVar2 = 8;\n  }" (if "if") (parenthesized_expression "((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")) () ")")) (compound_statement "{\n    iVar2 = 8;\n  }" ({ "{") (expression_statement "iVar2 = 8;" (assignment_expression "iVar2 = 8" (identifier "iVar2") (= "=") (number_literal "8")) (; ";")) (} "}"))) (expression_statement "puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);" (assignment_expression "puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8)" (subscript_expression "puVar4[5]" (identifier "puVar4") ([ "[") (number_literal "5") (] "]")) (= "=") (cast_expression "(char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)*(undefined4 *)(iVar8 + 0x28) >> 8)" (( "(") (binary_expression "(uint)*(undefined4 *)(iVar8 + 0x28) >> 8" (binary_expression "(uint)*(undefined4 *)(iVar8 + 0x28)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(undefined4 *)(iVar8 + 0x28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + 0x28)" (( "(") (binary_expression "iVar8 + 0x28" (identifier "iVar8") (+ "+") (number_literal "0x28")) () ")")))) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "iVar2 = uVar6 + iVar2;" (assignment_expression "iVar2 = uVar6 + iVar2" (identifier "iVar2") (= "=") (binary_expression "uVar6 + iVar2" (identifier "uVar6") (+ "+") (identifier "iVar2"))) (; ";")) (expression_statement "puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);" (assignment_expression "puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28)" (subscript_expression "puVar4[6]" (identifier "puVar4") ([ "[") (number_literal "6") (] "]")) (= "=") (cast_expression "(char)*(undefined4 *)(iVar8 + 0x28)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*(undefined4 *)(iVar8 + 0x28)" (* "*") (cast_expression "(undefined4 *)(iVar8 + 0x28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + 0x28)" (( "(") (binary_expression "iVar8 + 0x28" (identifier "iVar8") (+ "+") (number_literal "0x28")) () ")")))))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;" (assignment_expression "*(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff" (pointer_expression "*(uint *)(param_1 + 0x14)" (* "*") (cast_expression "(uint *)(param_1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (binary_expression "*(int *)(iVar8 + 0x28) - iVar2 & 0xffff" (binary_expression "*(int *)(iVar8 + 0x28) - iVar2" (pointer_expression "*(int *)(iVar8 + 0x28)" (* "*") (cast_expression "(int *)(iVar8 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + 0x28)" (( "(") (binary_expression "iVar8 + 0x28" (identifier "iVar8") (+ "+") (number_literal "0x28")) () ")")))) (- "-") (identifier "iVar2")) (& "&") (number_literal "0xffff"))) (; ";")) (expression_statement "FUN_0004496c(param_1,param_2);" (call_expression "FUN_0004496c(param_1,param_2)" (identifier "FUN_0004496c") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "iVar5 = *(int *)(iVar8 + 0x28);" (assignment_expression "iVar5 = *(int *)(iVar8 + 0x28)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(iVar8 + 0x28)" (* "*") (cast_expression "(int *)(iVar8 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + 0x28)" (( "(") (binary_expression "iVar8 + 0x28" (identifier "iVar8") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (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 "uVar3 = *(undefined4 *)(iVar8 + 0x24);" (assignment_expression "uVar3 = *(undefined4 *)(iVar8 + 0x24)" (identifier "uVar3") (= "=") (pointer_expression "*(undefined4 *)(iVar8 + 0x24)" (* "*") (cast_expression "(undefined4 *)(iVar8 + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar8 + 0x24)" (( "(") (binary_expression "iVar8 + 0x24" (identifier "iVar8") (+ "+") (number_literal "0x24")) () ")"))))) (; ";")) (expression_statement "*(short *)(param_1 + 0x12) = (short)iVar2;" (assignment_expression "*(short *)(param_1 + 0x12) = (short)iVar2" (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")) () ")")))) (= "=") (cast_expression "(short)iVar2" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "iVar2"))) (; ";")) (expression_statement "*(int *)(param_1 + 0x3c) = iVar7 + iVar5;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar7 + iVar5" (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 "iVar7 + iVar5" (identifier "iVar7") (+ "+") (identifier "iVar5"))) (; ";")) (expression_statement "*(int *)(param_1 + 0x40) = iVar7 + iVar2;" (assignment_expression "*(int *)(param_1 + 0x40) = iVar7 + iVar2" (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 "iVar7 + iVar2" (identifier "iVar7") (+ "+") (identifier "iVar2"))) (; ";")) (expression_statement "*(short *)(param_1 + 0x1a) = (short)uVar3 + -1;" (assignment_expression "*(short *)(param_1 + 0x1a) = (short)uVar3 + -1" (pointer_expression "*(short *)(param_1 + 0x1a)" (* "*") (cast_expression "(short *)(param_1 + 0x1a)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1a)" (( "(") (binary_expression "param_1 + 0x1a" (identifier "param_1") (+ "+") (number_literal "0x1a")) () ")")))) (= "=") (binary_expression "(short)uVar3 + -1" (cast_expression "(short)uVar3" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "uVar3")) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];" (assignment_expression "*(uint *)(param_1 + 0x44) = iVar7 + (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 "iVar7 + (uint)(byte)param_1[10]" (identifier "iVar7") (+ "+") (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 "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(undefined2 *)(param_1 + 0x18) = 0;" (assignment_expression "*(undefined2 *)(param_1 + 0x18) = 0" (pointer_expression "*(undefined2 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined2 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))
(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)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (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))))))) (expression_statement (assignment_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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (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 (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (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: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) 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: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) 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: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) 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: (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: (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)) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (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: (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: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) 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: (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: (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: (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: (pointer_expression argument: (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))))

void MASKED(undefined1 *param_1,uint param_2)

{
  undefined1 *puVar1;
  int iVar2;
  undefined4 uVar3;
  undefined1 *puVar4;
  int iVar5;
  uint uVar6;
  int iVar7;
  int iVar8;
  
  iVar8 = *(int *)(param_1 + 0x34);
  iVar7 = *(int *)(param_1 + 0x38);
  uVar6 = (uint)(byte)param_1[9];
  puVar4 = (undefined1 *)(iVar7 + uVar6);
  if ((*(ushort *)(iVar8 + 0x18) & 0xc) != 0) {
    puVar4 = (undefined1 *)(*(code *)PTR_memset_000f5450)(puVar4,0,*(int *)(iVar8 + 0x28) - uVar6);
  }
  *puVar4 = (char)param_2;
  puVar1 = (undefined1 *)(iVar7 + uVar6 + 1);
  *puVar1 = 0;
  puVar1[1] = 0;
  puVar1[2] = 0;
  puVar1[3] = 0;
  iVar2 = 0xc;
  puVar4[7] = 0;
  if ((param_2 & 8) != 0) {
    iVar2 = 8;
  }
  puVar4[5] = (char)((uint)*(undefined4 *)(iVar8 + 0x28) >> 8);
  iVar2 = uVar6 + iVar2;
  puVar4[6] = (char)*(undefined4 *)(iVar8 + 0x28);
  *(uint *)(param_1 + 0x14) = *(int *)(iVar8 + 0x28) - iVar2 & 0xffff;
  FUN_0004496c(param_1,param_2);
  iVar5 = *(int *)(iVar8 + 0x28);
  param_1[0xc] = 0;
  uVar3 = *(undefined4 *)(iVar8 + 0x24);
  *(short *)(param_1 + 0x12) = (short)iVar2;
  *(int *)(param_1 + 0x3c) = iVar7 + iVar5;
  *(int *)(param_1 + 0x40) = iVar7 + iVar2;
  *(short *)(param_1 + 0x1a) = (short)uVar3 + -1;
  *(uint *)(param_1 + 0x44) = iVar7 + (uint)(byte)param_1[10];
  *param_1 = 1;
  *(undefined2 *)(param_1 + 0x18) = 0;
  return;
}

