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

void __regparm3 dropCell(MemPage *pPage,int idx,int sz,int *pRC)

{
  ushort *__dest;
  u8 *puVar1;
  byte bVar2;
  u8 *puVar3;
  uint uVar4;
  int iVar5;
  ushort uVar6;
  
  __dest = (ushort *)(pPage->aCellIdx + idx * 2);
  uVar6 = *__dest << 8 | *__dest >> 8;
  if (pPage->pBt->usableSize < (uint)uVar6 + sz) {
    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,
                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    *pRC = 0xb;
    return;
  }
  bVar2 = pPage->hdrOffset;
  puVar3 = pPage->aData;
  iVar5 = freeSpace(pPage,uVar6,(u16)sz);
  if (iVar5 == 0) {
    uVar4 = (uint)bVar2;
    uVar6 = pPage->nCell - 1;
    pPage->nCell = uVar6;
    if (uVar6 == 0) {
      puVar1 = puVar3 + uVar4 + 1;
      puVar1[0] = '\0';
      puVar1[1] = '\0';
      puVar1[2] = '\0';
      puVar1[3] = '\0';
      puVar3[uVar4 + 7] = '\0';
      puVar3[uVar4 + 5] = (u8)(pPage->pBt->usableSize >> 8);
      puVar3[uVar4 + 6] = (u8)pPage->pBt->usableSize;
      pPage->nFree = (((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -
                     (ushort)pPage->childPtrSize;
      return;
    }
    memmove(__dest,__dest + 1,((uint)uVar6 - idx) * 2);
    puVar3[uVar4 + 3] = *(u8 *)((int)&pPage->nCell + 1);
    puVar3[uVar4 + 4] = (u8)pPage->nCell;
    pPage->nFree = pPage->nFree + 2;
    return;
  }
  *pRC = iVar5;
  return;
}



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

void __regparm3 FUN_0006ff70(int param_1,int param_2,int param_3,int *param_4)

{
  ushort *__dest;
  byte bVar1;
  int iVar2;
  uint uVar3;
  ushort uVar4;
  int iVar5;
  
  __dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);
  if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <
      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {
    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,
                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    *param_4 = 0xb;
    return;
  }
  bVar1 = *(byte *)(param_1 + 9);
  iVar2 = *(int *)(param_1 + 0x38);
  iVar5 = FUN_0006faa0();
  if (iVar5 == 0) {
    uVar3 = (uint)bVar1;
    uVar4 = *(short *)(param_1 + 0x16) - 1;
    *(ushort *)(param_1 + 0x16) = uVar4;
    if (uVar4 == 0) {
      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;
      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;
      *(char *)(iVar2 + 5 + uVar3) =
           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);
      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);
      *(ushort *)(param_1 + 0x14) =
           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -
            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);
      return;
    }
    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);
    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);
    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);
    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;
    return;
  }
  *param_4 = iVar5;
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00017230
ADD EBX,0x10bead
SUB ESP,0x1c
MOV EAX,dword ptr [EAX + 0x40]
MOV dword ptr [ESP + 0x8],EDX
LEA EDI,[EAX + EDX*0x2]
MOV EAX,dword ptr [ESI + 0x34]
MOVZX EDX,word ptr [EDI]
ROL DX,0x8
MOVZX EDX,DX
LEA EBP,[EDX + ECX*0x1]
CMP EBP,dword ptr [EAX + 0x24]
JA 0x00070030
MOVZX EAX,byte ptr [ESI + 0x9]
MOV EBP,dword ptr [ESI + 0x38]
MOV byte ptr [ESP + 0xc],AL
MOV EAX,ESI
CALL 0x0006faa0
TEST EAX,EAX
JNZ 0x00070020
MOVZX EAX,word ptr [ESI + 0x16]
MOVZX EDX,byte ptr [ESP + 0xc]
SUB EAX,0x1
MOV word ptr [ESI + 0x16],AX
TEST AX,AX
JNZ 0x00070070
MOV dword ptr [EBP + EDX*0x1 + 0x1],0x0
MOV byte ptr [EBP + EDX*0x1 + 0x7],0x0
MOV EAX,dword ptr [ESI + 0x34]
MOV EAX,dword ptr [EAX + 0x24]
MOV byte ptr [EBP + EDX*0x1 + 0x5],AH
MOV EAX,dword ptr [ESI + 0x34]
MOV EAX,dword ptr [EAX + 0x24]
MOV byte ptr [EBP + EDX*0x1 + 0x6],AL
MOV EAX,dword ptr [ESI + 0x34]
MOVZX EDX,byte ptr [ESI + 0x9]
MOV EAX,dword ptr [EAX + 0x24]
SUB EAX,EDX
MOVZX EDX,byte ptr [ESI + 0xa]
SUB EAX,0x8
SUB EAX,EDX
MOV word ptr [ESI + 0x14],AX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBX,dword ptr [ESP + 0x30]
MOV dword ptr [EBX],EAX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfffa0934]
PUSH EAX
LEA EAX,[EBX + 0xfffa3c05]
PUSH 0x11000
PUSH EAX
LEA EAX,[EBX + 0xfffa39ca]
PUSH EAX
PUSH 0xb
CALL 0x0006e260
MOV EAX,dword ptr [ESP + 0x50]
ADD ESP,0x20
MOV dword ptr [EAX],0xb
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESP + 0xc],EDX
SUB ESP,0x4
MOVZX EAX,AX
SUB EAX,dword ptr [ESP + 0xc]
ADD EAX,EAX
PUSH EAX
LEA EAX,[EDI + 0x2]
PUSH EAX
PUSH EDI
CALL 0x00015100
MOVZX EAX,byte ptr [ESI + 0x17]
MOV EDX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
MOV byte ptr [EBP + EDX*0x1 + 0x3],AL
MOVZX EAX,word ptr [ESI + 0x16]
MOV byte ptr [EBP + EDX*0x1 + 0x4],AL
ADD word ptr [ESI + 0x14],0x2
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_0006ff70(int param_1,int param_2,int param_3,int *param_4)\n\n{\n  ushort *__dest;\n  byte bVar1;\n  int iVar2;\n  uint uVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  __dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);\n  if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }\n  bVar1 = *(byte *)(param_1 + 9);\n  iVar2 = *(int *)(param_1 + 0x38);\n  iVar5 = FUN_0006faa0();\n  if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }\n  *param_4 = iVar5;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_0006ff70(int param_1,int param_2,int param_3,int *param_4)\n\n{\n  ushort *__dest;\n  byte bVar1;\n  int iVar2;\n  uint uVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  __dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);\n  if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }\n  bVar1 = *(byte *)(param_1 + 9);\n  iVar2 = *(int *)(param_1 + 0x38);\n  iVar5 = FUN_0006faa0();\n  if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }\n  *param_4 = iVar5;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0006ff70(int param_1,int param_2,int param_3,int *param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,int *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  ushort *__dest;\n  byte bVar1;\n  int iVar2;\n  uint uVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  __dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);\n  if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }\n  bVar1 = *(byte *)(param_1 + 9);\n  iVar2 = *(int *)(param_1 + 0x38);\n  iVar5 = FUN_0006faa0();\n  if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }\n  *param_4 = iVar5;\n  return;\n}" { (declaration "ushort *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "ushort uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "__dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);" (assignment_expression "__dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2)" identifier = (cast_expression "(ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x40) + param_2 * 2)" ( (binary_expression "*(int *)(param_1 + 0x40) + param_2 * 2" (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 "param_2 * 2" identifier * number_literal)) )))) ;) (if_statement "if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }" if (parenthesized_expression "(*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3)" ( (binary_expression "*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3" (pointer_expression "*(uint *)(*(int *)(param_1 + 0x34) + 0x24)" * (cast_expression "(uint *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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) )))) + number_literal) )))) < (binary_expression "(uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3" (call_expression "(uint)(ushort)(*__dest << 8 | *__dest >> 8)" (call_expression "(uint)(ushort)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(ushort)" ( identifier ))) (argument_list "(*__dest << 8 | *__dest >> 8)" ( (binary_expression "*__dest << 8 | *__dest >> 8" (binary_expression "*__dest << 8" (pointer_expression "*__dest" * identifier) << number_literal) | (binary_expression "*__dest >> 8" (pointer_expression "*__dest" * identifier) >> number_literal)) ))) + identifier)) )) (compound_statement "{\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }" { (expression_statement "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , (pointer_expression "&WORD_00011000" & identifier) , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (expression_statement "*param_4 = 0xb;" (assignment_expression "*param_4 = 0xb" (pointer_expression "*param_4" * identifier) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "bVar1 = *(byte *)(param_1 + 9);" (assignment_expression "bVar1 = *(byte *)(param_1 + 9)" identifier = (pointer_expression "*(byte *)(param_1 + 9)" * (cast_expression "(byte *)(param_1 + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar2 = *(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 "iVar5 = FUN_0006faa0();" (assignment_expression "iVar5 = FUN_0006faa0()" identifier = (call_expression "FUN_0006faa0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }" { (expression_statement "uVar3 = (uint)bVar1;" (assignment_expression "uVar3 = (uint)bVar1" identifier = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "uVar4 = *(short *)(param_1 + 0x16) - 1;" (assignment_expression "uVar4 = *(short *)(param_1 + 0x16) - 1" identifier = (binary_expression "*(short *)(param_1 + 0x16) - 1" (pointer_expression "*(short *)(param_1 + 0x16)" * (cast_expression "(short *)(param_1 + 0x16)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x16)" ( (binary_expression "param_1 + 0x16" identifier + number_literal) )))) - number_literal)) ;) (expression_statement "*(ushort *)(param_1 + 0x16) = uVar4;" (assignment_expression "*(ushort *)(param_1 + 0x16) = uVar4" (pointer_expression "*(ushort *)(param_1 + 0x16)" * (cast_expression "(ushort *)(param_1 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x16)" ( (binary_expression "param_1 + 0x16" identifier + number_literal) )))) = identifier) ;) (if_statement "if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }" { (expression_statement "*(undefined4 *)(iVar2 + 1 + uVar3) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + 1 + uVar3) = 0" (pointer_expression "*(undefined4 *)(iVar2 + 1 + uVar3)" * (cast_expression "(undefined4 *)(iVar2 + 1 + uVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 1 + uVar3)" ( (binary_expression "iVar2 + 1 + uVar3" (binary_expression "iVar2 + 1" identifier + number_literal) + identifier) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(iVar2 + 7 + uVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + 7 + uVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + 7 + uVar3)" * (cast_expression "(undefined1 *)(iVar2 + 7 + uVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 7 + uVar3)" ( (binary_expression "iVar2 + 7 + uVar3" (binary_expression "iVar2 + 7" identifier + number_literal) + identifier) )))) = number_literal) ;) (expression_statement "*(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);" (assignment_expression "*(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8)" (pointer_expression "*(char *)(iVar2 + 5 + uVar3)" * (cast_expression "(char *)(iVar2 + 5 + uVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 5 + uVar3)" ( (binary_expression "iVar2 + 5 + uVar3" (binary_expression "iVar2 + 5" identifier + number_literal) + identifier) )))) = (cast_expression "(char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8)" ( (binary_expression "(uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8" (binary_expression "(uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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) )))) + number_literal) )))) >> number_literal) )))) ;) (expression_statement "*(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);" (assignment_expression "*(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (pointer_expression "*(char *)(iVar2 + 6 + uVar3)" * (cast_expression "(char *)(iVar2 + 6 + uVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 6 + uVar3)" ( (binary_expression "iVar2 + 6 + uVar3" (binary_expression "iVar2 + 6" identifier + number_literal) + identifier) )))) = (cast_expression "(char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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) )))) + number_literal) )))))) ;) (expression_statement "*(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);" (assignment_expression "*(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10)" (pointer_expression "*(ushort *)(param_1 + 0x14)" * (cast_expression "(ushort *)(param_1 + 0x14)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "(((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10)" (parenthesized_expression "(((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8)" ( (binary_expression "((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8" (parenthesized_expression "((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9))" ( (binary_expression "(short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)" (cast_expression "(short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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) )))) + number_literal) ))))) - (binary_expression "(ushort)*(byte *)(param_1 + 9)" (parenthesized_expression "(ushort)" ( identifier )) * (cast_expression "(byte *)(param_1 + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) ))))) )) + number_literal) )) - (binary_expression "(ushort)*(byte *)(param_1 + 10)" (parenthesized_expression "(ushort)" ( identifier )) * (cast_expression "(byte *)(param_1 + 10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) )))))) ;) (return_statement "return;" return ;) })) (expression_statement "memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);" (call_expression "memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2)" identifier (argument_list "(__dest,__dest + 1,((uint)uVar4 - param_2) * 2)" ( identifier , (binary_expression "__dest + 1" identifier + number_literal) , (binary_expression "((uint)uVar4 - param_2) * 2" (parenthesized_expression "((uint)uVar4 - param_2)" ( (binary_expression "(uint)uVar4 - param_2" (cast_expression "(uint)uVar4" ( (type_descriptor "uint" type_identifier) ) identifier) - identifier) )) * number_literal) ))) ;) (expression_statement "*(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);" (assignment_expression "*(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17)" (pointer_expression "*(undefined1 *)(iVar2 + 3 + uVar3)" * (cast_expression "(undefined1 *)(iVar2 + 3 + uVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 3 + uVar3)" ( (binary_expression "iVar2 + 3 + uVar3" (binary_expression "iVar2 + 3" identifier + number_literal) + identifier) )))) = (pointer_expression "*(undefined1 *)(param_1 + 0x17)" * (cast_expression "(undefined1 *)(param_1 + 0x17)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x17)" ( (binary_expression "param_1 + 0x17" identifier + number_literal) ))))) ;) (expression_statement "*(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);" (assignment_expression "*(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16)" (pointer_expression "*(char *)(iVar2 + 4 + uVar3)" * (cast_expression "(char *)(iVar2 + 4 + uVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 4 + uVar3)" ( (binary_expression "iVar2 + 4 + uVar3" (binary_expression "iVar2 + 4" identifier + number_literal) + identifier) )))) = (cast_expression "(char)*(undefined2 *)(param_1 + 0x16)" ( (type_descriptor "char" primitive_type) ) (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) )))))) ;) (expression_statement "*(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;" (assignment_expression "*(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2" (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 *)(param_1 + 0x14) + 2" (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) )))) + number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "*param_4 = iVar5;" (assignment_expression "*param_4 = iVar5" (pointer_expression "*param_4" * identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 dropCell(MemPage *pPage,int idx,int sz,int *pRC)\n\n{\n  ushort *__dest;\n  u8 *puVar1;\n  byte bVar2;\n  u8 *puVar3;\n  uint uVar4;\n  int iVar5;\n  ushort uVar6;\n  \n  __dest = (ushort *)(pPage->aCellIdx + idx * 2);\n  uVar6 = *__dest << 8 | *__dest >> 8;\n  if (pPage->pBt->usableSize < (uint)uVar6 + sz) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *pRC = 0xb;\n    return;\n  }\n  bVar2 = pPage->hdrOffset;\n  puVar3 = pPage->aData;\n  iVar5 = freeSpace(pPage,uVar6,(u16)sz);\n  if (iVar5 == 0) {\n    uVar4 = (uint)bVar2;\n    uVar6 = pPage->nCell - 1;\n    pPage->nCell = uVar6;\n    if (uVar6 == 0) {\n      puVar1 = puVar3 + uVar4 + 1;\n      puVar1[0] = '\0';\n      puVar1[1] = '\0';\n      puVar1[2] = '\0';\n      puVar1[3] = '\0';\n      puVar3[uVar4 + 7] = '\0';\n      puVar3[uVar4 + 5] = (u8)(pPage->pBt->usableSize >> 8);\n      puVar3[uVar4 + 6] = (u8)pPage->pBt->usableSize;\n      pPage->nFree = (((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -\n                     (ushort)pPage->childPtrSize;\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar6 - idx) * 2);\n    puVar3[uVar4 + 3] = *(u8 *)((int)&pPage->nCell + 1);\n    puVar3[uVar4 + 4] = (u8)pPage->nCell;\n    pPage->nFree = pPage->nFree + 2;\n    return;\n  }\n  *pRC = iVar5;\n  return;\n}\n\n" comment (function_definition "void __regparm3 dropCell(MemPage *pPage,int idx,int sz,int *pRC)\n\n{\n  ushort *__dest;\n  u8 *puVar1;\n  byte bVar2;\n  u8 *puVar3;\n  uint uVar4;\n  int iVar5;\n  ushort uVar6;\n  \n  __dest = (ushort *)(pPage->aCellIdx + idx * 2);\n  uVar6 = *__dest << 8 | *__dest >> 8;\n  if (pPage->pBt->usableSize < (uint)uVar6 + sz) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *pRC = 0xb;\n    return;\n  }\n  bVar2 = pPage->hdrOffset;\n  puVar3 = pPage->aData;\n  iVar5 = freeSpace(pPage,uVar6,(u16)sz);\n  if (iVar5 == 0) {\n    uVar4 = (uint)bVar2;\n    uVar6 = pPage->nCell - 1;\n    pPage->nCell = uVar6;\n    if (uVar6 == 0) {\n      puVar1 = puVar3 + uVar4 + 1;\n      puVar1[0] = '\0';\n      puVar1[1] = '\0';\n      puVar1[2] = '\0';\n      puVar1[3] = '\0';\n      puVar3[uVar4 + 7] = '\0';\n      puVar3[uVar4 + 5] = (u8)(pPage->pBt->usableSize >> 8);\n      puVar3[uVar4 + 6] = (u8)pPage->pBt->usableSize;\n      pPage->nFree = (((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -\n                     (ushort)pPage->childPtrSize;\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar6 - idx) * 2);\n    puVar3[uVar4 + 3] = *(u8 *)((int)&pPage->nCell + 1);\n    puVar3[uVar4 + 4] = (u8)pPage->nCell;\n    pPage->nFree = pPage->nFree + 2;\n    return;\n  }\n  *pRC = iVar5;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "dropCell(MemPage *pPage,int idx,int sz,int *pRC)" identifier (parameter_list "(MemPage *pPage,int idx,int sz,int *pRC)" ( (parameter_declaration "MemPage *pPage" type_identifier (pointer_declarator "*pPage" * identifier)) , (parameter_declaration "int idx" primitive_type identifier) , (parameter_declaration "int sz" primitive_type identifier) , (parameter_declaration "int *pRC" primitive_type (pointer_declarator "*pRC" * identifier)) ))) (compound_statement "{\n  ushort *__dest;\n  u8 *puVar1;\n  byte bVar2;\n  u8 *puVar3;\n  uint uVar4;\n  int iVar5;\n  ushort uVar6;\n  \n  __dest = (ushort *)(pPage->aCellIdx + idx * 2);\n  uVar6 = *__dest << 8 | *__dest >> 8;\n  if (pPage->pBt->usableSize < (uint)uVar6 + sz) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *pRC = 0xb;\n    return;\n  }\n  bVar2 = pPage->hdrOffset;\n  puVar3 = pPage->aData;\n  iVar5 = freeSpace(pPage,uVar6,(u16)sz);\n  if (iVar5 == 0) {\n    uVar4 = (uint)bVar2;\n    uVar6 = pPage->nCell - 1;\n    pPage->nCell = uVar6;\n    if (uVar6 == 0) {\n      puVar1 = puVar3 + uVar4 + 1;\n      puVar1[0] = '\0';\n      puVar1[1] = '\0';\n      puVar1[2] = '\0';\n      puVar1[3] = '\0';\n      puVar3[uVar4 + 7] = '\0';\n      puVar3[uVar4 + 5] = (u8)(pPage->pBt->usableSize >> 8);\n      puVar3[uVar4 + 6] = (u8)pPage->pBt->usableSize;\n      pPage->nFree = (((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -\n                     (ushort)pPage->childPtrSize;\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar6 - idx) * 2);\n    puVar3[uVar4 + 3] = *(u8 *)((int)&pPage->nCell + 1);\n    puVar3[uVar4 + 4] = (u8)pPage->nCell;\n    pPage->nFree = pPage->nFree + 2;\n    return;\n  }\n  *pRC = iVar5;\n  return;\n}" { (declaration "ushort *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "u8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "u8 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "ushort uVar6;" type_identifier identifier ;) (expression_statement "__dest = (ushort *)(pPage->aCellIdx + idx * 2);" (assignment_expression "__dest = (ushort *)(pPage->aCellIdx + idx * 2)" identifier = (cast_expression "(ushort *)(pPage->aCellIdx + idx * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pPage->aCellIdx + idx * 2)" ( (binary_expression "pPage->aCellIdx + idx * 2" (field_expression "pPage->aCellIdx" identifier -> field_identifier) + (binary_expression "idx * 2" identifier * number_literal)) )))) ;) (expression_statement "uVar6 = *__dest << 8 | *__dest >> 8;" (assignment_expression "uVar6 = *__dest << 8 | *__dest >> 8" identifier = (binary_expression "*__dest << 8 | *__dest >> 8" (binary_expression "*__dest << 8" (pointer_expression "*__dest" * identifier) << number_literal) | (binary_expression "*__dest >> 8" (pointer_expression "*__dest" * identifier) >> number_literal))) ;) (if_statement "if (pPage->pBt->usableSize < (uint)uVar6 + sz) {\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *pRC = 0xb;\n    return;\n  }" if (parenthesized_expression "(pPage->pBt->usableSize < (uint)uVar6 + sz)" ( (binary_expression "pPage->pBt->usableSize < (uint)uVar6 + sz" (field_expression "pPage->pBt->usableSize" (field_expression "pPage->pBt" identifier -> field_identifier) -> field_identifier) < (binary_expression "(uint)uVar6 + sz" (cast_expression "(uint)uVar6" ( (type_descriptor "uint" type_identifier) ) identifier) + identifier)) )) (compound_statement "{\n    sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *pRC = 0xb;\n    return;\n  }" { (expression_statement "sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , (pointer_expression "&WORD_00011000" & identifier) , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (expression_statement "*pRC = 0xb;" (assignment_expression "*pRC = 0xb" (pointer_expression "*pRC" * identifier) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "bVar2 = pPage->hdrOffset;" (assignment_expression "bVar2 = pPage->hdrOffset" identifier = (field_expression "pPage->hdrOffset" identifier -> field_identifier)) ;) (expression_statement "puVar3 = pPage->aData;" (assignment_expression "puVar3 = pPage->aData" identifier = (field_expression "pPage->aData" identifier -> field_identifier)) ;) (expression_statement "iVar5 = freeSpace(pPage,uVar6,(u16)sz);" (assignment_expression "iVar5 = freeSpace(pPage,uVar6,(u16)sz)" identifier = (call_expression "freeSpace(pPage,uVar6,(u16)sz)" identifier (argument_list "(pPage,uVar6,(u16)sz)" ( identifier , identifier , (cast_expression "(u16)sz" ( (type_descriptor "u16" type_identifier) ) identifier) )))) ;) (if_statement "if (iVar5 == 0) {\n    uVar4 = (uint)bVar2;\n    uVar6 = pPage->nCell - 1;\n    pPage->nCell = uVar6;\n    if (uVar6 == 0) {\n      puVar1 = puVar3 + uVar4 + 1;\n      puVar1[0] = '\0';\n      puVar1[1] = '\0';\n      puVar1[2] = '\0';\n      puVar1[3] = '\0';\n      puVar3[uVar4 + 7] = '\0';\n      puVar3[uVar4 + 5] = (u8)(pPage->pBt->usableSize >> 8);\n      puVar3[uVar4 + 6] = (u8)pPage->pBt->usableSize;\n      pPage->nFree = (((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -\n                     (ushort)pPage->childPtrSize;\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar6 - idx) * 2);\n    puVar3[uVar4 + 3] = *(u8 *)((int)&pPage->nCell + 1);\n    puVar3[uVar4 + 4] = (u8)pPage->nCell;\n    pPage->nFree = pPage->nFree + 2;\n    return;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar4 = (uint)bVar2;\n    uVar6 = pPage->nCell - 1;\n    pPage->nCell = uVar6;\n    if (uVar6 == 0) {\n      puVar1 = puVar3 + uVar4 + 1;\n      puVar1[0] = '\0';\n      puVar1[1] = '\0';\n      puVar1[2] = '\0';\n      puVar1[3] = '\0';\n      puVar3[uVar4 + 7] = '\0';\n      puVar3[uVar4 + 5] = (u8)(pPage->pBt->usableSize >> 8);\n      puVar3[uVar4 + 6] = (u8)pPage->pBt->usableSize;\n      pPage->nFree = (((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -\n                     (ushort)pPage->childPtrSize;\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar6 - idx) * 2);\n    puVar3[uVar4 + 3] = *(u8 *)((int)&pPage->nCell + 1);\n    puVar3[uVar4 + 4] = (u8)pPage->nCell;\n    pPage->nFree = pPage->nFree + 2;\n    return;\n  }" { (expression_statement "uVar4 = (uint)bVar2;" (assignment_expression "uVar4 = (uint)bVar2" identifier = (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "uVar6 = pPage->nCell - 1;" (assignment_expression "uVar6 = pPage->nCell - 1" identifier = (binary_expression "pPage->nCell - 1" (field_expression "pPage->nCell" identifier -> field_identifier) - number_literal)) ;) (expression_statement "pPage->nCell = uVar6;" (assignment_expression "pPage->nCell = uVar6" (field_expression "pPage->nCell" identifier -> field_identifier) = identifier) ;) (if_statement "if (uVar6 == 0) {\n      puVar1 = puVar3 + uVar4 + 1;\n      puVar1[0] = '\0';\n      puVar1[1] = '\0';\n      puVar1[2] = '\0';\n      puVar1[3] = '\0';\n      puVar3[uVar4 + 7] = '\0';\n      puVar3[uVar4 + 5] = (u8)(pPage->pBt->usableSize >> 8);\n      puVar3[uVar4 + 6] = (u8)pPage->pBt->usableSize;\n      pPage->nFree = (((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -\n                     (ushort)pPage->childPtrSize;\n      return;\n    }" if (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) (compound_statement "{\n      puVar1 = puVar3 + uVar4 + 1;\n      puVar1[0] = '\0';\n      puVar1[1] = '\0';\n      puVar1[2] = '\0';\n      puVar1[3] = '\0';\n      puVar3[uVar4 + 7] = '\0';\n      puVar3[uVar4 + 5] = (u8)(pPage->pBt->usableSize >> 8);\n      puVar3[uVar4 + 6] = (u8)pPage->pBt->usableSize;\n      pPage->nFree = (((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -\n                     (ushort)pPage->childPtrSize;\n      return;\n    }" { (expression_statement "puVar1 = puVar3 + uVar4 + 1;" (assignment_expression "puVar1 = puVar3 + uVar4 + 1" identifier = (binary_expression "puVar3 + uVar4 + 1" (binary_expression "puVar3 + uVar4" 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 "puVar3[uVar4 + 7] = '\0';" (assignment_expression "puVar3[uVar4 + 7] = '\0'" (subscript_expression "puVar3[uVar4 + 7]" identifier [ (binary_expression "uVar4 + 7" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar3[uVar4 + 5] = (u8)(pPage->pBt->usableSize >> 8);" (assignment_expression "puVar3[uVar4 + 5] = (u8)(pPage->pBt->usableSize >> 8)" (subscript_expression "puVar3[uVar4 + 5]" identifier [ (binary_expression "uVar4 + 5" identifier + number_literal) ]) = (call_expression "(u8)(pPage->pBt->usableSize >> 8)" (parenthesized_expression "(u8)" ( identifier )) (argument_list "(pPage->pBt->usableSize >> 8)" ( (binary_expression "pPage->pBt->usableSize >> 8" (field_expression "pPage->pBt->usableSize" (field_expression "pPage->pBt" identifier -> field_identifier) -> field_identifier) >> number_literal) )))) ;) (expression_statement "puVar3[uVar4 + 6] = (u8)pPage->pBt->usableSize;" (assignment_expression "puVar3[uVar4 + 6] = (u8)pPage->pBt->usableSize" (subscript_expression "puVar3[uVar4 + 6]" identifier [ (binary_expression "uVar4 + 6" identifier + number_literal) ]) = (cast_expression "(u8)pPage->pBt->usableSize" ( (type_descriptor "u8" type_identifier) ) (field_expression "pPage->pBt->usableSize" (field_expression "pPage->pBt" identifier -> field_identifier) -> field_identifier))) ;) (expression_statement "pPage->nFree = (((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -\n                     (ushort)pPage->childPtrSize;" (assignment_expression "pPage->nFree = (((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -\n                     (ushort)pPage->childPtrSize" (field_expression "pPage->nFree" identifier -> field_identifier) = (binary_expression "(((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8) -\n                     (ushort)pPage->childPtrSize" (parenthesized_expression "(((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8)" ( (binary_expression "((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset) + -8" (parenthesized_expression "((short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset)" ( (binary_expression "(short)pPage->pBt->usableSize - (ushort)pPage->hdrOffset" (cast_expression "(short)pPage->pBt->usableSize" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (field_expression "pPage->pBt->usableSize" (field_expression "pPage->pBt" identifier -> field_identifier) -> field_identifier)) - (cast_expression "(ushort)pPage->hdrOffset" ( (type_descriptor "ushort" type_identifier) ) (field_expression "pPage->hdrOffset" identifier -> field_identifier))) )) + number_literal) )) - (cast_expression "(ushort)pPage->childPtrSize" ( (type_descriptor "ushort" type_identifier) ) (field_expression "pPage->childPtrSize" identifier -> field_identifier)))) ;) (return_statement "return;" return ;) })) (expression_statement "memmove(__dest,__dest + 1,((uint)uVar6 - idx) * 2);" (call_expression "memmove(__dest,__dest + 1,((uint)uVar6 - idx) * 2)" identifier (argument_list "(__dest,__dest + 1,((uint)uVar6 - idx) * 2)" ( identifier , (binary_expression "__dest + 1" identifier + number_literal) , (binary_expression "((uint)uVar6 - idx) * 2" (parenthesized_expression "((uint)uVar6 - idx)" ( (binary_expression "(uint)uVar6 - idx" (cast_expression "(uint)uVar6" ( (type_descriptor "uint" type_identifier) ) identifier) - identifier) )) * number_literal) ))) ;) (expression_statement "puVar3[uVar4 + 3] = *(u8 *)((int)&pPage->nCell + 1);" (assignment_expression "puVar3[uVar4 + 3] = *(u8 *)((int)&pPage->nCell + 1)" (subscript_expression "puVar3[uVar4 + 3]" identifier [ (binary_expression "uVar4 + 3" identifier + number_literal) ]) = (pointer_expression "*(u8 *)((int)&pPage->nCell + 1)" * (cast_expression "(u8 *)((int)&pPage->nCell + 1)" ( (type_descriptor "u8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&pPage->nCell + 1)" ( (binary_expression "(int)&pPage->nCell + 1" (cast_expression "(int)&pPage->nCell" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&pPage->nCell" & (field_expression "pPage->nCell" identifier -> field_identifier))) + number_literal) ))))) ;) (expression_statement "puVar3[uVar4 + 4] = (u8)pPage->nCell;" (assignment_expression "puVar3[uVar4 + 4] = (u8)pPage->nCell" (subscript_expression "puVar3[uVar4 + 4]" identifier [ (binary_expression "uVar4 + 4" identifier + number_literal) ]) = (cast_expression "(u8)pPage->nCell" ( (type_descriptor "u8" type_identifier) ) (field_expression "pPage->nCell" identifier -> field_identifier))) ;) (expression_statement "pPage->nFree = pPage->nFree + 2;" (assignment_expression "pPage->nFree = pPage->nFree + 2" (field_expression "pPage->nFree" identifier -> field_identifier) = (binary_expression "pPage->nFree + 2" (field_expression "pPage->nFree" identifier -> field_identifier) + number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "*pRC = iVar5;" (assignment_expression "*pRC = iVar5" (pointer_expression "*pRC" * identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0006ff70(int param_1,int param_2,int param_3,int *param_4)\n\n{\n  ushort *__dest;\n  byte bVar1;\n  int iVar2;\n  uint uVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  __dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);\n  if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }\n  bVar1 = *(byte *)(param_1 + 9);\n  iVar2 = *(int *)(param_1 + 0x38);\n  iVar5 = FUN_0006faa0();\n  if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }\n  *param_4 = iVar5;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0006ff70(int param_1,int param_2,int param_3,int *param_4)\n\n{\n  ushort *__dest;\n  byte bVar1;\n  int iVar2;\n  uint uVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  __dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);\n  if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }\n  bVar1 = *(byte *)(param_1 + 9);\n  iVar2 = *(int *)(param_1 + 0x38);\n  iVar5 = FUN_0006faa0();\n  if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }\n  *param_4 = iVar5;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0006ff70(int param_1,int param_2,int param_3,int *param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,int *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  ushort *__dest;\n  byte bVar1;\n  int iVar2;\n  uint uVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  __dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);\n  if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }\n  bVar1 = *(byte *)(param_1 + 9);\n  iVar2 = *(int *)(param_1 + 0x38);\n  iVar5 = FUN_0006faa0();\n  if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }\n  *param_4 = iVar5;\n  return;\n}" { (declaration "ushort *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "ushort uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "__dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);" (assignment_expression "__dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2)" identifier = (cast_expression "(ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x40) + param_2 * 2)" ( (binary_expression "*(int *)(param_1 + 0x40) + param_2 * 2" (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 "param_2 * 2" identifier * number_literal)) )))) ;) (if_statement "if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }" if (parenthesized_expression "(*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3)" ( (binary_expression "*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3" (pointer_expression "*(uint *)(*(int *)(param_1 + 0x34) + 0x24)" * (cast_expression "(uint *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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) )))) + number_literal) )))) < (binary_expression "(uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3" (call_expression "(uint)(ushort)(*__dest << 8 | *__dest >> 8)" (call_expression "(uint)(ushort)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(ushort)" ( identifier ))) (argument_list "(*__dest << 8 | *__dest >> 8)" ( (binary_expression "*__dest << 8 | *__dest >> 8" (binary_expression "*__dest << 8" (pointer_expression "*__dest" * identifier) << number_literal) | (binary_expression "*__dest >> 8" (pointer_expression "*__dest" * identifier) >> number_literal)) ))) + identifier)) )) (compound_statement "{\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }" { (expression_statement "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , (pointer_expression "&WORD_00011000" & identifier) , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (expression_statement "*param_4 = 0xb;" (assignment_expression "*param_4 = 0xb" (pointer_expression "*param_4" * identifier) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "bVar1 = *(byte *)(param_1 + 9);" (assignment_expression "bVar1 = *(byte *)(param_1 + 9)" identifier = (pointer_expression "*(byte *)(param_1 + 9)" * (cast_expression "(byte *)(param_1 + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar2 = *(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 "iVar5 = FUN_0006faa0();" (assignment_expression "iVar5 = FUN_0006faa0()" identifier = (call_expression "FUN_0006faa0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }" { (expression_statement "uVar3 = (uint)bVar1;" (assignment_expression "uVar3 = (uint)bVar1" identifier = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (expression_statement "uVar4 = *(short *)(param_1 + 0x16) - 1;" (assignment_expression "uVar4 = *(short *)(param_1 + 0x16) - 1" identifier = (binary_expression "*(short *)(param_1 + 0x16) - 1" (pointer_expression "*(short *)(param_1 + 0x16)" * (cast_expression "(short *)(param_1 + 0x16)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x16)" ( (binary_expression "param_1 + 0x16" identifier + number_literal) )))) - number_literal)) ;) (expression_statement "*(ushort *)(param_1 + 0x16) = uVar4;" (assignment_expression "*(ushort *)(param_1 + 0x16) = uVar4" (pointer_expression "*(ushort *)(param_1 + 0x16)" * (cast_expression "(ushort *)(param_1 + 0x16)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x16)" ( (binary_expression "param_1 + 0x16" identifier + number_literal) )))) = identifier) ;) (if_statement "if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }" { (expression_statement "*(undefined4 *)(iVar2 + 1 + uVar3) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + 1 + uVar3) = 0" (pointer_expression "*(undefined4 *)(iVar2 + 1 + uVar3)" * (cast_expression "(undefined4 *)(iVar2 + 1 + uVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 1 + uVar3)" ( (binary_expression "iVar2 + 1 + uVar3" (binary_expression "iVar2 + 1" identifier + number_literal) + identifier) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(iVar2 + 7 + uVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + 7 + uVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + 7 + uVar3)" * (cast_expression "(undefined1 *)(iVar2 + 7 + uVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 7 + uVar3)" ( (binary_expression "iVar2 + 7 + uVar3" (binary_expression "iVar2 + 7" identifier + number_literal) + identifier) )))) = number_literal) ;) (expression_statement "*(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);" (assignment_expression "*(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8)" (pointer_expression "*(char *)(iVar2 + 5 + uVar3)" * (cast_expression "(char *)(iVar2 + 5 + uVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 5 + uVar3)" ( (binary_expression "iVar2 + 5 + uVar3" (binary_expression "iVar2 + 5" identifier + number_literal) + identifier) )))) = (cast_expression "(char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8)" ( (binary_expression "(uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8" (binary_expression "(uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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) )))) + number_literal) )))) >> number_literal) )))) ;) (expression_statement "*(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);" (assignment_expression "*(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (pointer_expression "*(char *)(iVar2 + 6 + uVar3)" * (cast_expression "(char *)(iVar2 + 6 + uVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 6 + uVar3)" ( (binary_expression "iVar2 + 6 + uVar3" (binary_expression "iVar2 + 6" identifier + number_literal) + identifier) )))) = (cast_expression "(char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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) )))) + number_literal) )))))) ;) (expression_statement "*(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);" (assignment_expression "*(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10)" (pointer_expression "*(ushort *)(param_1 + 0x14)" * (cast_expression "(ushort *)(param_1 + 0x14)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "(((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10)" (parenthesized_expression "(((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8)" ( (binary_expression "((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8" (parenthesized_expression "((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9))" ( (binary_expression "(short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)" (cast_expression "(short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" ( (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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) )))) + number_literal) ))))) - (binary_expression "(ushort)*(byte *)(param_1 + 9)" (parenthesized_expression "(ushort)" ( identifier )) * (cast_expression "(byte *)(param_1 + 9)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 9)" ( (binary_expression "param_1 + 9" identifier + number_literal) ))))) )) + number_literal) )) - (binary_expression "(ushort)*(byte *)(param_1 + 10)" (parenthesized_expression "(ushort)" ( identifier )) * (cast_expression "(byte *)(param_1 + 10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) )))))) ;) (return_statement "return;" return ;) })) (expression_statement "memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);" (call_expression "memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2)" identifier (argument_list "(__dest,__dest + 1,((uint)uVar4 - param_2) * 2)" ( identifier , (binary_expression "__dest + 1" identifier + number_literal) , (binary_expression "((uint)uVar4 - param_2) * 2" (parenthesized_expression "((uint)uVar4 - param_2)" ( (binary_expression "(uint)uVar4 - param_2" (cast_expression "(uint)uVar4" ( (type_descriptor "uint" type_identifier) ) identifier) - identifier) )) * number_literal) ))) ;) (expression_statement "*(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);" (assignment_expression "*(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17)" (pointer_expression "*(undefined1 *)(iVar2 + 3 + uVar3)" * (cast_expression "(undefined1 *)(iVar2 + 3 + uVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 3 + uVar3)" ( (binary_expression "iVar2 + 3 + uVar3" (binary_expression "iVar2 + 3" identifier + number_literal) + identifier) )))) = (pointer_expression "*(undefined1 *)(param_1 + 0x17)" * (cast_expression "(undefined1 *)(param_1 + 0x17)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x17)" ( (binary_expression "param_1 + 0x17" identifier + number_literal) ))))) ;) (expression_statement "*(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);" (assignment_expression "*(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16)" (pointer_expression "*(char *)(iVar2 + 4 + uVar3)" * (cast_expression "(char *)(iVar2 + 4 + uVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 4 + uVar3)" ( (binary_expression "iVar2 + 4 + uVar3" (binary_expression "iVar2 + 4" identifier + number_literal) + identifier) )))) = (cast_expression "(char)*(undefined2 *)(param_1 + 0x16)" ( (type_descriptor "char" primitive_type) ) (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) )))))) ;) (expression_statement "*(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;" (assignment_expression "*(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2" (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 *)(param_1 + 0x14) + 2" (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) )))) + number_literal)) ;) (return_statement "return;" return ;) })) (expression_statement "*param_4 = iVar5;" (assignment_expression "*param_4 = iVar5" (pointer_expression "*param_4" * identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) < (binary_expression (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( (binary_expression (binary_expression (pointer_expression * IDENT) << LIT) | (binary_expression (pointer_expression * IDENT) >> LIT)) ))) + IDENT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (string_literal " string_content ") , (pointer_expression & IDENT) , (string_literal " string_content ") ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return ;) })) (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 = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (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 IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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 (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (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) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (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 IDENT + LIT) )))) = (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) - (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) + LIT) )) - (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - 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) )))) = (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 (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 (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) )))) + LIT)) ;) (return_statement return ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0006ff70(int param_1,int param_2,int param_3,int *param_4)\n\n{\n  ushort *__dest;\n  byte bVar1;\n  int iVar2;\n  uint uVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  __dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);\n  if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }\n  bVar1 = *(byte *)(param_1 + 9);\n  iVar2 = *(int *)(param_1 + 0x38);\n  iVar5 = FUN_0006faa0();\n  if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }\n  *param_4 = iVar5;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0006ff70(int param_1,int param_2,int param_3,int *param_4)" (identifier "FUN_0006ff70") (parameter_list "(int param_1,int param_2,int param_3,int *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int *param_4" (primitive_type "int") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  ushort *__dest;\n  byte bVar1;\n  int iVar2;\n  uint uVar3;\n  ushort uVar4;\n  int iVar5;\n  \n  __dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);\n  if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }\n  bVar1 = *(byte *)(param_1 + 9);\n  iVar2 = *(int *)(param_1 + 0x38);\n  iVar5 = FUN_0006faa0();\n  if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }\n  *param_4 = iVar5;\n  return;\n}" ({ "{") (declaration "ushort *__dest;" (type_identifier "ushort") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "ushort uVar4;" (type_identifier "ushort") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (expression_statement "__dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);" (assignment_expression "__dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2)" (identifier "__dest") (= "=") (cast_expression "(ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x40) + param_2 * 2)" (( "(") (binary_expression "*(int *)(param_1 + 0x40) + param_2 * 2" (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 "param_2 * 2" (identifier "param_2") (* "*") (number_literal "2"))) () ")")))) (; ";")) (if_statement "if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }" (if "if") (parenthesized_expression "(*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3)" (( "(") (binary_expression "*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <\n      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3" (pointer_expression "*(uint *)(*(int *)(param_1 + 0x34) + 0x24)" (* "*") (cast_expression "(uint *)(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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")) () ")")))) (+ "+") (number_literal "0x24")) () ")")))) (< "<") (binary_expression "(uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3" (call_expression "(uint)(ushort)(*__dest << 8 | *__dest >> 8)" (call_expression "(uint)(ushort)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(ushort)" (( "(") (identifier "ushort") () ")"))) (argument_list "(*__dest << 8 | *__dest >> 8)" (( "(") (binary_expression "*__dest << 8 | *__dest >> 8" (binary_expression "*__dest << 8" (pointer_expression "*__dest" (* "*") (identifier "__dest")) (<< "<<") (number_literal "8")) (| "|") (binary_expression "*__dest >> 8" (pointer_expression "*__dest" (* "*") (identifier "__dest")) (>> ">>") (number_literal "8"))) () ")"))) (+ "+") (identifier "param_3"))) () ")")) (compound_statement "{\n    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n    *param_4 = 0xb;\n    return;\n  }" ({ "{") (expression_statement "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" (identifier "FUN_0006e260") (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,\n                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" (( "(") (number_literal "0xb") (, ",") (string_literal ""%s at line %d of [%.10s]"" (" """) (string_content "%s at line %d of [%.10s]") (" """)) (, ",") (string_literal ""database corruption"" (" """) (string_content "database corruption") (" """)) (, ",") (pointer_expression "&WORD_00011000" (& "&") (identifier "WORD_00011000")) (, ",") (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" (" """) (string_content "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1") (" """)) () ")"))) (; ";")) (expression_statement "*param_4 = 0xb;" (assignment_expression "*param_4 = 0xb" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0xb")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "bVar1 = *(byte *)(param_1 + 9);" (assignment_expression "bVar1 = *(byte *)(param_1 + 9)" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)(param_1 + 9)" (* "*") (cast_expression "(byte *)(param_1 + 9)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 9)" (( "(") (binary_expression "param_1 + 9" (identifier "param_1") (+ "+") (number_literal "9")) () ")"))))) (; ";")) (expression_statement "iVar2 = *(int *)(param_1 + 0x38);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x38)" (identifier "iVar2") (= "=") (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 "iVar5 = FUN_0006faa0();" (assignment_expression "iVar5 = FUN_0006faa0()" (identifier "iVar5") (= "=") (call_expression "FUN_0006faa0()" (identifier "FUN_0006faa0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar5 == 0) {\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = (uint)bVar1;\n    uVar4 = *(short *)(param_1 + 0x16) - 1;\n    *(ushort *)(param_1 + 0x16) = uVar4;\n    if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }\n    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);\n    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);\n    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);\n    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;\n    return;\n  }" ({ "{") (expression_statement "uVar3 = (uint)bVar1;" (assignment_expression "uVar3 = (uint)bVar1" (identifier "uVar3") (= "=") (cast_expression "(uint)bVar1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar1"))) (; ";")) (expression_statement "uVar4 = *(short *)(param_1 + 0x16) - 1;" (assignment_expression "uVar4 = *(short *)(param_1 + 0x16) - 1" (identifier "uVar4") (= "=") (binary_expression "*(short *)(param_1 + 0x16) - 1" (pointer_expression "*(short *)(param_1 + 0x16)" (* "*") (cast_expression "(short *)(param_1 + 0x16)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x16)" (( "(") (binary_expression "param_1 + 0x16" (identifier "param_1") (+ "+") (number_literal "0x16")) () ")")))) (- "-") (number_literal "1"))) (; ";")) (expression_statement "*(ushort *)(param_1 + 0x16) = uVar4;" (assignment_expression "*(ushort *)(param_1 + 0x16) = uVar4" (pointer_expression "*(ushort *)(param_1 + 0x16)" (* "*") (cast_expression "(ushort *)(param_1 + 0x16)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x16)" (( "(") (binary_expression "param_1 + 0x16" (identifier "param_1") (+ "+") (number_literal "0x16")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (if_statement "if (uVar4 == 0) {\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }" (if "if") (parenthesized_expression "(uVar4 == 0)" (( "(") (binary_expression "uVar4 == 0" (identifier "uVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;\n      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;\n      *(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);\n      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);\n      *(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);\n      return;\n    }" ({ "{") (expression_statement "*(undefined4 *)(iVar2 + 1 + uVar3) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + 1 + uVar3) = 0" (pointer_expression "*(undefined4 *)(iVar2 + 1 + uVar3)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 1 + uVar3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 1 + uVar3)" (( "(") (binary_expression "iVar2 + 1 + uVar3" (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1")) (+ "+") (identifier "uVar3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined1 *)(iVar2 + 7 + uVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar2 + 7 + uVar3) = 0" (pointer_expression "*(undefined1 *)(iVar2 + 7 + uVar3)" (* "*") (cast_expression "(undefined1 *)(iVar2 + 7 + uVar3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 7 + uVar3)" (( "(") (binary_expression "iVar2 + 7 + uVar3" (binary_expression "iVar2 + 7" (identifier "iVar2") (+ "+") (number_literal "7")) (+ "+") (identifier "uVar3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);" (assignment_expression "*(char *)(iVar2 + 5 + uVar3) =\n           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8)" (pointer_expression "*(char *)(iVar2 + 5 + uVar3)" (* "*") (cast_expression "(char *)(iVar2 + 5 + uVar3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 5 + uVar3)" (( "(") (binary_expression "iVar2 + 5 + uVar3" (binary_expression "iVar2 + 5" (identifier "iVar2") (+ "+") (number_literal "5")) (+ "+") (identifier "uVar3")) () ")")))) (= "=") (cast_expression "(char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8)" (( "(") (binary_expression "(uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8" (binary_expression "(uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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")) () ")")))) (+ "+") (number_literal "0x24")) () ")")))) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "*(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);" (assignment_expression "*(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (pointer_expression "*(char *)(iVar2 + 6 + uVar3)" (* "*") (cast_expression "(char *)(iVar2 + 6 + uVar3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 6 + uVar3)" (( "(") (binary_expression "iVar2 + 6 + uVar3" (binary_expression "iVar2 + 6" (identifier "iVar2") (+ "+") (number_literal "6")) (+ "+") (identifier "uVar3")) () ")")))) (= "=") (cast_expression "(char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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")) () ")")))) (+ "+") (number_literal "0x24")) () ")")))))) (; ";")) (expression_statement "*(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);" (assignment_expression "*(ushort *)(param_1 + 0x14) =\n           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10)" (pointer_expression "*(ushort *)(param_1 + 0x14)" (* "*") (cast_expression "(ushort *)(param_1 + 0x14)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (binary_expression "(((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10)" (parenthesized_expression "(((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8)" (( "(") (binary_expression "((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)) + -8" (parenthesized_expression "((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9))" (( "(") (binary_expression "(short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -\n            (ushort)*(byte *)(param_1 + 9)" (cast_expression "(short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x34) + 0x24)" (( "(") (binary_expression "*(int *)(param_1 + 0x34) + 0x24" (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")) () ")")))) (+ "+") (number_literal "0x24")) () ")"))))) (- "-") (binary_expression "(ushort)*(byte *)(param_1 + 9)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (* "*") (cast_expression "(byte *)(param_1 + 9)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 9)" (( "(") (binary_expression "param_1 + 9" (identifier "param_1") (+ "+") (number_literal "9")) () ")"))))) () ")")) (+ "+") (number_literal "-8")) () ")")) (- "-") (binary_expression "(ushort)*(byte *)(param_1 + 10)" (parenthesized_expression "(ushort)" (( "(") (identifier "ushort") () ")")) (* "*") (cast_expression "(byte *)(param_1 + 10)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 10)" (( "(") (binary_expression "param_1 + 10" (identifier "param_1") (+ "+") (number_literal "10")) () ")")))))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);" (call_expression "memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2)" (identifier "memmove") (argument_list "(__dest,__dest + 1,((uint)uVar4 - param_2) * 2)" (( "(") (identifier "__dest") (, ",") (binary_expression "__dest + 1" (identifier "__dest") (+ "+") (number_literal "1")) (, ",") (binary_expression "((uint)uVar4 - param_2) * 2" (parenthesized_expression "((uint)uVar4 - param_2)" (( "(") (binary_expression "(uint)uVar4 - param_2" (cast_expression "(uint)uVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar4")) (- "-") (identifier "param_2")) () ")")) (* "*") (number_literal "2")) () ")"))) (; ";")) (expression_statement "*(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);" (assignment_expression "*(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17)" (pointer_expression "*(undefined1 *)(iVar2 + 3 + uVar3)" (* "*") (cast_expression "(undefined1 *)(iVar2 + 3 + uVar3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 3 + uVar3)" (( "(") (binary_expression "iVar2 + 3 + uVar3" (binary_expression "iVar2 + 3" (identifier "iVar2") (+ "+") (number_literal "3")) (+ "+") (identifier "uVar3")) () ")")))) (= "=") (pointer_expression "*(undefined1 *)(param_1 + 0x17)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x17)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x17)" (( "(") (binary_expression "param_1 + 0x17" (identifier "param_1") (+ "+") (number_literal "0x17")) () ")"))))) (; ";")) (expression_statement "*(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);" (assignment_expression "*(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16)" (pointer_expression "*(char *)(iVar2 + 4 + uVar3)" (* "*") (cast_expression "(char *)(iVar2 + 4 + uVar3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 4 + uVar3)" (( "(") (binary_expression "iVar2 + 4 + uVar3" (binary_expression "iVar2 + 4" (identifier "iVar2") (+ "+") (number_literal "4")) (+ "+") (identifier "uVar3")) () ")")))) (= "=") (cast_expression "(char)*(undefined2 *)(param_1 + 0x16)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (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")) () ")")))))) (; ";")) (expression_statement "*(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;" (assignment_expression "*(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2" (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 *)(param_1 + 0x14) + 2" (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")) () ")")))) (+ "+") (number_literal "2"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "*param_4 = iVar5;" (assignment_expression "*param_4 = iVar5" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "iVar5")) (; ";")) (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_1,int var_2,int *pRC)

