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

int __regparm3
sessionSelectStmt(sqlite3 *db,char *zDb,char *zTab,int nCol,char **azCol,u8 *abPK,
                 sqlite3_stmt **ppStmt)

{
  int iVar1;
  int iVar2;
  u8 *zSql;
  char *zStr;
  int iVar3;
  int iVal;
  int in_GS_OFFSET;
  char *local_48;
  int rc;
  SessionBuffer buf;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  rc = 0;
  iVar2 = sqlite3_stricmp("sqlite_stat1",zTab);
  if (iVar2 == 0) {
    zSql = (u8 *)sqlite3_mprintf("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"
                                 ,zDb);
    iVar2 = -1;
    if (zSql == (u8 *)0x0) {
      rc = 7;
      goto LAB_000c2643;
    }
  }
  else {
    buf.aBuf = (u8 *)0x0;
    buf.nBuf = 0;
    buf.nAlloc = 0;
    sessionAppendStr(&buf,"SELECT * FROM ",&rc);
    sessionAppendIdent(&buf,zDb,&rc);
    sessionAppendStr(&buf,".",&rc);
    sessionAppendIdent(&buf,zTab,&rc);
    sessionAppendStr(&buf," WHERE ",&rc);
    zStr = "";
    local_48 = " AND ";
    iVar2 = buf.nBuf;
    zSql = buf.aBuf;
    iVar3 = 0;
    if (0 < nCol) {
      do {
        iVal = iVar3 + 1;
        if (abPK[iVar3] != '\0') {
          sessionAppendStr(&buf,zStr,&rc);
          sessionAppendIdent(&buf,azCol[iVar3],&rc);
          sessionAppendStr(&buf," IS ?",&rc);
          sessionAppendInteger(&buf,iVal,&rc);
          zStr = local_48;
        }
        iVar2 = buf.nBuf;
        zSql = buf.aBuf;
        iVar3 = iVal;
      } while (nCol != iVal);
    }
  }
  if (rc == 0) {
    rc = sqlite3_prepare_v2(db,(char *)zSql,iVar2,ppStmt,(char **)0x0);
  }
LAB_000c2643:
  sqlite3_free(zSql);
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return rc;
}



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

undefined4 __regparm3
FUN_000c25a0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5
            ,int param_6,undefined4 param_7)

{
  char *pcVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  undefined4 local_30;
  int local_2c;
  undefined4 local_28;
  
  iVar2 = *(int *)(in_GS_OFFSET + 0x14);
  iVar3 = FUN_00027b40("sqlite_stat1",param_3);
  if (iVar3 == 0) {
    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"
                            ,param_2);
    local_28 = 0xffffffff;
    if (local_2c == 0) {
      local_30 = 7;
      goto LAB_000c2643;
    }
  }
  else {
    local_2c = 0;
    local_28 = 0;
    FUN_0006ddb0();
    FUN_0006dd00();
    FUN_0006ddb0();
    FUN_0006dd00();
    FUN_0006ddb0();
    iVar3 = 0;
    if (0 < param_4) {
      do {
        pcVar1 = (char *)(param_6 + iVar3);
        iVar3 = iVar3 + 1;
        if (*pcVar1 != '\0') {
          FUN_0006ddb0();
          FUN_0006dd00();
          FUN_0006ddb0();
          FUN_0006de30();
        }
      } while (param_4 != iVar3);
    }
  }
  local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);
LAB_000c2643:
  FUN_00024cc0(local_2c);
  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_30;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000f4bf0();
}


