
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int __regparm3 btreeGetUnusedPage(BtShared *pBt,Pgno pgno,MemPage **ppPage,int flags)

{
  DbPage *pPg;
  int iVar1;
  
  iVar1 = btreeGetPage(pBt,pgno,ppPage,flags);
  if (iVar1 == 0) {
    pPg = (*ppPage)->pDbPage;
    if (pPg->nRef < 2) {
      (*ppPage)->isInit = '\0';
      iVar1 = 0;
    }
    else {
      sqlite3PagerUnrefNotNull(pPg);
      *ppPage = (MemPage *)0x0;
      sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,
                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
      iVar1 = 0xb;
    }
    return iVar1;
  }
  *ppPage = (MemPage *)0x0;
  return iVar1;
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int FUN_0006f360(undefined4 param_1)

{
  int iVar1;
  undefined4 *in_ECX;
  
  iVar1 = FUN_00038b40(param_1);
  if (iVar1 == 0) {
    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {
      *(undefined1 *)*in_ECX = 0;
      iVar1 = 0;
    }
    else {
      FUN_000386c0();
      *in_ECX = 0;
      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,
                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
      iVar1 = 0xb;
    }
    return iVar1;
  }
  *in_ECX = 0;
  return iVar1;
}


PUSH ESI
CALL 0x00115708
ADD ESI,0x10cac2
PUSH EBX
MOV EBX,ECX
SUB ESP,0x10
PUSH dword ptr [ESP + 0x1c]
CALL 0x00038b40
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0006f3a0
MOV EDX,dword ptr [EBX]
MOV ECX,dword ptr [EDX + 0x48]
CMP word ptr [ECX + 0x1e],0x1
JG 0x0006f3b0
MOV byte ptr [EDX],0x0
ADD ESP,0x4
POP EBX
POP ESI
RET
MOV dword ptr [EBX],0x0
ADD ESP,0x4
POP EBX
POP ESI
RET
MOV EAX,ECX
CALL 0x000386c0
SUB ESP,0xc
LEA EAX,[ESI + 0xfffa0934]
MOV dword ptr [EBX],0x0
PUSH EAX
LEA EAX,[ESI + 0xfffa3c05]
PUSH 0xfef8
PUSH EAX
LEA EAX,[ESI + 0xfffa39ca]
PUSH EAX
PUSH 0xb
CALL 0x0006e260
ADD ESP,0x20
MOV EAX,0xb
JMP 0x0006f391
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nint FUN_0006f360(undefined4 param_1)\n\n{\n  int iVar1;\n  undefined4 *in_ECX;\n  \n  iVar1 = FUN_00038b40(param_1);\n  if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *in_ECX = 0;\n  return iVar1;\n}\n\n" comment (function_definition "int FUN_0006f360(undefined4 param_1)\n\n{\n  int iVar1;\n  undefined4 *in_ECX;\n  \n  iVar1 = FUN_00038b40(param_1);\n  if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *in_ECX = 0;\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0006f360(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *in_ECX;\n  \n  iVar1 = FUN_00038b40(param_1);\n  if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *in_ECX = 0;\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *in_ECX;" type_identifier (pointer_declarator "*in_ECX" * identifier) ;) (expression_statement "iVar1 = FUN_00038b40(param_1);" (assignment_expression "iVar1 = FUN_00038b40(param_1)" identifier = (call_expression "FUN_00038b40(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }" { (if_statement "if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" if (parenthesized_expression "(*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2)" ( (binary_expression "*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2" (pointer_expression "*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e)" * (cast_expression "(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e)" ( (binary_expression "*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e" (pointer_expression "*(int *)((undefined1 *)*in_ECX + 0x48)" * (cast_expression "(int *)((undefined1 *)*in_ECX + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((undefined1 *)*in_ECX + 0x48)" ( (binary_expression "(undefined1 *)*in_ECX + 0x48" (cast_expression "(undefined1 *)*in_ECX" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*in_ECX" * identifier)) + number_literal) )))) + number_literal) )))) < number_literal) )) (compound_statement "{\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }" { (expression_statement "*(undefined1 *)*in_ECX = 0;" (assignment_expression "*(undefined1 *)*in_ECX = 0" (pointer_expression "*(undefined1 *)*in_ECX" * (cast_expression "(undefined1 *)*in_ECX" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*in_ECX" * identifier))) = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" else (compound_statement "{\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" { (expression_statement "FUN_000386c0();" (call_expression "FUN_000386c0()" identifier (argument_list "()" ( ))) ;) (expression_statement "*in_ECX = 0;" (assignment_expression "*in_ECX = 0" (pointer_expression "*in_ECX" * identifier) = number_literal) ;) (expression_statement "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , number_literal , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (expression_statement "iVar1 = 0xb;" (assignment_expression "iVar1 = 0xb" identifier = number_literal) ;) }))) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "*in_ECX = 0;" (assignment_expression "*in_ECX = 0" (pointer_expression "*in_ECX" * identifier) = number_literal) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nint __regparm3 btreeGetUnusedPage(BtShared *pBt,Pgno pgno,MemPage **ppPage,int flags)\n\n{\n  DbPage *pPg;\n  int iVar1;\n  \n  iVar1 = btreeGetPage(pBt,pgno,ppPage,flags);\n  if (iVar1 == 0) {\n    pPg = (*ppPage)->pDbPage;\n    if (pPg->nRef < 2) {\n      (*ppPage)->isInit = '\0';\n      iVar1 = 0;\n    }\n    else {\n      sqlite3PagerUnrefNotNull(pPg);\n      *ppPage = (MemPage *)0x0;\n      sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *ppPage = (MemPage *)0x0;\n  return iVar1;\n}\n\n" comment (function_definition "int __regparm3 btreeGetUnusedPage(BtShared *pBt,Pgno pgno,MemPage **ppPage,int flags)\n\n{\n  DbPage *pPg;\n  int iVar1;\n  \n  iVar1 = btreeGetPage(pBt,pgno,ppPage,flags);\n  if (iVar1 == 0) {\n    pPg = (*ppPage)->pDbPage;\n    if (pPg->nRef < 2) {\n      (*ppPage)->isInit = '\0';\n      iVar1 = 0;\n    }\n    else {\n      sqlite3PagerUnrefNotNull(pPg);\n      *ppPage = (MemPage *)0x0;\n      sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *ppPage = (MemPage *)0x0;\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "btreeGetUnusedPage(BtShared *pBt,Pgno pgno,MemPage **ppPage,int flags)" identifier (parameter_list "(BtShared *pBt,Pgno pgno,MemPage **ppPage,int flags)" ( (parameter_declaration "BtShared *pBt" type_identifier (pointer_declarator "*pBt" * identifier)) , (parameter_declaration "Pgno pgno" type_identifier identifier) , (parameter_declaration "MemPage **ppPage" type_identifier (pointer_declarator "**ppPage" * (pointer_declarator "*ppPage" * identifier))) , (parameter_declaration "int flags" primitive_type identifier) ))) (compound_statement "{\n  DbPage *pPg;\n  int iVar1;\n  \n  iVar1 = btreeGetPage(pBt,pgno,ppPage,flags);\n  if (iVar1 == 0) {\n    pPg = (*ppPage)->pDbPage;\n    if (pPg->nRef < 2) {\n      (*ppPage)->isInit = '\0';\n      iVar1 = 0;\n    }\n    else {\n      sqlite3PagerUnrefNotNull(pPg);\n      *ppPage = (MemPage *)0x0;\n      sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *ppPage = (MemPage *)0x0;\n  return iVar1;\n}" { (declaration "DbPage *pPg;" type_identifier (pointer_declarator "*pPg" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = btreeGetPage(pBt,pgno,ppPage,flags);" (assignment_expression "iVar1 = btreeGetPage(pBt,pgno,ppPage,flags)" identifier = (call_expression "btreeGetPage(pBt,pgno,ppPage,flags)" identifier (argument_list "(pBt,pgno,ppPage,flags)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    pPg = (*ppPage)->pDbPage;\n    if (pPg->nRef < 2) {\n      (*ppPage)->isInit = '\0';\n      iVar1 = 0;\n    }\n    else {\n      sqlite3PagerUnrefNotNull(pPg);\n      *ppPage = (MemPage *)0x0;\n      sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    pPg = (*ppPage)->pDbPage;\n    if (pPg->nRef < 2) {\n      (*ppPage)->isInit = '\0';\n      iVar1 = 0;\n    }\n    else {\n      sqlite3PagerUnrefNotNull(pPg);\n      *ppPage = (MemPage *)0x0;\n      sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }" { (expression_statement "pPg = (*ppPage)->pDbPage;" (assignment_expression "pPg = (*ppPage)->pDbPage" identifier = (field_expression "(*ppPage)->pDbPage" (parenthesized_expression "(*ppPage)" ( (pointer_expression "*ppPage" * identifier) )) -> field_identifier)) ;) (if_statement "if (pPg->nRef < 2) {\n      (*ppPage)->isInit = '\0';\n      iVar1 = 0;\n    }\n    else {\n      sqlite3PagerUnrefNotNull(pPg);\n      *ppPage = (MemPage *)0x0;\n      sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" if (parenthesized_expression "(pPg->nRef < 2)" ( (binary_expression "pPg->nRef < 2" (field_expression "pPg->nRef" identifier -> field_identifier) < number_literal) )) (compound_statement "{\n      (*ppPage)->isInit = '\0';\n      iVar1 = 0;\n    }" { (expression_statement "(*ppPage)->isInit = '\0';" (assignment_expression "(*ppPage)->isInit = '\0'" (field_expression "(*ppPage)->isInit" (parenthesized_expression "(*ppPage)" ( (pointer_expression "*ppPage" * identifier) )) -> field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      sqlite3PagerUnrefNotNull(pPg);\n      *ppPage = (MemPage *)0x0;\n      sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" else (compound_statement "{\n      sqlite3PagerUnrefNotNull(pPg);\n      *ppPage = (MemPage *)0x0;\n      sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" { (expression_statement "sqlite3PagerUnrefNotNull(pPg);" (call_expression "sqlite3PagerUnrefNotNull(pPg)" identifier (argument_list "(pPg)" ( identifier ))) ;) (expression_statement "*ppPage = (MemPage *)0x0;" (assignment_expression "*ppPage = (MemPage *)0x0" (pointer_expression "*ppPage" * identifier) = (cast_expression "(MemPage *)0x0" ( (type_descriptor "MemPage *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "sqlite3_log(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , number_literal , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (expression_statement "iVar1 = 0xb;" (assignment_expression "iVar1 = 0xb" identifier = number_literal) ;) }))) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "*ppPage = (MemPage *)0x0;" (assignment_expression "*ppPage = (MemPage *)0x0" (pointer_expression "*ppPage" * identifier) = (cast_expression "(MemPage *)0x0" ( (type_descriptor "MemPage *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int FUN_0006f360(undefined4 param_1)\n\n{\n  int iVar1;\n  undefined4 *in_ECX;\n  \n  iVar1 = FUN_00038b40(param_1);\n  if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *in_ECX = 0;\n  return iVar1;\n}\n\n" (function_definition "int FUN_0006f360(undefined4 param_1)\n\n{\n  int iVar1;\n  undefined4 *in_ECX;\n  \n  iVar1 = FUN_00038b40(param_1);\n  if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *in_ECX = 0;\n  return iVar1;\n}" primitive_type (function_declarator "FUN_0006f360(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *in_ECX;\n  \n  iVar1 = FUN_00038b40(param_1);\n  if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *in_ECX = 0;\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *in_ECX;" type_identifier (pointer_declarator "*in_ECX" * identifier) ;) (expression_statement "iVar1 = FUN_00038b40(param_1);" (assignment_expression "iVar1 = FUN_00038b40(param_1)" identifier = (call_expression "FUN_00038b40(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }" { (if_statement "if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" if (parenthesized_expression "(*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2)" ( (binary_expression "*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2" (pointer_expression "*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e)" * (cast_expression "(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e)" ( (binary_expression "*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e" (pointer_expression "*(int *)((undefined1 *)*in_ECX + 0x48)" * (cast_expression "(int *)((undefined1 *)*in_ECX + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((undefined1 *)*in_ECX + 0x48)" ( (binary_expression "(undefined1 *)*in_ECX + 0x48" (cast_expression "(undefined1 *)*in_ECX" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*in_ECX" * identifier)) + number_literal) )))) + number_literal) )))) < number_literal) )) (compound_statement "{\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }" { (expression_statement "*(undefined1 *)*in_ECX = 0;" (assignment_expression "*(undefined1 *)*in_ECX = 0" (pointer_expression "*(undefined1 *)*in_ECX" * (cast_expression "(undefined1 *)*in_ECX" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*in_ECX" * identifier))) = number_literal) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" else (compound_statement "{\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" { (expression_statement "FUN_000386c0();" (call_expression "FUN_000386c0()" identifier (argument_list "()" ( ))) ;) (expression_statement "*in_ECX = 0;" (assignment_expression "*in_ECX = 0" (pointer_expression "*in_ECX" * identifier) = number_literal) ;) (expression_statement "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" identifier (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" ( number_literal , (string_literal ""%s at line %d of [%.10s]"" " string_content ") , (string_literal ""database corruption"" " string_content ") , number_literal , (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" " string_content ") ))) ;) (expression_statement "iVar1 = 0xb;" (assignment_expression "iVar1 = 0xb" identifier = number_literal) ;) }))) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "*in_ECX = 0;" (assignment_expression "*in_ECX = 0" (pointer_expression "*in_ECX" * identifier) = number_literal) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) + LIT) )))) + LIT) )))) < LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_0006f360(undefined4 param_1)\n\n{\n  int iVar1;\n  undefined4 *in_ECX;\n  \n  iVar1 = FUN_00038b40(param_1);\n  if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *in_ECX = 0;\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_0006f360(undefined4 param_1)" (identifier "FUN_0006f360") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 *in_ECX;\n  \n  iVar1 = FUN_00038b40(param_1);\n  if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }\n  *in_ECX = 0;\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 *in_ECX;" (type_identifier "undefined4") (pointer_declarator "*in_ECX" (* "*") (identifier "in_ECX")) (; ";")) (expression_statement "iVar1 = FUN_00038b40(param_1);" (assignment_expression "iVar1 = FUN_00038b40(param_1)" (identifier "iVar1") (= "=") (call_expression "FUN_00038b40(param_1)" (identifier "FUN_00038b40") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }\n    return iVar1;\n  }" ({ "{") (if_statement "if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }\n    else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" (if "if") (parenthesized_expression "(*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2)" (( "(") (binary_expression "*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2" (pointer_expression "*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e)" (* "*") (cast_expression "(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e)" (( "(") (binary_expression "*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e" (pointer_expression "*(int *)((undefined1 *)*in_ECX + 0x48)" (* "*") (cast_expression "(int *)((undefined1 *)*in_ECX + 0x48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((undefined1 *)*in_ECX + 0x48)" (( "(") (binary_expression "(undefined1 *)*in_ECX + 0x48" (cast_expression "(undefined1 *)*in_ECX" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*in_ECX" (* "*") (identifier "in_ECX"))) (+ "+") (number_literal "0x48")) () ")")))) (+ "+") (number_literal "0x1e")) () ")")))) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      *(undefined1 *)*in_ECX = 0;\n      iVar1 = 0;\n    }" ({ "{") (expression_statement "*(undefined1 *)*in_ECX = 0;" (assignment_expression "*(undefined1 *)*in_ECX = 0" (pointer_expression "*(undefined1 *)*in_ECX" (* "*") (cast_expression "(undefined1 *)*in_ECX" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*in_ECX" (* "*") (identifier "in_ECX")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" (else "else") (compound_statement "{\n      FUN_000386c0();\n      *in_ECX = 0;\n      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");\n      iVar1 = 0xb;\n    }" ({ "{") (expression_statement "FUN_000386c0();" (call_expression "FUN_000386c0()" (identifier "FUN_000386c0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*in_ECX = 0;" (assignment_expression "*in_ECX = 0" (pointer_expression "*in_ECX" (* "*") (identifier "in_ECX")) (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");" (call_expression "FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\n                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1")" (identifier "FUN_0006e260") (argument_list "(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,\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") (" """)) (, ",") (number_literal "0xfef8") (, ",") (string_literal ""bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1"" (" """) (string_content "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1") (" """)) () ")"))) (; ";")) (expression_statement "iVar1 = 0xb;" (assignment_expression "iVar1 = 0xb" (identifier "iVar1") (= "=") (number_literal "0xb")) (; ";")) (} "}")))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "*in_ECX = 0;" (assignment_expression "*in_ECX = 0" (pointer_expression "*in_ECX" (* "*") (identifier "in_ECX")) (= "=") (number_literal "0")) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int __regparm3 function_1(type_1 *pBt,type_2 pgno,type_3 **ppPage,int flags)

