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

int __regparm3 vdbeSafetyNotNull(Vdbe *p)

{
  char *zFormat;
  
  if (p == (Vdbe *)0x0) {
    zFormat = "API called with NULL prepared statement";
  }
  else {
    if (p->db != (sqlite3 *)0x0) {
      return 0;
    }
    zFormat = "API called with finalized prepared statement";
  }
  sqlite3_log(0x15,zFormat);
  return 1;
}



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

undefined4 __regparm3 FUN_00055f10(int *param_1)

{
  char *pcVar1;
  
  if (param_1 == (int *)0x0) {
    pcVar1 = "API called with NULL prepared statement";
  }
  else {
    if (*param_1 != 0) {
      return 0;
    }
    pcVar1 = "API called with finalized prepared statement";
  }
  FUN_00050b70(0x15,pcVar1);
  return 1;
}


PUSH EBX
CALL 0x00014cf0
ADD EBX,0xf2fbe
SUB ESP,0x8
TEST EAX,EAX
JZ 0x00055f38
MOV EDX,EAX
XOR EAX,EAX
MOV EDX,dword ptr [EDX]
TEST EDX,EDX
JZ 0x00055f60
ADD ESP,0x8
POP EBX
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffb9e84]
PUSH EAX
PUSH 0x15
CALL 0x00050b70
ADD ESP,0x10
MOV EAX,0x1
ADD ESP,0x8
POP EBX
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffb9eac]
JMP 0x00055f41
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_00055f10(int *param_1)\n\n{\n  char *pcVar1;\n  \n  if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }\n  FUN_00050b70(0x15,pcVar1);\n  return 1;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_00055f10(int *param_1)\n\n{\n  char *pcVar1;\n  \n  if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }\n  FUN_00050b70(0x15,pcVar1);\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00055f10(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  \n  if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }\n  FUN_00050b70(0x15,pcVar1);\n  return 1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (if_statement "if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }" if (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar1 = "API called with NULL prepared statement";\n  }" { (expression_statement "pcVar1 = "API called with NULL prepared statement";" (assignment_expression "pcVar1 = "API called with NULL prepared statement"" identifier = (string_literal ""API called with NULL prepared statement"" " string_content ")) ;) }) (else_clause "else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }" else (compound_statement "{\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }" { (if_statement "if (*param_1 != 0) {\n      return 0;\n    }" if (parenthesized_expression "(*param_1 != 0)" ( (binary_expression "*param_1 != 0" (pointer_expression "*param_1" * identifier) != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "pcVar1 = "API called with finalized prepared statement";" (assignment_expression "pcVar1 = "API called with finalized prepared statement"" identifier = (string_literal ""API called with finalized prepared statement"" " string_content ")) ;) }))) (expression_statement "FUN_00050b70(0x15,pcVar1);" (call_expression "FUN_00050b70(0x15,pcVar1)" identifier (argument_list "(0x15,pcVar1)" ( number_literal , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 vdbeSafetyNotNull(Vdbe *p)\n\n{\n  char *zFormat;\n  \n  if (p == (Vdbe *)0x0) {\n    zFormat = "API called with NULL prepared statement";\n  }\n  else {\n    if (p->db != (sqlite3 *)0x0) {\n      return 0;\n    }\n    zFormat = "API called with finalized prepared statement";\n  }\n  sqlite3_log(0x15,zFormat);\n  return 1;\n}\n\n" comment (function_definition "int __regparm3 vdbeSafetyNotNull(Vdbe *p)\n\n{\n  char *zFormat;\n  \n  if (p == (Vdbe *)0x0) {\n    zFormat = "API called with NULL prepared statement";\n  }\n  else {\n    if (p->db != (sqlite3 *)0x0) {\n      return 0;\n    }\n    zFormat = "API called with finalized prepared statement";\n  }\n  sqlite3_log(0x15,zFormat);\n  return 1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "vdbeSafetyNotNull(Vdbe *p)" identifier (parameter_list "(Vdbe *p)" ( (parameter_declaration "Vdbe *p" type_identifier (pointer_declarator "*p" * identifier)) ))) (compound_statement "{\n  char *zFormat;\n  \n  if (p == (Vdbe *)0x0) {\n    zFormat = "API called with NULL prepared statement";\n  }\n  else {\n    if (p->db != (sqlite3 *)0x0) {\n      return 0;\n    }\n    zFormat = "API called with finalized prepared statement";\n  }\n  sqlite3_log(0x15,zFormat);\n  return 1;\n}" { (declaration "char *zFormat;" primitive_type (pointer_declarator "*zFormat" * identifier) ;) (if_statement "if (p == (Vdbe *)0x0) {\n    zFormat = "API called with NULL prepared statement";\n  }\n  else {\n    if (p->db != (sqlite3 *)0x0) {\n      return 0;\n    }\n    zFormat = "API called with finalized prepared statement";\n  }" if (parenthesized_expression "(p == (Vdbe *)0x0)" ( (binary_expression "p == (Vdbe *)0x0" identifier == (cast_expression "(Vdbe *)0x0" ( (type_descriptor "Vdbe *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    zFormat = "API called with NULL prepared statement";\n  }" { (expression_statement "zFormat = "API called with NULL prepared statement";" (assignment_expression "zFormat = "API called with NULL prepared statement"" identifier = (string_literal ""API called with NULL prepared statement"" " string_content ")) ;) }) (else_clause "else {\n    if (p->db != (sqlite3 *)0x0) {\n      return 0;\n    }\n    zFormat = "API called with finalized prepared statement";\n  }" else (compound_statement "{\n    if (p->db != (sqlite3 *)0x0) {\n      return 0;\n    }\n    zFormat = "API called with finalized prepared statement";\n  }" { (if_statement "if (p->db != (sqlite3 *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(p->db != (sqlite3 *)0x0)" ( (binary_expression "p->db != (sqlite3 *)0x0" (field_expression "p->db" identifier -> field_identifier) != (cast_expression "(sqlite3 *)0x0" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "zFormat = "API called with finalized prepared statement";" (assignment_expression "zFormat = "API called with finalized prepared statement"" identifier = (string_literal ""API called with finalized prepared statement"" " string_content ")) ;) }))) (expression_statement "sqlite3_log(0x15,zFormat);" (call_expression "sqlite3_log(0x15,zFormat)" identifier (argument_list "(0x15,zFormat)" ( number_literal , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined4 __regparm3 FUN_00055f10(int *param_1)\n\n{\n  char *pcVar1;\n  \n  if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }\n  FUN_00050b70(0x15,pcVar1);\n  return 1;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_00055f10(int *param_1)\n\n{\n  char *pcVar1;\n  \n  if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }\n  FUN_00050b70(0x15,pcVar1);\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00055f10(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  \n  if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }\n  FUN_00050b70(0x15,pcVar1);\n  return 1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (if_statement "if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }" if (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar1 = "API called with NULL prepared statement";\n  }" { (expression_statement "pcVar1 = "API called with NULL prepared statement";" (assignment_expression "pcVar1 = "API called with NULL prepared statement"" identifier = (string_literal ""API called with NULL prepared statement"" " string_content ")) ;) }) (else_clause "else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }" else (compound_statement "{\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }" { (if_statement "if (*param_1 != 0) {\n      return 0;\n    }" if (parenthesized_expression "(*param_1 != 0)" ( (binary_expression "*param_1 != 0" (pointer_expression "*param_1" * identifier) != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "pcVar1 = "API called with finalized prepared statement";" (assignment_expression "pcVar1 = "API called with finalized prepared statement"" identifier = (string_literal ""API called with finalized prepared statement"" " string_content ")) ;) }))) (expression_statement "FUN_00050b70(0x15,pcVar1);" (call_expression "FUN_00050b70(0x15,pcVar1)" identifier (argument_list "(0x15,pcVar1)" ( number_literal , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }))) (expression_statement (call_expression IDENT (argument_list ( LIT , IDENT ))) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3 FUN_00055f10(int *param_1)\n\n{\n  char *pcVar1;\n  \n  if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }\n  FUN_00050b70(0x15,pcVar1);\n  return 1;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00055f10(int *param_1)" (identifier "FUN_00055f10") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  char *pcVar1;\n  \n  if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }\n  FUN_00050b70(0x15,pcVar1);\n  return 1;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (if_statement "if (param_1 == (int *)0x0) {\n    pcVar1 = "API called with NULL prepared statement";\n  }\n  else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }" (if "if") (parenthesized_expression "(param_1 == (int *)0x0)" (( "(") (binary_expression "param_1 == (int *)0x0" (identifier "param_1") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pcVar1 = "API called with NULL prepared statement";\n  }" ({ "{") (expression_statement "pcVar1 = "API called with NULL prepared statement";" (assignment_expression "pcVar1 = "API called with NULL prepared statement"" (identifier "pcVar1") (= "=") (string_literal ""API called with NULL prepared statement"" (" """) (string_content "API called with NULL prepared statement") (" """))) (; ";")) (} "}")) (else_clause "else {\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }" (else "else") (compound_statement "{\n    if (*param_1 != 0) {\n      return 0;\n    }\n    pcVar1 = "API called with finalized prepared statement";\n  }" ({ "{") (if_statement "if (*param_1 != 0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(*param_1 != 0)" (( "(") (binary_expression "*param_1 != 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "pcVar1 = "API called with finalized prepared statement";" (assignment_expression "pcVar1 = "API called with finalized prepared statement"" (identifier "pcVar1") (= "=") (string_literal ""API called with finalized prepared statement"" (" """) (string_content "API called with finalized prepared statement") (" """))) (; ";")) (} "}")))) (expression_statement "FUN_00050b70(0x15,pcVar1);" (call_expression "FUN_00050b70(0x15,pcVar1)" (identifier "FUN_00050b70") (argument_list "(0x15,pcVar1)" (( "(") (number_literal "0x15") (, ",") (identifier "pcVar1") () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 *var_1)

{
  char *zFormat;
  
  if (var_1 == (type_1 *)0x0) {
    zFormat = "API called with NULL prepared statement";
  }
  else {
    if (var_1->db != (type_2 *)0x0) {
      return 0;
    }
    zFormat = "API called with finalized prepared statement";
  }
  var_2(0x15,zFormat);
  return 1;
}


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

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

undefined4 __regparm3 MASKED(int *param_1)

{
  char *pcVar1;
  
  if (param_1 == (int *)0x0) {
    pcVar1 = "API called with NULL prepared statement";
  }
  else {
    if (*param_1 != 0) {
      return 0;
    }
    pcVar1 = "API called with finalized prepared statement";
  }
  FUN_00050b70(0x15,pcVar1);
  return 1;
}

