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

int sqlite3_create_function
              (sqlite3 *db,char *zFunc,int nArg,int enc,void *p,
              _func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xSFunc,
              _func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xStep,
              _func_void_sqlite3_context_ptr *xFinal)

{
  uint uVar1;
  
  sqlite3_mutex_enter(db->mutex);
  uVar1 = sqlite3CreateFunc(db,zFunc,nArg,enc,p,xSFunc,xStep,xFinal,
                            (_func_void_sqlite3_context_ptr *)0x0,
                            (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,
                            (FuncDestructor *)0x0);
  if ((db->mallocFailed == '\0') && (uVar1 != 0xc0a)) {
    uVar1 = uVar1 & db->errMask;
  }
  else {
    uVar1 = apiOomError(db);
  }
  sqlite3_mutex_leave(db->mutex);
  return uVar1;
}



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

uint sqlite3_create_function
               (int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)

{
  uint uVar1;
  
  sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));
  uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);
  if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {
    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);
  }
  else {
    uVar1 = FUN_0002ad10();
  }
  sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));
  return uVar1;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x10]
CALL 0x0001ddf0
ADD EBX,0xb53e4
SUB ESP,0xc
PUSH dword ptr [ESI + 0xc]
CALL 0x000168d0
PUSH 0x0
PUSH 0x0
MOV EAX,ESI
PUSH 0x0
PUSH dword ptr [ESP + 0x48]
PUSH dword ptr [ESP + 0x48]
PUSH dword ptr [ESP + 0x48]
PUSH dword ptr [ESP + 0x48]
PUSH dword ptr [ESP + 0x48]
MOV ECX,dword ptr [ESP + 0x48]
MOV EDX,dword ptr [ESP + 0x44]
CALL 0x00050620
ADD ESP,0x30
CMP byte ptr [ESI + 0x4d],0x0
JNZ 0x00050c70
CMP EAX,0xc0a
JZ 0x00050c70
AND EAX,dword ptr [ESI + 0x40]
MOV EDI,EAX
JMP 0x00050c79
MOV EAX,ESI
CALL 0x0002ad10
MOV EDI,EAX
SUB ESP,0xc
PUSH dword ptr [ESI + 0xc]
CALL 0x00016830
ADD ESP,0x10
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint sqlite3_create_function\n               (int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)\n\n{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));\n  uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);\n  if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }\n  sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));\n  return uVar1;\n}\n\n" comment (function_definition "uint sqlite3_create_function\n               (int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)\n\n{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));\n  uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);\n  if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }\n  sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));\n  return uVar1;\n}" type_identifier (function_declarator "sqlite3_create_function\n               (int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined4 param_8" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));\n  uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);\n  if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }\n  sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));" (call_expression "sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (expression_statement "uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);" (assignment_expression "uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0)" identifier = (call_expression "FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0)" identifier (argument_list "(param_4,param_5,param_6,param_7,param_8,0,0,0)" ( identifier , identifier , identifier , identifier , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }" if (parenthesized_expression "((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a))" ( (binary_expression "(*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)" (parenthesized_expression "(*(char *)(param_1 + 0x4d) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x4d) == '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" * (cast_expression "(char *)(param_1 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4d)" ( (binary_expression "param_1 + 0x4d" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(uVar1 != 0xc0a)" ( (binary_expression "uVar1 != 0xc0a" identifier != number_literal) ))) )) (compound_statement "{\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }" { (expression_statement "uVar1 = uVar1 & *(uint *)(param_1 + 0x40);" (assignment_expression "uVar1 = uVar1 & *(uint *)(param_1 + 0x40)" identifier = (binary_expression "uVar1 & *(uint *)(param_1 + 0x40)" identifier & (pointer_expression "*(uint *)(param_1 + 0x40)" * (cast_expression "(uint *)(param_1 + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))))) ;) }) (else_clause "else {\n    uVar1 = FUN_0002ad10();\n  }" else (compound_statement "{\n    uVar1 = FUN_0002ad10();\n  }" { (expression_statement "uVar1 = FUN_0002ad10();" (assignment_expression "uVar1 = FUN_0002ad10()" identifier = (call_expression "FUN_0002ad10()" identifier (argument_list "()" ( )))) ;) }))) (expression_statement "sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));" (call_expression "sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint sqlite3_create_function\n              (sqlite3 *db,char *zFunc,int nArg,int enc,void *p,\n              _func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xSFunc,\n              _func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xStep,\n              _func_void_sqlite3_context_ptr *xFinal)\n\n{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(db->mutex);\n  uVar1 = sqlite3CreateFunc(db,zFunc,nArg,enc,p,xSFunc,xStep,xFinal,\n                            (_func_void_sqlite3_context_ptr *)0x0,\n                            (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                            (FuncDestructor *)0x0);\n  if ((db->mallocFailed == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & db->errMask;\n  }\n  else {\n    uVar1 = apiOomError(db);\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return uVar1;\n}\n\n" comment comment (function_definition "int sqlite3_create_function\n              (sqlite3 *db,char *zFunc,int nArg,int enc,void *p,\n              _func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xSFunc,\n              _func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xStep,\n              _func_void_sqlite3_context_ptr *xFinal)\n\n{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(db->mutex);\n  uVar1 = sqlite3CreateFunc(db,zFunc,nArg,enc,p,xSFunc,xStep,xFinal,\n                            (_func_void_sqlite3_context_ptr *)0x0,\n                            (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                            (FuncDestructor *)0x0);\n  if ((db->mallocFailed == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & db->errMask;\n  }\n  else {\n    uVar1 = apiOomError(db);\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return uVar1;\n}" primitive_type (function_declarator "sqlite3_create_function\n              (sqlite3 *db,char *zFunc,int nArg,int enc,void *p,\n              _func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xSFunc,\n              _func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xStep,\n              _func_void_sqlite3_context_ptr *xFinal)" identifier (parameter_list "(sqlite3 *db,char *zFunc,int nArg,int enc,void *p,\n              _func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xSFunc,\n              _func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xStep,\n              _func_void_sqlite3_context_ptr *xFinal)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "char *zFunc" primitive_type (pointer_declarator "*zFunc" * identifier)) , (parameter_declaration "int nArg" primitive_type identifier) , (parameter_declaration "int enc" primitive_type identifier) , (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) , (parameter_declaration "_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xSFunc" type_identifier (pointer_declarator "*xSFunc" * identifier)) , (parameter_declaration "_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *xStep" type_identifier (pointer_declarator "*xStep" * identifier)) , (parameter_declaration "_func_void_sqlite3_context_ptr *xFinal" type_identifier (pointer_declarator "*xFinal" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(db->mutex);\n  uVar1 = sqlite3CreateFunc(db,zFunc,nArg,enc,p,xSFunc,xStep,xFinal,\n                            (_func_void_sqlite3_context_ptr *)0x0,\n                            (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                            (FuncDestructor *)0x0);\n  if ((db->mallocFailed == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & db->errMask;\n  }\n  else {\n    uVar1 = apiOomError(db);\n  }\n  sqlite3_mutex_leave(db->mutex);\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "sqlite3_mutex_enter(db->mutex);" (call_expression "sqlite3_mutex_enter(db->mutex)" identifier (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) (expression_statement "uVar1 = sqlite3CreateFunc(db,zFunc,nArg,enc,p,xSFunc,xStep,xFinal,\n                            (_func_void_sqlite3_context_ptr *)0x0,\n                            (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                            (FuncDestructor *)0x0);" (assignment_expression "uVar1 = sqlite3CreateFunc(db,zFunc,nArg,enc,p,xSFunc,xStep,xFinal,\n                            (_func_void_sqlite3_context_ptr *)0x0,\n                            (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                            (FuncDestructor *)0x0)" identifier = (call_expression "sqlite3CreateFunc(db,zFunc,nArg,enc,p,xSFunc,xStep,xFinal,\n                            (_func_void_sqlite3_context_ptr *)0x0,\n                            (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                            (FuncDestructor *)0x0)" identifier (argument_list "(db,zFunc,nArg,enc,p,xSFunc,xStep,xFinal,\n                            (_func_void_sqlite3_context_ptr *)0x0,\n                            (_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0,\n                            (FuncDestructor *)0x0)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , (cast_expression "(_func_void_sqlite3_context_ptr *)0x0" ( (type_descriptor "_func_void_sqlite3_context_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *)0x0" ( (type_descriptor "_func_void_sqlite3_context_ptr_int_sqlite3_value_ptr_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(FuncDestructor *)0x0" ( (type_descriptor "FuncDestructor *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (if_statement "if ((db->mallocFailed == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & db->errMask;\n  }\n  else {\n    uVar1 = apiOomError(db);\n  }" if (parenthesized_expression "((db->mallocFailed == '\0') && (uVar1 != 0xc0a))" ( (binary_expression "(db->mallocFailed == '\0') && (uVar1 != 0xc0a)" (parenthesized_expression "(db->mallocFailed == '\0')" ( (binary_expression "db->mallocFailed == '\0'" (field_expression "db->mallocFailed" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(uVar1 != 0xc0a)" ( (binary_expression "uVar1 != 0xc0a" identifier != number_literal) ))) )) (compound_statement "{\n    uVar1 = uVar1 & db->errMask;\n  }" { (expression_statement "uVar1 = uVar1 & db->errMask;" (assignment_expression "uVar1 = uVar1 & db->errMask" identifier = (binary_expression "uVar1 & db->errMask" identifier & (field_expression "db->errMask" identifier -> field_identifier))) ;) }) (else_clause "else {\n    uVar1 = apiOomError(db);\n  }" else (compound_statement "{\n    uVar1 = apiOomError(db);\n  }" { (expression_statement "uVar1 = apiOomError(db);" (assignment_expression "uVar1 = apiOomError(db)" identifier = (call_expression "apiOomError(db)" identifier (argument_list "(db)" ( identifier )))) ;) }))) (expression_statement "sqlite3_mutex_leave(db->mutex);" (call_expression "sqlite3_mutex_leave(db->mutex)" identifier (argument_list "(db->mutex)" ( (field_expression "db->mutex" identifier -> field_identifier) ))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "uint sqlite3_create_function\n               (int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)\n\n{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));\n  uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);\n  if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }\n  sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));\n  return uVar1;\n}\n\n" (function_definition "uint sqlite3_create_function\n               (int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)\n\n{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));\n  uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);\n  if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }\n  sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));\n  return uVar1;\n}" type_identifier (function_declarator "sqlite3_create_function\n               (int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined4 param_8" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));\n  uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);\n  if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }\n  sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));\n  return uVar1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));" (call_expression "sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (expression_statement "uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);" (assignment_expression "uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0)" identifier = (call_expression "FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0)" identifier (argument_list "(param_4,param_5,param_6,param_7,param_8,0,0,0)" ( identifier , identifier , identifier , identifier , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }" if (parenthesized_expression "((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a))" ( (binary_expression "(*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)" (parenthesized_expression "(*(char *)(param_1 + 0x4d) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x4d) == '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" * (cast_expression "(char *)(param_1 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4d)" ( (binary_expression "param_1 + 0x4d" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(uVar1 != 0xc0a)" ( (binary_expression "uVar1 != 0xc0a" identifier != number_literal) ))) )) (compound_statement "{\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }" { (expression_statement "uVar1 = uVar1 & *(uint *)(param_1 + 0x40);" (assignment_expression "uVar1 = uVar1 & *(uint *)(param_1 + 0x40)" identifier = (binary_expression "uVar1 & *(uint *)(param_1 + 0x40)" identifier & (pointer_expression "*(uint *)(param_1 + 0x40)" * (cast_expression "(uint *)(param_1 + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))))) ;) }) (else_clause "else {\n    uVar1 = FUN_0002ad10();\n  }" else (compound_statement "{\n    uVar1 = FUN_0002ad10();\n  }" { (expression_statement "uVar1 = FUN_0002ad10();" (assignment_expression "uVar1 = FUN_0002ad10()" identifier = (call_expression "FUN_0002ad10()" identifier (argument_list "()" ( )))) ;) }))) (expression_statement "sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));" (call_expression "sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc))" identifier (argument_list "(*(undefined4 *)(param_1 + 0xc))" ( (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) ))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (call_expression 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 ( IDENT , IDENT , IDENT , IDENT , IDENT , LIT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT & (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) }))) (expression_statement (call_expression 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 "uint sqlite3_create_function\n               (int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)\n\n{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));\n  uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);\n  if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }\n  sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));\n  return uVar1;\n}" (type_identifier "uint") (function_declarator "sqlite3_create_function\n               (int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)" (identifier "sqlite3_create_function") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "undefined4 param_6" (type_identifier "undefined4") (identifier "param_6")) (, ",") (parameter_declaration "undefined4 param_7" (type_identifier "undefined4") (identifier "param_7")) (, ",") (parameter_declaration "undefined4 param_8" (type_identifier "undefined4") (identifier "param_8")) () ")"))) (compound_statement "{\n  uint uVar1;\n  \n  sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));\n  uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);\n  if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }\n  sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));\n  return uVar1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (expression_statement "sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));" (call_expression "sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc))" (identifier "sqlite3_mutex_enter") (argument_list "(*(undefined4 *)(param_1 + 0xc))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (expression_statement "uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);" (assignment_expression "uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0)" (identifier "uVar1") (= "=") (call_expression "FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0)" (identifier "FUN_00050620") (argument_list "(param_4,param_5,param_6,param_7,param_8,0,0,0)" (( "(") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (identifier "param_6") (, ",") (identifier "param_7") (, ",") (identifier "param_8") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }\n  else {\n    uVar1 = FUN_0002ad10();\n  }" (if "if") (parenthesized_expression "((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a))" (( "(") (binary_expression "(*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)" (parenthesized_expression "(*(char *)(param_1 + 0x4d) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x4d) == '\0'" (pointer_expression "*(char *)(param_1 + 0x4d)" (* "*") (cast_expression "(char *)(param_1 + 0x4d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4d)" (( "(") (binary_expression "param_1 + 0x4d" (identifier "param_1") (+ "+") (number_literal "0x4d")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(uVar1 != 0xc0a)" (( "(") (binary_expression "uVar1 != 0xc0a" (identifier "uVar1") (!= "!=") (number_literal "0xc0a")) () ")"))) () ")")) (compound_statement "{\n    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);\n  }" ({ "{") (expression_statement "uVar1 = uVar1 & *(uint *)(param_1 + 0x40);" (assignment_expression "uVar1 = uVar1 & *(uint *)(param_1 + 0x40)" (identifier "uVar1") (= "=") (binary_expression "uVar1 & *(uint *)(param_1 + 0x40)" (identifier "uVar1") (& "&") (pointer_expression "*(uint *)(param_1 + 0x40)" (* "*") (cast_expression "(uint *)(param_1 + 0x40)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))))) (; ";")) (} "}")) (else_clause "else {\n    uVar1 = FUN_0002ad10();\n  }" (else "else") (compound_statement "{\n    uVar1 = FUN_0002ad10();\n  }" ({ "{") (expression_statement "uVar1 = FUN_0002ad10();" (assignment_expression "uVar1 = FUN_0002ad10()" (identifier "uVar1") (= "=") (call_expression "FUN_0002ad10()" (identifier "FUN_0002ad10") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")))) (expression_statement "sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));" (call_expression "sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc))" (identifier "sqlite3_mutex_leave") (argument_list "(*(undefined4 *)(param_1 + 0xc))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

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

int function_1
              (type_1 *db,char *zFunc,int nArg,int enc,void *p,
              type_2 *xSFunc,
              type_2 *xStep,
              type_3 *xFinal)

{
  type_4 var_3;
  
  var_1(db->mutex);
  var_3 = var_2(db,zFunc,nArg,enc,p,xSFunc,xStep,xFinal,
                            (type_3 *)0x0,
                            (type_2 *)0x0,
                            (type_5 *)0x0);
  if ((db->mallocFailed == '\0') && (var_3 != 0xc0a)) {
    var_3 = var_3 & db->errMask;
  }
  else {
    var_3 = var_4(db);
  }
  var_5(db->mutex);
  return var_3;
}


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

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

uint MASKED
               (int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
               undefined4 param_5,undefined4 param_6,undefined4 param_7,undefined4 param_8)

{
  uint uVar1;
  
  sqlite3_mutex_enter(*(undefined4 *)(param_1 + 0xc));
  uVar1 = FUN_00050620(param_4,param_5,param_6,param_7,param_8,0,0,0);
  if ((*(char *)(param_1 + 0x4d) == '\0') && (uVar1 != 0xc0a)) {
    uVar1 = uVar1 & *(uint *)(param_1 + 0x40);
  }
  else {
    uVar1 = FUN_0002ad10();
  }
  sqlite3_mutex_leave(*(undefined4 *)(param_1 + 0xc));
  return uVar1;
}