{
  type_4 *pPg;
  int var_2;
  
  var_2 = var_1(pBt,pgno,ppPage,flags);
  if (var_2 == 0) {
    pPg = (*ppPage)->pDbPage;
    if (pPg->nRef < 2) {
      (*ppPage)->isInit = '\0';
      var_2 = 0;
    }
    else {
      var_3(pPg);
      *ppPage = (type_3 *)0x0;
      var_4(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,
                  "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
      var_2 = 0xb;
    }
    return var_2;
  }
  *ppPage = (type_3 *)0x0;
  return var_2;
}


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

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int MASKED(undefined4 param_1)

{
  int iVar1;
  undefined4 *in_ECX;
  
  iVar1 = FUN_00038b40(param_1);
  if (iVar1 == 0) {
    if (*(short *)(*(int *)((undefined1 *)*in_ECX + 0x48) + 0x1e) < 2) {
      *(undefined1 *)*in_ECX = 0;
      iVar1 = 0;
    }
    else {
      FUN_000386c0();
      *in_ECX = 0;
      FUN_0006e260(0xb,"%s at line %d of [%.10s]","database corruption",0xfef8,
                   "bd49a8271d650fa89e446b42e513b595a717b9212c91dd384aab871fc1d0alt1");
      iVar1 = 0xb;
    }
    return iVar1;
  }
  *in_ECX = 0;
  return iVar1;
}

