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

int sqlite3_blob_close(sqlite3_blob *pBlob)

{
  sqlite3 *db;
  int iVar1;
  
  iVar1 = 0;
  if (pBlob != (sqlite3_blob *)0x0) {
    db = *(sqlite3 **)(pBlob + 0x14);
    if (db->mutex != (sqlite3_mutex *)0x0) {
      (*sqlite3Config.mutex.xMutexEnter)(db->mutex);
    }
    iVar1 = sqlite3_finalize(*(sqlite3_stmt **)(pBlob + 0x10));
    if (db->pnBytesFreed == (int *)0x0) {
      sqlite3_free(pBlob);
    }
    else {
      measureAllocationSize(db,pBlob);
    }
    if (db->mutex != (sqlite3_mutex *)0x0) {
      (*sqlite3Config.mutex.xMutexLeave)(db->mutex);
    }
  }
  return iVar1;
}



undefined4 FUN_000c0610(int param_1)

{
  int iVar1;
  int unaff_EBP;
  undefined4 uVar2;
  
  FUN_0003a405();
  uVar2 = 0;
  if (param_1 != 0) {
    iVar1 = *(int *)(param_1 + 0x14);
    if (*(int *)(iVar1 + 0xc) != 0) {
      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));
    }
    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));
    if (*(int *)(iVar1 + 0x1e0) == 0) {
      FUN_00044000(param_1);
    }
    else {
      FUN_0003a540();
    }
    if (*(int *)(iVar1 + 0xc) != 0) {
      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));
    }
  }
  return uVar2;
}


