
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int statFilter(sqlite3_vtab_cursor *pCursor,int idxNum,char *idxStr,int argc,sqlite3_value **argv)

{
  sqlite3_vtab *psVar1;
  char *pcVar2;
  int iVar3;
  void *pvVar4;
  sqlite3_vtab *psVar5;
  sqlite3 *in_stack_ffffffe4;
  sqlite3_stmt **in_stack_ffffffe8;
  char **in_stack_ffffffec;
  
  psVar1 = pCursor->pVtab;
  if (idxNum == 1) {
    pvVar4 = sqlite3ValueText(*argv,'\x01');
    psVar5 = (sqlite3_vtab *)sqlite3FindDbName(in_stack_ffffffe4,(char *)in_stack_ffffffe8);
    pCursor[3].pVtab = psVar5;
    if ((int)psVar5 < 0) {
      sqlite3_free(pCursor->pVtab->zErrMsg);
      psVar1 = pCursor->pVtab;
      pcVar2 = sqlite3_mprintf("no such schema: %s",pvVar4);
      psVar1->zErrMsg = pcVar2;
      if (pCursor->pVtab->zErrMsg != (char *)0x0) {
        return 1;
      }
      return 7;
    }
  }
  else {
    pCursor[3].pVtab = (sqlite3_vtab *)psVar1[1].nRef;
  }
  statResetCsr((StatCursor *)pCursor);
  sqlite3_finalize((sqlite3_stmt *)pCursor[1].pVtab);
  pCursor[1].pVtab = (sqlite3_vtab *)0x0;
  pcVar2 = sqlite3_mprintf("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"
                           ,*(undefined4 *)
                             ((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10));
  if (pcVar2 != (char *)0x0) {
    iVar3 = sqlite3LockAndPrepare
                      ((sqlite3 *)0x80,(char *)0x0,(int)(pCursor + 1),0,(Vdbe *)in_stack_ffffffe4,
                       in_stack_ffffffe8,in_stack_ffffffec);
    sqlite3_free(pcVar2);
    if (iVar3 != 0) {
      return iVar3;
    }
    iVar3 = statNext(pCursor);
    return iVar3;
  }
  return 7;
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int FUN_000eedf0(int *param_1,int param_2)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  
  iVar1 = *param_1;
  if (param_2 == 1) {
    uVar3 = FUN_0006a450();
    iVar2 = FUN_000456a0();
    param_1[3] = iVar2;
    if (iVar2 < 0) {
      FUN_00042800(*(undefined4 *)(*param_1 + 8));
      iVar1 = *param_1;
      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);
      *(undefined4 *)(iVar1 + 8) = uVar3;
      if (*(int *)(*param_1 + 8) != 0) {
        return 1;
      }
      return 7;
    }
  }
  else {
    param_1[3] = *(int *)(iVar1 + 0x10);
  }
  FUN_000acb20();
  FUN_000a96f0(param_1[1]);
  param_1[1] = 0;
  iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"
                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))
  ;
  if (iVar1 != 0) {
    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);
    FUN_00042800(iVar1);
    if (iVar2 != 0) {
      return iVar2;
    }
    iVar1 = FUN_000ee370();
    return iVar1;
  }
  return 7;
}


