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

int __regparm3 unixGetTempname(int nBuf,char *zBuf)

{
  int iVar1;
  int iVar2;
  char **ppcVar3;
  char *pcVar4;
  int in_GS_OFFSET;
  int local_90;
  u64 r;
  uint local_74;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x96e5b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *zBuf = '\0';
  pcVar4 = sqlite3_temp_directory;
  if (azDirs_17541 == (char *)0x0) {
    azDirs_17541 = getenv("SQLITE_TMPDIR");
  }
  if (DAT_0017d3e4 == (char *)0x0) {
    DAT_0017d3e4 = getenv("TMPDIR");
  }
  ppcVar3 = &azDirs_17541;
  while( true ) {
    if ((((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&
        ((local_74 & 0xf000) == 0x4000)) && (iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0))
    {
      iVar1 = 0xc;
      goto LAB_00096f7f;
    }
    if (ppcVar3 == (char **)&DAT_0017d3f8) break;
    pcVar4 = *ppcVar3;
    ppcVar3 = ppcVar3 + 1;
  }
  local_90 = 0x190a;
  goto LAB_00096f00;
  while( true ) {
    iVar2 = (*aSyscall[2].pCurrent)(zBuf,0);
    local_90 = 0;
    if (iVar2 != 0) break;
LAB_00096f7f:
    iVar2 = sqlite3_initialize();
    if (iVar2 == 0) {
      sqlite3_randomness(8,&r);
    }
    zBuf[nBuf + -2] = '\0';
    sqlite3_snprintf(nBuf,zBuf,"%s/etilqs_%llx%c",pcVar4,(undefined4)r,r._4_4_,0);
    if ((zBuf[nBuf + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {
      local_90 = 1;
      break;
    }
  }
LAB_00096f00:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_90;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

undefined4 __regparm3 FUN_00096e50(int param_1,undefined1 *param_2)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  int in_GS_OFFSET;
  undefined4 local_90;
  undefined4 local_84;
  undefined4 local_80;
  uint local_74;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x96e5b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_2 = 0;
  iVar4 = DAT_0017d9a4;
  if (DAT_0017d3e0 == (char *)0x0) {
    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");
  }
  if (DAT_0017d3e4 == (char *)0x0) {
    DAT_0017d3e4 = getenv("TMPDIR");
  }
  piVar3 = (int *)&DAT_0017d3e0;
  while( true ) {
    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&
        ((local_74 & 0xf000) == 0x4000)) &&
       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {
      iVar1 = 0xc;
      goto LAB_00096f7f;
    }
    if (piVar3 == (int *)&DAT_0017d3f8) break;
    iVar4 = *piVar3;
    piVar3 = piVar3 + 1;
  }
  local_90 = 0x190a;
  goto LAB_00096f00;
  while( true ) {
    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);
    local_90 = 0;
    if (iVar2 != 0) break;
LAB_00096f7f:
    iVar2 = FUN_0005b490();
    if (iVar2 == 0) {
      FUN_0005bbb0();
    }
    param_2[param_1 + -2] = '\0';
    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);
    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {
      local_90 = 1;
      break;
    }
  }
LAB_00096f00:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_90;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00116110();
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
PUSH EBX
CALL 0x00017230
ADD EBX,0xe4fcd
SUB ESP,0x9c
MOV dword ptr [ESP + 0x10],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x8c],EAX
XOR EAX,EAX
MOV byte ptr [EDX],0x0
MOV EDX,dword ptr [EBX + 0x15b8]
MOV ESI,dword ptr [EBX + 0x1b7c]
TEST EDX,EDX
JZ 0x00096fd8
MOV EAX,dword ptr [EBX + 0x15bc]
TEST EAX,EAX
JZ 0x00097000
LEA EBP,[EBX + 0x15b8]
LEA EAX,[EBX + 0x15d0]
MOV dword ptr [ESP + 0x14],EDI
MOV EDI,ESI
LEA ECX,[ESP + 0x28]
MOV ESI,EBP
MOV EBP,EAX
MOV dword ptr [ESP + 0xc],ECX
JMP 0x00096ec5
MOV EDI,dword ptr [ESI]
ADD ESI,0x4
TEST EDI,EDI
JZ 0x00096eee
SUB ESP,0x8
PUSH dword ptr [ESP + 0x14]
PUSH EDI
CALL dword ptr [EBX + 0x194c]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00096eee
MOV EAX,dword ptr [ESP + 0x38]
AND EAX,0xf000
CMP EAX,0x4000
JZ 0x00096f28
CMP ESI,EBP
JNZ 0x00096ec0
MOV dword ptr [ESP + 0x1c],0x190a
LEA ESI,[ESI]
MOV ECX,dword ptr [ESP + 0x8c]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,dword ptr [ESP + 0x1c]
JNZ 0x0009701d
ADD ESP,0x9c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH 0x3
PUSH EDI
CALL dword ptr [EBX + 0x1934]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00096eee
MOV ESI,EDI
MOV dword ptr [ESP + 0x1c],EAX
MOV EDI,dword ptr [ESP + 0x14]
MOV ECX,0xc
MOV EAX,dword ptr [ESP + 0x10]
MOV dword ptr [ESP + 0x18],ESI
MOV ESI,ECX
LEA EBP,[EDI + EAX*0x1 + -0x2]
LEA EAX,[EBX + 0xfffa4707]
MOV dword ptr [ESP + 0x14],EAX
JMP 0x00096f7f
SUB ESP,0x8
LEA EAX,[0x1918]
PUSH 0x0
PUSH EDI
CALL dword ptr [EAX + EBX*0x1 + 0x1c]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00096f00
CALL 0x0005b490
TEST EAX,EAX
JNZ 0x00096f96
MOV EDX,dword ptr [ESP + 0xc]
MOV EAX,0x8
CALL 0x0005bbb0
SUB ESP,0x4
MOV byte ptr [EBP],0x0
PUSH 0x0
PUSH dword ptr [ESP + 0x34]
PUSH dword ptr [ESP + 0x34]
PUSH dword ptr [ESP + 0x28]
PUSH dword ptr [ESP + 0x28]
PUSH EDI
PUSH dword ptr [ESP + 0x2c]
CALL 0x00069ff0
ADD ESP,0x20
CMP byte ptr [EBP],0x0
JNZ 0x00096fc7
SUB ESI,0x1
JNZ 0x00096f68
MOV dword ptr [ESP + 0x1c],0x1
JMP 0x00096f00
SUB ESP,0xc
LEA EAX,[EBX + 0xfffa46f9]
PUSH EAX
CALL 0x00015320
ADD ESP,0x10
MOV dword ptr [EBX + 0x15b8],EAX
MOV EAX,dword ptr [EBX + 0x15bc]
TEST EAX,EAX
JNZ 0x00096e9f
NOP
SUB ESP,0xc
LEA EAX,[EBX + 0xfffa4700]
PUSH EAX
CALL 0x00015320
ADD ESP,0x10
MOV dword ptr [EBX + 0x15bc],EAX
JMP 0x00096e9f
CALL 0x00116110
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_00096e50(int param_1,undefined1 *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  undefined4 local_90;\n  undefined4 local_84;\n  undefined4 local_80;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  iVar4 = DAT_0017d9a4;\n  if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  piVar3 = (int *)&DAT_0017d3e0;\n  while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00116110();\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_00096e50(int param_1,undefined1 *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  undefined4 local_90;\n  undefined4 local_84;\n  undefined4 local_80;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  iVar4 = DAT_0017d9a4;\n  if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  piVar3 = (int *)&DAT_0017d3e0;\n  while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00116110();\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00096e50(int param_1,undefined1 *param_2)" identifier (parameter_list "(int param_1,undefined1 *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  undefined4 local_90;\n  undefined4 local_84;\n  undefined4 local_80;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  iVar4 = DAT_0017d9a4;\n  if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  piVar3 = (int *)&DAT_0017d3e0;\n  while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00116110();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_90;" type_identifier identifier ;) (declaration "undefined4 local_84;" type_identifier identifier ;) (declaration "undefined4 local_80;" type_identifier identifier ;) (declaration "uint local_74;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x96e5b;" (assignment_expression "uStack_14 = 0x96e5b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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 "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "iVar4 = DAT_0017d9a4;" (assignment_expression "iVar4 = DAT_0017d9a4" identifier = identifier) ;) (if_statement "if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }" if (parenthesized_expression "(DAT_0017d3e0 == (char *)0x0)" ( (binary_expression "DAT_0017d3e0 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }" { (expression_statement "DAT_0017d3e0 = getenv("SQLITE_TMPDIR");" (assignment_expression "DAT_0017d3e0 = getenv("SQLITE_TMPDIR")" identifier = (call_expression "getenv("SQLITE_TMPDIR")" identifier (argument_list "("SQLITE_TMPDIR")" ( (string_literal ""SQLITE_TMPDIR"" " string_content ") )))) ;) })) (if_statement "if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }" if (parenthesized_expression "(DAT_0017d3e4 == (char *)0x0)" ( (binary_expression "DAT_0017d3e4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }" { (expression_statement "DAT_0017d3e4 = getenv("TMPDIR");" (assignment_expression "DAT_0017d3e4 = getenv("TMPDIR")" identifier = (call_expression "getenv("TMPDIR")" identifier (argument_list "("TMPDIR")" ( (string_literal ""TMPDIR"" " string_content ") )))) ;) })) (expression_statement "piVar3 = (int *)&DAT_0017d3e0;" (assignment_expression "piVar3 = (int *)&DAT_0017d3e0" identifier = (cast_expression "(int *)&DAT_0017d3e0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_0017d3e0" & identifier))) ;) (while_statement "while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }" { (if_statement "if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }" if (parenthesized_expression "((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0))" ( (binary_expression "(((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)" (parenthesized_expression "(((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000))" ( (binary_expression "((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)" (parenthesized_expression "((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0))" ( (binary_expression "(iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)" (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)" ( (comma_expression "iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84)" identifier = (call_expression "(*(code *)PTR_FUN_0017d774)(iVar4,&local_84)" (parenthesized_expression "(*(code *)PTR_FUN_0017d774)" ( (pointer_expression "*(code *)PTR_FUN_0017d774" * (cast_expression "(code *)PTR_FUN_0017d774" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4,&local_84)" ( identifier , (pointer_expression "&local_84" & identifier) )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "((local_74 & 0xf000) == 0x4000)" ( (binary_expression "(local_74 & 0xf000) == 0x4000" (parenthesized_expression "(local_74 & 0xf000)" ( (binary_expression "local_74 & 0xf000" identifier & number_literal) )) == number_literal) ))) )) && (parenthesized_expression "(iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)" ( (comma_expression "iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0" (assignment_expression "iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3)" identifier = (call_expression "(*(code *)PTR_access_0017d75c)(iVar4,3)" (parenthesized_expression "(*(code *)PTR_access_0017d75c)" ( (pointer_expression "*(code *)PTR_access_0017d75c" * (cast_expression "(code *)PTR_access_0017d75c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4,3)" ( identifier , number_literal )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }" { (expression_statement "iVar1 = 0xc;" (assignment_expression "iVar1 = 0xc" identifier = number_literal) ;) (goto_statement "goto LAB_00096f7f;" goto statement_identifier ;) })) (if_statement "if (piVar3 == (int *)&DAT_0017d3f8) break;" if (parenthesized_expression "(piVar3 == (int *)&DAT_0017d3f8)" ( (binary_expression "piVar3 == (int *)&DAT_0017d3f8" identifier == (cast_expression "(int *)&DAT_0017d3f8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_0017d3f8" & identifier))) )) (break_statement "break;" break ;)) (expression_statement "iVar4 = *piVar3;" (assignment_expression "iVar4 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "piVar3 = piVar3 + 1;" (assignment_expression "piVar3 = piVar3 + 1" identifier = (binary_expression "piVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "local_90 = 0x190a;" (assignment_expression "local_90 = 0x190a" identifier = number_literal) ;) (goto_statement "goto LAB_00096f00;" goto statement_identifier ;) (while_statement "while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }" { (expression_statement "iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);" (assignment_expression "iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0)" identifier = (call_expression "(*(code *)PTR_access_0017d75c)(param_2,0)" (parenthesized_expression "(*(code *)PTR_access_0017d75c)" ( (pointer_expression "*(code *)PTR_access_0017d75c" * (cast_expression "(code *)PTR_access_0017d75c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,0)" ( identifier , number_literal )))) ;) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" identifier = number_literal) ;) (if_statement "if (iVar2 != 0) break;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (labeled_statement "LAB_00096f7f:\n    iVar2 = FUN_0005b490();" statement_identifier : (expression_statement "iVar2 = FUN_0005b490();" (assignment_expression "iVar2 = FUN_0005b490()" identifier = (call_expression "FUN_0005b490()" identifier (argument_list "()" ( )))) ;)) (if_statement "if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      FUN_0005bbb0();\n    }" { (expression_statement "FUN_0005bbb0();" (call_expression "FUN_0005bbb0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "param_2[param_1 + -2] = '\0';" (assignment_expression "param_2[param_1 + -2] = '\0'" (subscript_expression "param_2[param_1 + -2]" identifier [ (binary_expression "param_1 + -2" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);" (call_expression "FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0)" identifier (argument_list "(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0)" ( identifier , identifier , (string_literal ""%s/etilqs_%llx%c"" " string_content ") , identifier , identifier , identifier , number_literal ))) ;) (if_statement "if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }" if (parenthesized_expression "((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0))" ( (binary_expression "(param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)" (parenthesized_expression "(param_2[param_1 + -2] != '\0')" ( (binary_expression "param_2[param_1 + -2] != '\0'" (subscript_expression "param_2[param_1 + -2]" identifier [ (binary_expression "param_1 + -2" identifier + number_literal) ]) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(iVar1 = iVar1 + -1, iVar1 == 0)" ( (comma_expression "iVar1 = iVar1 + -1, iVar1 == 0" (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n      local_90 = 1;\n      break;\n    }" { (expression_statement "local_90 = 1;" (assignment_expression "local_90 = 1" identifier = number_literal) ;) (break_statement "break;" break ;) })) })) (labeled_statement "LAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(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_90;\n  }" { (return_statement "return local_90;" return identifier ;) }))) comment (expression_statement "FUN_00116110();" (call_expression "FUN_00116110()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 unixGetTempname(int nBuf,char *zBuf)\n\n{\n  int iVar1;\n  int iVar2;\n  char **ppcVar3;\n  char *pcVar4;\n  int in_GS_OFFSET;\n  int local_90;\n  u64 r;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *zBuf = '\0';\n  pcVar4 = sqlite3_temp_directory;\n  if (azDirs_17541 == (char *)0x0) {\n    azDirs_17541 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  ppcVar3 = &azDirs_17541;\n  while( true ) {\n    if ((((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) && (iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0))\n    {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (ppcVar3 == (char **)&DAT_0017d3f8) break;\n    pcVar4 = *ppcVar3;\n    ppcVar3 = ppcVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*aSyscall[2].pCurrent)(zBuf,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = sqlite3_initialize();\n    if (iVar2 == 0) {\n      sqlite3_randomness(8,&r);\n    }\n    zBuf[nBuf + -2] = '\0';\n    sqlite3_snprintf(nBuf,zBuf,"%s/etilqs_%llx%c",pcVar4,(undefined4)r,r._4_4_,0);\n    if ((zBuf[nBuf + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "int __regparm3 unixGetTempname(int nBuf,char *zBuf)\n\n{\n  int iVar1;\n  int iVar2;\n  char **ppcVar3;\n  char *pcVar4;\n  int in_GS_OFFSET;\n  int local_90;\n  u64 r;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *zBuf = '\0';\n  pcVar4 = sqlite3_temp_directory;\n  if (azDirs_17541 == (char *)0x0) {\n    azDirs_17541 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  ppcVar3 = &azDirs_17541;\n  while( true ) {\n    if ((((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) && (iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0))\n    {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (ppcVar3 == (char **)&DAT_0017d3f8) break;\n    pcVar4 = *ppcVar3;\n    ppcVar3 = ppcVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*aSyscall[2].pCurrent)(zBuf,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = sqlite3_initialize();\n    if (iVar2 == 0) {\n      sqlite3_randomness(8,&r);\n    }\n    zBuf[nBuf + -2] = '\0';\n    sqlite3_snprintf(nBuf,zBuf,"%s/etilqs_%llx%c",pcVar4,(undefined4)r,r._4_4_,0);\n    if ((zBuf[nBuf + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "unixGetTempname(int nBuf,char *zBuf)" identifier (parameter_list "(int nBuf,char *zBuf)" ( (parameter_declaration "int nBuf" primitive_type identifier) , (parameter_declaration "char *zBuf" primitive_type (pointer_declarator "*zBuf" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  char **ppcVar3;\n  char *pcVar4;\n  int in_GS_OFFSET;\n  int local_90;\n  u64 r;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *zBuf = '\0';\n  pcVar4 = sqlite3_temp_directory;\n  if (azDirs_17541 == (char *)0x0) {\n    azDirs_17541 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  ppcVar3 = &azDirs_17541;\n  while( true ) {\n    if ((((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) && (iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0))\n    {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (ppcVar3 == (char **)&DAT_0017d3f8) break;\n    pcVar4 = *ppcVar3;\n    ppcVar3 = ppcVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*aSyscall[2].pCurrent)(zBuf,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = sqlite3_initialize();\n    if (iVar2 == 0) {\n      sqlite3_randomness(8,&r);\n    }\n    zBuf[nBuf + -2] = '\0';\n    sqlite3_snprintf(nBuf,zBuf,"%s/etilqs_%llx%c",pcVar4,(undefined4)r,r._4_4_,0);\n    if ((zBuf[nBuf + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char **ppcVar3;" primitive_type (pointer_declarator "**ppcVar3" * (pointer_declarator "*ppcVar3" * identifier)) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_90;" primitive_type identifier ;) (declaration "u64 r;" type_identifier identifier ;) (declaration "uint local_74;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x96e5b;" (assignment_expression "uStack_14 = 0x96e5b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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 "*zBuf = '\0';" (assignment_expression "*zBuf = '\0'" (pointer_expression "*zBuf" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar4 = sqlite3_temp_directory;" (assignment_expression "pcVar4 = sqlite3_temp_directory" identifier = identifier) ;) (if_statement "if (azDirs_17541 == (char *)0x0) {\n    azDirs_17541 = getenv("SQLITE_TMPDIR");\n  }" if (parenthesized_expression "(azDirs_17541 == (char *)0x0)" ( (binary_expression "azDirs_17541 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    azDirs_17541 = getenv("SQLITE_TMPDIR");\n  }" { (expression_statement "azDirs_17541 = getenv("SQLITE_TMPDIR");" (assignment_expression "azDirs_17541 = getenv("SQLITE_TMPDIR")" identifier = (call_expression "getenv("SQLITE_TMPDIR")" identifier (argument_list "("SQLITE_TMPDIR")" ( (string_literal ""SQLITE_TMPDIR"" " string_content ") )))) ;) })) (if_statement "if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }" if (parenthesized_expression "(DAT_0017d3e4 == (char *)0x0)" ( (binary_expression "DAT_0017d3e4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }" { (expression_statement "DAT_0017d3e4 = getenv("TMPDIR");" (assignment_expression "DAT_0017d3e4 = getenv("TMPDIR")" identifier = (call_expression "getenv("TMPDIR")" identifier (argument_list "("TMPDIR")" ( (string_literal ""TMPDIR"" " string_content ") )))) ;) })) (expression_statement "ppcVar3 = &azDirs_17541;" (assignment_expression "ppcVar3 = &azDirs_17541" identifier = (pointer_expression "&azDirs_17541" & identifier)) ;) (while_statement "while( true ) {\n    if ((((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) && (iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0))\n    {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (ppcVar3 == (char **)&DAT_0017d3f8) break;\n    pcVar4 = *ppcVar3;\n    ppcVar3 = ppcVar3 + 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if ((((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) && (iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0))\n    {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (ppcVar3 == (char **)&DAT_0017d3f8) break;\n    pcVar4 = *ppcVar3;\n    ppcVar3 = ppcVar3 + 1;\n  }" { (if_statement "if ((((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) && (iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0))\n    {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }" if (parenthesized_expression "((((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) && (iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0))" ( (binary_expression "(((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) && (iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0)" (parenthesized_expression "(((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000))" ( (binary_expression "((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)" (parenthesized_expression "((pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0))" ( (binary_expression "(pcVar4 != (char *)0x0) && (iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)" (parenthesized_expression "(pcVar4 != (char *)0x0)" ( (binary_expression "pcVar4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0)" ( (comma_expression "iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r), iVar1 == 0" (assignment_expression "iVar1 = (*aSyscall[4].pCurrent)(pcVar4,&r)" identifier = (call_expression "(*aSyscall[4].pCurrent)(pcVar4,&r)" (parenthesized_expression "(*aSyscall[4].pCurrent)" ( (pointer_expression "*aSyscall[4].pCurrent" * (field_expression "aSyscall[4].pCurrent" (subscript_expression "aSyscall[4]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(pcVar4,&r)" ( identifier , (pointer_expression "&r" & identifier) )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "((local_74 & 0xf000) == 0x4000)" ( (binary_expression "(local_74 & 0xf000) == 0x4000" (parenthesized_expression "(local_74 & 0xf000)" ( (binary_expression "local_74 & 0xf000" identifier & number_literal) )) == number_literal) ))) )) && (parenthesized_expression "(iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0)" ( (comma_expression "iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3), iVar1 == 0" (assignment_expression "iVar1 = (*aSyscall[2].pCurrent)(pcVar4,3)" identifier = (call_expression "(*aSyscall[2].pCurrent)(pcVar4,3)" (parenthesized_expression "(*aSyscall[2].pCurrent)" ( (pointer_expression "*aSyscall[2].pCurrent" * (field_expression "aSyscall[2].pCurrent" (subscript_expression "aSyscall[2]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(pcVar4,3)" ( identifier , number_literal )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }" { (expression_statement "iVar1 = 0xc;" (assignment_expression "iVar1 = 0xc" identifier = number_literal) ;) (goto_statement "goto LAB_00096f7f;" goto statement_identifier ;) })) (if_statement "if (ppcVar3 == (char **)&DAT_0017d3f8) break;" if (parenthesized_expression "(ppcVar3 == (char **)&DAT_0017d3f8)" ( (binary_expression "ppcVar3 == (char **)&DAT_0017d3f8" identifier == (cast_expression "(char **)&DAT_0017d3f8" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (pointer_expression "&DAT_0017d3f8" & identifier))) )) (break_statement "break;" break ;)) (expression_statement "pcVar4 = *ppcVar3;" (assignment_expression "pcVar4 = *ppcVar3" identifier = (pointer_expression "*ppcVar3" * identifier)) ;) (expression_statement "ppcVar3 = ppcVar3 + 1;" (assignment_expression "ppcVar3 = ppcVar3 + 1" identifier = (binary_expression "ppcVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "local_90 = 0x190a;" (assignment_expression "local_90 = 0x190a" identifier = number_literal) ;) (goto_statement "goto LAB_00096f00;" goto statement_identifier ;) (while_statement "while( true ) {\n    iVar2 = (*aSyscall[2].pCurrent)(zBuf,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = sqlite3_initialize();\n    if (iVar2 == 0) {\n      sqlite3_randomness(8,&r);\n    }\n    zBuf[nBuf + -2] = '\0';\n    sqlite3_snprintf(nBuf,zBuf,"%s/etilqs_%llx%c",pcVar4,(undefined4)r,r._4_4_,0);\n    if ((zBuf[nBuf + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar2 = (*aSyscall[2].pCurrent)(zBuf,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = sqlite3_initialize();\n    if (iVar2 == 0) {\n      sqlite3_randomness(8,&r);\n    }\n    zBuf[nBuf + -2] = '\0';\n    sqlite3_snprintf(nBuf,zBuf,"%s/etilqs_%llx%c",pcVar4,(undefined4)r,r._4_4_,0);\n    if ((zBuf[nBuf + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }" { (expression_statement "iVar2 = (*aSyscall[2].pCurrent)(zBuf,0);" (assignment_expression "iVar2 = (*aSyscall[2].pCurrent)(zBuf,0)" identifier = (call_expression "(*aSyscall[2].pCurrent)(zBuf,0)" (parenthesized_expression "(*aSyscall[2].pCurrent)" ( (pointer_expression "*aSyscall[2].pCurrent" * (field_expression "aSyscall[2].pCurrent" (subscript_expression "aSyscall[2]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(zBuf,0)" ( identifier , number_literal )))) ;) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" identifier = number_literal) ;) (if_statement "if (iVar2 != 0) break;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (labeled_statement "LAB_00096f7f:\n    iVar2 = sqlite3_initialize();" statement_identifier : (expression_statement "iVar2 = sqlite3_initialize();" (assignment_expression "iVar2 = sqlite3_initialize()" identifier = (call_expression "sqlite3_initialize()" identifier (argument_list "()" ( )))) ;)) (if_statement "if (iVar2 == 0) {\n      sqlite3_randomness(8,&r);\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      sqlite3_randomness(8,&r);\n    }" { (expression_statement "sqlite3_randomness(8,&r);" (call_expression "sqlite3_randomness(8,&r)" identifier (argument_list "(8,&r)" ( number_literal , (pointer_expression "&r" & identifier) ))) ;) })) (expression_statement "zBuf[nBuf + -2] = '\0';" (assignment_expression "zBuf[nBuf + -2] = '\0'" (subscript_expression "zBuf[nBuf + -2]" identifier [ (binary_expression "nBuf + -2" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "sqlite3_snprintf(nBuf,zBuf,"%s/etilqs_%llx%c",pcVar4,(undefined4)r,r._4_4_,0);" (call_expression "sqlite3_snprintf(nBuf,zBuf,"%s/etilqs_%llx%c",pcVar4,(undefined4)r,r._4_4_,0)" identifier (argument_list "(nBuf,zBuf,"%s/etilqs_%llx%c",pcVar4,(undefined4)r,r._4_4_,0)" ( identifier , identifier , (string_literal ""%s/etilqs_%llx%c"" " string_content ") , identifier , (cast_expression "(undefined4)r" ( (type_descriptor "undefined4" type_identifier) ) identifier) , (field_expression "r._4_4_" identifier . field_identifier) , number_literal ))) ;) (if_statement "if ((zBuf[nBuf + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }" if (parenthesized_expression "((zBuf[nBuf + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0))" ( (binary_expression "(zBuf[nBuf + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)" (parenthesized_expression "(zBuf[nBuf + -2] != '\0')" ( (binary_expression "zBuf[nBuf + -2] != '\0'" (subscript_expression "zBuf[nBuf + -2]" identifier [ (binary_expression "nBuf + -2" identifier + number_literal) ]) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(iVar1 = iVar1 + -1, iVar1 == 0)" ( (comma_expression "iVar1 = iVar1 + -1, iVar1 == 0" (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n      local_90 = 1;\n      break;\n    }" { (expression_statement "local_90 = 1;" (assignment_expression "local_90 = 1" identifier = number_literal) ;) (break_statement "break;" break ;) })) })) (labeled_statement "LAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(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_90;\n  }" { (return_statement "return local_90;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined4 __regparm3 FUN_00096e50(int param_1,undefined1 *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  undefined4 local_90;\n  undefined4 local_84;\n  undefined4 local_80;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  iVar4 = DAT_0017d9a4;\n  if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  piVar3 = (int *)&DAT_0017d3e0;\n  while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    \n  FUN_00116110();\n}\n\n" (function_definition "undefined4 __regparm3 FUN_00096e50(int param_1,undefined1 *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  undefined4 local_90;\n  undefined4 local_84;\n  undefined4 local_80;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  iVar4 = DAT_0017d9a4;\n  if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  piVar3 = (int *)&DAT_0017d3e0;\n  while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    \n  FUN_00116110();\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00096e50(int param_1,undefined1 *param_2)" identifier (parameter_list "(int param_1,undefined1 *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined1 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  undefined4 local_90;\n  undefined4 local_84;\n  undefined4 local_80;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  iVar4 = DAT_0017d9a4;\n  if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  piVar3 = (int *)&DAT_0017d3e0;\n  while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    \n  FUN_00116110();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_90;" type_identifier identifier ;) (declaration "undefined4 local_84;" type_identifier identifier ;) (declaration "undefined4 local_80;" type_identifier identifier ;) (declaration "uint local_74;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x96e5b;" (assignment_expression "uStack_14 = 0x96e5b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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 "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "iVar4 = DAT_0017d9a4;" (assignment_expression "iVar4 = DAT_0017d9a4" identifier = identifier) ;) (if_statement "if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }" if (parenthesized_expression "(DAT_0017d3e0 == (char *)0x0)" ( (binary_expression "DAT_0017d3e0 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }" { (expression_statement "DAT_0017d3e0 = getenv("SQLITE_TMPDIR");" (assignment_expression "DAT_0017d3e0 = getenv("SQLITE_TMPDIR")" identifier = (call_expression "getenv("SQLITE_TMPDIR")" identifier (argument_list "("SQLITE_TMPDIR")" ( (string_literal ""SQLITE_TMPDIR"" " string_content ") )))) ;) })) (if_statement "if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }" if (parenthesized_expression "(DAT_0017d3e4 == (char *)0x0)" ( (binary_expression "DAT_0017d3e4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }" { (expression_statement "DAT_0017d3e4 = getenv("TMPDIR");" (assignment_expression "DAT_0017d3e4 = getenv("TMPDIR")" identifier = (call_expression "getenv("TMPDIR")" identifier (argument_list "("TMPDIR")" ( (string_literal ""TMPDIR"" " string_content ") )))) ;) })) (expression_statement "piVar3 = (int *)&DAT_0017d3e0;" (assignment_expression "piVar3 = (int *)&DAT_0017d3e0" identifier = (cast_expression "(int *)&DAT_0017d3e0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_0017d3e0" & identifier))) ;) (while_statement "while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }" { (if_statement "if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }" if (parenthesized_expression "((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0))" ( (binary_expression "(((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)" (parenthesized_expression "(((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000))" ( (binary_expression "((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)" (parenthesized_expression "((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0))" ( (binary_expression "(iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)" (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)" ( (comma_expression "iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84)" identifier = (call_expression "(*(code *)PTR_FUN_0017d774)(iVar4,&local_84)" (parenthesized_expression "(*(code *)PTR_FUN_0017d774)" ( (pointer_expression "*(code *)PTR_FUN_0017d774" * (cast_expression "(code *)PTR_FUN_0017d774" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4,&local_84)" ( identifier , (pointer_expression "&local_84" & identifier) )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "((local_74 & 0xf000) == 0x4000)" ( (binary_expression "(local_74 & 0xf000) == 0x4000" (parenthesized_expression "(local_74 & 0xf000)" ( (binary_expression "local_74 & 0xf000" identifier & number_literal) )) == number_literal) ))) )) && (parenthesized_expression "(iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)" ( (comma_expression "iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0" (assignment_expression "iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3)" identifier = (call_expression "(*(code *)PTR_access_0017d75c)(iVar4,3)" (parenthesized_expression "(*(code *)PTR_access_0017d75c)" ( (pointer_expression "*(code *)PTR_access_0017d75c" * (cast_expression "(code *)PTR_access_0017d75c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4,3)" ( identifier , number_literal )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }" { (expression_statement "iVar1 = 0xc;" (assignment_expression "iVar1 = 0xc" identifier = number_literal) ;) (goto_statement "goto LAB_00096f7f;" goto statement_identifier ;) })) (if_statement "if (piVar3 == (int *)&DAT_0017d3f8) break;" if (parenthesized_expression "(piVar3 == (int *)&DAT_0017d3f8)" ( (binary_expression "piVar3 == (int *)&DAT_0017d3f8" identifier == (cast_expression "(int *)&DAT_0017d3f8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_0017d3f8" & identifier))) )) (break_statement "break;" break ;)) (expression_statement "iVar4 = *piVar3;" (assignment_expression "iVar4 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "piVar3 = piVar3 + 1;" (assignment_expression "piVar3 = piVar3 + 1" identifier = (binary_expression "piVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "local_90 = 0x190a;" (assignment_expression "local_90 = 0x190a" identifier = number_literal) ;) (goto_statement "goto LAB_00096f00;" goto statement_identifier ;) (while_statement "while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }" { (expression_statement "iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);" (assignment_expression "iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0)" identifier = (call_expression "(*(code *)PTR_access_0017d75c)(param_2,0)" (parenthesized_expression "(*(code *)PTR_access_0017d75c)" ( (pointer_expression "*(code *)PTR_access_0017d75c" * (cast_expression "(code *)PTR_access_0017d75c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,0)" ( identifier , number_literal )))) ;) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" identifier = number_literal) ;) (if_statement "if (iVar2 != 0) break;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (labeled_statement "LAB_00096f7f:\n    iVar2 = FUN_0005b490();" statement_identifier : (expression_statement "iVar2 = FUN_0005b490();" (assignment_expression "iVar2 = FUN_0005b490()" identifier = (call_expression "FUN_0005b490()" identifier (argument_list "()" ( )))) ;)) (if_statement "if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      FUN_0005bbb0();\n    }" { (expression_statement "FUN_0005bbb0();" (call_expression "FUN_0005bbb0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "param_2[param_1 + -2] = '\0';" (assignment_expression "param_2[param_1 + -2] = '\0'" (subscript_expression "param_2[param_1 + -2]" identifier [ (binary_expression "param_1 + -2" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);" (call_expression "FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0)" identifier (argument_list "(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0)" ( identifier , identifier , (string_literal ""%s/etilqs_%llx%c"" " string_content ") , identifier , identifier , identifier , number_literal ))) ;) (if_statement "if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }" if (parenthesized_expression "((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0))" ( (binary_expression "(param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)" (parenthesized_expression "(param_2[param_1 + -2] != '\0')" ( (binary_expression "param_2[param_1 + -2] != '\0'" (subscript_expression "param_2[param_1 + -2]" identifier [ (binary_expression "param_1 + -2" identifier + number_literal) ]) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(iVar1 = iVar1 + -1, iVar1 == 0)" ( (comma_expression "iVar1 = iVar1 + -1, iVar1 == 0" (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n      local_90 = 1;\n      break;\n    }" { (expression_statement "local_90 = 1;" (assignment_expression "local_90 = 1" identifier = number_literal) ;) (break_statement "break;" break ;) })) })) (labeled_statement "LAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(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_90;\n  }" { (return_statement "return local_90;" return identifier ;) }))) (expression_statement "FUN_00116110();" (call_expression "FUN_00116110()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (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 (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (pointer_expression & IDENT) )))) , (binary_expression IDENT == LIT)) ))) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (break_statement break ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (string_literal " string_content ") , IDENT , IDENT , IDENT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) != (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT + LIT)) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (break_statement break ;) })) })) (labeled_statement statement_identifier : (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 FUN_00096e50(int param_1,undefined1 *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  undefined4 local_90;\n  undefined4 local_84;\n  undefined4 local_80;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  iVar4 = DAT_0017d9a4;\n  if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  piVar3 = (int *)&DAT_0017d3e0;\n  while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    \n  FUN_00116110();\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00096e50(int param_1,undefined1 *param_2)" (identifier "FUN_00096e50") (parameter_list "(int param_1,undefined1 *param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined1 *param_2" (type_identifier "undefined1") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  undefined4 local_90;\n  undefined4 local_84;\n  undefined4 local_80;\n  uint local_74;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x96e5b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_2 = 0;\n  iVar4 = DAT_0017d9a4;\n  if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }\n  if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }\n  piVar3 = (int *)&DAT_0017d3e0;\n  while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }\n  local_90 = 0x190a;\n  goto LAB_00096f00;\n  while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }\nLAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }\n                    \n  FUN_00116110();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 local_90;" (type_identifier "undefined4") (identifier "local_90") (; ";")) (declaration "undefined4 local_84;" (type_identifier "undefined4") (identifier "local_84") (; ";")) (declaration "undefined4 local_80;" (type_identifier "undefined4") (identifier "local_80") (; ";")) (declaration "uint local_74;" (type_identifier "uint") (identifier "local_74") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x96e5b;" (assignment_expression "uStack_14 = 0x96e5b" (identifier "uStack_14") (= "=") (number_literal "0x96e5b")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (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 "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar4 = DAT_0017d9a4;" (assignment_expression "iVar4 = DAT_0017d9a4" (identifier "iVar4") (= "=") (identifier "DAT_0017d9a4")) (; ";")) (if_statement "if (DAT_0017d3e0 == (char *)0x0) {\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }" (if "if") (parenthesized_expression "(DAT_0017d3e0 == (char *)0x0)" (( "(") (binary_expression "DAT_0017d3e0 == (char *)0x0" (identifier "DAT_0017d3e0") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");\n  }" ({ "{") (expression_statement "DAT_0017d3e0 = getenv("SQLITE_TMPDIR");" (assignment_expression "DAT_0017d3e0 = getenv("SQLITE_TMPDIR")" (identifier "DAT_0017d3e0") (= "=") (call_expression "getenv("SQLITE_TMPDIR")" (identifier "getenv") (argument_list "("SQLITE_TMPDIR")" (( "(") (string_literal ""SQLITE_TMPDIR"" (" """) (string_content "SQLITE_TMPDIR") (" """)) () ")")))) (; ";")) (} "}"))) (if_statement "if (DAT_0017d3e4 == (char *)0x0) {\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }" (if "if") (parenthesized_expression "(DAT_0017d3e4 == (char *)0x0)" (( "(") (binary_expression "DAT_0017d3e4 == (char *)0x0" (identifier "DAT_0017d3e4") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    DAT_0017d3e4 = getenv("TMPDIR");\n  }" ({ "{") (expression_statement "DAT_0017d3e4 = getenv("TMPDIR");" (assignment_expression "DAT_0017d3e4 = getenv("TMPDIR")" (identifier "DAT_0017d3e4") (= "=") (call_expression "getenv("TMPDIR")" (identifier "getenv") (argument_list "("TMPDIR")" (( "(") (string_literal ""TMPDIR"" (" """) (string_content "TMPDIR") (" """)) () ")")))) (; ";")) (} "}"))) (expression_statement "piVar3 = (int *)&DAT_0017d3e0;" (assignment_expression "piVar3 = (int *)&DAT_0017d3e0" (identifier "piVar3") (= "=") (cast_expression "(int *)&DAT_0017d3e0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_0017d3e0" (& "&") (identifier "DAT_0017d3e0")))) (; ";")) (while_statement "while( true ) {\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }\n    if (piVar3 == (int *)&DAT_0017d3f8) break;\n    iVar4 = *piVar3;\n    piVar3 = piVar3 + 1;\n  }" ({ "{") (if_statement "if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }" (if "if") (parenthesized_expression "((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0))" (( "(") (binary_expression "(((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)) &&\n       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)" (parenthesized_expression "(((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000))" (( "(") (binary_expression "((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&\n        ((local_74 & 0xf000) == 0x4000)" (parenthesized_expression "((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0))" (( "(") (binary_expression "(iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)" (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)" (( "(") (comma_expression "iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_FUN_0017d774)(iVar4,&local_84)" (parenthesized_expression "(*(code *)PTR_FUN_0017d774)" (( "(") (pointer_expression "*(code *)PTR_FUN_0017d774" (* "*") (cast_expression "(code *)PTR_FUN_0017d774" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0017d774"))) () ")")) (argument_list "(iVar4,&local_84)" (( "(") (identifier "iVar4") (, ",") (pointer_expression "&local_84" (& "&") (identifier "local_84")) () ")")))) (, ",") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((local_74 & 0xf000) == 0x4000)" (( "(") (binary_expression "(local_74 & 0xf000) == 0x4000" (parenthesized_expression "(local_74 & 0xf000)" (( "(") (binary_expression "local_74 & 0xf000" (identifier "local_74") (& "&") (number_literal "0xf000")) () ")")) (== "==") (number_literal "0x4000")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)" (( "(") (comma_expression "iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0" (assignment_expression "iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_access_0017d75c)(iVar4,3)" (parenthesized_expression "(*(code *)PTR_access_0017d75c)" (( "(") (pointer_expression "*(code *)PTR_access_0017d75c" (* "*") (cast_expression "(code *)PTR_access_0017d75c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_access_0017d75c"))) () ")")) (argument_list "(iVar4,3)" (( "(") (identifier "iVar4") (, ",") (number_literal "3") () ")")))) (, ",") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n      iVar1 = 0xc;\n      goto LAB_00096f7f;\n    }" ({ "{") (expression_statement "iVar1 = 0xc;" (assignment_expression "iVar1 = 0xc" (identifier "iVar1") (= "=") (number_literal "0xc")) (; ";")) (goto_statement "goto LAB_00096f7f;" (goto "goto") (statement_identifier "LAB_00096f7f") (; ";")) (} "}"))) (if_statement "if (piVar3 == (int *)&DAT_0017d3f8) break;" (if "if") (parenthesized_expression "(piVar3 == (int *)&DAT_0017d3f8)" (( "(") (binary_expression "piVar3 == (int *)&DAT_0017d3f8" (identifier "piVar3") (== "==") (cast_expression "(int *)&DAT_0017d3f8" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_0017d3f8" (& "&") (identifier "DAT_0017d3f8")))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar4 = *piVar3;" (assignment_expression "iVar4 = *piVar3" (identifier "iVar4") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (expression_statement "piVar3 = piVar3 + 1;" (assignment_expression "piVar3 = piVar3 + 1" (identifier "piVar3") (= "=") (binary_expression "piVar3 + 1" (identifier "piVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "local_90 = 0x190a;" (assignment_expression "local_90 = 0x190a" (identifier "local_90") (= "=") (number_literal "0x190a")) (; ";")) (goto_statement "goto LAB_00096f00;" (goto "goto") (statement_identifier "LAB_00096f00") (; ";")) (while_statement "while( true ) {\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);\n    local_90 = 0;\n    if (iVar2 != 0) break;\nLAB_00096f7f:\n    iVar2 = FUN_0005b490();\n    if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }\n    param_2[param_1 + -2] = '\0';\n    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);\n    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }\n  }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);" (assignment_expression "iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_access_0017d75c)(param_2,0)" (parenthesized_expression "(*(code *)PTR_access_0017d75c)" (( "(") (pointer_expression "*(code *)PTR_access_0017d75c" (* "*") (cast_expression "(code *)PTR_access_0017d75c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_access_0017d75c"))) () ")")) (argument_list "(param_2,0)" (( "(") (identifier "param_2") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" (identifier "local_90") (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar2 != 0) break;" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (labeled_statement "LAB_00096f7f:\n    iVar2 = FUN_0005b490();" (statement_identifier "LAB_00096f7f") (: ":") (expression_statement "iVar2 = FUN_0005b490();" (assignment_expression "iVar2 = FUN_0005b490()" (identifier "iVar2") (= "=") (call_expression "FUN_0005b490()" (identifier "FUN_0005b490") (argument_list "()" (( "(") () ")")))) (; ";"))) (if_statement "if (iVar2 == 0) {\n      FUN_0005bbb0();\n    }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0005bbb0();\n    }" ({ "{") (expression_statement "FUN_0005bbb0();" (call_expression "FUN_0005bbb0()" (identifier "FUN_0005bbb0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "param_2[param_1 + -2] = '\0';" (assignment_expression "param_2[param_1 + -2] = '\0'" (subscript_expression "param_2[param_1 + -2]" (identifier "param_2") ([ "[") (binary_expression "param_1 + -2" (identifier "param_1") (+ "+") (number_literal "-2")) (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);" (call_expression "FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0)" (identifier "FUN_00069ff0") (argument_list "(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (string_literal ""%s/etilqs_%llx%c"" (" """) (string_content "%s/etilqs_%llx%c") (" """)) (, ",") (identifier "iVar4") (, ",") (identifier "local_84") (, ",") (identifier "local_80") (, ",") (number_literal "0") () ")"))) (; ";")) (if_statement "if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {\n      local_90 = 1;\n      break;\n    }" (if "if") (parenthesized_expression "((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0))" (( "(") (binary_expression "(param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)" (parenthesized_expression "(param_2[param_1 + -2] != '\0')" (( "(") (binary_expression "param_2[param_1 + -2] != '\0'" (subscript_expression "param_2[param_1 + -2]" (identifier "param_2") ([ "[") (binary_expression "param_1 + -2" (identifier "param_1") (+ "+") (number_literal "-2")) (] "]")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(iVar1 = iVar1 + -1, iVar1 == 0)" (( "(") (comma_expression "iVar1 = iVar1 + -1, iVar1 == 0" (assignment_expression "iVar1 = iVar1 + -1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1"))) (, ",") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n      local_90 = 1;\n      break;\n    }" ({ "{") (expression_statement "local_90 = 1;" (assignment_expression "local_90 = 1" (identifier "local_90") (= "=") (number_literal "1")) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (} "}"))) (labeled_statement "LAB_00096f00:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }" (statement_identifier "LAB_00096f00") (: ":") (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_90;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (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_90;\n  }" ({ "{") (return_statement "return local_90;" (return "return") (identifier "local_90") (; ";")) (} "}")))) (expression_statement "FUN_00116110();" (call_expression "FUN_00116110()" (identifier "FUN_00116110") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int __regparm3 function_1(int var_12,char *zBuf)

{
  int var_6;
  int var_9;
  char **var_8;
  char *var_5;
  int var_1;
  int local_90;
  type_1 r;
  type_2 var_7;
  int var_14;
  type_3 uStack_14;
  
  uStack_14 = 0x96e5b;
  var_14 = *(int *)(var_1 + 0x14);
  *zBuf = '\0';
  var_5 = sqlite3_temp_directory;
  if (var_2 == (char *)0x0) {
    var_2 = var_3("SQLITE_TMPDIR");
  }
  if (var_4 == (char *)0x0) {
    var_4 = var_3("TMPDIR");
  }
  var_8 = &var_2;
  while( true ) {
    if ((((var_5 != (char *)0x0) && (var_6 = (*aSyscall[4].pCurrent)(var_5,&r), var_6 == 0)) &&
        ((var_7 & 0xf000) == 0x4000)) && (var_6 = (*aSyscall[2].pCurrent)(var_5,3), var_6 == 0))
    {
      var_6 = 0xc;
      goto LAB_00096f7f;
    }
    if (var_8 == (char **)&DAT_0017d3f8) break;
    var_5 = *var_8;
    var_8 = var_8 + 1;
  }
  local_90 = 0x190a;
  goto LAB_00096f00;
  while( true ) {
    var_9 = (*aSyscall[2].pCurrent)(zBuf,0);
    local_90 = 0;
    if (var_9 != 0) break;
LAB_00096f7f:
    var_9 = var_10();
    if (var_9 == 0) {
      var_11(8,&r);
    }
    zBuf[var_12 + -2] = '\0';
    var_13(var_12,zBuf,"%s/etilqs_%llx%c",var_5,(type_3)r,r._4_4_,0);
    if ((zBuf[var_12 + -2] != '\0') || (var_6 = var_6 + -1, var_6 == 0)) {
      local_90 = 1;
      break;
    }
  }
LAB_00096f00:
  if (var_14 == *(int *)(var_1 + 0x14)) {
    return local_90;
  }
                    /* WARNING: Subroutine does not return */
  var_15();
}


(translation_unit (function_definition type: (type_identifier) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) 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: (number_literal))) (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: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (pointer_expression argument: (identifier))))) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (char_literal (escape_sequence)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (string_literal (string_content)) (identifier) (identifier) (identifier) (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (break_statement))))) (labeled_statement label: (statement_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(int param_1,undefined1 *param_2)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  int in_GS_OFFSET;
  undefined4 local_90;
  undefined4 local_84;
  undefined4 local_80;
  uint local_74;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x96e5b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_2 = 0;
  iVar4 = DAT_0017d9a4;
  if (DAT_0017d3e0 == (char *)0x0) {
    DAT_0017d3e0 = getenv("SQLITE_TMPDIR");
  }
  if (DAT_0017d3e4 == (char *)0x0) {
    DAT_0017d3e4 = getenv("TMPDIR");
  }
  piVar3 = (int *)&DAT_0017d3e0;
  while( true ) {
    if ((((iVar4 != 0) && (iVar1 = (*(code *)PTR_FUN_0017d774)(iVar4,&local_84), iVar1 == 0)) &&
        ((local_74 & 0xf000) == 0x4000)) &&
       (iVar1 = (*(code *)PTR_access_0017d75c)(iVar4,3), iVar1 == 0)) {
      iVar1 = 0xc;
      goto LAB_00096f7f;
    }
    if (piVar3 == (int *)&DAT_0017d3f8) break;
    iVar4 = *piVar3;
    piVar3 = piVar3 + 1;
  }
  local_90 = 0x190a;
  goto LAB_00096f00;
  while( true ) {
    iVar2 = (*(code *)PTR_access_0017d75c)(param_2,0);
    local_90 = 0;
    if (iVar2 != 0) break;
LAB_00096f7f:
    iVar2 = FUN_0005b490();
    if (iVar2 == 0) {
      FUN_0005bbb0();
    }
    param_2[param_1 + -2] = '\0';
    FUN_00069ff0(param_1,param_2,"%s/etilqs_%llx%c",iVar4,local_84,local_80,0);
    if ((param_2[param_1 + -2] != '\0') || (iVar1 = iVar1 + -1, iVar1 == 0)) {
      local_90 = 1;
      break;
    }
  }
LAB_00096f00:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_90;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00116110();
}