PUSH EBP
PUSH EDI
MOV EDI,ECX
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x00014cf0
ADD EBX,0x86927
SUB ESP,0x54
MOV dword ptr [ESP + 0x20],EAX
MOV EAX,dword ptr [ESP + 0x6c]
MOV dword ptr [ESP + 0x18],EDX
MOV dword ptr [ESP + 0x14],EAX
MOV EAX,dword ptr [ESP + 0x70]
MOV dword ptr [ESP + 0x10],EAX
MOV EAX,dword ptr [ESP + 0x74]
MOV dword ptr [ESP + 0x24],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x44],EAX
XOR EAX,EAX
LEA EAX,[EBX + 0xfffaeb02]
MOV dword ptr [ESP + 0x34],0x0
PUSH ECX
PUSH EAX
CALL 0x00027b40
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000c2670
SUB ESP,0x8
LEA EAX,[EBX + 0xfffbc170]
PUSH ESI
PUSH EAX
CALL 0x00071090
ADD ESP,0x10
MOV ESI,EAX
MOV EAX,0xffffffff
TEST ESI,ESI
JZ 0x000c2760
MOV EDX,dword ptr [ESP + 0x2c]
TEST EDX,EDX
JNZ 0x000c2643
SUB ESP,0xc
PUSH 0x0
PUSH dword ptr [ESP + 0x2c]
PUSH EAX
PUSH ESI
PUSH dword ptr [ESP + 0x34]
CALL 0x000c21a0
MOV dword ptr [ESP + 0x4c],EAX
ADD ESP,0x20
SUB ESP,0xc
PUSH ESI
CALL 0x00024cc0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x2c]
MOV ECX,dword ptr [ESP + 0x3c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x000c276d
ADD ESP,0x4c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EBP,[ESP + 0x2c]
LEA ESI,[ESP + 0x30]
MOV dword ptr [ESP + 0x30],0x0
MOV ECX,EBP
LEA EDX,[EBX + 0xfffaefce]
MOV EAX,ESI
MOV dword ptr [ESP + 0x34],0x0
MOV dword ptr [ESP + 0x38],0x0
CALL 0x0006ddb0
MOV EDX,dword ptr [ESP + 0x10]
MOV ECX,EBP
MOV EAX,ESI
CALL 0x0006dd00
MOV ECX,EBP
LEA EDX,[EBX + 0xfffaefb8]
MOV EAX,ESI
CALL 0x0006ddb0
MOV EDX,EDI
MOV ECX,EBP
MOV EAX,ESI
CALL 0x0006dd00
MOV ECX,EBP
LEA EDX,[EBX + 0xfffac4cf]
MOV EAX,ESI
CALL 0x0006ddb0
LEA EAX,[EBX + 0xfffaefdd]
MOV ECX,dword ptr [ESP + 0x60]
XOR EDI,EDI
MOV dword ptr [ESP + 0x10],EAX
LEA EAX,[EBX + 0xfffac4e7]
LEA EDX,[EBX + 0xfffac22b]
MOV dword ptr [ESP + 0x14],EAX
TEST ECX,ECX
JG 0x000c274c
LEA ESI,[ESI]
MOV ESI,dword ptr [ESP + 0x30]
MOV EAX,dword ptr [ESP + 0x34]
JMP 0x000c2620
MOV ECX,EBP
MOV EAX,ESI
CALL 0x0006ddb0
MOV EAX,dword ptr [ESP + 0xc]
MOV ECX,EBP
MOV EDX,dword ptr [EAX + EDI*0x4 + -0x4]
MOV EAX,ESI
CALL 0x0006dd00
MOV EDX,dword ptr [ESP + 0x10]
MOV ECX,EBP
MOV EAX,ESI
CALL 0x0006ddb0
MOV EDX,EDI
MOV ECX,EBP
MOV EAX,ESI
CALL 0x0006de30
MOV EDX,dword ptr [ESP + 0x14]
CMP dword ptr [ESP + 0x60],EDI
JZ 0x000c2700
MOV EAX,dword ptr [ESP + 0x8]
MOVZX EAX,byte ptr [EAX + EDI*0x1]
ADD EDI,0x1
TEST AL,AL
JZ 0x000c2746
JMP 0x000c2710
MOV dword ptr [ESP + 0x2c],0x7
JMP 0x000c2643
CALL 0x000f4bf0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3\nFUN_000c25a0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)\n\n{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined4 local_30;\n  int local_2c;\n  undefined4 local_28;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_00027b40("sqlite_stat1",param_3);\n  if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }\n  local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);\nLAB_000c2643:\n  FUN_00024cc0(local_2c);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f4bf0();\n}\n\n" comment (function_definition "undefined4 __regparm3\nFUN_000c25a0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)\n\n{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined4 local_30;\n  int local_2c;\n  undefined4 local_28;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_00027b40("sqlite_stat1",param_3);\n  if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }\n  local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);\nLAB_000c2643:\n  FUN_00024cc0(local_2c);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f4bf0();\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000c25a0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)" ( (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 identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "int param_6" primitive_type identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined4 local_30;\n  int local_2c;\n  undefined4 local_28;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_00027b40("sqlite_stat1",param_3);\n  if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }\n  local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);\nLAB_000c2643:\n  FUN_00024cc0(local_2c);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000f4bf0();\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (expression_statement "iVar2 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar2 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = FUN_00027b40("sqlite_stat1",param_3);" (assignment_expression "iVar3 = FUN_00027b40("sqlite_stat1",param_3)" identifier = (call_expression "FUN_00027b40("sqlite_stat1",param_3)" identifier (argument_list "("sqlite_stat1",param_3)" ( (string_literal ""sqlite_stat1"" " string_content ") , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }" { (expression_statement "local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);" (assignment_expression "local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2)" identifier = (call_expression "FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2)" identifier (argument_list "("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2)" ( (string_literal ""SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"" " string_content escape_sequence escape_sequence string_content ") , identifier )))) ;) (expression_statement "local_28 = 0xffffffff;" (assignment_expression "local_28 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }" if (parenthesized_expression "(local_2c == 0)" ( (binary_expression "local_2c == 0" identifier == number_literal) )) (compound_statement "{\n      local_30 = 7;\n      goto LAB_000c2643;\n    }" { (expression_statement "local_30 = 7;" (assignment_expression "local_30 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_000c2643;" goto statement_identifier ;) })) }) (else_clause "else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }" else (compound_statement "{\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }" { (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006dd00();" (call_expression "FUN_0006dd00()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006dd00();" (call_expression "FUN_0006dd00()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }" if (parenthesized_expression "(0 < param_4)" ( (binary_expression "0 < param_4" number_literal < identifier) )) (compound_statement "{\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }" { (do_statement "do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);" do (compound_statement "{\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      }" { (expression_statement "pcVar1 = (char *)(param_6 + iVar3);" (assignment_expression "pcVar1 = (char *)(param_6 + iVar3)" identifier = (cast_expression "(char *)(param_6 + iVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_6 + iVar3)" ( (binary_expression "param_6 + iVar3" identifier + identifier) )))) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }" if (parenthesized_expression "(*pcVar1 != '\0')" ( (binary_expression "*pcVar1 != '\0'" (pointer_expression "*pcVar1" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }" { (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006dd00();" (call_expression "FUN_0006dd00()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006de30();" (call_expression "FUN_0006de30()" identifier (argument_list "()" ( ))) ;) })) }) while (parenthesized_expression "(param_4 != iVar3)" ( (binary_expression "param_4 != iVar3" identifier != identifier) )) ;) })) }))) (expression_statement "local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);" (assignment_expression "local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0)" identifier = (call_expression "FUN_000c21a0(param_1,local_2c,local_28,param_7,0)" identifier (argument_list "(param_1,local_2c,local_28,param_7,0)" ( identifier , identifier , identifier , identifier , number_literal )))) ;) (labeled_statement "LAB_000c2643:\n  FUN_00024cc0(local_2c);" statement_identifier : (expression_statement "FUN_00024cc0(local_2c);" (call_expression "FUN_00024cc0(local_2c)" identifier (argument_list "(local_2c)" ( identifier ))) ;)) (if_statement "if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }" if (parenthesized_expression "(iVar2 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar2 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return local_30;\n  }" { (return_statement "return local_30;" return identifier ;) })) comment (expression_statement "FUN_000f4bf0();" (call_expression "FUN_000f4bf0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3\nsessionSelectStmt(sqlite3 *db,char *zDb,char *zTab,int nCol,char **azCol,u8 *abPK,\n                 sqlite3_stmt **ppStmt)\n\n{\n  int iVar1;\n  int iVar2;\n  u8 *zSql;\n  char *zStr;\n  int iVar3;\n  int iVal;\n  int in_GS_OFFSET;\n  char *local_48;\n  int rc;\n  SessionBuffer buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  rc = 0;\n  iVar2 = sqlite3_stricmp("sqlite_stat1",zTab);\n  if (iVar2 == 0) {\n    zSql = (u8 *)sqlite3_mprintf("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                                 ,zDb);\n    iVar2 = -1;\n    if (zSql == (u8 *)0x0) {\n      rc = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    buf.aBuf = (u8 *)0x0;\n    buf.nBuf = 0;\n    buf.nAlloc = 0;\n    sessionAppendStr(&buf,"SELECT * FROM ",&rc);\n    sessionAppendIdent(&buf,zDb,&rc);\n    sessionAppendStr(&buf,".",&rc);\n    sessionAppendIdent(&buf,zTab,&rc);\n    sessionAppendStr(&buf," WHERE ",&rc);\n    zStr = "";\n    local_48 = " AND ";\n    iVar2 = buf.nBuf;\n    zSql = buf.aBuf;\n    iVar3 = 0;\n    if (0 < nCol) {\n      do {\n        iVal = iVar3 + 1;\n        if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }\n        iVar2 = buf.nBuf;\n        zSql = buf.aBuf;\n        iVar3 = iVal;\n      } while (nCol != iVal);\n    }\n  }\n  if (rc == 0) {\n    rc = sqlite3_prepare_v2(db,(char *)zSql,iVar2,ppStmt,(char **)0x0);\n  }\nLAB_000c2643:\n  sqlite3_free(zSql);\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return rc;\n}\n\n" comment (function_definition "int __regparm3\nsessionSelectStmt(sqlite3 *db,char *zDb,char *zTab,int nCol,char **azCol,u8 *abPK,\n                 sqlite3_stmt **ppStmt)\n\n{\n  int iVar1;\n  int iVar2;\n  u8 *zSql;\n  char *zStr;\n  int iVar3;\n  int iVal;\n  int in_GS_OFFSET;\n  char *local_48;\n  int rc;\n  SessionBuffer buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  rc = 0;\n  iVar2 = sqlite3_stricmp("sqlite_stat1",zTab);\n  if (iVar2 == 0) {\n    zSql = (u8 *)sqlite3_mprintf("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                                 ,zDb);\n    iVar2 = -1;\n    if (zSql == (u8 *)0x0) {\n      rc = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    buf.aBuf = (u8 *)0x0;\n    buf.nBuf = 0;\n    buf.nAlloc = 0;\n    sessionAppendStr(&buf,"SELECT * FROM ",&rc);\n    sessionAppendIdent(&buf,zDb,&rc);\n    sessionAppendStr(&buf,".",&rc);\n    sessionAppendIdent(&buf,zTab,&rc);\n    sessionAppendStr(&buf," WHERE ",&rc);\n    zStr = "";\n    local_48 = " AND ";\n    iVar2 = buf.nBuf;\n    zSql = buf.aBuf;\n    iVar3 = 0;\n    if (0 < nCol) {\n      do {\n        iVal = iVar3 + 1;\n        if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }\n        iVar2 = buf.nBuf;\n        zSql = buf.aBuf;\n        iVar3 = iVal;\n      } while (nCol != iVal);\n    }\n  }\n  if (rc == 0) {\n    rc = sqlite3_prepare_v2(db,(char *)zSql,iVar2,ppStmt,(char **)0x0);\n  }\nLAB_000c2643:\n  sqlite3_free(zSql);\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return rc;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sessionSelectStmt(sqlite3 *db,char *zDb,char *zTab,int nCol,char **azCol,u8 *abPK,\n                 sqlite3_stmt **ppStmt)" identifier (parameter_list "(sqlite3 *db,char *zDb,char *zTab,int nCol,char **azCol,u8 *abPK,\n                 sqlite3_stmt **ppStmt)" ( (parameter_declaration "sqlite3 *db" type_identifier (pointer_declarator "*db" * identifier)) , (parameter_declaration "char *zDb" primitive_type (pointer_declarator "*zDb" * identifier)) , (parameter_declaration "char *zTab" primitive_type (pointer_declarator "*zTab" * identifier)) , (parameter_declaration "int nCol" primitive_type identifier) , (parameter_declaration "char **azCol" primitive_type (pointer_declarator "**azCol" * (pointer_declarator "*azCol" * identifier))) , (parameter_declaration "u8 *abPK" type_identifier (pointer_declarator "*abPK" * identifier)) , (parameter_declaration "sqlite3_stmt **ppStmt" type_identifier (pointer_declarator "**ppStmt" * (pointer_declarator "*ppStmt" * identifier))) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  u8 *zSql;\n  char *zStr;\n  int iVar3;\n  int iVal;\n  int in_GS_OFFSET;\n  char *local_48;\n  int rc;\n  SessionBuffer buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  rc = 0;\n  iVar2 = sqlite3_stricmp("sqlite_stat1",zTab);\n  if (iVar2 == 0) {\n    zSql = (u8 *)sqlite3_mprintf("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                                 ,zDb);\n    iVar2 = -1;\n    if (zSql == (u8 *)0x0) {\n      rc = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    buf.aBuf = (u8 *)0x0;\n    buf.nBuf = 0;\n    buf.nAlloc = 0;\n    sessionAppendStr(&buf,"SELECT * FROM ",&rc);\n    sessionAppendIdent(&buf,zDb,&rc);\n    sessionAppendStr(&buf,".",&rc);\n    sessionAppendIdent(&buf,zTab,&rc);\n    sessionAppendStr(&buf," WHERE ",&rc);\n    zStr = "";\n    local_48 = " AND ";\n    iVar2 = buf.nBuf;\n    zSql = buf.aBuf;\n    iVar3 = 0;\n    if (0 < nCol) {\n      do {\n        iVal = iVar3 + 1;\n        if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }\n        iVar2 = buf.nBuf;\n        zSql = buf.aBuf;\n        iVar3 = iVal;\n      } while (nCol != iVal);\n    }\n  }\n  if (rc == 0) {\n    rc = sqlite3_prepare_v2(db,(char *)zSql,iVar2,ppStmt,(char **)0x0);\n  }\nLAB_000c2643:\n  sqlite3_free(zSql);\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return rc;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "u8 *zSql;" type_identifier (pointer_declarator "*zSql" * identifier) ;) (declaration "char *zStr;" primitive_type (pointer_declarator "*zStr" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVal;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_48;" primitive_type (pointer_declarator "*local_48" * identifier) ;) (declaration "int rc;" primitive_type identifier ;) (declaration "SessionBuffer buf;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "rc = 0;" (assignment_expression "rc = 0" identifier = number_literal) ;) (expression_statement "iVar2 = sqlite3_stricmp("sqlite_stat1",zTab);" (assignment_expression "iVar2 = sqlite3_stricmp("sqlite_stat1",zTab)" identifier = (call_expression "sqlite3_stricmp("sqlite_stat1",zTab)" identifier (argument_list "("sqlite_stat1",zTab)" ( (string_literal ""sqlite_stat1"" " string_content ") , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    zSql = (u8 *)sqlite3_mprintf("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                                 ,zDb);\n    iVar2 = -1;\n    if (zSql == (u8 *)0x0) {\n      rc = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    buf.aBuf = (u8 *)0x0;\n    buf.nBuf = 0;\n    buf.nAlloc = 0;\n    sessionAppendStr(&buf,"SELECT * FROM ",&rc);\n    sessionAppendIdent(&buf,zDb,&rc);\n    sessionAppendStr(&buf,".",&rc);\n    sessionAppendIdent(&buf,zTab,&rc);\n    sessionAppendStr(&buf," WHERE ",&rc);\n    zStr = "";\n    local_48 = " AND ";\n    iVar2 = buf.nBuf;\n    zSql = buf.aBuf;\n    iVar3 = 0;\n    if (0 < nCol) {\n      do {\n        iVal = iVar3 + 1;\n        if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }\n        iVar2 = buf.nBuf;\n        zSql = buf.aBuf;\n        iVar3 = iVal;\n      } while (nCol != iVal);\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    zSql = (u8 *)sqlite3_mprintf("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                                 ,zDb);\n    iVar2 = -1;\n    if (zSql == (u8 *)0x0) {\n      rc = 7;\n      goto LAB_000c2643;\n    }\n  }" { (expression_statement "zSql = (u8 *)sqlite3_mprintf("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                                 ,zDb);" (assignment_expression "zSql = (u8 *)sqlite3_mprintf("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                                 ,zDb)" identifier = (cast_expression "(u8 *)sqlite3_mprintf("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                                 ,zDb)" ( (type_descriptor "u8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_mprintf("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                                 ,zDb)" identifier (argument_list "("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                                 ,zDb)" ( (string_literal ""SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"" " string_content escape_sequence escape_sequence string_content ") , identifier ))))) ;) (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) (if_statement "if (zSql == (u8 *)0x0) {\n      rc = 7;\n      goto LAB_000c2643;\n    }" if (parenthesized_expression "(zSql == (u8 *)0x0)" ( (binary_expression "zSql == (u8 *)0x0" identifier == (cast_expression "(u8 *)0x0" ( (type_descriptor "u8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      rc = 7;\n      goto LAB_000c2643;\n    }" { (expression_statement "rc = 7;" (assignment_expression "rc = 7" identifier = number_literal) ;) (goto_statement "goto LAB_000c2643;" goto statement_identifier ;) })) }) (else_clause "else {\n    buf.aBuf = (u8 *)0x0;\n    buf.nBuf = 0;\n    buf.nAlloc = 0;\n    sessionAppendStr(&buf,"SELECT * FROM ",&rc);\n    sessionAppendIdent(&buf,zDb,&rc);\n    sessionAppendStr(&buf,".",&rc);\n    sessionAppendIdent(&buf,zTab,&rc);\n    sessionAppendStr(&buf," WHERE ",&rc);\n    zStr = "";\n    local_48 = " AND ";\n    iVar2 = buf.nBuf;\n    zSql = buf.aBuf;\n    iVar3 = 0;\n    if (0 < nCol) {\n      do {\n        iVal = iVar3 + 1;\n        if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }\n        iVar2 = buf.nBuf;\n        zSql = buf.aBuf;\n        iVar3 = iVal;\n      } while (nCol != iVal);\n    }\n  }" else (compound_statement "{\n    buf.aBuf = (u8 *)0x0;\n    buf.nBuf = 0;\n    buf.nAlloc = 0;\n    sessionAppendStr(&buf,"SELECT * FROM ",&rc);\n    sessionAppendIdent(&buf,zDb,&rc);\n    sessionAppendStr(&buf,".",&rc);\n    sessionAppendIdent(&buf,zTab,&rc);\n    sessionAppendStr(&buf," WHERE ",&rc);\n    zStr = "";\n    local_48 = " AND ";\n    iVar2 = buf.nBuf;\n    zSql = buf.aBuf;\n    iVar3 = 0;\n    if (0 < nCol) {\n      do {\n        iVal = iVar3 + 1;\n        if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }\n        iVar2 = buf.nBuf;\n        zSql = buf.aBuf;\n        iVar3 = iVal;\n      } while (nCol != iVal);\n    }\n  }" { (expression_statement "buf.aBuf = (u8 *)0x0;" (assignment_expression "buf.aBuf = (u8 *)0x0" (field_expression "buf.aBuf" identifier . field_identifier) = (cast_expression "(u8 *)0x0" ( (type_descriptor "u8 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "buf.nBuf = 0;" (assignment_expression "buf.nBuf = 0" (field_expression "buf.nBuf" identifier . field_identifier) = number_literal) ;) (expression_statement "buf.nAlloc = 0;" (assignment_expression "buf.nAlloc = 0" (field_expression "buf.nAlloc" identifier . field_identifier) = number_literal) ;) (expression_statement "sessionAppendStr(&buf,"SELECT * FROM ",&rc);" (call_expression "sessionAppendStr(&buf,"SELECT * FROM ",&rc)" identifier (argument_list "(&buf,"SELECT * FROM ",&rc)" ( (pointer_expression "&buf" & identifier) , (string_literal ""SELECT * FROM "" " string_content ") , (pointer_expression "&rc" & identifier) ))) ;) (expression_statement "sessionAppendIdent(&buf,zDb,&rc);" (call_expression "sessionAppendIdent(&buf,zDb,&rc)" identifier (argument_list "(&buf,zDb,&rc)" ( (pointer_expression "&buf" & identifier) , identifier , (pointer_expression "&rc" & identifier) ))) ;) (expression_statement "sessionAppendStr(&buf,".",&rc);" (call_expression "sessionAppendStr(&buf,".",&rc)" identifier (argument_list "(&buf,".",&rc)" ( (pointer_expression "&buf" & identifier) , (string_literal ""."" " string_content ") , (pointer_expression "&rc" & identifier) ))) ;) (expression_statement "sessionAppendIdent(&buf,zTab,&rc);" (call_expression "sessionAppendIdent(&buf,zTab,&rc)" identifier (argument_list "(&buf,zTab,&rc)" ( (pointer_expression "&buf" & identifier) , identifier , (pointer_expression "&rc" & identifier) ))) ;) (expression_statement "sessionAppendStr(&buf," WHERE ",&rc);" (call_expression "sessionAppendStr(&buf," WHERE ",&rc)" identifier (argument_list "(&buf," WHERE ",&rc)" ( (pointer_expression "&buf" & identifier) , (string_literal "" WHERE "" " string_content ") , (pointer_expression "&rc" & identifier) ))) ;) (expression_statement "zStr = "";" (assignment_expression "zStr = """ identifier = (string_literal """" " ")) ;) (expression_statement "local_48 = " AND ";" (assignment_expression "local_48 = " AND "" identifier = (string_literal "" AND "" " string_content ")) ;) (expression_statement "iVar2 = buf.nBuf;" (assignment_expression "iVar2 = buf.nBuf" identifier = (field_expression "buf.nBuf" identifier . field_identifier)) ;) (expression_statement "zSql = buf.aBuf;" (assignment_expression "zSql = buf.aBuf" identifier = (field_expression "buf.aBuf" identifier . field_identifier)) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (0 < nCol) {\n      do {\n        iVal = iVar3 + 1;\n        if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }\n        iVar2 = buf.nBuf;\n        zSql = buf.aBuf;\n        iVar3 = iVal;\n      } while (nCol != iVal);\n    }" if (parenthesized_expression "(0 < nCol)" ( (binary_expression "0 < nCol" number_literal < identifier) )) (compound_statement "{\n      do {\n        iVal = iVar3 + 1;\n        if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }\n        iVar2 = buf.nBuf;\n        zSql = buf.aBuf;\n        iVar3 = iVal;\n      } while (nCol != iVal);\n    }" { (do_statement "do {\n        iVal = iVar3 + 1;\n        if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }\n        iVar2 = buf.nBuf;\n        zSql = buf.aBuf;\n        iVar3 = iVal;\n      } while (nCol != iVal);" do (compound_statement "{\n        iVal = iVar3 + 1;\n        if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }\n        iVar2 = buf.nBuf;\n        zSql = buf.aBuf;\n        iVar3 = iVal;\n      }" { (expression_statement "iVal = iVar3 + 1;" (assignment_expression "iVal = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (abPK[iVar3] != '\0') {\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }" if (parenthesized_expression "(abPK[iVar3] != '\0')" ( (binary_expression "abPK[iVar3] != '\0'" (subscript_expression "abPK[iVar3]" identifier [ identifier ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          sessionAppendStr(&buf,zStr,&rc);\n          sessionAppendIdent(&buf,azCol[iVar3],&rc);\n          sessionAppendStr(&buf," IS ?",&rc);\n          sessionAppendInteger(&buf,iVal,&rc);\n          zStr = local_48;\n        }" { (expression_statement "sessionAppendStr(&buf,zStr,&rc);" (call_expression "sessionAppendStr(&buf,zStr,&rc)" identifier (argument_list "(&buf,zStr,&rc)" ( (pointer_expression "&buf" & identifier) , identifier , (pointer_expression "&rc" & identifier) ))) ;) (expression_statement "sessionAppendIdent(&buf,azCol[iVar3],&rc);" (call_expression "sessionAppendIdent(&buf,azCol[iVar3],&rc)" identifier (argument_list "(&buf,azCol[iVar3],&rc)" ( (pointer_expression "&buf" & identifier) , (subscript_expression "azCol[iVar3]" identifier [ identifier ]) , (pointer_expression "&rc" & identifier) ))) ;) (expression_statement "sessionAppendStr(&buf," IS ?",&rc);" (call_expression "sessionAppendStr(&buf," IS ?",&rc)" identifier (argument_list "(&buf," IS ?",&rc)" ( (pointer_expression "&buf" & identifier) , (string_literal "" IS ?"" " string_content ") , (pointer_expression "&rc" & identifier) ))) ;) (expression_statement "sessionAppendInteger(&buf,iVal,&rc);" (call_expression "sessionAppendInteger(&buf,iVal,&rc)" identifier (argument_list "(&buf,iVal,&rc)" ( (pointer_expression "&buf" & identifier) , identifier , (pointer_expression "&rc" & identifier) ))) ;) (expression_statement "zStr = local_48;" (assignment_expression "zStr = local_48" identifier = identifier) ;) })) (expression_statement "iVar2 = buf.nBuf;" (assignment_expression "iVar2 = buf.nBuf" identifier = (field_expression "buf.nBuf" identifier . field_identifier)) ;) (expression_statement "zSql = buf.aBuf;" (assignment_expression "zSql = buf.aBuf" identifier = (field_expression "buf.aBuf" identifier . field_identifier)) ;) (expression_statement "iVar3 = iVal;" (assignment_expression "iVar3 = iVal" identifier = identifier) ;) }) while (parenthesized_expression "(nCol != iVal)" ( (binary_expression "nCol != iVal" identifier != identifier) )) ;) })) }))) (if_statement "if (rc == 0) {\n    rc = sqlite3_prepare_v2(db,(char *)zSql,iVar2,ppStmt,(char **)0x0);\n  }" if (parenthesized_expression "(rc == 0)" ( (binary_expression "rc == 0" identifier == number_literal) )) (compound_statement "{\n    rc = sqlite3_prepare_v2(db,(char *)zSql,iVar2,ppStmt,(char **)0x0);\n  }" { (expression_statement "rc = sqlite3_prepare_v2(db,(char *)zSql,iVar2,ppStmt,(char **)0x0);" (assignment_expression "rc = sqlite3_prepare_v2(db,(char *)zSql,iVar2,ppStmt,(char **)0x0)" identifier = (call_expression "sqlite3_prepare_v2(db,(char *)zSql,iVar2,ppStmt,(char **)0x0)" identifier (argument_list "(db,(char *)zSql,iVar2,ppStmt,(char **)0x0)" ( identifier , (cast_expression "(char *)zSql" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) )))) ;) })) (labeled_statement "LAB_000c2643:\n  sqlite3_free(zSql);" statement_identifier : (expression_statement "sqlite3_free(zSql);" (call_expression "sqlite3_free(zSql)" identifier (argument_list "(zSql)" ( identifier ))) ;)) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return rc;" return identifier ;) })))
(translation_unit "undefined4 __regparm3\nFUN_000c25a0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)\n\n{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined4 local_30;\n  int local_2c;\n  undefined4 local_28;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_00027b40("sqlite_stat1",param_3);\n  if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }\n  local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);\nLAB_000c2643:\n  FUN_00024cc0(local_2c);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }\n                    \n  FUN_000f4bf0();\n}\n\n" (function_definition "undefined4 __regparm3\nFUN_000c25a0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)\n\n{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined4 local_30;\n  int local_2c;\n  undefined4 local_28;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_00027b40("sqlite_stat1",param_3);\n  if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }\n  local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);\nLAB_000c2643:\n  FUN_00024cc0(local_2c);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }\n                    \n  FUN_000f4bf0();\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000c25a0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)" ( (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 identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "int param_6" primitive_type identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined4 local_30;\n  int local_2c;\n  undefined4 local_28;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_00027b40("sqlite_stat1",param_3);\n  if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }\n  local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);\nLAB_000c2643:\n  FUN_00024cc0(local_2c);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }\n                    \n  FUN_000f4bf0();\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (expression_statement "iVar2 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar2 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar3 = FUN_00027b40("sqlite_stat1",param_3);" (assignment_expression "iVar3 = FUN_00027b40("sqlite_stat1",param_3)" identifier = (call_expression "FUN_00027b40("sqlite_stat1",param_3)" identifier (argument_list "("sqlite_stat1",param_3)" ( (string_literal ""sqlite_stat1"" " string_content ") , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }" { (expression_statement "local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);" (assignment_expression "local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2)" identifier = (call_expression "FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2)" identifier (argument_list "("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2)" ( (string_literal ""SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"" " string_content escape_sequence escape_sequence string_content ") , identifier )))) ;) (expression_statement "local_28 = 0xffffffff;" (assignment_expression "local_28 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }" if (parenthesized_expression "(local_2c == 0)" ( (binary_expression "local_2c == 0" identifier == number_literal) )) (compound_statement "{\n      local_30 = 7;\n      goto LAB_000c2643;\n    }" { (expression_statement "local_30 = 7;" (assignment_expression "local_30 = 7" identifier = number_literal) ;) (goto_statement "goto LAB_000c2643;" goto statement_identifier ;) })) }) (else_clause "else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }" else (compound_statement "{\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }" { (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006dd00();" (call_expression "FUN_0006dd00()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006dd00();" (call_expression "FUN_0006dd00()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }" if (parenthesized_expression "(0 < param_4)" ( (binary_expression "0 < param_4" number_literal < identifier) )) (compound_statement "{\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }" { (do_statement "do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);" do (compound_statement "{\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      }" { (expression_statement "pcVar1 = (char *)(param_6 + iVar3);" (assignment_expression "pcVar1 = (char *)(param_6 + iVar3)" identifier = (cast_expression "(char *)(param_6 + iVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_6 + iVar3)" ( (binary_expression "param_6 + iVar3" identifier + identifier) )))) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }" if (parenthesized_expression "(*pcVar1 != '\0')" ( (binary_expression "*pcVar1 != '\0'" (pointer_expression "*pcVar1" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }" { (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006dd00();" (call_expression "FUN_0006dd00()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0006de30();" (call_expression "FUN_0006de30()" identifier (argument_list "()" ( ))) ;) })) }) while (parenthesized_expression "(param_4 != iVar3)" ( (binary_expression "param_4 != iVar3" identifier != identifier) )) ;) })) }))) (expression_statement "local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);" (assignment_expression "local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0)" identifier = (call_expression "FUN_000c21a0(param_1,local_2c,local_28,param_7,0)" identifier (argument_list "(param_1,local_2c,local_28,param_7,0)" ( identifier , identifier , identifier , identifier , number_literal )))) ;) (labeled_statement "LAB_000c2643:\n  FUN_00024cc0(local_2c);" statement_identifier : (expression_statement "FUN_00024cc0(local_2c);" (call_expression "FUN_00024cc0(local_2c)" identifier (argument_list "(local_2c)" ( identifier ))) ;)) (if_statement "if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }" if (parenthesized_expression "(iVar2 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar2 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return local_30;\n  }" { (return_statement "return local_30;" return identifier ;) })) (expression_statement "FUN_000f4bf0();" (call_expression "FUN_000f4bf0()" identifier (argument_list "()" ( ))) ;) })))
(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 IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence escape_sequence string_content ") , IDENT )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , LIT )))) ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 __regparm3\nFUN_000c25a0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)\n\n{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined4 local_30;\n  int local_2c;\n  undefined4 local_28;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_00027b40("sqlite_stat1",param_3);\n  if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }\n  local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);\nLAB_000c2643:\n  FUN_00024cc0(local_2c);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }\n                    \n  FUN_000f4bf0();\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000c25a0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)" (identifier "FUN_000c25a0") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,undefined4 param_5\n            ,int param_6,undefined4 param_7)" (( "(") (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") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "int param_6" (primitive_type "int") (identifier "param_6")) (, ",") (parameter_declaration "undefined4 param_7" (type_identifier "undefined4") (identifier "param_7")) () ")"))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  int iVar3;\n  int in_GS_OFFSET;\n  undefined4 local_30;\n  int local_2c;\n  undefined4 local_28;\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_00027b40("sqlite_stat1",param_3);\n  if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }\n  local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);\nLAB_000c2643:\n  FUN_00024cc0(local_2c);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }\n                    \n  FUN_000f4bf0();\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 local_30;" (type_identifier "undefined4") (identifier "local_30") (; ";")) (declaration "int local_2c;" (primitive_type "int") (identifier "local_2c") (; ";")) (declaration "undefined4 local_28;" (type_identifier "undefined4") (identifier "local_28") (; ";")) (expression_statement "iVar2 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar2 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar3 = FUN_00027b40("sqlite_stat1",param_3);" (assignment_expression "iVar3 = FUN_00027b40("sqlite_stat1",param_3)" (identifier "iVar3") (= "=") (call_expression "FUN_00027b40("sqlite_stat1",param_3)" (identifier "FUN_00027b40") (argument_list "("sqlite_stat1",param_3)" (( "(") (string_literal ""sqlite_stat1"" (" """) (string_content "sqlite_stat1") (" """)) (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }\n  else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);\n    local_28 = 0xffffffff;\n    if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }\n  }" ({ "{") (expression_statement "local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2);" (assignment_expression "local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2)" (identifier "local_2c") (= "=") (call_expression "FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2)" (identifier "FUN_00071090") (argument_list "("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"\n                            ,param_2)" (( "(") (string_literal ""SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"" (" """) (string_content "SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X") (escape_sequence "\'") (escape_sequence "\'") (string_content " THEN NULL ELSE ?2 END)") (" """)) (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "local_28 = 0xffffffff;" (assignment_expression "local_28 = 0xffffffff" (identifier "local_28") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (local_2c == 0) {\n      local_30 = 7;\n      goto LAB_000c2643;\n    }" (if "if") (parenthesized_expression "(local_2c == 0)" (( "(") (binary_expression "local_2c == 0" (identifier "local_2c") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      local_30 = 7;\n      goto LAB_000c2643;\n    }" ({ "{") (expression_statement "local_30 = 7;" (assignment_expression "local_30 = 7" (identifier "local_30") (= "=") (number_literal "7")) (; ";")) (goto_statement "goto LAB_000c2643;" (goto "goto") (statement_identifier "LAB_000c2643") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }" (else "else") (compound_statement "{\n    local_2c = 0;\n    local_28 = 0;\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    FUN_0006dd00();\n    FUN_0006ddb0();\n    iVar3 = 0;\n    if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }\n  }" ({ "{") (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" (identifier "local_2c") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" (identifier "FUN_0006ddb0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0006dd00();" (call_expression "FUN_0006dd00()" (identifier "FUN_0006dd00") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" (identifier "FUN_0006ddb0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0006dd00();" (call_expression "FUN_0006dd00()" (identifier "FUN_0006dd00") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" (identifier "FUN_0006ddb0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (if_statement "if (0 < param_4) {\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }" (if "if") (parenthesized_expression "(0 < param_4)" (( "(") (binary_expression "0 < param_4" (number_literal "0") (< "<") (identifier "param_4")) () ")")) (compound_statement "{\n      do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);\n    }" ({ "{") (do_statement "do {\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      } while (param_4 != iVar3);" (do "do") (compound_statement "{\n        pcVar1 = (char *)(param_6 + iVar3);\n        iVar3 = iVar3 + 1;\n        if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }\n      }" ({ "{") (expression_statement "pcVar1 = (char *)(param_6 + iVar3);" (assignment_expression "pcVar1 = (char *)(param_6 + iVar3)" (identifier "pcVar1") (= "=") (cast_expression "(char *)(param_6 + iVar3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_6 + iVar3)" (( "(") (binary_expression "param_6 + iVar3" (identifier "param_6") (+ "+") (identifier "iVar3")) () ")")))) (; ";")) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (*pcVar1 != '\0') {\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }" (if "if") (parenthesized_expression "(*pcVar1 != '\0')" (( "(") (binary_expression "*pcVar1 != '\0'" (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n          FUN_0006ddb0();\n          FUN_0006dd00();\n          FUN_0006ddb0();\n          FUN_0006de30();\n        }" ({ "{") (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" (identifier "FUN_0006ddb0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0006dd00();" (call_expression "FUN_0006dd00()" (identifier "FUN_0006dd00") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0006ddb0();" (call_expression "FUN_0006ddb0()" (identifier "FUN_0006ddb0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0006de30();" (call_expression "FUN_0006de30()" (identifier "FUN_0006de30") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(param_4 != iVar3)" (( "(") (binary_expression "param_4 != iVar3" (identifier "param_4") (!= "!=") (identifier "iVar3")) () ")")) (; ";")) (} "}"))) (} "}")))) (expression_statement "local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);" (assignment_expression "local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0)" (identifier "local_30") (= "=") (call_expression "FUN_000c21a0(param_1,local_2c,local_28,param_7,0)" (identifier "FUN_000c21a0") (argument_list "(param_1,local_2c,local_28,param_7,0)" (( "(") (identifier "param_1") (, ",") (identifier "local_2c") (, ",") (identifier "local_28") (, ",") (identifier "param_7") (, ",") (number_literal "0") () ")")))) (; ";")) (labeled_statement "LAB_000c2643:\n  FUN_00024cc0(local_2c);" (statement_identifier "LAB_000c2643") (: ":") (expression_statement "FUN_00024cc0(local_2c);" (call_expression "FUN_00024cc0(local_2c)" (identifier "FUN_00024cc0") (argument_list "(local_2c)" (( "(") (identifier "local_2c") () ")"))) (; ";"))) (if_statement "if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_30;\n  }" (if "if") (parenthesized_expression "(iVar2 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar2 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar2") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return local_30;\n  }" ({ "{") (return_statement "return local_30;" (return "return") (identifier "local_30") (; ";")) (} "}"))) (expression_statement "FUN_000f4bf0();" (call_expression "FUN_000f4bf0()" (identifier "FUN_000f4bf0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int __regparm3
function_1(type_1 *db,char *zDb,char *zTab,int var_8,char **azCol,type_2 *abPK,
                 type_3 **ppStmt)

{
  int var_15;
  int var_3;
  type_2 *var_5;
  char *zStr;
  int var_9;
  int var_11;
  int var_1;
  char *local_48;
  int var_12;
  type_4 buf;
  
  var_15 = *(int *)(var_1 + 0x14);
  var_12 = 0;
  var_3 = var_2("sqlite_stat1",zTab);
  if (var_3 == 0) {
    var_5 = (type_2 *)var_4("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"
                                 ,zDb);
    var_3 = -1;
    if (var_5 == (type_2 *)0x0) {
      var_12 = 7;
      goto LAB_000c2643;
    }
  }
  else {
    buf.aBuf = (type_2 *)0x0;
    buf.nBuf = 0;
    buf.nAlloc = 0;
    var_6(&buf,"SELECT * FROM ",&var_12);
    var_7(&buf,zDb,&var_12);
    var_6(&buf,".",&var_12);
    var_7(&buf,zTab,&var_12);
    var_6(&buf," WHERE ",&var_12);
    zStr = "";
    local_48 = " AND ";
    var_3 = buf.nBuf;
    var_5 = buf.aBuf;
    var_9 = 0;
    if (0 < var_8) {
      do {
        var_11 = var_9 + 1;
        if (abPK[var_9] != '\0') {
          var_6(&buf,zStr,&var_12);
          var_7(&buf,azCol[var_9],&var_12);
          var_6(&buf," IS ?",&var_12);
          var_10(&buf,var_11,&var_12);
          zStr = local_48;
        }
        var_3 = buf.nBuf;
        var_5 = buf.aBuf;
        var_9 = var_11;
      } while (var_8 != var_11);
    }
  }
  if (var_12 == 0) {
    var_12 = var_13(db,(char *)var_5,var_3,ppStmt,(char **)0x0);
  }
LAB_000c2643:
  var_14(var_5);
  if (var_15 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_16();
  }
  return var_12;
}


(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: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (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 (string_literal (string_content) (escape_sequence) (escape_sequence) (string_content)) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier) (number_literal))))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

/* 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,undefined4 param_5
            ,int param_6,undefined4 param_7)

{
  char *pcVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  undefined4 local_30;
  int local_2c;
  undefined4 local_28;
  
  iVar2 = *(int *)(in_GS_OFFSET + 0x14);
  iVar3 = FUN_00027b40("sqlite_stat1",param_3);
  if (iVar3 == 0) {
    local_2c = FUN_00071090("SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X\'\' THEN NULL ELSE ?2 END)"
                            ,param_2);
    local_28 = 0xffffffff;
    if (local_2c == 0) {
      local_30 = 7;
      goto LAB_000c2643;
    }
  }
  else {
    local_2c = 0;
    local_28 = 0;
    FUN_0006ddb0();
    FUN_0006dd00();
    FUN_0006ddb0();
    FUN_0006dd00();
    FUN_0006ddb0();
    iVar3 = 0;
    if (0 < param_4) {
      do {
        pcVar1 = (char *)(param_6 + iVar3);
        iVar3 = iVar3 + 1;
        if (*pcVar1 != '\0') {
          FUN_0006ddb0();
          FUN_0006dd00();
          FUN_0006ddb0();
          FUN_0006de30();
        }
      } while (param_4 != iVar3);
    }
  }
  local_30 = FUN_000c21a0(param_1,local_2c,local_28,param_7,0);
LAB_000c2643:
  FUN_00024cc0(local_2c);
  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_30;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000f4bf0();
}

