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

void __regparm3 verifyDbFile(unixFile *pFile)

{
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  stat buf;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if ((pFile->ctrlFlags & 0x80) == 0) {
    iVar2 = (*aSyscall[5].pCurrent)(pFile->h,&buf);
    if (iVar2 == 0) {
      if (buf.st_nlink == 0) {
        sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);
      }
      else if (buf.st_nlink < 2) {
        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);
        if (iVar2 != 0) {
          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);
        }
      }
      else {
        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);
      }
    }
    else {
      sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath);
    }
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void __regparm3 FUN_000570c0(int param_1)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined1 local_70 [20];
  uint local_5c;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x570c9;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {
    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);
    if (iVar1 == 0) {
      if (local_5c == 0) {
        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));
      }
      else if (local_5c < 2) {
        iVar1 = FUN_0002acc0();
        if (iVar1 != 0) {
          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));
        }
      }
      else {
        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));
      }
    }
    else {
      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));
    }
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000f6410();
}


PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00014d20
ADD EBX,0xf3e0b
SUB ESP,0x74
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x6c],EAX
XOR EAX,EAX
TEST byte ptr [ESI + 0x12],0x80
JNZ 0x00057120
SUB ESP,0x8
LEA EAX,[ESP + 0x14]
PUSH EAX
PUSH dword ptr [ESI + 0xc]
CALL dword ptr [EBX + 0x152c]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00057180
MOV EAX,dword ptr [ESP + 0x20]
TEST EAX,EAX
JZ 0x00057140
CMP EAX,0x1
JA 0x00057160
LEA EDX,[ESI + 0x20]
LEA EAX,[ESI + 0x8]
CALL 0x0002acc0
TEST EAX,EAX
JNZ 0x000571a0
MOV EAX,dword ptr [ESP + 0x6c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x000571bc
ADD ESP,0x74
POP EBX
POP ESI
RET
SUB ESP,0x4
LEA EAX,[EBX + 0xfffadb9d]
PUSH dword ptr [ESI + 0x20]
PUSH EAX
PUSH 0x1c
CALL 0x00052380
ADD ESP,0x10
JMP 0x00057120
SUB ESP,0x4
LEA EAX,[EBX + 0xfffadbba]
PUSH dword ptr [ESI + 0x20]
PUSH EAX
PUSH 0x1c
CALL 0x00052380
ADD ESP,0x10
JMP 0x00057120
SUB ESP,0x4
LEA EAX,[EBX + 0xfffadb85]
PUSH dword ptr [ESI + 0x20]
PUSH EAX
PUSH 0x1c
CALL 0x00052380
ADD ESP,0x10
JMP 0x00057120
SUB ESP,0x4
LEA EAX,[EBX + 0xfffadbd5]
PUSH dword ptr [ESI + 0x20]
PUSH EAX
PUSH 0x1c
CALL 0x00052380
ADD ESP,0x10
JMP 0x00057120
CALL 0x000f6410
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_000570c0(int param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_70 [20];\n  uint local_5c;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x570c9;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f6410();\n}\n\n" comment (function_definition "void __regparm3 FUN_000570c0(int param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_70 [20];\n  uint local_5c;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x570c9;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f6410();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000570c0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_70 [20];\n  uint local_5c;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x570c9;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f6410();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_70 [20];" type_identifier (array_declarator "local_70 [20]" identifier [ number_literal ]) ;) (declaration "uint local_5c;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x570c9;" (assignment_expression "uStack_c = 0x570c9" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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) ))))) ;) (if_statement "if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }" if (parenthesized_expression "((*(byte *)(param_1 + 0x12) & 0x80) == 0)" ( (binary_expression "(*(byte *)(param_1 + 0x12) & 0x80) == 0" (parenthesized_expression "(*(byte *)(param_1 + 0x12) & 0x80)" ( (binary_expression "*(byte *)(param_1 + 0x12) & 0x80" (pointer_expression "*(byte *)(param_1 + 0x12)" * (cast_expression "(byte *)(param_1 + 0x12)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }" { (expression_statement "iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70)" identifier = (call_expression "(*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70)" (parenthesized_expression "(*(code *)PTR_FUN_0014c400)" ( (pointer_expression "*(code *)PTR_FUN_0014c400" * (cast_expression "(code *)PTR_FUN_0014c400" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0xc),local_70)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }" { (if_statement "if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" if (parenthesized_expression "(local_5c == 0)" ( (binary_expression "local_5c == 0" identifier == number_literal) )) (compound_statement "{\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }" { (expression_statement "FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20))" ( number_literal , (string_literal ""file unlinked while open: %s"" " string_content ") , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) }) (else_clause "else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" else (if_statement "if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" if (parenthesized_expression "(local_5c < 2)" ( (binary_expression "local_5c < 2" identifier < number_literal) )) (compound_statement "{\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }" { (expression_statement "iVar1 = FUN_0002acc0();" (assignment_expression "iVar1 = FUN_0002acc0()" identifier = (call_expression "FUN_0002acc0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }" { (expression_statement "FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20))" ( number_literal , (string_literal ""file renamed while open: %s"" " string_content ") , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) })) }) (else_clause "else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" else (compound_statement "{\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" { (expression_statement "FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20))" ( number_literal , (string_literal ""multiple links to file: %s"" " string_content ") , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) }))))) }) (else_clause "else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }" else (compound_statement "{\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }" { (expression_statement "FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20))" ( number_literal , (string_literal ""cannot fstat db file %s"" " string_content ") , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) }))) })) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(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_000f6410();" (call_expression "FUN_000f6410()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 verifyDbFile(unixFile *pFile)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  stat buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((pFile->ctrlFlags & 0x80) == 0) {\n    iVar2 = (*aSyscall[5].pCurrent)(pFile->h,&buf);\n    if (iVar2 == 0) {\n      if (buf.st_nlink == 0) {\n        sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);\n      }\n      else if (buf.st_nlink < 2) {\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }\n      else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }\n    }\n    else {\n      sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath);\n    }\n  }\n  if (iVar1 == *(int *)(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 verifyDbFile(unixFile *pFile)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  stat buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((pFile->ctrlFlags & 0x80) == 0) {\n    iVar2 = (*aSyscall[5].pCurrent)(pFile->h,&buf);\n    if (iVar2 == 0) {\n      if (buf.st_nlink == 0) {\n        sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);\n      }\n      else if (buf.st_nlink < 2) {\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }\n      else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }\n    }\n    else {\n      sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath);\n    }\n  }\n  if (iVar1 == *(int *)(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 "verifyDbFile(unixFile *pFile)" identifier (parameter_list "(unixFile *pFile)" ( (parameter_declaration "unixFile *pFile" type_identifier (pointer_declarator "*pFile" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  stat buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((pFile->ctrlFlags & 0x80) == 0) {\n    iVar2 = (*aSyscall[5].pCurrent)(pFile->h,&buf);\n    if (iVar2 == 0) {\n      if (buf.st_nlink == 0) {\n        sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);\n      }\n      else if (buf.st_nlink < 2) {\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }\n      else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }\n    }\n    else {\n      sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath);\n    }\n  }\n  if (iVar1 == *(int *)(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 iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "stat buf;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(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) ))))) ;) (if_statement "if ((pFile->ctrlFlags & 0x80) == 0) {\n    iVar2 = (*aSyscall[5].pCurrent)(pFile->h,&buf);\n    if (iVar2 == 0) {\n      if (buf.st_nlink == 0) {\n        sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);\n      }\n      else if (buf.st_nlink < 2) {\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }\n      else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }\n    }\n    else {\n      sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath);\n    }\n  }" if (parenthesized_expression "((pFile->ctrlFlags & 0x80) == 0)" ( (binary_expression "(pFile->ctrlFlags & 0x80) == 0" (parenthesized_expression "(pFile->ctrlFlags & 0x80)" ( (binary_expression "pFile->ctrlFlags & 0x80" (field_expression "pFile->ctrlFlags" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar2 = (*aSyscall[5].pCurrent)(pFile->h,&buf);\n    if (iVar2 == 0) {\n      if (buf.st_nlink == 0) {\n        sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);\n      }\n      else if (buf.st_nlink < 2) {\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }\n      else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }\n    }\n    else {\n      sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath);\n    }\n  }" { (expression_statement "iVar2 = (*aSyscall[5].pCurrent)(pFile->h,&buf);" (assignment_expression "iVar2 = (*aSyscall[5].pCurrent)(pFile->h,&buf)" identifier = (call_expression "(*aSyscall[5].pCurrent)(pFile->h,&buf)" (parenthesized_expression "(*aSyscall[5].pCurrent)" ( (pointer_expression "*aSyscall[5].pCurrent" * (field_expression "aSyscall[5].pCurrent" (subscript_expression "aSyscall[5]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(pFile->h,&buf)" ( (field_expression "pFile->h" identifier -> field_identifier) , (pointer_expression "&buf" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n      if (buf.st_nlink == 0) {\n        sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);\n      }\n      else if (buf.st_nlink < 2) {\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }\n      else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }\n    }\n    else {\n      sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath);\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      if (buf.st_nlink == 0) {\n        sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);\n      }\n      else if (buf.st_nlink < 2) {\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }\n      else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }\n    }" { (if_statement "if (buf.st_nlink == 0) {\n        sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);\n      }\n      else if (buf.st_nlink < 2) {\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }\n      else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }" if (parenthesized_expression "(buf.st_nlink == 0)" ( (binary_expression "buf.st_nlink == 0" (field_expression "buf.st_nlink" identifier . field_identifier) == number_literal) )) (compound_statement "{\n        sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);\n      }" { (expression_statement "sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath);" (call_expression "sqlite3_log(0x1c,"file unlinked while open: %s",pFile->zPath)" identifier (argument_list "(0x1c,"file unlinked while open: %s",pFile->zPath)" ( number_literal , (string_literal ""file unlinked while open: %s"" " string_content ") , (field_expression "pFile->zPath" identifier -> field_identifier) ))) ;) }) (else_clause "else if (buf.st_nlink < 2) {\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }\n      else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }" else (if_statement "if (buf.st_nlink < 2) {\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }\n      else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }" if (parenthesized_expression "(buf.st_nlink < 2)" ( (binary_expression "buf.st_nlink < 2" (field_expression "buf.st_nlink" identifier . field_identifier) < number_literal) )) (compound_statement "{\n        iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);\n        if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }\n      }" { (expression_statement "iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath);" (assignment_expression "iVar2 = fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath)" identifier = (call_expression "fileHasMoved((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath)" identifier (argument_list "((unixFile *)&pFile->pInode,(unixFile *)&pFile->zPath)" ( (cast_expression "(unixFile *)&pFile->pInode" ( (type_descriptor "unixFile *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pFile->pInode" & (field_expression "pFile->pInode" identifier -> field_identifier))) , (cast_expression "(unixFile *)&pFile->zPath" ( (type_descriptor "unixFile *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pFile->zPath" & (field_expression "pFile->zPath" identifier -> field_identifier))) )))) ;) (if_statement "if (iVar2 != 0) {\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);\n        }" { (expression_statement "sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath);" (call_expression "sqlite3_log(0x1c,"file renamed while open: %s",pFile->zPath)" identifier (argument_list "(0x1c,"file renamed while open: %s",pFile->zPath)" ( number_literal , (string_literal ""file renamed while open: %s"" " string_content ") , (field_expression "pFile->zPath" identifier -> field_identifier) ))) ;) })) }) (else_clause "else {\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }" else (compound_statement "{\n        sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);\n      }" { (expression_statement "sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath);" (call_expression "sqlite3_log(0x1c,"multiple links to file: %s",pFile->zPath)" identifier (argument_list "(0x1c,"multiple links to file: %s",pFile->zPath)" ( number_literal , (string_literal ""multiple links to file: %s"" " string_content ") , (field_expression "pFile->zPath" identifier -> field_identifier) ))) ;) }))))) }) (else_clause "else {\n      sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath);\n    }" else (compound_statement "{\n      sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath);\n    }" { (expression_statement "sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath);" (call_expression "sqlite3_log(0x1c,"cannot fstat db file %s",pFile->zPath)" identifier (argument_list "(0x1c,"cannot fstat db file %s",pFile->zPath)" ( number_literal , (string_literal ""cannot fstat db file %s"" " string_content ") , (field_expression "pFile->zPath" identifier -> field_identifier) ))) ;) }))) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(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 "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void __regparm3 FUN_000570c0(int param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_70 [20];\n  uint local_5c;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x570c9;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000f6410();\n}\n\n" (function_definition "void __regparm3 FUN_000570c0(int param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_70 [20];\n  uint local_5c;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x570c9;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000f6410();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000570c0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_70 [20];\n  uint local_5c;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x570c9;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000f6410();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_70 [20];" type_identifier (array_declarator "local_70 [20]" identifier [ number_literal ]) ;) (declaration "uint local_5c;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x570c9;" (assignment_expression "uStack_c = 0x570c9" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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) ))))) ;) (if_statement "if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }" if (parenthesized_expression "((*(byte *)(param_1 + 0x12) & 0x80) == 0)" ( (binary_expression "(*(byte *)(param_1 + 0x12) & 0x80) == 0" (parenthesized_expression "(*(byte *)(param_1 + 0x12) & 0x80)" ( (binary_expression "*(byte *)(param_1 + 0x12) & 0x80" (pointer_expression "*(byte *)(param_1 + 0x12)" * (cast_expression "(byte *)(param_1 + 0x12)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }" { (expression_statement "iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70)" identifier = (call_expression "(*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70)" (parenthesized_expression "(*(code *)PTR_FUN_0014c400)" ( (pointer_expression "*(code *)PTR_FUN_0014c400" * (cast_expression "(code *)PTR_FUN_0014c400" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0xc),local_70)" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }" { (if_statement "if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" if (parenthesized_expression "(local_5c == 0)" ( (binary_expression "local_5c == 0" identifier == number_literal) )) (compound_statement "{\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }" { (expression_statement "FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20))" ( number_literal , (string_literal ""file unlinked while open: %s"" " string_content ") , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) }) (else_clause "else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" else (if_statement "if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" if (parenthesized_expression "(local_5c < 2)" ( (binary_expression "local_5c < 2" identifier < number_literal) )) (compound_statement "{\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }" { (expression_statement "iVar1 = FUN_0002acc0();" (assignment_expression "iVar1 = FUN_0002acc0()" identifier = (call_expression "FUN_0002acc0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }" { (expression_statement "FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20))" ( number_literal , (string_literal ""file renamed while open: %s"" " string_content ") , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) })) }) (else_clause "else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" else (compound_statement "{\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" { (expression_statement "FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20))" ( number_literal , (string_literal ""multiple links to file: %s"" " string_content ") , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) }))))) }) (else_clause "else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }" else (compound_statement "{\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }" { (expression_statement "FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20))" ( number_literal , (string_literal ""cannot fstat db file %s"" " string_content ") , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) ))) ;) }))) })) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(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_000f6410();" (call_expression "FUN_000f6410()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (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 { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) }))))) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) }))) })) (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 __regparm3 FUN_000570c0(int param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_70 [20];\n  uint local_5c;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x570c9;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000f6410();\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000570c0(int param_1)" (identifier "FUN_000570c0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_70 [20];\n  uint local_5c;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x570c9;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000f6410();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_70 [20];" (type_identifier "undefined1") (array_declarator "local_70 [20]" (identifier "local_70") ([ "[") (number_literal "20") (] "]")) (; ";")) (declaration "uint local_5c;" (type_identifier "uint") (identifier "local_5c") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (declaration "undefined4 uStack_c;" (type_identifier "undefined4") (identifier "uStack_c") (; ";")) (expression_statement "uStack_c = 0x570c9;" (assignment_expression "uStack_c = 0x570c9" (identifier "uStack_c") (= "=") (number_literal "0x570c9")) (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (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")) () ")"))))) (; ";")) (if_statement "if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }" (if "if") (parenthesized_expression "((*(byte *)(param_1 + 0x12) & 0x80) == 0)" (( "(") (binary_expression "(*(byte *)(param_1 + 0x12) & 0x80) == 0" (parenthesized_expression "(*(byte *)(param_1 + 0x12) & 0x80)" (( "(") (binary_expression "*(byte *)(param_1 + 0x12) & 0x80" (pointer_expression "*(byte *)(param_1 + 0x12)" (* "*") (cast_expression "(byte *)(param_1 + 0x12)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x12)" (( "(") (binary_expression "param_1 + 0x12" (identifier "param_1") (+ "+") (number_literal "0x12")) () ")")))) (& "&") (number_literal "0x80")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);\n    if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }\n  }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70)" (parenthesized_expression "(*(code *)PTR_FUN_0014c400)" (( "(") (pointer_expression "*(code *)PTR_FUN_0014c400" (* "*") (cast_expression "(code *)PTR_FUN_0014c400" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0014c400"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 0xc),local_70)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (identifier "local_70") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }\n    else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n    }" ({ "{") (if_statement "if (local_5c == 0) {\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }\n      else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" (if "if") (parenthesized_expression "(local_5c == 0)" (( "(") (binary_expression "local_5c == 0" (identifier "local_5c") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));\n      }" ({ "{") (expression_statement "FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20))" (identifier "FUN_00052380") (argument_list "(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20))" (( "(") (number_literal "0x1c") (, ",") (string_literal ""file unlinked while open: %s"" (" """) (string_content "file unlinked while open: %s") (" """)) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")"))) (; ";")) (} "}")) (else_clause "else if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" (else "else") (if_statement "if (local_5c < 2) {\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }\n      else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" (if "if") (parenthesized_expression "(local_5c < 2)" (( "(") (binary_expression "local_5c < 2" (identifier "local_5c") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n        iVar1 = FUN_0002acc0();\n        if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }\n      }" ({ "{") (expression_statement "iVar1 = FUN_0002acc0();" (assignment_expression "iVar1 = FUN_0002acc0()" (identifier "iVar1") (= "=") (call_expression "FUN_0002acc0()" (identifier "FUN_0002acc0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));\n        }" ({ "{") (expression_statement "FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20))" (identifier "FUN_00052380") (argument_list "(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20))" (( "(") (number_literal "0x1c") (, ",") (string_literal ""file renamed while open: %s"" (" """) (string_content "file renamed while open: %s") (" """)) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" (else "else") (compound_statement "{\n        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));\n      }" ({ "{") (expression_statement "FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20))" (identifier "FUN_00052380") (argument_list "(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20))" (( "(") (number_literal "0x1c") (, ",") (string_literal ""multiple links to file: %s"" (" """) (string_content "multiple links to file: %s") (" """)) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")"))) (; ";")) (} "}")))))) (} "}")) (else_clause "else {\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }" (else "else") (compound_statement "{\n      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));\n    }" ({ "{") (expression_statement "FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));" (call_expression "FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20))" (identifier "FUN_00052380") (argument_list "(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20))" (( "(") (number_literal "0x1c") (, ",") (string_literal ""cannot fstat db file %s"" (" """) (string_content "cannot fstat db file %s") (" """)) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")"))) (; ";")) (} "}")))) (} "}"))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (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_000f6410();" (call_expression "FUN_000f6410()" (identifier "FUN_000f6410") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *pFile)

{
  int var_5;
  int var_2;
  int var_1;
  type_2 buf;
  
  var_5 = *(int *)(var_1 + 0x14);
  if ((pFile->ctrlFlags & 0x80) == 0) {
    var_2 = (*aSyscall[5].pCurrent)(pFile->h,&buf);
    if (var_2 == 0) {
      if (buf.st_nlink == 0) {
        var_3(0x1c,"file unlinked while open: %s",pFile->zPath);
      }
      else if (buf.st_nlink < 2) {
        var_2 = var_4((type_1 *)&pFile->pInode,(type_1 *)&pFile->zPath);
        if (var_2 != 0) {
          var_3(0x1c,"file renamed while open: %s",pFile->zPath);
        }
      }
      else {
        var_3(0x1c,"multiple links to file: %s",pFile->zPath);
      }
    }
    else {
      var_3(0x1c,"cannot fstat db file %s",pFile->zPath);
    }
  }
  if (var_5 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_6();
}


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

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

void __regparm3 MASKED(int param_1)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined1 local_70 [20];
  uint local_5c;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x570c9;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if ((*(byte *)(param_1 + 0x12) & 0x80) == 0) {
    iVar1 = (*(code *)PTR_FUN_0014c400)(*(undefined4 *)(param_1 + 0xc),local_70);
    if (iVar1 == 0) {
      if (local_5c == 0) {
        FUN_00052380(0x1c,"file unlinked while open: %s",*(undefined4 *)(param_1 + 0x20));
      }
      else if (local_5c < 2) {
        iVar1 = FUN_0002acc0();
        if (iVar1 != 0) {
          FUN_00052380(0x1c,"file renamed while open: %s",*(undefined4 *)(param_1 + 0x20));
        }
      }
      else {
        FUN_00052380(0x1c,"multiple links to file: %s",*(undefined4 *)(param_1 + 0x20));
      }
    }
    else {
      FUN_00052380(0x1c,"cannot fstat db file %s",*(undefined4 *)(param_1 + 0x20));
    }
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000f6410();
}

