
/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */

void __regparm3 checkPtrmap(IntegrityCk *pCheck,Pgno iChild,u8 eType,Pgno iParent)

{
  int iVar1;
  int in_GS_OFFSET;
  Pgno in_stack_ffffffc8;
  u8 *in_stack_ffffffcc;
  Pgno *in_stack_ffffffd0;
  u8 ePtrmapType;
  Pgno iPtrmapParent;
  sqlite3 *local_20;
  
  local_20 = *(sqlite3 **)(in_GS_OFFSET + 0x14);
  iVar1 = ptrmapGet((BtShared *)&iPtrmapParent,in_stack_ffffffc8,in_stack_ffffffcc,in_stack_ffffffd0
                   );
  if (iVar1 == 0) {
    if ((ePtrmapType != eType) || (iParent != iPtrmapParent)) {
      checkAppendMsg(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,
                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent);
    }
  }
  else {
    if ((iVar1 == 7) || (iVar1 == 0xc0a)) {
      pCheck->mallocFailed = 1;
    }
    checkAppendMsg(pCheck,"Failed to read ptrmap key=%d",iChild);
  }
  if (local_20 == *(sqlite3 **)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



void FUN_000961d0(int param_1)

{
  int iVar1;
  int iVar2;
  uint extraout_ECX;
  undefined4 uVar3;
  int unaff_EBP;
  int in_GS_OFFSET;
  undefined8 uVar4;
  char local_25;
  int local_24;
  int local_20;
  
  uVar4 = FUN_0003a405();
  uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);
  iVar1 = (int)uVar4;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = FUN_00077c70(&local_24);
  if (iVar2 == 0) {
    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {
      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);
    }
  }
  else {
    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {
      *(undefined4 *)(iVar1 + 0x18) = 1;
    }
    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00153870();
}


PUSH EBP
CALL 0x0003a405
ADD EBP,0x124c52
PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EAX
PUSH EBX
MOV EBX,ECX
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
LEA ECX,[ESP + 0x7]
SUB ESP,0xc
LEA EAX,[ESP + 0x14]
PUSH EAX
MOV EAX,dword ptr [ESI]
CALL 0x00077c70
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00096258
MOVZX EAX,byte ptr [ESP + 0x7]
MOV EDX,dword ptr [ESP + 0x8]
CMP AL,BL
JNZ 0x00096221
CMP dword ptr [ESP + 0x30],EDX
JZ 0x0009623f
SUB ESP,0x4
MOVZX EBX,BL
PUSH EDX
PUSH EAX
LEA EAX,[EBP + 0xfffaf4dc]
PUSH dword ptr [ESP + 0x3c]
PUSH EBX
PUSH EDI
PUSH EAX
PUSH ESI
CALL 0x00096140
ADD ESP,0x20
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00096289
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP EAX,0x7
JZ 0x00096280
CMP EAX,0xc0a
JZ 0x00096280
SUB ESP,0x4
LEA EAX,[EBP + 0xfffa1f14]
PUSH EDI
PUSH EAX
PUSH ESI
CALL 0x00096140
ADD ESP,0x10
JMP 0x0009623f
MOV dword ptr [ESI + 0x18],0x1
JMP 0x00096264
CALL 0x00153870
(translation_unit "void FUN_000961d0(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  uint extraout_ECX;\n  undefined4 uVar3;\n  int unaff_EBP;\n  int in_GS_OFFSET;\n  undefined8 uVar4;\n  char local_25;\n  int local_24;\n  int local_20;\n  \n  uVar4 = FUN_0003a405();\n  uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);\n  iVar1 = (int)uVar4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_00077c70(&local_24);\n  if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00153870();\n}\n\n" (function_definition "void FUN_000961d0(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  uint extraout_ECX;\n  undefined4 uVar3;\n  int unaff_EBP;\n  int in_GS_OFFSET;\n  undefined8 uVar4;\n  char local_25;\n  int local_24;\n  int local_20;\n  \n  uVar4 = FUN_0003a405();\n  uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);\n  iVar1 = (int)uVar4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_00077c70(&local_24);\n  if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00153870();\n}" primitive_type (function_declarator "FUN_000961d0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint extraout_ECX;\n  undefined4 uVar3;\n  int unaff_EBP;\n  int in_GS_OFFSET;\n  undefined8 uVar4;\n  char local_25;\n  int local_24;\n  int local_20;\n  \n  uVar4 = FUN_0003a405();\n  uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);\n  iVar1 = (int)uVar4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_00077c70(&local_24);\n  if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00153870();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint extraout_ECX;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "char local_25;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "uVar4 = FUN_0003a405();" (assignment_expression "uVar4 = FUN_0003a405()" identifier = (call_expression "FUN_0003a405()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);" (assignment_expression "uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20)" identifier = (call_expression "(undefined4)((ulonglong)uVar4 >> 0x20)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "((ulonglong)uVar4 >> 0x20)" ( (binary_expression "(ulonglong)uVar4 >> 0x20" (cast_expression "(ulonglong)uVar4" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "iVar1 = (int)uVar4;" (assignment_expression "iVar1 = (int)uVar4" identifier = (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = FUN_00077c70(&local_24);" (assignment_expression "iVar2 = FUN_00077c70(&local_24)" identifier = (call_expression "FUN_00077c70(&local_24)" identifier (argument_list "(&local_24)" ( (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }" { (if_statement "if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }" if (parenthesized_expression "((local_25 != (char)extraout_ECX) || (param_1 != local_24))" ( (binary_expression "(local_25 != (char)extraout_ECX) || (param_1 != local_24)" (parenthesized_expression "(local_25 != (char)extraout_ECX)" ( (binary_expression "local_25 != (char)extraout_ECX" identifier != (cast_expression "(char)extraout_ECX" ( (type_descriptor "char" primitive_type) ) identifier)) )) || (parenthesized_expression "(param_1 != local_24)" ( (binary_expression "param_1 != local_24" identifier != identifier) ))) )) (compound_statement "{\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }" { (expression_statement "FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);" (call_expression "FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24)" identifier (argument_list "(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24)" ( identifier , (binary_expression "unaff_EBP + 0xd412e" identifier + number_literal) , identifier , (binary_expression "extraout_ECX & 0xff" identifier & number_literal) , identifier , identifier , identifier ))) ;) })) }) (else_clause "else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }" else (compound_statement "{\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }" { (if_statement "if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }" if (parenthesized_expression "((iVar2 == 7) || (iVar2 == 0xc0a))" ( (binary_expression "(iVar2 == 7) || (iVar2 == 0xc0a)" (parenthesized_expression "(iVar2 == 7)" ( (binary_expression "iVar2 == 7" identifier == number_literal) )) || (parenthesized_expression "(iVar2 == 0xc0a)" ( (binary_expression "iVar2 == 0xc0a" identifier == number_literal) ))) )) (compound_statement "{\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }" { (expression_statement "*(undefined4 *)(iVar1 + 0x18) = 1;" (assignment_expression "*(undefined4 *)(iVar1 + 0x18) = 1" (pointer_expression "*(undefined4 *)(iVar1 + 0x18)" * (cast_expression "(undefined4 *)(iVar1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) = number_literal) ;) })) (expression_statement "FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);" (call_expression "FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3)" identifier (argument_list "(iVar1,unaff_EBP + 0xc6b66,uVar3)" ( identifier , (binary_expression "unaff_EBP + 0xc6b66" identifier + number_literal) , identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_00153870();" (call_expression "FUN_00153870()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */\n\nvoid __regparm3 checkPtrmap(IntegrityCk *pCheck,Pgno iChild,u8 eType,Pgno iParent)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  Pgno in_stack_ffffffc8;\n  u8 *in_stack_ffffffcc;\n  Pgno *in_stack_ffffffd0;\n  u8 ePtrmapType;\n  Pgno iPtrmapParent;\n  sqlite3 *local_20;\n  \n  local_20 = *(sqlite3 **)(in_GS_OFFSET + 0x14);\n  iVar1 = ptrmapGet((BtShared *)&iPtrmapParent,in_stack_ffffffc8,in_stack_ffffffcc,in_stack_ffffffd0\n                   );\n  if (iVar1 == 0) {\n    if ((ePtrmapType != eType) || (iParent != iPtrmapParent)) {\n      checkAppendMsg(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,\n                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent);\n    }\n  }\n  else {\n    if ((iVar1 == 7) || (iVar1 == 0xc0a)) {\n      pCheck->mallocFailed = 1;\n    }\n    checkAppendMsg(pCheck,"Failed to read ptrmap key=%d",iChild);\n  }\n  if (local_20 == *(sqlite3 **)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "void __regparm3 checkPtrmap(IntegrityCk *pCheck,Pgno iChild,u8 eType,Pgno iParent)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  Pgno in_stack_ffffffc8;\n  u8 *in_stack_ffffffcc;\n  Pgno *in_stack_ffffffd0;\n  u8 ePtrmapType;\n  Pgno iPtrmapParent;\n  sqlite3 *local_20;\n  \n  local_20 = *(sqlite3 **)(in_GS_OFFSET + 0x14);\n  iVar1 = ptrmapGet((BtShared *)&iPtrmapParent,in_stack_ffffffc8,in_stack_ffffffcc,in_stack_ffffffd0\n                   );\n  if (iVar1 == 0) {\n    if ((ePtrmapType != eType) || (iParent != iPtrmapParent)) {\n      checkAppendMsg(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,\n                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent);\n    }\n  }\n  else {\n    if ((iVar1 == 7) || (iVar1 == 0xc0a)) {\n      pCheck->mallocFailed = 1;\n    }\n    checkAppendMsg(pCheck,"Failed to read ptrmap key=%d",iChild);\n  }\n  if (local_20 == *(sqlite3 **)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "checkPtrmap(IntegrityCk *pCheck,Pgno iChild,u8 eType,Pgno iParent)" identifier (parameter_list "(IntegrityCk *pCheck,Pgno iChild,u8 eType,Pgno iParent)" ( (parameter_declaration "IntegrityCk *pCheck" type_identifier (pointer_declarator "*pCheck" * identifier)) , (parameter_declaration "Pgno iChild" type_identifier identifier) , (parameter_declaration "u8 eType" type_identifier identifier) , (parameter_declaration "Pgno iParent" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  Pgno in_stack_ffffffc8;\n  u8 *in_stack_ffffffcc;\n  Pgno *in_stack_ffffffd0;\n  u8 ePtrmapType;\n  Pgno iPtrmapParent;\n  sqlite3 *local_20;\n  \n  local_20 = *(sqlite3 **)(in_GS_OFFSET + 0x14);\n  iVar1 = ptrmapGet((BtShared *)&iPtrmapParent,in_stack_ffffffc8,in_stack_ffffffcc,in_stack_ffffffd0\n                   );\n  if (iVar1 == 0) {\n    if ((ePtrmapType != eType) || (iParent != iPtrmapParent)) {\n      checkAppendMsg(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,\n                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent);\n    }\n  }\n  else {\n    if ((iVar1 == 7) || (iVar1 == 0xc0a)) {\n      pCheck->mallocFailed = 1;\n    }\n    checkAppendMsg(pCheck,"Failed to read ptrmap key=%d",iChild);\n  }\n  if (local_20 == *(sqlite3 **)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "Pgno in_stack_ffffffc8;" type_identifier identifier ;) (declaration "u8 *in_stack_ffffffcc;" type_identifier (pointer_declarator "*in_stack_ffffffcc" * identifier) ;) (declaration "Pgno *in_stack_ffffffd0;" type_identifier (pointer_declarator "*in_stack_ffffffd0" * identifier) ;) (declaration "u8 ePtrmapType;" type_identifier identifier ;) (declaration "Pgno iPtrmapParent;" type_identifier identifier ;) (declaration "sqlite3 *local_20;" type_identifier (pointer_declarator "*local_20" * identifier) ;) (expression_statement "local_20 = *(sqlite3 **)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(sqlite3 **)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(sqlite3 **)(in_GS_OFFSET + 0x14)" * (cast_expression "(sqlite3 **)(in_GS_OFFSET + 0x14)" ( (type_descriptor "sqlite3 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = ptrmapGet((BtShared *)&iPtrmapParent,in_stack_ffffffc8,in_stack_ffffffcc,in_stack_ffffffd0\n                   );" (assignment_expression "iVar1 = ptrmapGet((BtShared *)&iPtrmapParent,in_stack_ffffffc8,in_stack_ffffffcc,in_stack_ffffffd0\n                   )" identifier = (call_expression "ptrmapGet((BtShared *)&iPtrmapParent,in_stack_ffffffc8,in_stack_ffffffcc,in_stack_ffffffd0\n                   )" identifier (argument_list "((BtShared *)&iPtrmapParent,in_stack_ffffffc8,in_stack_ffffffcc,in_stack_ffffffd0\n                   )" ( (cast_expression "(BtShared *)&iPtrmapParent" ( (type_descriptor "BtShared *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&iPtrmapParent" & identifier)) , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    if ((ePtrmapType != eType) || (iParent != iPtrmapParent)) {\n      checkAppendMsg(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,\n                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent);\n    }\n  }\n  else {\n    if ((iVar1 == 7) || (iVar1 == 0xc0a)) {\n      pCheck->mallocFailed = 1;\n    }\n    checkAppendMsg(pCheck,"Failed to read ptrmap key=%d",iChild);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((ePtrmapType != eType) || (iParent != iPtrmapParent)) {\n      checkAppendMsg(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,\n                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent);\n    }\n  }" { (if_statement "if ((ePtrmapType != eType) || (iParent != iPtrmapParent)) {\n      checkAppendMsg(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,\n                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent);\n    }" if (parenthesized_expression "((ePtrmapType != eType) || (iParent != iPtrmapParent))" ( (binary_expression "(ePtrmapType != eType) || (iParent != iPtrmapParent)" (parenthesized_expression "(ePtrmapType != eType)" ( (binary_expression "ePtrmapType != eType" identifier != identifier) )) || (parenthesized_expression "(iParent != iPtrmapParent)" ( (binary_expression "iParent != iPtrmapParent" identifier != identifier) ))) )) (compound_statement "{\n      checkAppendMsg(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,\n                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent);\n    }" { (expression_statement "checkAppendMsg(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,\n                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent);" (call_expression "checkAppendMsg(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,\n                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent)" identifier (argument_list "(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,\n                     (uint)eType,iParent,(uint)ePtrmapType,iPtrmapParent)" ( identifier , (string_literal ""Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)"" " string_content ") , identifier , (cast_expression "(uint)eType" ( (type_descriptor "uint" type_identifier) ) identifier) , identifier , (cast_expression "(uint)ePtrmapType" ( (type_descriptor "uint" type_identifier) ) identifier) , identifier ))) ;) })) }) (else_clause "else {\n    if ((iVar1 == 7) || (iVar1 == 0xc0a)) {\n      pCheck->mallocFailed = 1;\n    }\n    checkAppendMsg(pCheck,"Failed to read ptrmap key=%d",iChild);\n  }" else (compound_statement "{\n    if ((iVar1 == 7) || (iVar1 == 0xc0a)) {\n      pCheck->mallocFailed = 1;\n    }\n    checkAppendMsg(pCheck,"Failed to read ptrmap key=%d",iChild);\n  }" { (if_statement "if ((iVar1 == 7) || (iVar1 == 0xc0a)) {\n      pCheck->mallocFailed = 1;\n    }" if (parenthesized_expression "((iVar1 == 7) || (iVar1 == 0xc0a))" ( (binary_expression "(iVar1 == 7) || (iVar1 == 0xc0a)" (parenthesized_expression "(iVar1 == 7)" ( (binary_expression "iVar1 == 7" identifier == number_literal) )) || (parenthesized_expression "(iVar1 == 0xc0a)" ( (binary_expression "iVar1 == 0xc0a" identifier == number_literal) ))) )) (compound_statement "{\n      pCheck->mallocFailed = 1;\n    }" { (expression_statement "pCheck->mallocFailed = 1;" (assignment_expression "pCheck->mallocFailed = 1" (field_expression "pCheck->mallocFailed" identifier -> field_identifier) = number_literal) ;) })) (expression_statement "checkAppendMsg(pCheck,"Failed to read ptrmap key=%d",iChild);" (call_expression "checkAppendMsg(pCheck,"Failed to read ptrmap key=%d",iChild)" identifier (argument_list "(pCheck,"Failed to read ptrmap key=%d",iChild)" ( identifier , (string_literal ""Failed to read ptrmap key=%d"" " string_content ") , identifier ))) ;) }))) (if_statement "if (local_20 == *(sqlite3 **)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(sqlite3 **)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(sqlite3 **)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(sqlite3 **)(in_GS_OFFSET + 0x14)" * (cast_expression "(sqlite3 **)(in_GS_OFFSET + 0x14)" ( (type_descriptor "sqlite3 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_000961d0(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  uint extraout_ECX;\n  undefined4 uVar3;\n  int unaff_EBP;\n  int in_GS_OFFSET;\n  undefined8 uVar4;\n  char local_25;\n  int local_24;\n  int local_20;\n  \n  uVar4 = FUN_0003a405();\n  uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);\n  iVar1 = (int)uVar4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_00077c70(&local_24);\n  if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00153870();\n}\n\n" (function_definition "void FUN_000961d0(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  uint extraout_ECX;\n  undefined4 uVar3;\n  int unaff_EBP;\n  int in_GS_OFFSET;\n  undefined8 uVar4;\n  char local_25;\n  int local_24;\n  int local_20;\n  \n  uVar4 = FUN_0003a405();\n  uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);\n  iVar1 = (int)uVar4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_00077c70(&local_24);\n  if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00153870();\n}" primitive_type (function_declarator "FUN_000961d0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint extraout_ECX;\n  undefined4 uVar3;\n  int unaff_EBP;\n  int in_GS_OFFSET;\n  undefined8 uVar4;\n  char local_25;\n  int local_24;\n  int local_20;\n  \n  uVar4 = FUN_0003a405();\n  uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);\n  iVar1 = (int)uVar4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_00077c70(&local_24);\n  if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00153870();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint extraout_ECX;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "char local_25;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "uVar4 = FUN_0003a405();" (assignment_expression "uVar4 = FUN_0003a405()" identifier = (call_expression "FUN_0003a405()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);" (assignment_expression "uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20)" identifier = (call_expression "(undefined4)((ulonglong)uVar4 >> 0x20)" (parenthesized_expression "(undefined4)" ( identifier )) (argument_list "((ulonglong)uVar4 >> 0x20)" ( (binary_expression "(ulonglong)uVar4 >> 0x20" (cast_expression "(ulonglong)uVar4" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "iVar1 = (int)uVar4;" (assignment_expression "iVar1 = (int)uVar4" identifier = (cast_expression "(int)uVar4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = FUN_00077c70(&local_24);" (assignment_expression "iVar2 = FUN_00077c70(&local_24)" identifier = (call_expression "FUN_00077c70(&local_24)" identifier (argument_list "(&local_24)" ( (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }" { (if_statement "if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }" if (parenthesized_expression "((local_25 != (char)extraout_ECX) || (param_1 != local_24))" ( (binary_expression "(local_25 != (char)extraout_ECX) || (param_1 != local_24)" (parenthesized_expression "(local_25 != (char)extraout_ECX)" ( (binary_expression "local_25 != (char)extraout_ECX" identifier != (cast_expression "(char)extraout_ECX" ( (type_descriptor "char" primitive_type) ) identifier)) )) || (parenthesized_expression "(param_1 != local_24)" ( (binary_expression "param_1 != local_24" identifier != identifier) ))) )) (compound_statement "{\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }" { (expression_statement "FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);" (call_expression "FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24)" identifier (argument_list "(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24)" ( identifier , (binary_expression "unaff_EBP + 0xd412e" identifier + number_literal) , identifier , (binary_expression "extraout_ECX & 0xff" identifier & number_literal) , identifier , identifier , identifier ))) ;) })) }) (else_clause "else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }" else (compound_statement "{\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }" { (if_statement "if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }" if (parenthesized_expression "((iVar2 == 7) || (iVar2 == 0xc0a))" ( (binary_expression "(iVar2 == 7) || (iVar2 == 0xc0a)" (parenthesized_expression "(iVar2 == 7)" ( (binary_expression "iVar2 == 7" identifier == number_literal) )) || (parenthesized_expression "(iVar2 == 0xc0a)" ( (binary_expression "iVar2 == 0xc0a" identifier == number_literal) ))) )) (compound_statement "{\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }" { (expression_statement "*(undefined4 *)(iVar1 + 0x18) = 1;" (assignment_expression "*(undefined4 *)(iVar1 + 0x18) = 1" (pointer_expression "*(undefined4 *)(iVar1 + 0x18)" * (cast_expression "(undefined4 *)(iVar1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) )))) = number_literal) ;) })) (expression_statement "FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);" (call_expression "FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3)" identifier (argument_list "(iVar1,unaff_EBP + 0xc6b66,uVar3)" ( identifier , (binary_expression "unaff_EBP + 0xc6b66" identifier + number_literal) , identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_00153870();" (call_expression "FUN_00153870()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) || (parenthesized_expression ( (binary_expression IDENT != IDENT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , IDENT , (binary_expression IDENT & LIT) , IDENT , IDENT , IDENT ))) ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (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 IDENT + LIT) )))) = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_000961d0(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  uint extraout_ECX;\n  undefined4 uVar3;\n  int unaff_EBP;\n  int in_GS_OFFSET;\n  undefined8 uVar4;\n  char local_25;\n  int local_24;\n  int local_20;\n  \n  uVar4 = FUN_0003a405();\n  uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);\n  iVar1 = (int)uVar4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_00077c70(&local_24);\n  if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00153870();\n}" (primitive_type "void") (function_declarator "FUN_000961d0(int param_1)" (identifier "FUN_000961d0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint extraout_ECX;\n  undefined4 uVar3;\n  int unaff_EBP;\n  int in_GS_OFFSET;\n  undefined8 uVar4;\n  char local_25;\n  int local_24;\n  int local_20;\n  \n  uVar4 = FUN_0003a405();\n  uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);\n  iVar1 = (int)uVar4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_00077c70(&local_24);\n  if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00153870();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint extraout_ECX;" (type_identifier "uint") (identifier "extraout_ECX") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int unaff_EBP;" (primitive_type "int") (identifier "unaff_EBP") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined8 uVar4;" (type_identifier "undefined8") (identifier "uVar4") (; ";")) (declaration "char local_25;" (primitive_type "char") (identifier "local_25") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (expression_statement "uVar4 = FUN_0003a405();" (assignment_expression "uVar4 = FUN_0003a405()" (identifier "uVar4") (= "=") (call_expression "FUN_0003a405()" (identifier "FUN_0003a405") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);" (assignment_expression "uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20)" (identifier "uVar3") (= "=") (call_expression "(undefined4)((ulonglong)uVar4 >> 0x20)" (parenthesized_expression "(undefined4)" (( "(") (identifier "undefined4") () ")")) (argument_list "((ulonglong)uVar4 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar4 >> 0x20" (cast_expression "(ulonglong)uVar4" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar4")) (>> ">>") (number_literal "0x20")) () ")")))) (; ";")) (expression_statement "iVar1 = (int)uVar4;" (assignment_expression "iVar1 = (int)uVar4" (identifier "iVar1") (= "=") (cast_expression "(int)uVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar4"))) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar2 = FUN_00077c70(&local_24);" (assignment_expression "iVar2 = FUN_00077c70(&local_24)" (identifier "iVar2") (= "=") (call_expression "FUN_00077c70(&local_24)" (identifier "FUN_00077c70") (argument_list "(&local_24)" (( "(") (pointer_expression "&local_24" (& "&") (identifier "local_24")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }\n  else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }\n  }" ({ "{") (if_statement "if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }" (if "if") (parenthesized_expression "((local_25 != (char)extraout_ECX) || (param_1 != local_24))" (( "(") (binary_expression "(local_25 != (char)extraout_ECX) || (param_1 != local_24)" (parenthesized_expression "(local_25 != (char)extraout_ECX)" (( "(") (binary_expression "local_25 != (char)extraout_ECX" (identifier "local_25") (!= "!=") (cast_expression "(char)extraout_ECX" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "extraout_ECX"))) () ")")) (|| "||") (parenthesized_expression "(param_1 != local_24)" (( "(") (binary_expression "param_1 != local_24" (identifier "param_1") (!= "!=") (identifier "local_24")) () ")"))) () ")")) (compound_statement "{\n      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);\n    }" ({ "{") (expression_statement "FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);" (call_expression "FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24)" (identifier "FUN_00096140") (argument_list "(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24)" (( "(") (identifier "iVar1") (, ",") (binary_expression "unaff_EBP + 0xd412e" (identifier "unaff_EBP") (+ "+") (number_literal "0xd412e")) (, ",") (identifier "uVar3") (, ",") (binary_expression "extraout_ECX & 0xff" (identifier "extraout_ECX") (& "&") (number_literal "0xff")) (, ",") (identifier "param_1") (, ",") (identifier "local_25") (, ",") (identifier "local_24") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }" (else "else") (compound_statement "{\n    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }\n    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);\n  }" ({ "{") (if_statement "if ((iVar2 == 7) || (iVar2 == 0xc0a)) {\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }" (if "if") (parenthesized_expression "((iVar2 == 7) || (iVar2 == 0xc0a))" (( "(") (binary_expression "(iVar2 == 7) || (iVar2 == 0xc0a)" (parenthesized_expression "(iVar2 == 7)" (( "(") (binary_expression "iVar2 == 7" (identifier "iVar2") (== "==") (number_literal "7")) () ")")) (|| "||") (parenthesized_expression "(iVar2 == 0xc0a)" (( "(") (binary_expression "iVar2 == 0xc0a" (identifier "iVar2") (== "==") (number_literal "0xc0a")) () ")"))) () ")")) (compound_statement "{\n      *(undefined4 *)(iVar1 + 0x18) = 1;\n    }" ({ "{") (expression_statement "*(undefined4 *)(iVar1 + 0x18) = 1;" (assignment_expression "*(undefined4 *)(iVar1 + 0x18) = 1" (pointer_expression "*(undefined4 *)(iVar1 + 0x18)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);" (call_expression "FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3)" (identifier "FUN_00096140") (argument_list "(iVar1,unaff_EBP + 0xc6b66,uVar3)" (( "(") (identifier "iVar1") (, ",") (binary_expression "unaff_EBP + 0xc6b66" (identifier "unaff_EBP") (+ "+") (number_literal "0xc6b66")) (, ",") (identifier "uVar3") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00153870();" (call_expression "FUN_00153870()" (identifier "FUN_00153870") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */

void __regparm3 function_1(type_1 *pCheck,type_2 iChild,type_3 var_5,type_2 var_6)

{
  int var_3;
  int var_1;
  type_2 in_stack_ffffffc8;
  type_3 *in_stack_ffffffcc;
  type_2 *in_stack_ffffffd0;
  type_3 var_4;
  type_2 var_7;
  type_4 *var_9;
  
  var_9 = *(type_4 **)(var_1 + 0x14);
  var_3 = var_2((type_5 *)&var_7,in_stack_ffffffc8,in_stack_ffffffcc,in_stack_ffffffd0
                   );
  if (var_3 == 0) {
    if ((var_4 != var_5) || (var_6 != var_7)) {
      var_8(pCheck,"Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)",iChild,
                     (type_6)var_5,var_6,(type_6)var_4,var_7);
    }
  }
  else {
    if ((var_3 == 7) || (var_3 == 0xc0a)) {
      pCheck->mallocFailed = 1;
    }
    var_8(pCheck,"Failed to read ptrmap key=%d",iChild);
  }
  if (var_9 == *(type_4 **)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_10();
}


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

void MASKED(int param_1)

{
  int iVar1;
  int iVar2;
  uint extraout_ECX;
  undefined4 uVar3;
  int unaff_EBP;
  int in_GS_OFFSET;
  undefined8 uVar4;
  char local_25;
  int local_24;
  int local_20;
  
  uVar4 = FUN_0003a405();
  uVar3 = (undefined4)((ulonglong)uVar4 >> 0x20);
  iVar1 = (int)uVar4;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = FUN_00077c70(&local_24);
  if (iVar2 == 0) {
    if ((local_25 != (char)extraout_ECX) || (param_1 != local_24)) {
      FUN_00096140(iVar1,unaff_EBP + 0xd412e,uVar3,extraout_ECX & 0xff,param_1,local_25,local_24);
    }
  }
  else {
    if ((iVar2 == 7) || (iVar2 == 0xc0a)) {
      *(undefined4 *)(iVar1 + 0x18) = 1;
    }
    FUN_00096140(iVar1,unaff_EBP + 0xc6b66,uVar3);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00153870();
}