{
  type_2 *var_10;
  type_3 *puVar1;
  type_4 bVar2;
  type_3 *var_7;
  type_5 var_8;
  int var_5;
  type_2 var_6;
  
  var_10 = (type_2 *)(pPage->aCellIdx + var_1 * 2);
  var_6 = *var_10 << 8 | *var_10 >> 8;
  if (pPage->pBt->usableSize < (type_5)var_6 + var_2) {
    var_3(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,
                "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    *pRC = 0xb;
    return;
  }
  bVar2 = pPage->hdrOffset;
  var_7 = pPage->aData;
  var_5 = var_4(pPage,var_6,(type_6)var_2);
  if (var_5 == 0) {
    var_8 = (type_5)bVar2;
    var_6 = pPage->nCell - 1;
    pPage->nCell = var_6;
    if (var_6 == 0) {
      puVar1 = var_7 + var_8 + 1;
      puVar1[0] = '\0';
      puVar1[1] = '\0';
      puVar1[2] = '\0';
      puVar1[3] = '\0';
      var_7[var_8 + 7] = '\0';
      var_7[var_8 + 5] = (type_3)(pPage->pBt->usableSize >> 8);
      var_7[var_8 + 6] = (type_3)pPage->pBt->usableSize;
      pPage->nFree = (((short)pPage->pBt->usableSize - (type_2)pPage->hdrOffset) + -8) -
                     (type_2)pPage->childPtrSize;
      return;
    }
    var_9(var_10,var_10 + 1,((type_5)var_6 - var_1) * 2);
    var_7[var_8 + 3] = *(type_3 *)((int)&pPage->nCell + 1);
    var_7[var_8 + 4] = (type_3)pPage->nCell;
    pPage->nFree = pPage->nFree + 2;
    return;
  }
  *pRC = var_5;
  return;
}


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

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

void __regparm3 MASKED(int param_1,int param_2,int param_3,int *param_4)

{
  ushort *__dest;
  byte bVar1;
  int iVar2;
  uint uVar3;
  ushort uVar4;
  int iVar5;
  
  __dest = (ushort *)(*(int *)(param_1 + 0x40) + param_2 * 2);
  if (*(uint *)(*(int *)(param_1 + 0x34) + 0x24) <
      (uint)(ushort)(*__dest << 8 | *__dest >> 8) + param_3) {
    FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",&WORD_00011000,
                 "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
    *param_4 = 0xb;
    return;
  }
  bVar1 = *(byte *)(param_1 + 9);
  iVar2 = *(int *)(param_1 + 0x38);
  iVar5 = FUN_0006faa0();
  if (iVar5 == 0) {
    uVar3 = (uint)bVar1;
    uVar4 = *(short *)(param_1 + 0x16) - 1;
    *(ushort *)(param_1 + 0x16) = uVar4;
    if (uVar4 == 0) {
      *(undefined4 *)(iVar2 + 1 + uVar3) = 0;
      *(undefined1 *)(iVar2 + 7 + uVar3) = 0;
      *(char *)(iVar2 + 5 + uVar3) =
           (char)((uint)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) >> 8);
      *(char *)(iVar2 + 6 + uVar3) = (char)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24);
      *(ushort *)(param_1 + 0x14) =
           (((short)*(undefined4 *)(*(int *)(param_1 + 0x34) + 0x24) -
            (ushort)*(byte *)(param_1 + 9)) + -8) - (ushort)*(byte *)(param_1 + 10);
      return;
    }
    memmove(__dest,__dest + 1,((uint)uVar4 - param_2) * 2);
    *(undefined1 *)(iVar2 + 3 + uVar3) = *(undefined1 *)(param_1 + 0x17);
    *(char *)(iVar2 + 4 + uVar3) = (char)*(undefined2 *)(param_1 + 0x16);
    *(short *)(param_1 + 0x14) = *(short *)(param_1 + 0x14) + 2;
    return;
  }
  *param_4 = iVar5;
  return;
}