PUSH EBP
CALL 0x0003a405
ADD EBP,0xfa812
PUSH EDI
XOR EDI,EDI
PUSH ESI
PUSH EBX
SUB ESP,0xc
MOV EBX,dword ptr [ESP + 0x20]
TEST EBX,EBX
JZ 0x000c067d
MOV ESI,dword ptr [EBX + 0x14]
MOV EAX,dword ptr [ESI + 0xc]
TEST EAX,EAX
JZ 0x000c0643
SUB ESP,0xc
PUSH EAX
CALL dword ptr [EBP + 0x614]
ADD ESP,0x10
SUB ESP,0xc
PUSH dword ptr [EBX + 0x10]
CALL 0x000c0450
ADD ESP,0x10
MOV EDI,EAX
MOV EAX,dword ptr [ESI + 0x1e0]
TEST EAX,EAX
JNZ 0x000c0690
SUB ESP,0xc
PUSH EBX
CALL 0x00044000
ADD ESP,0x10
MOV EAX,dword ptr [ESI + 0xc]
TEST EAX,EAX
JZ 0x000c067d
SUB ESP,0xc
PUSH EAX
CALL dword ptr [EBP + 0x61c]
ADD ESP,0x10
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,EBX
MOV EAX,ESI
CALL 0x0003a540
JMP 0x000c0669
(translation_unit "undefined4 FUN_000c0610(int param_1)\n\n{\n  int iVar1;\n  int unaff_EBP;\n  undefined4 uVar2;\n  \n  FUN_0003a405();\n  uVar2 = 0;\n  if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 FUN_000c0610(int param_1)\n\n{\n  int iVar1;\n  int unaff_EBP;\n  undefined4 uVar2;\n  \n  FUN_0003a405();\n  uVar2 = 0;\n  if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_000c0610(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int unaff_EBP;\n  undefined4 uVar2;\n  \n  FUN_0003a405();\n  uVar2 = 0;\n  if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "FUN_0003a405();" (call_expression "FUN_0003a405()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }" { (expression_statement "iVar1 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x14)" identifier = (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" { (expression_statement "(**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));" (call_expression "(**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc))" (parenthesized_expression "(**(code **)(&UNK_000fae26 + unaff_EBP))" ( (pointer_expression "**(code **)(&UNK_000fae26 + unaff_EBP)" * (pointer_expression "*(code **)(&UNK_000fae26 + unaff_EBP)" * (cast_expression "(code **)(&UNK_000fae26 + unaff_EBP)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_000fae26 + unaff_EBP)" ( (binary_expression "&UNK_000fae26 + unaff_EBP" (pointer_expression "&UNK_000fae26" & identifier) + identifier) ))))) )) (argument_list "(*(int *)(iVar1 + 0xc))" ( (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) ))) ;) })) (expression_statement "uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));" (assignment_expression "uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10))" identifier = (call_expression "FUN_000c0450(*(undefined4 *)(param_1 + 0x10))" identifier (argument_list "(*(undefined4 *)(param_1 + 0x10))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) )))) ;) (if_statement "if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0x1e0) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x1e0) == 0" (pointer_expression "*(int *)(iVar1 + 0x1e0)" * (cast_expression "(int *)(iVar1 + 0x1e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1e0)" ( (binary_expression "iVar1 + 0x1e0" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      FUN_00044000(param_1);\n    }" { (expression_statement "FUN_00044000(param_1);" (call_expression "FUN_00044000(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) }) (else_clause "else {\n      FUN_0003a540();\n    }" else (compound_statement "{\n      FUN_0003a540();\n    }" { (expression_statement "FUN_0003a540();" (call_expression "FUN_0003a540()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" { (expression_statement "(**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));" (call_expression "(**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc))" (parenthesized_expression "(**(code **)(&UNK_000fae2e + unaff_EBP))" ( (pointer_expression "**(code **)(&UNK_000fae2e + unaff_EBP)" * (pointer_expression "*(code **)(&UNK_000fae2e + unaff_EBP)" * (cast_expression "(code **)(&UNK_000fae2e + unaff_EBP)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_000fae2e + unaff_EBP)" ( (binary_expression "&UNK_000fae2e + unaff_EBP" (pointer_expression "&UNK_000fae2e" & identifier) + identifier) ))))) )) (argument_list "(*(int *)(iVar1 + 0xc))" ( (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) ))) ;) })) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */\n/* WARNING: Unknown calling convention */\n\nint sqlite3_blob_close(sqlite3_blob *pBlob)\n\n{\n  sqlite3 *db;\n  int iVar1;\n  \n  iVar1 = 0;\n  if (pBlob != (sqlite3_blob *)0x0) {\n    db = *(sqlite3 **)(pBlob + 0x14);\n    if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n    }\n    iVar1 = sqlite3_finalize(*(sqlite3_stmt **)(pBlob + 0x10));\n    if (db->pnBytesFreed == (int *)0x0) {\n      sqlite3_free(pBlob);\n    }\n    else {\n      measureAllocationSize(db,pBlob);\n    }\n    if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n    }\n  }\n  return iVar1;\n}\n\n" comment comment (function_definition "int sqlite3_blob_close(sqlite3_blob *pBlob)\n\n{\n  sqlite3 *db;\n  int iVar1;\n  \n  iVar1 = 0;\n  if (pBlob != (sqlite3_blob *)0x0) {\n    db = *(sqlite3 **)(pBlob + 0x14);\n    if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n    }\n    iVar1 = sqlite3_finalize(*(sqlite3_stmt **)(pBlob + 0x10));\n    if (db->pnBytesFreed == (int *)0x0) {\n      sqlite3_free(pBlob);\n    }\n    else {\n      measureAllocationSize(db,pBlob);\n    }\n    if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "sqlite3_blob_close(sqlite3_blob *pBlob)" identifier (parameter_list "(sqlite3_blob *pBlob)" ( (parameter_declaration "sqlite3_blob *pBlob" type_identifier (pointer_declarator "*pBlob" * identifier)) ))) (compound_statement "{\n  sqlite3 *db;\n  int iVar1;\n  \n  iVar1 = 0;\n  if (pBlob != (sqlite3_blob *)0x0) {\n    db = *(sqlite3 **)(pBlob + 0x14);\n    if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n    }\n    iVar1 = sqlite3_finalize(*(sqlite3_stmt **)(pBlob + 0x10));\n    if (db->pnBytesFreed == (int *)0x0) {\n      sqlite3_free(pBlob);\n    }\n    else {\n      measureAllocationSize(db,pBlob);\n    }\n    if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n    }\n  }\n  return iVar1;\n}" { (declaration "sqlite3 *db;" type_identifier (pointer_declarator "*db" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (if_statement "if (pBlob != (sqlite3_blob *)0x0) {\n    db = *(sqlite3 **)(pBlob + 0x14);\n    if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n    }\n    iVar1 = sqlite3_finalize(*(sqlite3_stmt **)(pBlob + 0x10));\n    if (db->pnBytesFreed == (int *)0x0) {\n      sqlite3_free(pBlob);\n    }\n    else {\n      measureAllocationSize(db,pBlob);\n    }\n    if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n    }\n  }" if (parenthesized_expression "(pBlob != (sqlite3_blob *)0x0)" ( (binary_expression "pBlob != (sqlite3_blob *)0x0" identifier != (cast_expression "(sqlite3_blob *)0x0" ( (type_descriptor "sqlite3_blob *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    db = *(sqlite3 **)(pBlob + 0x14);\n    if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n    }\n    iVar1 = sqlite3_finalize(*(sqlite3_stmt **)(pBlob + 0x10));\n    if (db->pnBytesFreed == (int *)0x0) {\n      sqlite3_free(pBlob);\n    }\n    else {\n      measureAllocationSize(db,pBlob);\n    }\n    if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n    }\n  }" { (expression_statement "db = *(sqlite3 **)(pBlob + 0x14);" (assignment_expression "db = *(sqlite3 **)(pBlob + 0x14)" identifier = (pointer_expression "*(sqlite3 **)(pBlob + 0x14)" * (cast_expression "(sqlite3 **)(pBlob + 0x14)" ( (type_descriptor "sqlite3 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(pBlob + 0x14)" ( (binary_expression "pBlob + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n    }" if (parenthesized_expression "(db->mutex != (sqlite3_mutex *)0x0)" ( (binary_expression "db->mutex != (sqlite3_mutex *)0x0" (field_expression "db->mutex" identifier -> field_identifier) != (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      (*sqlite3Config.mutex.xMutexEnter)(db->mutex);\n    }" { (expression_statement "(*sqlite3Config.mutex.xMutexEnter)(db->mutex);" (call_expression "(*sqlite3Config.mutex.xMutexEnter)(db->mutex)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexEnter)" ( (pointer_expression "*sqlite3Config.mutex.xMutexEnter" * (field_expression "sqlite3Config.mutex.xMutexEnter" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) })) (expression_statement "iVar1 = sqlite3_finalize(*(sqlite3_stmt **)(pBlob + 0x10));" (assignment_expression "iVar1 = sqlite3_finalize(*(sqlite3_stmt **)(pBlob + 0x10))" identifier = (call_expression "sqlite3_finalize(*(sqlite3_stmt **)(pBlob + 0x10))" identifier (argument_list "(*(sqlite3_stmt **)(pBlob + 0x10))" ( (pointer_expression "*(sqlite3_stmt **)(pBlob + 0x10)" * (cast_expression "(sqlite3_stmt **)(pBlob + 0x10)" ( (type_descriptor "sqlite3_stmt **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(pBlob + 0x10)" ( (binary_expression "pBlob + 0x10" identifier + number_literal) )))) )))) ;) (if_statement "if (db->pnBytesFreed == (int *)0x0) {\n      sqlite3_free(pBlob);\n    }\n    else {\n      measureAllocationSize(db,pBlob);\n    }" if (parenthesized_expression "(db->pnBytesFreed == (int *)0x0)" ( (binary_expression "db->pnBytesFreed == (int *)0x0" (field_expression "db->pnBytesFreed" identifier -> field_identifier) == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      sqlite3_free(pBlob);\n    }" { (expression_statement "sqlite3_free(pBlob);" (call_expression "sqlite3_free(pBlob)" identifier (argument_list "(pBlob)" ( identifier ))) ;) }) (else_clause "else {\n      measureAllocationSize(db,pBlob);\n    }" else (compound_statement "{\n      measureAllocationSize(db,pBlob);\n    }" { (expression_statement "measureAllocationSize(db,pBlob);" (call_expression "measureAllocationSize(db,pBlob)" identifier (argument_list "(db,pBlob)" ( identifier , identifier ))) ;) }))) (if_statement "if (db->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n    }" if (parenthesized_expression "(db->mutex != (sqlite3_mutex *)0x0)" ( (binary_expression "db->mutex != (sqlite3_mutex *)0x0" (field_expression "db->mutex" identifier -> field_identifier) != (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      (*sqlite3Config.mutex.xMutexLeave)(db->mutex);\n    }" { (expression_statement "(*sqlite3Config.mutex.xMutexLeave)(db->mutex);" (call_expression "(*sqlite3Config.mutex.xMutexLeave)(db->mutex)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexLeave)" ( (pointer_expression "*sqlite3Config.mutex.xMutexLeave" * (field_expression "sqlite3Config.mutex.xMutexLeave" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 FUN_000c0610(int param_1)\n\n{\n  int iVar1;\n  int unaff_EBP;\n  undefined4 uVar2;\n  \n  FUN_0003a405();\n  uVar2 = 0;\n  if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 FUN_000c0610(int param_1)\n\n{\n  int iVar1;\n  int unaff_EBP;\n  undefined4 uVar2;\n  \n  FUN_0003a405();\n  uVar2 = 0;\n  if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_000c0610(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int unaff_EBP;\n  undefined4 uVar2;\n  \n  FUN_0003a405();\n  uVar2 = 0;\n  if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "FUN_0003a405();" (call_expression "FUN_0003a405()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }" { (expression_statement "iVar1 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x14)" identifier = (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" { (expression_statement "(**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));" (call_expression "(**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc))" (parenthesized_expression "(**(code **)(&UNK_000fae26 + unaff_EBP))" ( (pointer_expression "**(code **)(&UNK_000fae26 + unaff_EBP)" * (pointer_expression "*(code **)(&UNK_000fae26 + unaff_EBP)" * (cast_expression "(code **)(&UNK_000fae26 + unaff_EBP)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_000fae26 + unaff_EBP)" ( (binary_expression "&UNK_000fae26 + unaff_EBP" (pointer_expression "&UNK_000fae26" & identifier) + identifier) ))))) )) (argument_list "(*(int *)(iVar1 + 0xc))" ( (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) ))) ;) })) (expression_statement "uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));" (assignment_expression "uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10))" identifier = (call_expression "FUN_000c0450(*(undefined4 *)(param_1 + 0x10))" identifier (argument_list "(*(undefined4 *)(param_1 + 0x10))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) )))) ;) (if_statement "if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0x1e0) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x1e0) == 0" (pointer_expression "*(int *)(iVar1 + 0x1e0)" * (cast_expression "(int *)(iVar1 + 0x1e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1e0)" ( (binary_expression "iVar1 + 0x1e0" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      FUN_00044000(param_1);\n    }" { (expression_statement "FUN_00044000(param_1);" (call_expression "FUN_00044000(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) }) (else_clause "else {\n      FUN_0003a540();\n    }" else (compound_statement "{\n      FUN_0003a540();\n    }" { (expression_statement "FUN_0003a540();" (call_expression "FUN_0003a540()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" { (expression_statement "(**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));" (call_expression "(**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc))" (parenthesized_expression "(**(code **)(&UNK_000fae2e + unaff_EBP))" ( (pointer_expression "**(code **)(&UNK_000fae2e + unaff_EBP)" * (pointer_expression "*(code **)(&UNK_000fae2e + unaff_EBP)" * (cast_expression "(code **)(&UNK_000fae2e + unaff_EBP)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_000fae2e + unaff_EBP)" ( (binary_expression "&UNK_000fae2e + unaff_EBP" (pointer_expression "&UNK_000fae2e" & identifier) + identifier) ))))) )) (argument_list "(*(int *)(iVar1 + 0xc))" ( (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) ))) ;) })) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_000c0610(int param_1)\n\n{\n  int iVar1;\n  int unaff_EBP;\n  undefined4 uVar2;\n  \n  FUN_0003a405();\n  uVar2 = 0;\n  if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "FUN_000c0610(int param_1)" (identifier "FUN_000c0610") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int unaff_EBP;\n  undefined4 uVar2;\n  \n  FUN_0003a405();\n  uVar2 = 0;\n  if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int unaff_EBP;" (primitive_type "int") (identifier "unaff_EBP") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "FUN_0003a405();" (call_expression "FUN_0003a405()" (identifier "FUN_0003a405") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_1 != 0) {\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = *(int *)(param_1 + 0x14);\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));\n    if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }\n  }" ({ "{") (expression_statement "iVar1 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x14)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" ({ "{") (expression_statement "(**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));" (call_expression "(**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc))" (parenthesized_expression "(**(code **)(&UNK_000fae26 + unaff_EBP))" (( "(") (pointer_expression "**(code **)(&UNK_000fae26 + unaff_EBP)" (* "*") (pointer_expression "*(code **)(&UNK_000fae26 + unaff_EBP)" (* "*") (cast_expression "(code **)(&UNK_000fae26 + unaff_EBP)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(&UNK_000fae26 + unaff_EBP)" (( "(") (binary_expression "&UNK_000fae26 + unaff_EBP" (pointer_expression "&UNK_000fae26" (& "&") (identifier "UNK_000fae26")) (+ "+") (identifier "unaff_EBP")) () ")"))))) () ")")) (argument_list "(*(int *)(iVar1 + 0xc))" (( "(") (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));" (assignment_expression "uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10))" (identifier "uVar2") (= "=") (call_expression "FUN_000c0450(*(undefined4 *)(param_1 + 0x10))" (identifier "FUN_000c0450") (argument_list "(*(undefined4 *)(param_1 + 0x10))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) () ")")))) (; ";")) (if_statement "if (*(int *)(iVar1 + 0x1e0) == 0) {\n      FUN_00044000(param_1);\n    }\n    else {\n      FUN_0003a540();\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0x1e0) == 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0x1e0) == 0" (pointer_expression "*(int *)(iVar1 + 0x1e0)" (* "*") (cast_expression "(int *)(iVar1 + 0x1e0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x1e0)" (( "(") (binary_expression "iVar1 + 0x1e0" (identifier "iVar1") (+ "+") (number_literal "0x1e0")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00044000(param_1);\n    }" ({ "{") (expression_statement "FUN_00044000(param_1);" (call_expression "FUN_00044000(param_1)" (identifier "FUN_00044000") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}")) (else_clause "else {\n      FUN_0003a540();\n    }" (else "else") (compound_statement "{\n      FUN_0003a540();\n    }" ({ "{") (expression_statement "FUN_0003a540();" (call_expression "FUN_0003a540()" (identifier "FUN_0003a540") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));\n    }" ({ "{") (expression_statement "(**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));" (call_expression "(**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc))" (parenthesized_expression "(**(code **)(&UNK_000fae2e + unaff_EBP))" (( "(") (pointer_expression "**(code **)(&UNK_000fae2e + unaff_EBP)" (* "*") (pointer_expression "*(code **)(&UNK_000fae2e + unaff_EBP)" (* "*") (cast_expression "(code **)(&UNK_000fae2e + unaff_EBP)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(&UNK_000fae2e + unaff_EBP)" (( "(") (binary_expression "&UNK_000fae2e + unaff_EBP" (pointer_expression "&UNK_000fae2e" (& "&") (identifier "UNK_000fae2e")) (+ "+") (identifier "unaff_EBP")) () ")"))))) () ")")) (argument_list "(*(int *)(iVar1 + 0xc))" (( "(") (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

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

int function_1(type_1 *var_1)

{
  type_2 *db;
  int iVar1;
  
  iVar1 = 0;
  if (var_1 != (type_1 *)0x0) {
    db = *(type_2 **)(var_1 + 0x14);
    if (db->mutex != (type_3 *)0x0) {
      (*sqlite3Config.mutex.xMutexEnter)(db->mutex);
    }
    iVar1 = var_2(*(type_4 **)(var_1 + 0x10));
    if (db->pnBytesFreed == (int *)0x0) {
      var_3(var_1);
    }
    else {
      var_4(db,var_1);
    }
    if (db->mutex != (type_3 *)0x0) {
      (*sqlite3Config.mutex.xMutexLeave)(db->mutex);
    }
  }
  return iVar1;
}


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

undefined4 MASKED(int param_1)

{
  int iVar1;
  int unaff_EBP;
  undefined4 uVar2;
  
  FUN_0003a405();
  uVar2 = 0;
  if (param_1 != 0) {
    iVar1 = *(int *)(param_1 + 0x14);
    if (*(int *)(iVar1 + 0xc) != 0) {
      (**(code **)(&UNK_000fae26 + unaff_EBP))(*(int *)(iVar1 + 0xc));
    }
    uVar2 = FUN_000c0450(*(undefined4 *)(param_1 + 0x10));
    if (*(int *)(iVar1 + 0x1e0) == 0) {
      FUN_00044000(param_1);
    }
    else {
      FUN_0003a540();
    }
    if (*(int *)(iVar1 + 0xc) != 0) {
      (**(code **)(&UNK_000fae2e + unaff_EBP))(*(int *)(iVar1 + 0xc));
    }
  }
  return uVar2;
}