PUSH EBP
PUSH EDI
PUSH ESI
CALL 0x00115708
ADD ESI,0x8d030
PUSH EBX
SUB ESP,0xc
MOV EBX,dword ptr [ESP + 0x20]
CMP dword ptr [ESP + 0x24],0x1
MOV EAX,dword ptr [ESP + 0x30]
MOV EDI,dword ptr [EBX]
JZ 0x000eeeb0
MOV EAX,dword ptr [EDI + 0x10]
MOV dword ptr [EBX + 0xc],EAX
MOV EAX,EBX
CALL 0x000acb20
SUB ESP,0xc
PUSH dword ptr [EBX + 0x4]
CALL 0x000a96f0
MOV dword ptr [EBX + 0x4],0x0
POP EAX
MOV EAX,dword ptr [EBX + 0xc]
POP EDX
MOV EDX,dword ptr [EDI + 0xc]
SHL EAX,0x4
ADD EAX,dword ptr [EDX + 0x10]
PUSH dword ptr [EAX]
LEA EAX,[ESI + 0xfffb43ec]
PUSH EAX
CALL 0x0008ff90
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x000eef05
LEA EDX,[EBX + 0x4]
MOV EAX,dword ptr [EDI + 0xc]
PUSH 0x0
MOV ECX,0xffffffff
PUSH EDX
MOV EDX,ESI
PUSH 0x0
PUSH 0x80
CALL 0x000e2920
MOV dword ptr [ESP],ESI
MOV EDI,EAX
CALL 0x00042800
ADD ESP,0x10
TEST EDI,EDI
JZ 0x000eeea0
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESP + 0x20],EBX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
JMP 0x000ee370
MOV EAX,dword ptr [EAX]
MOV EDX,0x1
CALL 0x0006a450
MOV EBP,EAX
MOV EAX,dword ptr [EDI + 0xc]
MOV EDX,EBP
CALL 0x000456a0
MOV dword ptr [EBX + 0xc],EAX
TEST EAX,EAX
JNS 0x000eee1d
MOV EAX,dword ptr [EBX]
SUB ESP,0xc
PUSH dword ptr [EAX + 0x8]
CALL 0x00042800
POP ECX
POP EAX
LEA EAX,[ESI + 0xfffa58fb]
MOV EDI,dword ptr [EBX]
PUSH EBP
PUSH EAX
CALL 0x0008ff90
ADD ESP,0x10
MOV dword ptr [EDI + 0x8],EAX
MOV EAX,dword ptr [EBX]
MOV EDI,0x1
MOV EAX,dword ptr [EAX + 0x8]
TEST EAX,EAX
JNZ 0x000eee8c
ADD ESP,0xc
MOV EDI,0x7
POP EBX
MOV EAX,EDI
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nint FUN_000eedf0(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar1 = *param_1;\n  if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }\n  FUN_000acb20();\n  FUN_000a96f0(param_1[1]);\n  param_1[1] = 0;\n  iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;\n  if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }\n  return 7;\n}\n\n" comment (function_definition "int FUN_000eedf0(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar1 = *param_1;\n  if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }\n  FUN_000acb20();\n  FUN_000a96f0(param_1[1]);\n  param_1[1] = 0;\n  iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;\n  if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }\n  return 7;\n}" primitive_type (function_declarator "FUN_000eedf0(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar1 = *param_1;\n  if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }\n  FUN_000acb20();\n  FUN_000a96f0(param_1[1]);\n  param_1[1] = 0;\n  iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;\n  if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }\n  return 7;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }" { (expression_statement "uVar3 = FUN_0006a450();" (assignment_expression "uVar3 = FUN_0006a450()" identifier = (call_expression "FUN_0006a450()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = FUN_000456a0();" (assignment_expression "iVar2 = FUN_000456a0()" identifier = (call_expression "FUN_000456a0()" identifier (argument_list "()" ( )))) ;) (expression_statement "param_1[3] = iVar2;" (assignment_expression "param_1[3] = iVar2" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }" { (expression_statement "FUN_00042800(*(undefined4 *)(*param_1 + 8));" (call_expression "FUN_00042800(*(undefined4 *)(*param_1 + 8))" identifier (argument_list "(*(undefined4 *)(*param_1 + 8))" ( (pointer_expression "*(undefined4 *)(*param_1 + 8)" * (cast_expression "(undefined4 *)(*param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 8)" ( (binary_expression "*param_1 + 8" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar3 = FUN_0008ff90("no such schema: %s",uVar3);" (assignment_expression "uVar3 = FUN_0008ff90("no such schema: %s",uVar3)" identifier = (call_expression "FUN_0008ff90("no such schema: %s",uVar3)" identifier (argument_list "("no such schema: %s",uVar3)" ( (string_literal ""no such schema: %s"" " string_content ") , identifier )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 8) = uVar3;" (assignment_expression "*(undefined4 *)(iVar1 + 8) = uVar3" (pointer_expression "*(undefined4 *)(iVar1 + 8)" * (cast_expression "(undefined4 *)(iVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) = identifier) ;) (if_statement "if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }" if (parenthesized_expression "(*(int *)(*param_1 + 8) != 0)" ( (binary_expression "*(int *)(*param_1 + 8) != 0" (pointer_expression "*(int *)(*param_1 + 8)" * (cast_expression "(int *)(*param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 8)" ( (binary_expression "*param_1 + 8" (pointer_expression "*param_1" * identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (return_statement "return 7;" return number_literal ;) })) }) (else_clause "else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }" else (compound_statement "{\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }" { (expression_statement "param_1[3] = *(int *)(iVar1 + 0x10);" (assignment_expression "param_1[3] = *(int *)(iVar1 + 0x10)" (subscript_expression "param_1[3]" identifier [ number_literal ]) = (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) ))))) ;) }))) (expression_statement "FUN_000acb20();" (call_expression "FUN_000acb20()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_000a96f0(param_1[1]);" (call_expression "FUN_000a96f0(param_1[1])" identifier (argument_list "(param_1[1])" ( (subscript_expression "param_1[1]" identifier [ number_literal ]) ))) ;) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;" (assignment_expression "iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))" identifier = (call_expression "FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))" identifier (argument_list "("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))" ( (string_literal ""SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content ") , (pointer_expression "*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10))" * (cast_expression "(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10))" ( (binary_expression "param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)" (binary_expression "param_1[3] * 0x10" (subscript_expression "param_1[3]" identifier [ number_literal ]) * number_literal) + (pointer_expression "*(int *)(*(int *)(iVar1 + 0xc) + 0x10)" * (cast_expression "(int *)(*(int *)(iVar1 + 0xc) + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0xc) + 0x10)" ( (binary_expression "*(int *)(iVar1 + 0xc) + 0x10" (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) ))))) )))) )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }" { (expression_statement "iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);" (assignment_expression "iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0)" identifier = (call_expression "FUN_000e2920(0x80,0,param_1 + 1,0)" identifier (argument_list "(0x80,0,param_1 + 1,0)" ( number_literal , number_literal , (binary_expression "param_1 + 1" identifier + number_literal) , number_literal )))) ;) (expression_statement "FUN_00042800(iVar1);" (call_expression "FUN_00042800(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (if_statement "if (iVar2 != 0) {\n      return iVar2;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      return iVar2;\n    }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "iVar1 = FUN_000ee370();" (assignment_expression "iVar1 = FUN_000ee370()" identifier = (call_expression "FUN_000ee370()" identifier (argument_list "()" ( )))) ;) (return_statement "return iVar1;" return identifier ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nint statFilter(sqlite3_vtab_cursor *pCursor,int idxNum,char *idxStr,int argc,sqlite3_value **argv)\n\n{\n  sqlite3_vtab *psVar1;\n  char *pcVar2;\n  int iVar3;\n  void *pvVar4;\n  sqlite3_vtab *psVar5;\n  sqlite3 *in_stack_ffffffe4;\n  sqlite3_stmt **in_stack_ffffffe8;\n  char **in_stack_ffffffec;\n  \n  psVar1 = pCursor->pVtab;\n  if (idxNum == 1) {\n    pvVar4 = sqlite3ValueText(*argv,'\x01');\n    psVar5 = (sqlite3_vtab *)sqlite3FindDbName(in_stack_ffffffe4,(char *)in_stack_ffffffe8);\n    pCursor[3].pVtab = psVar5;\n    if ((int)psVar5 < 0) {\n      sqlite3_free(pCursor->pVtab->zErrMsg);\n      psVar1 = pCursor->pVtab;\n      pcVar2 = sqlite3_mprintf("no such schema: %s",pvVar4);\n      psVar1->zErrMsg = pcVar2;\n      if (pCursor->pVtab->zErrMsg != (char *)0x0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    pCursor[3].pVtab = (sqlite3_vtab *)psVar1[1].nRef;\n  }\n  statResetCsr((StatCursor *)pCursor);\n  sqlite3_finalize((sqlite3_stmt *)pCursor[1].pVtab);\n  pCursor[1].pVtab = (sqlite3_vtab *)0x0;\n  pcVar2 = sqlite3_mprintf("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                           ,*(undefined4 *)\n                             ((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10));\n  if (pcVar2 != (char *)0x0) {\n    iVar3 = sqlite3LockAndPrepare\n                      ((sqlite3 *)0x80,(char *)0x0,(int)(pCursor + 1),0,(Vdbe *)in_stack_ffffffe4,\n                       in_stack_ffffffe8,in_stack_ffffffec);\n    sqlite3_free(pcVar2);\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    iVar3 = statNext(pCursor);\n    return iVar3;\n  }\n  return 7;\n}\n\n" comment (function_definition "int statFilter(sqlite3_vtab_cursor *pCursor,int idxNum,char *idxStr,int argc,sqlite3_value **argv)\n\n{\n  sqlite3_vtab *psVar1;\n  char *pcVar2;\n  int iVar3;\n  void *pvVar4;\n  sqlite3_vtab *psVar5;\n  sqlite3 *in_stack_ffffffe4;\n  sqlite3_stmt **in_stack_ffffffe8;\n  char **in_stack_ffffffec;\n  \n  psVar1 = pCursor->pVtab;\n  if (idxNum == 1) {\n    pvVar4 = sqlite3ValueText(*argv,'\x01');\n    psVar5 = (sqlite3_vtab *)sqlite3FindDbName(in_stack_ffffffe4,(char *)in_stack_ffffffe8);\n    pCursor[3].pVtab = psVar5;\n    if ((int)psVar5 < 0) {\n      sqlite3_free(pCursor->pVtab->zErrMsg);\n      psVar1 = pCursor->pVtab;\n      pcVar2 = sqlite3_mprintf("no such schema: %s",pvVar4);\n      psVar1->zErrMsg = pcVar2;\n      if (pCursor->pVtab->zErrMsg != (char *)0x0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    pCursor[3].pVtab = (sqlite3_vtab *)psVar1[1].nRef;\n  }\n  statResetCsr((StatCursor *)pCursor);\n  sqlite3_finalize((sqlite3_stmt *)pCursor[1].pVtab);\n  pCursor[1].pVtab = (sqlite3_vtab *)0x0;\n  pcVar2 = sqlite3_mprintf("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                           ,*(undefined4 *)\n                             ((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10));\n  if (pcVar2 != (char *)0x0) {\n    iVar3 = sqlite3LockAndPrepare\n                      ((sqlite3 *)0x80,(char *)0x0,(int)(pCursor + 1),0,(Vdbe *)in_stack_ffffffe4,\n                       in_stack_ffffffe8,in_stack_ffffffec);\n    sqlite3_free(pcVar2);\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    iVar3 = statNext(pCursor);\n    return iVar3;\n  }\n  return 7;\n}" primitive_type (function_declarator "statFilter(sqlite3_vtab_cursor *pCursor,int idxNum,char *idxStr,int argc,sqlite3_value **argv)" identifier (parameter_list "(sqlite3_vtab_cursor *pCursor,int idxNum,char *idxStr,int argc,sqlite3_value **argv)" ( (parameter_declaration "sqlite3_vtab_cursor *pCursor" type_identifier (pointer_declarator "*pCursor" * identifier)) , (parameter_declaration "int idxNum" primitive_type identifier) , (parameter_declaration "char *idxStr" primitive_type (pointer_declarator "*idxStr" * identifier)) , (parameter_declaration "int argc" primitive_type identifier) , (parameter_declaration "sqlite3_value **argv" type_identifier (pointer_declarator "**argv" * (pointer_declarator "*argv" * identifier))) ))) (compound_statement "{\n  sqlite3_vtab *psVar1;\n  char *pcVar2;\n  int iVar3;\n  void *pvVar4;\n  sqlite3_vtab *psVar5;\n  sqlite3 *in_stack_ffffffe4;\n  sqlite3_stmt **in_stack_ffffffe8;\n  char **in_stack_ffffffec;\n  \n  psVar1 = pCursor->pVtab;\n  if (idxNum == 1) {\n    pvVar4 = sqlite3ValueText(*argv,'\x01');\n    psVar5 = (sqlite3_vtab *)sqlite3FindDbName(in_stack_ffffffe4,(char *)in_stack_ffffffe8);\n    pCursor[3].pVtab = psVar5;\n    if ((int)psVar5 < 0) {\n      sqlite3_free(pCursor->pVtab->zErrMsg);\n      psVar1 = pCursor->pVtab;\n      pcVar2 = sqlite3_mprintf("no such schema: %s",pvVar4);\n      psVar1->zErrMsg = pcVar2;\n      if (pCursor->pVtab->zErrMsg != (char *)0x0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    pCursor[3].pVtab = (sqlite3_vtab *)psVar1[1].nRef;\n  }\n  statResetCsr((StatCursor *)pCursor);\n  sqlite3_finalize((sqlite3_stmt *)pCursor[1].pVtab);\n  pCursor[1].pVtab = (sqlite3_vtab *)0x0;\n  pcVar2 = sqlite3_mprintf("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                           ,*(undefined4 *)\n                             ((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10));\n  if (pcVar2 != (char *)0x0) {\n    iVar3 = sqlite3LockAndPrepare\n                      ((sqlite3 *)0x80,(char *)0x0,(int)(pCursor + 1),0,(Vdbe *)in_stack_ffffffe4,\n                       in_stack_ffffffe8,in_stack_ffffffec);\n    sqlite3_free(pcVar2);\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    iVar3 = statNext(pCursor);\n    return iVar3;\n  }\n  return 7;\n}" { (declaration "sqlite3_vtab *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "void *pvVar4;" primitive_type (pointer_declarator "*pvVar4" * identifier) ;) (declaration "sqlite3_vtab *psVar5;" type_identifier (pointer_declarator "*psVar5" * identifier) ;) (declaration "sqlite3 *in_stack_ffffffe4;" type_identifier (pointer_declarator "*in_stack_ffffffe4" * identifier) ;) (declaration "sqlite3_stmt **in_stack_ffffffe8;" type_identifier (pointer_declarator "**in_stack_ffffffe8" * (pointer_declarator "*in_stack_ffffffe8" * identifier)) ;) (declaration "char **in_stack_ffffffec;" primitive_type (pointer_declarator "**in_stack_ffffffec" * (pointer_declarator "*in_stack_ffffffec" * identifier)) ;) (expression_statement "psVar1 = pCursor->pVtab;" (assignment_expression "psVar1 = pCursor->pVtab" identifier = (field_expression "pCursor->pVtab" identifier -> field_identifier)) ;) (if_statement "if (idxNum == 1) {\n    pvVar4 = sqlite3ValueText(*argv,'\x01');\n    psVar5 = (sqlite3_vtab *)sqlite3FindDbName(in_stack_ffffffe4,(char *)in_stack_ffffffe8);\n    pCursor[3].pVtab = psVar5;\n    if ((int)psVar5 < 0) {\n      sqlite3_free(pCursor->pVtab->zErrMsg);\n      psVar1 = pCursor->pVtab;\n      pcVar2 = sqlite3_mprintf("no such schema: %s",pvVar4);\n      psVar1->zErrMsg = pcVar2;\n      if (pCursor->pVtab->zErrMsg != (char *)0x0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    pCursor[3].pVtab = (sqlite3_vtab *)psVar1[1].nRef;\n  }" if (parenthesized_expression "(idxNum == 1)" ( (binary_expression "idxNum == 1" identifier == number_literal) )) (compound_statement "{\n    pvVar4 = sqlite3ValueText(*argv,'\x01');\n    psVar5 = (sqlite3_vtab *)sqlite3FindDbName(in_stack_ffffffe4,(char *)in_stack_ffffffe8);\n    pCursor[3].pVtab = psVar5;\n    if ((int)psVar5 < 0) {\n      sqlite3_free(pCursor->pVtab->zErrMsg);\n      psVar1 = pCursor->pVtab;\n      pcVar2 = sqlite3_mprintf("no such schema: %s",pvVar4);\n      psVar1->zErrMsg = pcVar2;\n      if (pCursor->pVtab->zErrMsg != (char *)0x0) {\n        return 1;\n      }\n      return 7;\n    }\n  }" { (expression_statement "pvVar4 = sqlite3ValueText(*argv,'\x01');" (assignment_expression "pvVar4 = sqlite3ValueText(*argv,'\x01')" identifier = (call_expression "sqlite3ValueText(*argv,'\x01')" identifier (argument_list "(*argv,'\x01')" ( (pointer_expression "*argv" * identifier) , (char_literal "'\x01'" ' escape_sequence ') )))) ;) (expression_statement "psVar5 = (sqlite3_vtab *)sqlite3FindDbName(in_stack_ffffffe4,(char *)in_stack_ffffffe8);" (assignment_expression "psVar5 = (sqlite3_vtab *)sqlite3FindDbName(in_stack_ffffffe4,(char *)in_stack_ffffffe8)" identifier = (cast_expression "(sqlite3_vtab *)sqlite3FindDbName(in_stack_ffffffe4,(char *)in_stack_ffffffe8)" ( (type_descriptor "sqlite3_vtab *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3FindDbName(in_stack_ffffffe4,(char *)in_stack_ffffffe8)" identifier (argument_list "(in_stack_ffffffe4,(char *)in_stack_ffffffe8)" ( identifier , (cast_expression "(char *)in_stack_ffffffe8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) ))))) ;) (expression_statement "pCursor[3].pVtab = psVar5;" (assignment_expression "pCursor[3].pVtab = psVar5" (field_expression "pCursor[3].pVtab" (subscript_expression "pCursor[3]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (if_statement "if ((int)psVar5 < 0) {\n      sqlite3_free(pCursor->pVtab->zErrMsg);\n      psVar1 = pCursor->pVtab;\n      pcVar2 = sqlite3_mprintf("no such schema: %s",pvVar4);\n      psVar1->zErrMsg = pcVar2;\n      if (pCursor->pVtab->zErrMsg != (char *)0x0) {\n        return 1;\n      }\n      return 7;\n    }" if (parenthesized_expression "((int)psVar5 < 0)" ( (binary_expression "(int)psVar5 < 0" (cast_expression "(int)psVar5" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      sqlite3_free(pCursor->pVtab->zErrMsg);\n      psVar1 = pCursor->pVtab;\n      pcVar2 = sqlite3_mprintf("no such schema: %s",pvVar4);\n      psVar1->zErrMsg = pcVar2;\n      if (pCursor->pVtab->zErrMsg != (char *)0x0) {\n        return 1;\n      }\n      return 7;\n    }" { (expression_statement "sqlite3_free(pCursor->pVtab->zErrMsg);" (call_expression "sqlite3_free(pCursor->pVtab->zErrMsg)" identifier (argument_list "(pCursor->pVtab->zErrMsg)" ( (field_expression "pCursor->pVtab->zErrMsg" (field_expression "pCursor->pVtab" identifier -> field_identifier) -> field_identifier) ))) ;) (expression_statement "psVar1 = pCursor->pVtab;" (assignment_expression "psVar1 = pCursor->pVtab" identifier = (field_expression "pCursor->pVtab" identifier -> field_identifier)) ;) (expression_statement "pcVar2 = sqlite3_mprintf("no such schema: %s",pvVar4);" (assignment_expression "pcVar2 = sqlite3_mprintf("no such schema: %s",pvVar4)" identifier = (call_expression "sqlite3_mprintf("no such schema: %s",pvVar4)" identifier (argument_list "("no such schema: %s",pvVar4)" ( (string_literal ""no such schema: %s"" " string_content ") , identifier )))) ;) (expression_statement "psVar1->zErrMsg = pcVar2;" (assignment_expression "psVar1->zErrMsg = pcVar2" (field_expression "psVar1->zErrMsg" identifier -> field_identifier) = identifier) ;) (if_statement "if (pCursor->pVtab->zErrMsg != (char *)0x0) {\n        return 1;\n      }" if (parenthesized_expression "(pCursor->pVtab->zErrMsg != (char *)0x0)" ( (binary_expression "pCursor->pVtab->zErrMsg != (char *)0x0" (field_expression "pCursor->pVtab->zErrMsg" (field_expression "pCursor->pVtab" identifier -> field_identifier) -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (return_statement "return 7;" return number_literal ;) })) }) (else_clause "else {\n    pCursor[3].pVtab = (sqlite3_vtab *)psVar1[1].nRef;\n  }" else (compound_statement "{\n    pCursor[3].pVtab = (sqlite3_vtab *)psVar1[1].nRef;\n  }" { (expression_statement "pCursor[3].pVtab = (sqlite3_vtab *)psVar1[1].nRef;" (assignment_expression "pCursor[3].pVtab = (sqlite3_vtab *)psVar1[1].nRef" (field_expression "pCursor[3].pVtab" (subscript_expression "pCursor[3]" identifier [ number_literal ]) . field_identifier) = (cast_expression "(sqlite3_vtab *)psVar1[1].nRef" ( (type_descriptor "sqlite3_vtab *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "psVar1[1].nRef" (subscript_expression "psVar1[1]" identifier [ number_literal ]) . field_identifier))) ;) }))) (expression_statement "statResetCsr((StatCursor *)pCursor);" (call_expression "statResetCsr((StatCursor *)pCursor)" identifier (argument_list "((StatCursor *)pCursor)" ( (cast_expression "(StatCursor *)pCursor" ( (type_descriptor "StatCursor *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (expression_statement "sqlite3_finalize((sqlite3_stmt *)pCursor[1].pVtab);" (call_expression "sqlite3_finalize((sqlite3_stmt *)pCursor[1].pVtab)" identifier (argument_list "((sqlite3_stmt *)pCursor[1].pVtab)" ( (cast_expression "(sqlite3_stmt *)pCursor[1].pVtab" ( (type_descriptor "sqlite3_stmt *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pCursor[1].pVtab" (subscript_expression "pCursor[1]" identifier [ number_literal ]) . field_identifier)) ))) ;) (expression_statement "pCursor[1].pVtab = (sqlite3_vtab *)0x0;" (assignment_expression "pCursor[1].pVtab = (sqlite3_vtab *)0x0" (field_expression "pCursor[1].pVtab" (subscript_expression "pCursor[1]" identifier [ number_literal ]) . field_identifier) = (cast_expression "(sqlite3_vtab *)0x0" ( (type_descriptor "sqlite3_vtab *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pcVar2 = sqlite3_mprintf("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                           ,*(undefined4 *)\n                             ((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10));" (assignment_expression "pcVar2 = sqlite3_mprintf("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                           ,*(undefined4 *)\n                             ((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10))" identifier = (call_expression "sqlite3_mprintf("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                           ,*(undefined4 *)\n                             ((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10))" identifier (argument_list "("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                           ,*(undefined4 *)\n                             ((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10))" ( (string_literal ""SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content ") , (pointer_expression "*(undefined4 *)\n                             ((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10)" * (cast_expression "(undefined4 *)\n                             ((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10)" ( (binary_expression "(psVar1[1].pModule)->xDisconnect + (int)pCursor[3].pVtab * 0x10" (field_expression "(psVar1[1].pModule)->xDisconnect" (parenthesized_expression "(psVar1[1].pModule)" ( (field_expression "psVar1[1].pModule" (subscript_expression "psVar1[1]" identifier [ number_literal ]) . field_identifier) )) -> field_identifier) + (binary_expression "(int)pCursor[3].pVtab * 0x10" (cast_expression "(int)pCursor[3].pVtab" ( (type_descriptor "int" primitive_type) ) (field_expression "pCursor[3].pVtab" (subscript_expression "pCursor[3]" identifier [ number_literal ]) . field_identifier)) * number_literal)) )))) )))) ;) (if_statement "if (pcVar2 != (char *)0x0) {\n    iVar3 = sqlite3LockAndPrepare\n                      ((sqlite3 *)0x80,(char *)0x0,(int)(pCursor + 1),0,(Vdbe *)in_stack_ffffffe4,\n                       in_stack_ffffffe8,in_stack_ffffffec);\n    sqlite3_free(pcVar2);\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    iVar3 = statNext(pCursor);\n    return iVar3;\n  }" if (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar3 = sqlite3LockAndPrepare\n                      ((sqlite3 *)0x80,(char *)0x0,(int)(pCursor + 1),0,(Vdbe *)in_stack_ffffffe4,\n                       in_stack_ffffffe8,in_stack_ffffffec);\n    sqlite3_free(pcVar2);\n    if (iVar3 != 0) {\n      return iVar3;\n    }\n    iVar3 = statNext(pCursor);\n    return iVar3;\n  }" { (expression_statement "iVar3 = sqlite3LockAndPrepare\n                      ((sqlite3 *)0x80,(char *)0x0,(int)(pCursor + 1),0,(Vdbe *)in_stack_ffffffe4,\n                       in_stack_ffffffe8,in_stack_ffffffec);" (assignment_expression "iVar3 = sqlite3LockAndPrepare\n                      ((sqlite3 *)0x80,(char *)0x0,(int)(pCursor + 1),0,(Vdbe *)in_stack_ffffffe4,\n                       in_stack_ffffffe8,in_stack_ffffffec)" identifier = (call_expression "sqlite3LockAndPrepare\n                      ((sqlite3 *)0x80,(char *)0x0,(int)(pCursor + 1),0,(Vdbe *)in_stack_ffffffe4,\n                       in_stack_ffffffe8,in_stack_ffffffec)" identifier (argument_list "((sqlite3 *)0x80,(char *)0x0,(int)(pCursor + 1),0,(Vdbe *)in_stack_ffffffe4,\n                       in_stack_ffffffe8,in_stack_ffffffec)" ( (cast_expression "(sqlite3 *)0x80" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(int)(pCursor + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pCursor + 1)" ( (binary_expression "pCursor + 1" identifier + number_literal) ))) , number_literal , (cast_expression "(Vdbe *)in_stack_ffffffe4" ( (type_descriptor "Vdbe *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier )))) ;) (expression_statement "sqlite3_free(pcVar2);" (call_expression "sqlite3_free(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (if_statement "if (iVar3 != 0) {\n      return iVar3;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      return iVar3;\n    }" { (return_statement "return iVar3;" return identifier ;) })) (expression_statement "iVar3 = statNext(pCursor);" (assignment_expression "iVar3 = statNext(pCursor)" identifier = (call_expression "statNext(pCursor)" identifier (argument_list "(pCursor)" ( identifier )))) ;) (return_statement "return iVar3;" return identifier ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit "int FUN_000eedf0(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar1 = *param_1;\n  if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }\n  FUN_000acb20();\n  FUN_000a96f0(param_1[1]);\n  param_1[1] = 0;\n  iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;\n  if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }\n  return 7;\n}\n\n" (function_definition "int FUN_000eedf0(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar1 = *param_1;\n  if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }\n  FUN_000acb20();\n  FUN_000a96f0(param_1[1]);\n  param_1[1] = 0;\n  iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;\n  if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }\n  return 7;\n}" primitive_type (function_declarator "FUN_000eedf0(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar1 = *param_1;\n  if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }\n  FUN_000acb20();\n  FUN_000a96f0(param_1[1]);\n  param_1[1] = 0;\n  iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;\n  if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }\n  return 7;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }" { (expression_statement "uVar3 = FUN_0006a450();" (assignment_expression "uVar3 = FUN_0006a450()" identifier = (call_expression "FUN_0006a450()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = FUN_000456a0();" (assignment_expression "iVar2 = FUN_000456a0()" identifier = (call_expression "FUN_000456a0()" identifier (argument_list "()" ( )))) ;) (expression_statement "param_1[3] = iVar2;" (assignment_expression "param_1[3] = iVar2" (subscript_expression "param_1[3]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }" { (expression_statement "FUN_00042800(*(undefined4 *)(*param_1 + 8));" (call_expression "FUN_00042800(*(undefined4 *)(*param_1 + 8))" identifier (argument_list "(*(undefined4 *)(*param_1 + 8))" ( (pointer_expression "*(undefined4 *)(*param_1 + 8)" * (cast_expression "(undefined4 *)(*param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 8)" ( (binary_expression "*param_1 + 8" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar3 = FUN_0008ff90("no such schema: %s",uVar3);" (assignment_expression "uVar3 = FUN_0008ff90("no such schema: %s",uVar3)" identifier = (call_expression "FUN_0008ff90("no such schema: %s",uVar3)" identifier (argument_list "("no such schema: %s",uVar3)" ( (string_literal ""no such schema: %s"" " string_content ") , identifier )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 8) = uVar3;" (assignment_expression "*(undefined4 *)(iVar1 + 8) = uVar3" (pointer_expression "*(undefined4 *)(iVar1 + 8)" * (cast_expression "(undefined4 *)(iVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) = identifier) ;) (if_statement "if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }" if (parenthesized_expression "(*(int *)(*param_1 + 8) != 0)" ( (binary_expression "*(int *)(*param_1 + 8) != 0" (pointer_expression "*(int *)(*param_1 + 8)" * (cast_expression "(int *)(*param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 8)" ( (binary_expression "*param_1 + 8" (pointer_expression "*param_1" * identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (return_statement "return 7;" return number_literal ;) })) }) (else_clause "else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }" else (compound_statement "{\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }" { (expression_statement "param_1[3] = *(int *)(iVar1 + 0x10);" (assignment_expression "param_1[3] = *(int *)(iVar1 + 0x10)" (subscript_expression "param_1[3]" identifier [ number_literal ]) = (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) ))))) ;) }))) (expression_statement "FUN_000acb20();" (call_expression "FUN_000acb20()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_000a96f0(param_1[1]);" (call_expression "FUN_000a96f0(param_1[1])" identifier (argument_list "(param_1[1])" ( (subscript_expression "param_1[1]" identifier [ number_literal ]) ))) ;) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;" (assignment_expression "iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))" identifier = (call_expression "FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))" identifier (argument_list "("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))" ( (string_literal ""SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content ") , (pointer_expression "*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10))" * (cast_expression "(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10))" ( (binary_expression "param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)" (binary_expression "param_1[3] * 0x10" (subscript_expression "param_1[3]" identifier [ number_literal ]) * number_literal) + (pointer_expression "*(int *)(*(int *)(iVar1 + 0xc) + 0x10)" * (cast_expression "(int *)(*(int *)(iVar1 + 0xc) + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0xc) + 0x10)" ( (binary_expression "*(int *)(iVar1 + 0xc) + 0x10" (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) ))))) )))) )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }" { (expression_statement "iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);" (assignment_expression "iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0)" identifier = (call_expression "FUN_000e2920(0x80,0,param_1 + 1,0)" identifier (argument_list "(0x80,0,param_1 + 1,0)" ( number_literal , number_literal , (binary_expression "param_1 + 1" identifier + number_literal) , number_literal )))) ;) (expression_statement "FUN_00042800(iVar1);" (call_expression "FUN_00042800(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (if_statement "if (iVar2 != 0) {\n      return iVar2;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      return iVar2;\n    }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "iVar1 = FUN_000ee370();" (assignment_expression "iVar1 = FUN_000ee370()" identifier = (call_expression "FUN_000ee370()" identifier (argument_list "()" ( )))) ;) (return_statement "return iVar1;" return identifier ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) != LIT) )) (compound_statement { (return_statement return LIT ;) })) (return_statement return LIT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) * LIT) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) )))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT , (binary_expression IDENT + LIT) , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) (return_statement return LIT ;) })))
(function_definition "int FUN_000eedf0(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar1 = *param_1;\n  if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }\n  FUN_000acb20();\n  FUN_000a96f0(param_1[1]);\n  param_1[1] = 0;\n  iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;\n  if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }\n  return 7;\n}" (primitive_type "int") (function_declarator "FUN_000eedf0(int *param_1,int param_2)" (identifier "FUN_000eedf0") (parameter_list "(int *param_1,int param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  iVar1 = *param_1;\n  if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }\n  FUN_000acb20();\n  FUN_000a96f0(param_1[1]);\n  param_1[1] = 0;\n  iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;\n  if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }\n  return 7;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (param_2 == 1) {\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }\n  else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    uVar3 = FUN_0006a450();\n    iVar2 = FUN_000456a0();\n    param_1[3] = iVar2;\n    if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }\n  }" ({ "{") (expression_statement "uVar3 = FUN_0006a450();" (assignment_expression "uVar3 = FUN_0006a450()" (identifier "uVar3") (= "=") (call_expression "FUN_0006a450()" (identifier "FUN_0006a450") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar2 = FUN_000456a0();" (assignment_expression "iVar2 = FUN_000456a0()" (identifier "iVar2") (= "=") (call_expression "FUN_000456a0()" (identifier "FUN_000456a0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "param_1[3] = iVar2;" (assignment_expression "param_1[3] = iVar2" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (if_statement "if (iVar2 < 0) {\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00042800(*(undefined4 *)(*param_1 + 8));\n      iVar1 = *param_1;\n      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);\n      *(undefined4 *)(iVar1 + 8) = uVar3;\n      if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }\n      return 7;\n    }" ({ "{") (expression_statement "FUN_00042800(*(undefined4 *)(*param_1 + 8));" (call_expression "FUN_00042800(*(undefined4 *)(*param_1 + 8))" (identifier "FUN_00042800") (argument_list "(*(undefined4 *)(*param_1 + 8))" (( "(") (pointer_expression "*(undefined4 *)(*param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(*param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 8)" (( "(") (binary_expression "*param_1 + 8" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "8")) () ")")))) () ")"))) (; ";")) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar3 = FUN_0008ff90("no such schema: %s",uVar3);" (assignment_expression "uVar3 = FUN_0008ff90("no such schema: %s",uVar3)" (identifier "uVar3") (= "=") (call_expression "FUN_0008ff90("no such schema: %s",uVar3)" (identifier "FUN_0008ff90") (argument_list "("no such schema: %s",uVar3)" (( "(") (string_literal ""no such schema: %s"" (" """) (string_content "no such schema: %s") (" """)) (, ",") (identifier "uVar3") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 8) = uVar3;" (assignment_expression "*(undefined4 *)(iVar1 + 8) = uVar3" (pointer_expression "*(undefined4 *)(iVar1 + 8)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (if_statement "if (*(int *)(*param_1 + 8) != 0) {\n        return 1;\n      }" (if "if") (parenthesized_expression "(*(int *)(*param_1 + 8) != 0)" (( "(") (binary_expression "*(int *)(*param_1 + 8) != 0" (pointer_expression "*(int *)(*param_1 + 8)" (* "*") (cast_expression "(int *)(*param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 8)" (( "(") (binary_expression "*param_1 + 8" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "8")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return 1;\n      }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }" (else "else") (compound_statement "{\n    param_1[3] = *(int *)(iVar1 + 0x10);\n  }" ({ "{") (expression_statement "param_1[3] = *(int *)(iVar1 + 0x10);" (assignment_expression "param_1[3] = *(int *)(iVar1 + 0x10)" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (= "=") (pointer_expression "*(int *)(iVar1 + 0x10)" (* "*") (cast_expression "(int *)(iVar1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (} "}")))) (expression_statement "FUN_000acb20();" (call_expression "FUN_000acb20()" (identifier "FUN_000acb20") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_000a96f0(param_1[1]);" (call_expression "FUN_000a96f0(param_1[1])" (identifier "FUN_000a96f0") (argument_list "(param_1[1])" (( "(") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))\n  ;" (assignment_expression "iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))" (identifier "iVar1") (= "=") (call_expression "FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))" (identifier "FUN_0008ff90") (argument_list "("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"\n                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))" (( "(") (string_literal ""SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"" (" """) (string_content "SELECT ") (escape_sequence "\'") (string_content "sqlite_master") (escape_sequence "\'") (string_content " AS name, 1 AS rootpage, ") (escape_sequence "\'") (string_content "table") (escape_sequence "\'") (string_content " AS type  UNION ALL  SELECT name, rootpage, type  FROM ") (escape_sequence "\"") (string_content "%w") (escape_sequence "\"") (string_content ".sqlite_master WHERE rootpage!=0  ORDER BY name") (" """)) (, ",") (pointer_expression "*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10))" (* "*") (cast_expression "(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10))" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10))" (( "(") (binary_expression "param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)" (binary_expression "param_1[3] * 0x10" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (* "*") (number_literal "0x10")) (+ "+") (pointer_expression "*(int *)(*(int *)(iVar1 + 0xc) + 0x10)" (* "*") (cast_expression "(int *)(*(int *)(iVar1 + 0xc) + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar1 + 0xc) + 0x10)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) + 0x10" (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 "0x10")) () ")"))))) () ")")))) () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);\n    FUN_00042800(iVar1);\n    if (iVar2 != 0) {\n      return iVar2;\n    }\n    iVar1 = FUN_000ee370();\n    return iVar1;\n  }" ({ "{") (expression_statement "iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);" (assignment_expression "iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0)" (identifier "iVar2") (= "=") (call_expression "FUN_000e2920(0x80,0,param_1 + 1,0)" (identifier "FUN_000e2920") (argument_list "(0x80,0,param_1 + 1,0)" (( "(") (number_literal "0x80") (, ",") (number_literal "0") (, ",") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1")) (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "FUN_00042800(iVar1);" (call_expression "FUN_00042800(iVar1)" (identifier "FUN_00042800") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (if_statement "if (iVar2 != 0) {\n      return iVar2;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return iVar2;\n    }" ({ "{") (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (expression_statement "iVar1 = FUN_000ee370();" (assignment_expression "iVar1 = FUN_000ee370()" (identifier "iVar1") (= "=") (call_expression "FUN_000ee370()" (identifier "FUN_000ee370") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int function_1(type_1 *var_10,int var_1,char *idxStr,int argc,type_2 **argv)

{
  type_3 *psVar1;
  char *var_8;
  int var_11;
  void *pvVar4;
  type_3 *psVar5;
  type_4 *in_stack_ffffffe4;
  type_5 **in_stack_ffffffe8;
  char **in_stack_ffffffec;
  
  psVar1 = var_10->pVtab;
  if (var_1 == 1) {
    pvVar4 = var_2(*argv,'\x01');
    psVar5 = (type_3 *)var_3(in_stack_ffffffe4,(char *)in_stack_ffffffe8);
    var_10[3].pVtab = psVar5;
    if ((int)psVar5 < 0) {
      var_4(var_10->pVtab->zErrMsg);
      psVar1 = var_10->pVtab;
      var_8 = var_5("no such schema: %s",pvVar4);
      psVar1->zErrMsg = var_8;
      if (var_10->pVtab->zErrMsg != (char *)0x0) {
        return 1;
      }
      return 7;
    }
  }
  else {
    var_10[3].pVtab = (type_3 *)psVar1[1].nRef;
  }
  var_6((type_6 *)var_10);
  var_7((type_5 *)var_10[1].pVtab);
  var_10[1].pVtab = (type_3 *)0x0;
  var_8 = var_5("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"
                           ,*(type_7 *)
                             ((psVar1[1].pModule)->xDisconnect + (int)var_10[3].pVtab * 0x10));
  if (var_8 != (char *)0x0) {
    var_11 = var_9
                      ((type_4 *)0x80,(char *)0x0,(int)(var_10 + 1),0,(type_8 *)in_stack_ffffffe4,
                       in_stack_ffffffe8,in_stack_ffffffec);
    var_4(var_8);
    if (var_11 != 0) {
      return var_11;
    }
    var_11 = var_12(var_10);
    return var_11;
  }
  return 7;
}


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

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int MASKED(int *param_1,int param_2)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  
  iVar1 = *param_1;
  if (param_2 == 1) {
    uVar3 = FUN_0006a450();
    iVar2 = FUN_000456a0();
    param_1[3] = iVar2;
    if (iVar2 < 0) {
      FUN_00042800(*(undefined4 *)(*param_1 + 8));
      iVar1 = *param_1;
      uVar3 = FUN_0008ff90("no such schema: %s",uVar3);
      *(undefined4 *)(iVar1 + 8) = uVar3;
      if (*(int *)(*param_1 + 8) != 0) {
        return 1;
      }
      return 7;
    }
  }
  else {
    param_1[3] = *(int *)(iVar1 + 0x10);
  }
  FUN_000acb20();
  FUN_000a96f0(param_1[1]);
  param_1[1] = 0;
  iVar1 = FUN_0008ff90("SELECT \'sqlite_master\' AS name, 1 AS rootpage, \'table\' AS type  UNION ALL  SELECT name, rootpage, type  FROM \"%w\".sqlite_master WHERE rootpage!=0  ORDER BY name"
                       ,*(undefined4 *)(param_1[3] * 0x10 + *(int *)(*(int *)(iVar1 + 0xc) + 0x10)))
  ;
  if (iVar1 != 0) {
    iVar2 = FUN_000e2920(0x80,0,param_1 + 1,0);
    FUN_00042800(iVar1);
    if (iVar2 != 0) {
      return iVar2;
    }
    iVar1 = FUN_000ee370();
    return iVar1;
  }
  return 7;
}

