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

int __regparm3
fts3FunctionArg(sqlite3_context *pContext,char *zFunc,sqlite3_value *pVal,Fts3Cursor **ppCsr)

{
  Fts3Cursor *pFVar1;
  char *z;
  
  pFVar1 = (Fts3Cursor *)sqlite3_value_pointer(pVal,"fts3cursor");
  *ppCsr = pFVar1;
  if (pFVar1 != (Fts3Cursor *)0x0) {
    return 0;
  }
  z = sqlite3_mprintf("illegal first argument to %s",zFunc);
  sqlite3_result_error(pContext,z,-1);
  sqlite3_free(z);
  return 1;
}



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

undefined4 __regparm3
FUN_00076990(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = FUN_00021e70(param_3,"fts3cursor");
  *param_4 = iVar1;
  if (iVar1 != 0) {
    return 0;
  }
  uVar2 = FUN_00071090("illegal first argument to %s",param_2);
  FUN_000457b0(param_1,uVar2,0xffffffff);
  FUN_00024cc0(uVar2);
  return 1;
}


PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00014cf0
ADD EBX,0xd2538
SUB ESP,0x8
LEA EAX,[EBX + 0xfffae504]
PUSH EAX
PUSH ECX
CALL 0x00021e70
MOV EDX,dword ptr [ESP + 0x20]
ADD ESP,0x10
MOV dword ptr [EDX],EAX
TEST EAX,EAX
JZ 0x000769c8
POP EBX
XOR EAX,EAX
POP ESI
POP EDI
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffae50f]
PUSH EDI
PUSH EAX
CALL 0x00071090
ADD ESP,0xc
PUSH -0x1
MOV EDI,EAX
PUSH EAX
PUSH ESI
CALL 0x000457b0
MOV dword ptr [ESP],EDI
CALL 0x00024cc0
ADD ESP,0x10
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3\nFUN_00076990(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00021e70(param_3,"fts3cursor");\n  *param_4 = iVar1;\n  if (iVar1 != 0) {\n    return 0;\n  }\n  uVar2 = FUN_00071090("illegal first argument to %s",param_2);\n  FUN_000457b0(param_1,uVar2,0xffffffff);\n  FUN_00024cc0(uVar2);\n  return 1;\n}\n\n" comment (function_definition "undefined4 __regparm3\nFUN_00076990(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00021e70(param_3,"fts3cursor");\n  *param_4 = iVar1;\n  if (iVar1 != 0) {\n    return 0;\n  }\n  uVar2 = FUN_00071090("illegal first argument to %s",param_2);\n  FUN_000457b0(param_1,uVar2,0xffffffff);\n  FUN_00024cc0(uVar2);\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00076990(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00021e70(param_3,"fts3cursor");\n  *param_4 = iVar1;\n  if (iVar1 != 0) {\n    return 0;\n  }\n  uVar2 = FUN_00071090("illegal first argument to %s",param_2);\n  FUN_000457b0(param_1,uVar2,0xffffffff);\n  FUN_00024cc0(uVar2);\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_00021e70(param_3,"fts3cursor");" (assignment_expression "iVar1 = FUN_00021e70(param_3,"fts3cursor")" identifier = (call_expression "FUN_00021e70(param_3,"fts3cursor")" identifier (argument_list "(param_3,"fts3cursor")" ( identifier , (string_literal ""fts3cursor"" " string_content ") )))) ;) (expression_statement "*param_4 = iVar1;" (assignment_expression "*param_4 = iVar1" (pointer_expression "*param_4" * identifier) = identifier) ;) (if_statement "if (iVar1 != 0) {\n    return 0;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = FUN_00071090("illegal first argument to %s",param_2);" (assignment_expression "uVar2 = FUN_00071090("illegal first argument to %s",param_2)" identifier = (call_expression "FUN_00071090("illegal first argument to %s",param_2)" identifier (argument_list "("illegal first argument to %s",param_2)" ( (string_literal ""illegal first argument to %s"" " string_content ") , identifier )))) ;) (expression_statement "FUN_000457b0(param_1,uVar2,0xffffffff);" (call_expression "FUN_000457b0(param_1,uVar2,0xffffffff)" identifier (argument_list "(param_1,uVar2,0xffffffff)" ( identifier , identifier , number_literal ))) ;) (expression_statement "FUN_00024cc0(uVar2);" (call_expression "FUN_00024cc0(uVar2)" identifier (argument_list "(uVar2)" ( 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\nfts3FunctionArg(sqlite3_context *pContext,char *zFunc,sqlite3_value *pVal,Fts3Cursor **ppCsr)\n\n{\n  Fts3Cursor *pFVar1;\n  char *z;\n  \n  pFVar1 = (Fts3Cursor *)sqlite3_value_pointer(pVal,"fts3cursor");\n  *ppCsr = pFVar1;\n  if (pFVar1 != (Fts3Cursor *)0x0) {\n    return 0;\n  }\n  z = sqlite3_mprintf("illegal first argument to %s",zFunc);\n  sqlite3_result_error(pContext,z,-1);\n  sqlite3_free(z);\n  return 1;\n}\n\n" comment (function_definition "int __regparm3\nfts3FunctionArg(sqlite3_context *pContext,char *zFunc,sqlite3_value *pVal,Fts3Cursor **ppCsr)\n\n{\n  Fts3Cursor *pFVar1;\n  char *z;\n  \n  pFVar1 = (Fts3Cursor *)sqlite3_value_pointer(pVal,"fts3cursor");\n  *ppCsr = pFVar1;\n  if (pFVar1 != (Fts3Cursor *)0x0) {\n    return 0;\n  }\n  z = sqlite3_mprintf("illegal first argument to %s",zFunc);\n  sqlite3_result_error(pContext,z,-1);\n  sqlite3_free(z);\n  return 1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "fts3FunctionArg(sqlite3_context *pContext,char *zFunc,sqlite3_value *pVal,Fts3Cursor **ppCsr)" identifier (parameter_list "(sqlite3_context *pContext,char *zFunc,sqlite3_value *pVal,Fts3Cursor **ppCsr)" ( (parameter_declaration "sqlite3_context *pContext" type_identifier (pointer_declarator "*pContext" * identifier)) , (parameter_declaration "char *zFunc" primitive_type (pointer_declarator "*zFunc" * identifier)) , (parameter_declaration "sqlite3_value *pVal" type_identifier (pointer_declarator "*pVal" * identifier)) , (parameter_declaration "Fts3Cursor **ppCsr" type_identifier (pointer_declarator "**ppCsr" * (pointer_declarator "*ppCsr" * identifier))) ))) (compound_statement "{\n  Fts3Cursor *pFVar1;\n  char *z;\n  \n  pFVar1 = (Fts3Cursor *)sqlite3_value_pointer(pVal,"fts3cursor");\n  *ppCsr = pFVar1;\n  if (pFVar1 != (Fts3Cursor *)0x0) {\n    return 0;\n  }\n  z = sqlite3_mprintf("illegal first argument to %s",zFunc);\n  sqlite3_result_error(pContext,z,-1);\n  sqlite3_free(z);\n  return 1;\n}" { (declaration "Fts3Cursor *pFVar1;" type_identifier (pointer_declarator "*pFVar1" * identifier) ;) (declaration "char *z;" primitive_type (pointer_declarator "*z" * identifier) ;) (expression_statement "pFVar1 = (Fts3Cursor *)sqlite3_value_pointer(pVal,"fts3cursor");" (assignment_expression "pFVar1 = (Fts3Cursor *)sqlite3_value_pointer(pVal,"fts3cursor")" identifier = (cast_expression "(Fts3Cursor *)sqlite3_value_pointer(pVal,"fts3cursor")" ( (type_descriptor "Fts3Cursor *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_value_pointer(pVal,"fts3cursor")" identifier (argument_list "(pVal,"fts3cursor")" ( identifier , (string_literal ""fts3cursor"" " string_content ") ))))) ;) (expression_statement "*ppCsr = pFVar1;" (assignment_expression "*ppCsr = pFVar1" (pointer_expression "*ppCsr" * identifier) = identifier) ;) (if_statement "if (pFVar1 != (Fts3Cursor *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(pFVar1 != (Fts3Cursor *)0x0)" ( (binary_expression "pFVar1 != (Fts3Cursor *)0x0" identifier != (cast_expression "(Fts3Cursor *)0x0" ( (type_descriptor "Fts3Cursor *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "z = sqlite3_mprintf("illegal first argument to %s",zFunc);" (assignment_expression "z = sqlite3_mprintf("illegal first argument to %s",zFunc)" identifier = (call_expression "sqlite3_mprintf("illegal first argument to %s",zFunc)" identifier (argument_list "("illegal first argument to %s",zFunc)" ( (string_literal ""illegal first argument to %s"" " string_content ") , identifier )))) ;) (expression_statement "sqlite3_result_error(pContext,z,-1);" (call_expression "sqlite3_result_error(pContext,z,-1)" identifier (argument_list "(pContext,z,-1)" ( identifier , identifier , number_literal ))) ;) (expression_statement "sqlite3_free(z);" (call_expression "sqlite3_free(z)" identifier (argument_list "(z)" ( identifier ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined4 __regparm3\nFUN_00076990(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00021e70(param_3,"fts3cursor");\n  *param_4 = iVar1;\n  if (iVar1 != 0) {\n    return 0;\n  }\n  uVar2 = FUN_00071090("illegal first argument to %s",param_2);\n  FUN_000457b0(param_1,uVar2,0xffffffff);\n  FUN_00024cc0(uVar2);\n  return 1;\n}\n\n" (function_definition "undefined4 __regparm3\nFUN_00076990(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00021e70(param_3,"fts3cursor");\n  *param_4 = iVar1;\n  if (iVar1 != 0) {\n    return 0;\n  }\n  uVar2 = FUN_00071090("illegal first argument to %s",param_2);\n  FUN_000457b0(param_1,uVar2,0xffffffff);\n  FUN_00024cc0(uVar2);\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00076990(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00021e70(param_3,"fts3cursor");\n  *param_4 = iVar1;\n  if (iVar1 != 0) {\n    return 0;\n  }\n  uVar2 = FUN_00071090("illegal first argument to %s",param_2);\n  FUN_000457b0(param_1,uVar2,0xffffffff);\n  FUN_00024cc0(uVar2);\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_00021e70(param_3,"fts3cursor");" (assignment_expression "iVar1 = FUN_00021e70(param_3,"fts3cursor")" identifier = (call_expression "FUN_00021e70(param_3,"fts3cursor")" identifier (argument_list "(param_3,"fts3cursor")" ( identifier , (string_literal ""fts3cursor"" " string_content ") )))) ;) (expression_statement "*param_4 = iVar1;" (assignment_expression "*param_4 = iVar1" (pointer_expression "*param_4" * identifier) = identifier) ;) (if_statement "if (iVar1 != 0) {\n    return 0;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = FUN_00071090("illegal first argument to %s",param_2);" (assignment_expression "uVar2 = FUN_00071090("illegal first argument to %s",param_2)" identifier = (call_expression "FUN_00071090("illegal first argument to %s",param_2)" identifier (argument_list "("illegal first argument to %s",param_2)" ( (string_literal ""illegal first argument to %s"" " string_content ") , identifier )))) ;) (expression_statement "FUN_000457b0(param_1,uVar2,0xffffffff);" (call_expression "FUN_000457b0(param_1,uVar2,0xffffffff)" identifier (argument_list "(param_1,uVar2,0xffffffff)" ( identifier , identifier , number_literal ))) ;) (expression_statement "FUN_00024cc0(uVar2);" (call_expression "FUN_00024cc0(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3\nFUN_00076990(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00021e70(param_3,"fts3cursor");\n  *param_4 = iVar1;\n  if (iVar1 != 0) {\n    return 0;\n  }\n  uVar2 = FUN_00071090("illegal first argument to %s",param_2);\n  FUN_000457b0(param_1,uVar2,0xffffffff);\n  FUN_00024cc0(uVar2);\n  return 1;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00076990(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)" (identifier "FUN_00076990") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (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 "int *param_4" (primitive_type "int") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00021e70(param_3,"fts3cursor");\n  *param_4 = iVar1;\n  if (iVar1 != 0) {\n    return 0;\n  }\n  uVar2 = FUN_00071090("illegal first argument to %s",param_2);\n  FUN_000457b0(param_1,uVar2,0xffffffff);\n  FUN_00024cc0(uVar2);\n  return 1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = FUN_00021e70(param_3,"fts3cursor");" (assignment_expression "iVar1 = FUN_00021e70(param_3,"fts3cursor")" (identifier "iVar1") (= "=") (call_expression "FUN_00021e70(param_3,"fts3cursor")" (identifier "FUN_00021e70") (argument_list "(param_3,"fts3cursor")" (( "(") (identifier "param_3") (, ",") (string_literal ""fts3cursor"" (" """) (string_content "fts3cursor") (" """)) () ")")))) (; ";")) (expression_statement "*param_4 = iVar1;" (assignment_expression "*param_4 = iVar1" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar1 != 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_00071090("illegal first argument to %s",param_2);" (assignment_expression "uVar2 = FUN_00071090("illegal first argument to %s",param_2)" (identifier "uVar2") (= "=") (call_expression "FUN_00071090("illegal first argument to %s",param_2)" (identifier "FUN_00071090") (argument_list "("illegal first argument to %s",param_2)" (( "(") (string_literal ""illegal first argument to %s"" (" """) (string_content "illegal first argument to %s") (" """)) (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "FUN_000457b0(param_1,uVar2,0xffffffff);" (call_expression "FUN_000457b0(param_1,uVar2,0xffffffff)" (identifier "FUN_000457b0") (argument_list "(param_1,uVar2,0xffffffff)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") (, ",") (number_literal "0xffffffff") () ")"))) (; ";")) (expression_statement "FUN_00024cc0(uVar2);" (call_expression "FUN_00024cc0(uVar2)" (identifier "FUN_00024cc0") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (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 *pContext,char *zFunc,type_2 *pVal,type_3 **ppCsr)

{
  type_3 *var_2;
  char *z;
  
  var_2 = (type_3 *)var_1(pVal,"fts3cursor");
  *ppCsr = var_2;
  if (var_2 != (type_3 *)0x0) {
    return 0;
  }
  z = var_3("illegal first argument to %s",zFunc);
  var_4(pContext,z,-1);
  var_5(z);
  return 1;
}


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

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

undefined4 __regparm3
MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3,int *param_4)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = FUN_00021e70(param_3,"fts3cursor");
  *param_4 = iVar1;
  if (iVar1 != 0) {
    return 0;
  }
  uVar2 = FUN_00071090("illegal first argument to %s",param_2);
  FUN_000457b0(param_1,uVar2,0xffffffff);
  FUN_00024cc0(uVar2);
  return 1;
}

