
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* WARNING: Unknown calling convention */

int unixAccess(sqlite3_vfs *NotUsed,char *zPath,int flags,int *pResOut)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  int in_GS_OFFSET;
  stat buf;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (flags == 0) {
    iVar2 = (*aSyscall[4].pCurrent)(zPath,&buf);
    uVar3 = 0;
    if ((iVar2 == 0) && (uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000)) {
      uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -
              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f;
    }
    *pResOut = uVar3;
  }
  else {
    iVar2 = (*aSyscall[2].pCurrent)(zPath,6);
    *pResOut = (uint)(iVar2 == 0);
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return 0;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

undefined4 FUN_00024790(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)

{
  int iVar1;
  uint uVar2;
  int in_GS_OFFSET;
  undefined1 local_70 [16];
  uint local_60;
  uint local_44;
  int local_40;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x24797;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_3 == 0) {
    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);
    uVar2 = 0;
    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {
      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;
    }
    *param_4 = uVar2;
  }
  else {
    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);
    *param_4 = (uint)(iVar1 == 0);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return 0;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000d1450();
}


PUSH ESI
PUSH EBX
CALL 0x000d0aa3
ADD EAX,0xe1869
SUB ESP,0x74
MOV EBX,dword ptr [ESP + 0x88]
MOV EDX,dword ptr [ESP + 0x84]
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x6c],ECX
XOR ECX,ECX
MOV ESI,dword ptr [ESP + 0x8c]
TEST EBX,EBX
JNZ 0x000247f8
SUB ESP,0x8
LEA ECX,[ESP + 0x14]
PUSH ECX
PUSH EDX
CALL dword ptr [EAX + 0x1474]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00024818
MOV dword ptr [ESI],EBX
XOR EAX,EAX
MOV EDX,dword ptr [ESP + 0x6c]
XOR EDX,dword ptr GS:[0x14]
JNZ 0x00024847
ADD ESP,0x74
POP EBX
POP ESI
RET
SUB ESP,0x8
PUSH 0x6
PUSH EDX
CALL dword ptr [EAX + 0x145c]
ADD ESP,0x10
TEST EAX,EAX
SETZ AL
MOVZX EAX,AL
MOV dword ptr [ESI],EAX
JMP 0x000247dd
MOV EAX,dword ptr [ESP + 0x1c]
MOV EBX,0x1
AND EAX,0xf000
CMP EAX,0x8000
JNZ 0x000247db
MOV ECX,dword ptr [ESP + 0x3c]
SAR ECX,0x1f
MOV EAX,ECX
SUB EAX,dword ptr [ESP + 0x38]
MOV EDX,ECX
SBB EDX,dword ptr [ESP + 0x3c]
MOV EBX,EDX
SHR EBX,0x1f
JMP 0x000247db
CALL 0x000d1450
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nundefined4 FUN_00024790(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_70 [16];\n  uint local_60;\n  uint local_44;\n  int local_40;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x24797;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000d1450();\n}\n\n" comment (function_definition "undefined4 FUN_00024790(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_70 [16];\n  uint local_60;\n  uint local_44;\n  int local_40;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x24797;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000d1450();\n}" type_identifier (function_declarator "FUN_00024790(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "uint *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_70 [16];\n  uint local_60;\n  uint local_44;\n  int local_40;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x24797;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000d1450();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_70 [16];" type_identifier (array_declarator "local_70 [16]" identifier [ number_literal ]) ;) (declaration "uint local_60;" type_identifier identifier ;) (declaration "uint local_44;" type_identifier identifier ;) (declaration "int local_40;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x24797;" (assignment_expression "uStack_c = 0x24797" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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) ))))) ;) (if_statement "if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }" { (expression_statement "iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70)" identifier = (call_expression "(*(code *)PTR_FUN_00107474)(param_2,local_70)" (parenthesized_expression "(*(code *)PTR_FUN_00107474)" ( (pointer_expression "*(code *)PTR_FUN_00107474" * (cast_expression "(code *)PTR_FUN_00107474" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,local_70)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }" if (parenthesized_expression "((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000))" ( (binary_expression "(iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) && (parenthesized_expression "(uVar2 = 1, (local_60 & 0xf000) == 0x8000)" ( (comma_expression "uVar2 = 1, (local_60 & 0xf000) == 0x8000" (assignment_expression "uVar2 = 1" identifier = number_literal) , (binary_expression "(local_60 & 0xf000) == 0x8000" (parenthesized_expression "(local_60 & 0xf000)" ( (binary_expression "local_60 & 0xf000" identifier & number_literal) )) == number_literal)) ))) )) (compound_statement "{\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }" { (expression_statement "uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;" (assignment_expression "uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f" identifier = (binary_expression "((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f" (binary_expression "((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44)" (parenthesized_expression "((local_40 >> 0x1f) - local_40)" ( (binary_expression "(local_40 >> 0x1f) - local_40" (parenthesized_expression "(local_40 >> 0x1f)" ( (binary_expression "local_40 >> 0x1f" identifier >> number_literal) )) - identifier) )) - (call_expression "(uint)((uint)(local_40 >> 0x1f) < local_44)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((uint)(local_40 >> 0x1f) < local_44)" ( (binary_expression "(uint)(local_40 >> 0x1f) < local_44" (call_expression "(uint)(local_40 >> 0x1f)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(local_40 >> 0x1f)" ( (binary_expression "local_40 >> 0x1f" identifier >> number_literal) ))) < identifier) )))) >> number_literal)) ;) })) (expression_statement "*param_4 = uVar2;" (assignment_expression "*param_4 = uVar2" (pointer_expression "*param_4" * identifier) = identifier) ;) }) (else_clause "else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }" else (compound_statement "{\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }" { (expression_statement "iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);" (assignment_expression "iVar1 = (*(code *)PTR_access_0010745c)(param_2,6)" identifier = (call_expression "(*(code *)PTR_access_0010745c)(param_2,6)" (parenthesized_expression "(*(code *)PTR_access_0010745c)" ( (pointer_expression "*(code *)PTR_access_0010745c" * (cast_expression "(code *)PTR_access_0010745c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,6)" ( identifier , number_literal )))) ;) (expression_statement "*param_4 = (uint)(iVar1 == 0);" (assignment_expression "*param_4 = (uint)(iVar1 == 0)" (pointer_expression "*param_4" * identifier) = (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )))) ;) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(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 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) comment (expression_statement "FUN_000d1450();" (call_expression "FUN_000d1450()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n/* WARNING: Unknown calling convention */\n\nint unixAccess(sqlite3_vfs *NotUsed,char *zPath,int flags,int *pResOut)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  stat buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (flags == 0) {\n    iVar2 = (*aSyscall[4].pCurrent)(zPath,&buf);\n    uVar3 = 0;\n    if ((iVar2 == 0) && (uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000)) {\n      uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f;\n    }\n    *pResOut = uVar3;\n  }\n  else {\n    iVar2 = (*aSyscall[2].pCurrent)(zPath,6);\n    *pResOut = (uint)(iVar2 == 0);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int unixAccess(sqlite3_vfs *NotUsed,char *zPath,int flags,int *pResOut)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  stat buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (flags == 0) {\n    iVar2 = (*aSyscall[4].pCurrent)(zPath,&buf);\n    uVar3 = 0;\n    if ((iVar2 == 0) && (uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000)) {\n      uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f;\n    }\n    *pResOut = uVar3;\n  }\n  else {\n    iVar2 = (*aSyscall[2].pCurrent)(zPath,6);\n    *pResOut = (uint)(iVar2 == 0);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "unixAccess(sqlite3_vfs *NotUsed,char *zPath,int flags,int *pResOut)" identifier (parameter_list "(sqlite3_vfs *NotUsed,char *zPath,int flags,int *pResOut)" ( (parameter_declaration "sqlite3_vfs *NotUsed" type_identifier (pointer_declarator "*NotUsed" * identifier)) , (parameter_declaration "char *zPath" primitive_type (pointer_declarator "*zPath" * identifier)) , (parameter_declaration "int flags" primitive_type identifier) , (parameter_declaration "int *pResOut" primitive_type (pointer_declarator "*pResOut" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  stat buf;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (flags == 0) {\n    iVar2 = (*aSyscall[4].pCurrent)(zPath,&buf);\n    uVar3 = 0;\n    if ((iVar2 == 0) && (uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000)) {\n      uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f;\n    }\n    *pResOut = uVar3;\n  }\n  else {\n    iVar2 = (*aSyscall[2].pCurrent)(zPath,6);\n    *pResOut = (uint)(iVar2 == 0);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\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 "uint uVar3;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "stat buf;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (flags == 0) {\n    iVar2 = (*aSyscall[4].pCurrent)(zPath,&buf);\n    uVar3 = 0;\n    if ((iVar2 == 0) && (uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000)) {\n      uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f;\n    }\n    *pResOut = uVar3;\n  }\n  else {\n    iVar2 = (*aSyscall[2].pCurrent)(zPath,6);\n    *pResOut = (uint)(iVar2 == 0);\n  }" if (parenthesized_expression "(flags == 0)" ( (binary_expression "flags == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = (*aSyscall[4].pCurrent)(zPath,&buf);\n    uVar3 = 0;\n    if ((iVar2 == 0) && (uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000)) {\n      uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f;\n    }\n    *pResOut = uVar3;\n  }" { (expression_statement "iVar2 = (*aSyscall[4].pCurrent)(zPath,&buf);" (assignment_expression "iVar2 = (*aSyscall[4].pCurrent)(zPath,&buf)" identifier = (call_expression "(*aSyscall[4].pCurrent)(zPath,&buf)" (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 "(zPath,&buf)" ( identifier , (pointer_expression "&buf" & identifier) )))) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (if_statement "if ((iVar2 == 0) && (uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000)) {\n      uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f;\n    }" if (parenthesized_expression "((iVar2 == 0) && (uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000))" ( (binary_expression "(iVar2 == 0) && (uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000)" (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) && (parenthesized_expression "(uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000)" ( (comma_expression "uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000" (assignment_expression "uVar3 = 1" identifier = number_literal) , (binary_expression "(buf.st_mode & 0xf000) == 0x8000" (parenthesized_expression "(buf.st_mode & 0xf000)" ( (binary_expression "buf.st_mode & 0xf000" (field_expression "buf.st_mode" identifier . field_identifier) & number_literal) )) == number_literal)) ))) )) (compound_statement "{\n      uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f;\n    }" { (expression_statement "uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f;" (assignment_expression "uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f" identifier = (binary_expression "((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size) >> 0x1f" (binary_expression "((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -\n              (uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size)" (parenthesized_expression "((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_)" ( (binary_expression "(buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_" (parenthesized_expression "(buf.st_size._4_4_ >> 0x1f)" ( (binary_expression "buf.st_size._4_4_ >> 0x1f" (field_expression "buf.st_size._4_4_" (field_expression "buf.st_size" identifier . field_identifier) . field_identifier) >> number_literal) )) - (field_expression "buf.st_size._4_4_" (field_expression "buf.st_size" identifier . field_identifier) . field_identifier)) )) - (call_expression "(uint)((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size)" ( (binary_expression "(uint)(buf.st_size._4_4_ >> 0x1f) < (uint)buf.st_size" (call_expression "(uint)(buf.st_size._4_4_ >> 0x1f)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(buf.st_size._4_4_ >> 0x1f)" ( (binary_expression "buf.st_size._4_4_ >> 0x1f" (field_expression "buf.st_size._4_4_" (field_expression "buf.st_size" identifier . field_identifier) . field_identifier) >> number_literal) ))) < (cast_expression "(uint)buf.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "buf.st_size" identifier . field_identifier))) )))) >> number_literal)) ;) })) (expression_statement "*pResOut = uVar3;" (assignment_expression "*pResOut = uVar3" (pointer_expression "*pResOut" * identifier) = identifier) ;) }) (else_clause "else {\n    iVar2 = (*aSyscall[2].pCurrent)(zPath,6);\n    *pResOut = (uint)(iVar2 == 0);\n  }" else (compound_statement "{\n    iVar2 = (*aSyscall[2].pCurrent)(zPath,6);\n    *pResOut = (uint)(iVar2 == 0);\n  }" { (expression_statement "iVar2 = (*aSyscall[2].pCurrent)(zPath,6);" (assignment_expression "iVar2 = (*aSyscall[2].pCurrent)(zPath,6)" identifier = (call_expression "(*aSyscall[2].pCurrent)(zPath,6)" (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 "(zPath,6)" ( identifier , number_literal )))) ;) (expression_statement "*pResOut = (uint)(iVar2 == 0);" (assignment_expression "*pResOut = (uint)(iVar2 == 0)" (pointer_expression "*pResOut" * identifier) = (call_expression "(uint)(iVar2 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )))) ;) }))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined4 FUN_00024790(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_70 [16];\n  uint local_60;\n  uint local_44;\n  int local_40;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x24797;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }\n                    \n  FUN_000d1450();\n}\n\n" (function_definition "undefined4 FUN_00024790(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_70 [16];\n  uint local_60;\n  uint local_44;\n  int local_40;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x24797;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }\n                    \n  FUN_000d1450();\n}" type_identifier (function_declarator "FUN_00024790(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "uint *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_70 [16];\n  uint local_60;\n  uint local_44;\n  int local_40;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x24797;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }\n                    \n  FUN_000d1450();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_70 [16];" type_identifier (array_declarator "local_70 [16]" identifier [ number_literal ]) ;) (declaration "uint local_60;" type_identifier identifier ;) (declaration "uint local_44;" type_identifier identifier ;) (declaration "int local_40;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x24797;" (assignment_expression "uStack_c = 0x24797" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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) ))))) ;) (if_statement "if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }" { (expression_statement "iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70)" identifier = (call_expression "(*(code *)PTR_FUN_00107474)(param_2,local_70)" (parenthesized_expression "(*(code *)PTR_FUN_00107474)" ( (pointer_expression "*(code *)PTR_FUN_00107474" * (cast_expression "(code *)PTR_FUN_00107474" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,local_70)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }" if (parenthesized_expression "((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000))" ( (binary_expression "(iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) && (parenthesized_expression "(uVar2 = 1, (local_60 & 0xf000) == 0x8000)" ( (comma_expression "uVar2 = 1, (local_60 & 0xf000) == 0x8000" (assignment_expression "uVar2 = 1" identifier = number_literal) , (binary_expression "(local_60 & 0xf000) == 0x8000" (parenthesized_expression "(local_60 & 0xf000)" ( (binary_expression "local_60 & 0xf000" identifier & number_literal) )) == number_literal)) ))) )) (compound_statement "{\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }" { (expression_statement "uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;" (assignment_expression "uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f" identifier = (binary_expression "((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f" (binary_expression "((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44)" (parenthesized_expression "((local_40 >> 0x1f) - local_40)" ( (binary_expression "(local_40 >> 0x1f) - local_40" (parenthesized_expression "(local_40 >> 0x1f)" ( (binary_expression "local_40 >> 0x1f" identifier >> number_literal) )) - identifier) )) - (call_expression "(uint)((uint)(local_40 >> 0x1f) < local_44)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((uint)(local_40 >> 0x1f) < local_44)" ( (binary_expression "(uint)(local_40 >> 0x1f) < local_44" (call_expression "(uint)(local_40 >> 0x1f)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(local_40 >> 0x1f)" ( (binary_expression "local_40 >> 0x1f" identifier >> number_literal) ))) < identifier) )))) >> number_literal)) ;) })) (expression_statement "*param_4 = uVar2;" (assignment_expression "*param_4 = uVar2" (pointer_expression "*param_4" * identifier) = identifier) ;) }) (else_clause "else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }" else (compound_statement "{\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }" { (expression_statement "iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);" (assignment_expression "iVar1 = (*(code *)PTR_access_0010745c)(param_2,6)" identifier = (call_expression "(*(code *)PTR_access_0010745c)(param_2,6)" (parenthesized_expression "(*(code *)PTR_access_0010745c)" ( (pointer_expression "*(code *)PTR_access_0010745c" * (cast_expression "(code *)PTR_access_0010745c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,6)" ( identifier , number_literal )))) ;) (expression_statement "*param_4 = (uint)(iVar1 == 0);" (assignment_expression "*param_4 = (uint)(iVar1 == 0)" (pointer_expression "*param_4" * identifier) = (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )))) ;) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(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 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "FUN_000d1450();" (call_expression "FUN_000d1450()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (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) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (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 , IDENT )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = LIT) , (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT >> LIT) )) - IDENT) )) - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) ))) < IDENT) )))) >> LIT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }) (else_clause else (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 (pointer_expression * IDENT) = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == LIT) )))) ;) }))) (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 LIT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 FUN_00024790(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_70 [16];\n  uint local_60;\n  uint local_44;\n  int local_40;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x24797;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }\n                    \n  FUN_000d1450();\n}" (type_identifier "undefined4") (function_declarator "FUN_00024790(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)" (identifier "FUN_00024790") (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3,uint *param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "uint *param_4" (type_identifier "uint") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_70 [16];\n  uint local_60;\n  uint local_44;\n  int local_40;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x24797;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }\n                    \n  FUN_000d1450();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_70 [16];" (type_identifier "undefined1") (array_declarator "local_70 [16]" (identifier "local_70") ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "uint local_60;" (type_identifier "uint") (identifier "local_60") (; ";")) (declaration "uint local_44;" (type_identifier "uint") (identifier "local_44") (; ";")) (declaration "int local_40;" (primitive_type "int") (identifier "local_40") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (declaration "undefined4 uStack_c;" (type_identifier "undefined4") (identifier "uStack_c") (; ";")) (expression_statement "uStack_c = 0x24797;" (assignment_expression "uStack_c = 0x24797" (identifier "uStack_c") (= "=") (number_literal "0x24797")) (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (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")) () ")"))))) (; ";")) (if_statement "if (param_3 == 0) {\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }\n  else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);\n    uVar2 = 0;\n    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }\n    *param_4 = uVar2;\n  }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_FUN_00107474)(param_2,local_70)" (parenthesized_expression "(*(code *)PTR_FUN_00107474)" (( "(") (pointer_expression "*(code *)PTR_FUN_00107474" (* "*") (cast_expression "(code *)PTR_FUN_00107474" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_00107474"))) () ")")) (argument_list "(param_2,local_70)" (( "(") (identifier "param_2") (, ",") (identifier "local_70") () ")")))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }" (if "if") (parenthesized_expression "((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000))" (( "(") (binary_expression "(iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)" (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(uVar2 = 1, (local_60 & 0xf000) == 0x8000)" (( "(") (comma_expression "uVar2 = 1, (local_60 & 0xf000) == 0x8000" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (, ",") (binary_expression "(local_60 & 0xf000) == 0x8000" (parenthesized_expression "(local_60 & 0xf000)" (( "(") (binary_expression "local_60 & 0xf000" (identifier "local_60") (& "&") (number_literal "0xf000")) () ")")) (== "==") (number_literal "0x8000"))) () ")"))) () ")")) (compound_statement "{\n      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;\n    }" ({ "{") (expression_statement "uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;" (assignment_expression "uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f" (identifier "uVar2") (= "=") (binary_expression "((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f" (binary_expression "((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44)" (parenthesized_expression "((local_40 >> 0x1f) - local_40)" (( "(") (binary_expression "(local_40 >> 0x1f) - local_40" (parenthesized_expression "(local_40 >> 0x1f)" (( "(") (binary_expression "local_40 >> 0x1f" (identifier "local_40") (>> ">>") (number_literal "0x1f")) () ")")) (- "-") (identifier "local_40")) () ")")) (- "-") (call_expression "(uint)((uint)(local_40 >> 0x1f) < local_44)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((uint)(local_40 >> 0x1f) < local_44)" (( "(") (binary_expression "(uint)(local_40 >> 0x1f) < local_44" (call_expression "(uint)(local_40 >> 0x1f)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(local_40 >> 0x1f)" (( "(") (binary_expression "local_40 >> 0x1f" (identifier "local_40") (>> ">>") (number_literal "0x1f")) () ")"))) (< "<") (identifier "local_44")) () ")")))) (>> ">>") (number_literal "0x1f"))) (; ";")) (} "}"))) (expression_statement "*param_4 = uVar2;" (assignment_expression "*param_4 = uVar2" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "uVar2")) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }" (else "else") (compound_statement "{\n    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);\n    *param_4 = (uint)(iVar1 == 0);\n  }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);" (assignment_expression "iVar1 = (*(code *)PTR_access_0010745c)(param_2,6)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_access_0010745c)(param_2,6)" (parenthesized_expression "(*(code *)PTR_access_0010745c)" (( "(") (pointer_expression "*(code *)PTR_access_0010745c" (* "*") (cast_expression "(code *)PTR_access_0010745c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_access_0010745c"))) () ")")) (argument_list "(param_2,6)" (( "(") (identifier "param_2") (, ",") (number_literal "6") () ")")))) (; ";")) (expression_statement "*param_4 = (uint)(iVar1 == 0);" (assignment_expression "*param_4 = (uint)(iVar1 == 0)" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")))) (; ";")) (} "}")))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (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 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "FUN_000d1450();" (call_expression "FUN_000d1450()" (identifier "FUN_000d1450") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* WARNING: Unknown calling convention */

int function_1(type_1 *NotUsed,char *zPath,int var_2,int *pResOut)

{
  int var_4;
  int var_3;
  type_2 uVar3;
  int var_1;
  type_3 buf;
  
  var_4 = *(int *)(var_1 + 0x14);
  if (var_2 == 0) {
    var_3 = (*aSyscall[4].pCurrent)(zPath,&buf);
    uVar3 = 0;
    if ((var_3 == 0) && (uVar3 = 1, (buf.st_mode & 0xf000) == 0x8000)) {
      uVar3 = ((buf.st_size._4_4_ >> 0x1f) - buf.st_size._4_4_) -
              (type_2)((type_2)(buf.st_size._4_4_ >> 0x1f) < (type_2)buf.st_size) >> 0x1f;
    }
    *pResOut = uVar3;
  }
  else {
    var_3 = (*aSyscall[2].pCurrent)(zPath,6);
    *pResOut = (type_2)(var_3 == 0);
  }
  if (var_4 == *(int *)(var_1 + 0x14)) {
    return 0;
  }
                    /* WARNING: Subroutine does not return */
  var_5();
}


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

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

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

{
  int iVar1;
  uint uVar2;
  int in_GS_OFFSET;
  undefined1 local_70 [16];
  uint local_60;
  uint local_44;
  int local_40;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x24797;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_3 == 0) {
    iVar1 = (*(code *)PTR_FUN_00107474)(param_2,local_70);
    uVar2 = 0;
    if ((iVar1 == 0) && (uVar2 = 1, (local_60 & 0xf000) == 0x8000)) {
      uVar2 = ((local_40 >> 0x1f) - local_40) - (uint)((uint)(local_40 >> 0x1f) < local_44) >> 0x1f;
    }
    *param_4 = uVar2;
  }
  else {
    iVar1 = (*(code *)PTR_access_0010745c)(param_2,6);
    *param_4 = (uint)(iVar1 == 0);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return 0;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000d1450();
}

