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

void __regparm3 closePendingFds(unixFile *pFile)

{
  unixInodeInfo *puVar1;
  UnixUnusedFd *pUVar2;
  UnixUnusedFd *p;
  int iVar3;
  int lineno;
  
  puVar1 = pFile->pInode;
  p = puVar1->pUnused;
  while (p != (UnixUnusedFd *)0x0) {
    pUVar2 = p->pNext;
    iVar3 = (*aSyscall[1].pCurrent)(p->fd);
    if (iVar3 != 0) {
      robust_close(pFile,0x882b,lineno);
    }
    sqlite3_free(p);
    p = pUVar2;
  }
  puVar1->pUnused = (UnixUnusedFd *)0x0;
  return;
}



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

void __regparm3 FUN_0003b1c0(int param_1)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  int iVar4;
  
  iVar1 = *(int *)(param_1 + 8);
  puVar3 = *(undefined4 **)(iVar1 + 0x20);
  while (puVar3 != (undefined4 *)0x0) {
    puVar2 = (undefined4 *)puVar3[2];
    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);
    if (iVar4 != 0) {
      FUN_0003aea0();
    }
    sqlite3_free(puVar3);
    puVar3 = puVar2;
  }
  *(undefined4 *)(iVar1 + 0x20) = 0;
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001d810
ADD EBX,0xa2e37
SUB ESP,0x1c
MOV ECX,dword ptr [EAX + 0x8]
MOV EBP,dword ptr [ECX + 0x20]
MOV dword ptr [ESP + 0xc],ECX
TEST EBP,EBP
JZ 0x0003b230
MOV dword ptr [ESP + 0x8],EAX
LEA EDI,[0x1440]
JMP 0x0003b202
SUB ESP,0xc
PUSH EBP
MOV EBP,ESI
CALL 0x00016d30
ADD ESP,0x10
TEST ESI,ESI
JZ 0x0003b230
SUB ESP,0xc
MOV ESI,dword ptr [EBP + 0x8]
PUSH dword ptr [EBP]
CALL dword ptr [EDI + EBX*0x1 + 0x10]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003b1f0
MOV EAX,dword ptr [ESP + 0x8]
MOV EDX,0x882b
CALL 0x0003aea0
JMP 0x0003b1f0
MOV EAX,dword ptr [ESP + 0xc]
MOV dword ptr [EAX + 0x20],0x0
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_0003b1c0(int param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)(param_1 + 8);\n  puVar3 = *(undefined4 **)(iVar1 + 0x20);\n  while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }\n  *(undefined4 *)(iVar1 + 0x20) = 0;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_0003b1c0(int param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)(param_1 + 8);\n  puVar3 = *(undefined4 **)(iVar1 + 0x20);\n  while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }\n  *(undefined4 *)(iVar1 + 0x20) = 0;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0003b1c0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)(param_1 + 8);\n  puVar3 = *(undefined4 **)(iVar1 + 0x20);\n  while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }\n  *(undefined4 *)(iVar1 + 0x20) = 0;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 8);" (assignment_expression "iVar1 = *(int *)(param_1 + 8)" identifier = (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = *(undefined4 **)(iVar1 + 0x20);" (assignment_expression "puVar3 = *(undefined4 **)(iVar1 + 0x20)" identifier = (pointer_expression "*(undefined4 **)(iVar1 + 0x20)" * (cast_expression "(undefined4 **)(iVar1 + 0x20)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x20)" ( (binary_expression "iVar1 + 0x20" identifier + number_literal) ))))) ;) (while_statement "while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }" while (parenthesized_expression "(puVar3 != (undefined4 *)0x0)" ( (binary_expression "puVar3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }" { (expression_statement "puVar2 = (undefined4 *)puVar3[2];" (assignment_expression "puVar2 = (undefined4 *)puVar3[2]" identifier = (cast_expression "(undefined4 *)puVar3[2]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[2]" identifier [ number_literal ]))) ;) (expression_statement "iVar4 = (*(code *)PTR_close_000df450)(*puVar3);" (assignment_expression "iVar4 = (*(code *)PTR_close_000df450)(*puVar3)" identifier = (call_expression "(*(code *)PTR_close_000df450)(*puVar3)" (parenthesized_expression "(*(code *)PTR_close_000df450)" ( (pointer_expression "*(code *)PTR_close_000df450" * (cast_expression "(code *)PTR_close_000df450" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*puVar3)" ( (pointer_expression "*puVar3" * identifier) )))) ;) (if_statement "if (iVar4 != 0) {\n      FUN_0003aea0();\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_0003aea0();\n    }" { (expression_statement "FUN_0003aea0();" (call_expression "FUN_0003aea0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "sqlite3_free(puVar3);" (call_expression "sqlite3_free(puVar3)" identifier (argument_list "(puVar3)" ( identifier ))) ;) (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" identifier = identifier) ;) })) (expression_statement "*(undefined4 *)(iVar1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x20)" * (cast_expression "(undefined4 *)(iVar1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x20)" ( (binary_expression "iVar1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 closePendingFds(unixFile *pFile)\n\n{\n  unixInodeInfo *puVar1;\n  UnixUnusedFd *pUVar2;\n  UnixUnusedFd *p;\n  int iVar3;\n  int lineno;\n  \n  puVar1 = pFile->pInode;\n  p = puVar1->pUnused;\n  while (p != (UnixUnusedFd *)0x0) {\n    pUVar2 = p->pNext;\n    iVar3 = (*aSyscall[1].pCurrent)(p->fd);\n    if (iVar3 != 0) {\n      robust_close(pFile,0x882b,lineno);\n    }\n    sqlite3_free(p);\n    p = pUVar2;\n  }\n  puVar1->pUnused = (UnixUnusedFd *)0x0;\n  return;\n}\n\n" comment (function_definition "void __regparm3 closePendingFds(unixFile *pFile)\n\n{\n  unixInodeInfo *puVar1;\n  UnixUnusedFd *pUVar2;\n  UnixUnusedFd *p;\n  int iVar3;\n  int lineno;\n  \n  puVar1 = pFile->pInode;\n  p = puVar1->pUnused;\n  while (p != (UnixUnusedFd *)0x0) {\n    pUVar2 = p->pNext;\n    iVar3 = (*aSyscall[1].pCurrent)(p->fd);\n    if (iVar3 != 0) {\n      robust_close(pFile,0x882b,lineno);\n    }\n    sqlite3_free(p);\n    p = pUVar2;\n  }\n  puVar1->pUnused = (UnixUnusedFd *)0x0;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "closePendingFds(unixFile *pFile)" identifier (parameter_list "(unixFile *pFile)" ( (parameter_declaration "unixFile *pFile" type_identifier (pointer_declarator "*pFile" * identifier)) ))) (compound_statement "{\n  unixInodeInfo *puVar1;\n  UnixUnusedFd *pUVar2;\n  UnixUnusedFd *p;\n  int iVar3;\n  int lineno;\n  \n  puVar1 = pFile->pInode;\n  p = puVar1->pUnused;\n  while (p != (UnixUnusedFd *)0x0) {\n    pUVar2 = p->pNext;\n    iVar3 = (*aSyscall[1].pCurrent)(p->fd);\n    if (iVar3 != 0) {\n      robust_close(pFile,0x882b,lineno);\n    }\n    sqlite3_free(p);\n    p = pUVar2;\n  }\n  puVar1->pUnused = (UnixUnusedFd *)0x0;\n  return;\n}" { (declaration "unixInodeInfo *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "UnixUnusedFd *pUVar2;" type_identifier (pointer_declarator "*pUVar2" * identifier) ;) (declaration "UnixUnusedFd *p;" type_identifier (pointer_declarator "*p" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int lineno;" primitive_type identifier ;) (expression_statement "puVar1 = pFile->pInode;" (assignment_expression "puVar1 = pFile->pInode" identifier = (field_expression "pFile->pInode" identifier -> field_identifier)) ;) (expression_statement "p = puVar1->pUnused;" (assignment_expression "p = puVar1->pUnused" identifier = (field_expression "puVar1->pUnused" identifier -> field_identifier)) ;) (while_statement "while (p != (UnixUnusedFd *)0x0) {\n    pUVar2 = p->pNext;\n    iVar3 = (*aSyscall[1].pCurrent)(p->fd);\n    if (iVar3 != 0) {\n      robust_close(pFile,0x882b,lineno);\n    }\n    sqlite3_free(p);\n    p = pUVar2;\n  }" while (parenthesized_expression "(p != (UnixUnusedFd *)0x0)" ( (binary_expression "p != (UnixUnusedFd *)0x0" identifier != (cast_expression "(UnixUnusedFd *)0x0" ( (type_descriptor "UnixUnusedFd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pUVar2 = p->pNext;\n    iVar3 = (*aSyscall[1].pCurrent)(p->fd);\n    if (iVar3 != 0) {\n      robust_close(pFile,0x882b,lineno);\n    }\n    sqlite3_free(p);\n    p = pUVar2;\n  }" { (expression_statement "pUVar2 = p->pNext;" (assignment_expression "pUVar2 = p->pNext" identifier = (field_expression "p->pNext" identifier -> field_identifier)) ;) (expression_statement "iVar3 = (*aSyscall[1].pCurrent)(p->fd);" (assignment_expression "iVar3 = (*aSyscall[1].pCurrent)(p->fd)" identifier = (call_expression "(*aSyscall[1].pCurrent)(p->fd)" (parenthesized_expression "(*aSyscall[1].pCurrent)" ( (pointer_expression "*aSyscall[1].pCurrent" * (field_expression "aSyscall[1].pCurrent" (subscript_expression "aSyscall[1]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(p->fd)" ( (field_expression "p->fd" identifier -> field_identifier) )))) ;) (if_statement "if (iVar3 != 0) {\n      robust_close(pFile,0x882b,lineno);\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      robust_close(pFile,0x882b,lineno);\n    }" { (expression_statement "robust_close(pFile,0x882b,lineno);" (call_expression "robust_close(pFile,0x882b,lineno)" identifier (argument_list "(pFile,0x882b,lineno)" ( identifier , number_literal , identifier ))) ;) })) (expression_statement "sqlite3_free(p);" (call_expression "sqlite3_free(p)" identifier (argument_list "(p)" ( identifier ))) ;) (expression_statement "p = pUVar2;" (assignment_expression "p = pUVar2" identifier = identifier) ;) })) (expression_statement "puVar1->pUnused = (UnixUnusedFd *)0x0;" (assignment_expression "puVar1->pUnused = (UnixUnusedFd *)0x0" (field_expression "puVar1->pUnused" identifier -> field_identifier) = (cast_expression "(UnixUnusedFd *)0x0" ( (type_descriptor "UnixUnusedFd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0003b1c0(int param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)(param_1 + 8);\n  puVar3 = *(undefined4 **)(iVar1 + 0x20);\n  while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }\n  *(undefined4 *)(iVar1 + 0x20) = 0;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0003b1c0(int param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)(param_1 + 8);\n  puVar3 = *(undefined4 **)(iVar1 + 0x20);\n  while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }\n  *(undefined4 *)(iVar1 + 0x20) = 0;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0003b1c0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)(param_1 + 8);\n  puVar3 = *(undefined4 **)(iVar1 + 0x20);\n  while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }\n  *(undefined4 *)(iVar1 + 0x20) = 0;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(param_1 + 8);" (assignment_expression "iVar1 = *(int *)(param_1 + 8)" identifier = (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = *(undefined4 **)(iVar1 + 0x20);" (assignment_expression "puVar3 = *(undefined4 **)(iVar1 + 0x20)" identifier = (pointer_expression "*(undefined4 **)(iVar1 + 0x20)" * (cast_expression "(undefined4 **)(iVar1 + 0x20)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x20)" ( (binary_expression "iVar1 + 0x20" identifier + number_literal) ))))) ;) (while_statement "while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }" while (parenthesized_expression "(puVar3 != (undefined4 *)0x0)" ( (binary_expression "puVar3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }" { (expression_statement "puVar2 = (undefined4 *)puVar3[2];" (assignment_expression "puVar2 = (undefined4 *)puVar3[2]" identifier = (cast_expression "(undefined4 *)puVar3[2]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[2]" identifier [ number_literal ]))) ;) (expression_statement "iVar4 = (*(code *)PTR_close_000df450)(*puVar3);" (assignment_expression "iVar4 = (*(code *)PTR_close_000df450)(*puVar3)" identifier = (call_expression "(*(code *)PTR_close_000df450)(*puVar3)" (parenthesized_expression "(*(code *)PTR_close_000df450)" ( (pointer_expression "*(code *)PTR_close_000df450" * (cast_expression "(code *)PTR_close_000df450" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*puVar3)" ( (pointer_expression "*puVar3" * identifier) )))) ;) (if_statement "if (iVar4 != 0) {\n      FUN_0003aea0();\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_0003aea0();\n    }" { (expression_statement "FUN_0003aea0();" (call_expression "FUN_0003aea0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "sqlite3_free(puVar3);" (call_expression "sqlite3_free(puVar3)" identifier (argument_list "(puVar3)" ( identifier ))) ;) (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" identifier = identifier) ;) })) (expression_statement "*(undefined4 *)(iVar1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x20)" * (cast_expression "(undefined4 *)(iVar1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x20)" ( (binary_expression "iVar1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0003b1c0(int param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)(param_1 + 8);\n  puVar3 = *(undefined4 **)(iVar1 + 0x20);\n  while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }\n  *(undefined4 *)(iVar1 + 0x20) = 0;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003b1c0(int param_1)" (identifier "FUN_0003b1c0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  \n  iVar1 = *(int *)(param_1 + 8);\n  puVar3 = *(undefined4 **)(iVar1 + 0x20);\n  while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }\n  *(undefined4 *)(iVar1 + 0x20) = 0;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "iVar1 = *(int *)(param_1 + 8);" (assignment_expression "iVar1 = *(int *)(param_1 + 8)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "puVar3 = *(undefined4 **)(iVar1 + 0x20);" (assignment_expression "puVar3 = *(undefined4 **)(iVar1 + 0x20)" (identifier "puVar3") (= "=") (pointer_expression "*(undefined4 **)(iVar1 + 0x20)" (* "*") (cast_expression "(undefined4 **)(iVar1 + 0x20)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar1 + 0x20)" (( "(") (binary_expression "iVar1 + 0x20" (identifier "iVar1") (+ "+") (number_literal "0x20")) () ")"))))) (; ";")) (while_statement "while (puVar3 != (undefined4 *)0x0) {\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }" (while "while") (parenthesized_expression "(puVar3 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar3 != (undefined4 *)0x0" (identifier "puVar3") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    puVar2 = (undefined4 *)puVar3[2];\n    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);\n    if (iVar4 != 0) {\n      FUN_0003aea0();\n    }\n    sqlite3_free(puVar3);\n    puVar3 = puVar2;\n  }" ({ "{") (expression_statement "puVar2 = (undefined4 *)puVar3[2];" (assignment_expression "puVar2 = (undefined4 *)puVar3[2]" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)puVar3[2]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar3[2]" (identifier "puVar3") ([ "[") (number_literal "2") (] "]")))) (; ";")) (expression_statement "iVar4 = (*(code *)PTR_close_000df450)(*puVar3);" (assignment_expression "iVar4 = (*(code *)PTR_close_000df450)(*puVar3)" (identifier "iVar4") (= "=") (call_expression "(*(code *)PTR_close_000df450)(*puVar3)" (parenthesized_expression "(*(code *)PTR_close_000df450)" (( "(") (pointer_expression "*(code *)PTR_close_000df450" (* "*") (cast_expression "(code *)PTR_close_000df450" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_000df450"))) () ")")) (argument_list "(*puVar3)" (( "(") (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) () ")")))) (; ";")) (if_statement "if (iVar4 != 0) {\n      FUN_0003aea0();\n    }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0003aea0();\n    }" ({ "{") (expression_statement "FUN_0003aea0();" (call_expression "FUN_0003aea0()" (identifier "FUN_0003aea0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "sqlite3_free(puVar3);" (call_expression "sqlite3_free(puVar3)" (identifier "sqlite3_free") (argument_list "(puVar3)" (( "(") (identifier "puVar3") () ")"))) (; ";")) (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" (identifier "puVar3") (= "=") (identifier "puVar2")) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(iVar1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x20)" (( "(") (binary_expression "iVar1 + 0x20" (identifier "iVar1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *pFile)

{
  type_2 *puVar1;
  type_3 *pUVar2;
  type_3 *var_1;
  int var_2;
  int lineno;
  
  puVar1 = pFile->pInode;
  var_1 = puVar1->pUnused;
  while (var_1 != (type_3 *)0x0) {
    pUVar2 = var_1->pNext;
    var_2 = (*aSyscall[1].pCurrent)(var_1->fd);
    if (var_2 != 0) {
      var_3(pFile,0x882b,lineno);
    }
    var_4(var_1);
    var_1 = pUVar2;
  }
  puVar1->pUnused = (type_3 *)0x0;
  return;
}


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

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

void __regparm3 MASKED(int param_1)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  int iVar4;
  
  iVar1 = *(int *)(param_1 + 8);
  puVar3 = *(undefined4 **)(iVar1 + 0x20);
  while (puVar3 != (undefined4 *)0x0) {
    puVar2 = (undefined4 *)puVar3[2];
    iVar4 = (*(code *)PTR_close_000df450)(*puVar3);
    if (iVar4 != 0) {
      FUN_0003aea0();
    }
    sqlite3_free(puVar3);
    puVar3 = puVar2;
  }
  *(undefined4 *)(iVar1 + 0x20) = 0;
  return;
}

