
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

CURLcode file_connect(connectdata *conn,_Bool *done)

{
  _Bool _Var1;
  Curl_easy *data;
  undefined4 *puVar2;
  char *__file;
  CURLcode CVar3;
  void *pvVar4;
  int iVar5;
  int in_GS_OFFSET;
  char *real_path;
  size_t real_path_len;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1aa39;
  data = conn->data;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar2 = (undefined4 *)(data->req).protop;
  CVar3 = Curl_urldecode(data,(data->state).up.path,0,&real_path,&real_path_len,false);
  __file = real_path;
  if (CVar3 == CURLE_OK) {
    pvVar4 = memchr(real_path,0,real_path_len);
    if (pvVar4 == (void *)0x0) {
      iVar5 = open64(__file,0);
      _Var1 = (data->set).upload;
      *puVar2 = real_path;
      puVar2[1] = real_path;
      puVar2[2] = iVar5;
      if ((_Var1 == true) || (iVar5 != -1)) {
        *done = true;
      }
      else {
        CVar3 = CURLE_FILE_COULDNT_READ_FILE;
        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);
        puVar2 = (undefined4 *)(conn->data->req).protop;
        if (puVar2 != (undefined4 *)0x0) {
          (*Curl_cfree)((void *)puVar2[1]);
          puVar2[1] = 0;
          *puVar2 = 0;
          if (puVar2[2] != -1) {
            close(puVar2[2]);
          }
          puVar2[2] = 0xffffffff;
          CVar3 = CURLE_FILE_COULDNT_READ_FILE;
        }
      }
    }
    else {
      CVar3 = CURLE_URL_MALFORMAT;
      (*Curl_cfree)(__file);
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return CVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



int FUN_0001aa30(undefined1 *param_1)

{
  char cVar1;
  int iVar2;
  undefined4 *puVar3;
  char *__file;
  int iVar4;
  void *pvVar5;
  int iVar6;
  int unaff_EBX;
  int in_GS_OFFSET;
  int *unaff_retaddr;
  char *local_2c;
  size_t local_28;
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x1aa39;
  entry();
  iVar2 = *unaff_retaddr;
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  puVar3 = *(undefined4 **)(iVar2 + 0x148);
  iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);
  __file = local_2c;
  if (iVar4 == 0) {
    pvVar5 = memchr(local_2c,0,local_28);
    if (pvVar5 == (void *)0x0) {
      iVar6 = open64(__file,0);
      cVar1 = *(char *)(iVar2 + 0x935);
      *puVar3 = local_2c;
      puVar3[1] = local_2c;
      puVar3[2] = iVar6;
      if ((cVar1 == '\x01') || (iVar6 != -1)) {
        *param_1 = 1;
      }
      else {
        iVar4 = 0x25;
        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));
        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);
        if (puVar3 != (undefined4 *)0x0) {
          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);
          puVar3[1] = 0;
          *puVar3 = 0;
          if (puVar3[2] != -1) {
            close(puVar3[2]);
          }
          puVar3[2] = 0xffffffff;
          iVar4 = 0x25;
        }
      }
    }
    else {
      iVar4 = 3;
      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);
    }
  }
  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00082f60();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019ed0
ADD EBX,0x9bda7
SUB ESP,0x34
MOV EAX,dword ptr [ESP + 0x4c]
MOV EDI,dword ptr [ESP + 0x48]
MOV dword ptr [ESP + 0x14],EAX
MOV ESI,dword ptr [EDI]
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x24],EAX
XOR EAX,EAX
MOV EAX,dword ptr [ESI + 0x148]
MOV dword ptr [ESP + 0x10],EAX
PUSH 0x0
LEA EAX,[ESP + 0x24]
PUSH EAX
LEA EAX,[ESP + 0x24]
PUSH EAX
PUSH 0x0
PUSH dword ptr [ESI + 0xf0c]
PUSH ESI
CALL 0x000357b0
ADD ESP,0x20
MOV EBP,EAX
TEST EAX,EAX
JNZ 0x0001aabf
MOV ECX,dword ptr [ESP + 0x14]
SUB ESP,0x4
PUSH dword ptr [ESP + 0x1c]
PUSH 0x0
PUSH ECX
MOV dword ptr [ESP + 0x14],ECX
CALL 0x00018b20
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x4]
TEST EAX,EAX
JZ 0x0001aae0
SUB ESP,0xc
LEA EAX,[EBX + 0x88c]
MOV EBP,0x3
PUSH ECX
CALL dword ptr [EAX]
ADD ESP,0x10
MOV EDI,dword ptr [ESP + 0x1c]
XOR EDI,dword ptr GS:[0x14]
MOV EAX,EBP
JNZ 0x0001ab82
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH 0x0
PUSH ECX
CALL 0x00018220
MOV EDX,dword ptr [ESP + 0x18]
MOV ECX,dword ptr [ESP + 0x24]
ADD ESP,0x10
CMP byte ptr [ESI + 0x935],0x1
MOV dword ptr [EDX],ECX
MOV dword ptr [EDX + 0x4],ECX
MOV dword ptr [EDX + 0x8],EAX
JZ 0x0001ab0c
CMP EAX,-0x1
JZ 0x0001ab15
MOV EAX,dword ptr [ESP + 0xc]
MOV byte ptr [EAX],0x1
JMP 0x0001aabf
SUB ESP,0x4
LEA EAX,[EBX + 0xfffcc89d]
PUSH dword ptr [ESI + 0xf0c]
MOV EBP,0x25
PUSH EAX
PUSH ESI
CALL 0x00027d40
MOV EAX,dword ptr [EDI]
ADD ESP,0x10
MOV ESI,dword ptr [EAX + 0x148]
TEST ESI,ESI
JZ 0x0001aabf
LEA EAX,[EBX + 0x88c]
SUB ESP,0xc
PUSH dword ptr [ESI + 0x4]
CALL dword ptr [EAX]
MOV EAX,dword ptr [ESI + 0x8]
MOV dword ptr [ESI + 0x4],0x0
MOV dword ptr [ESI],0x0
ADD ESP,0x10
CMP EAX,-0x1
JZ 0x0001ab71
SUB ESP,0xc
PUSH EAX
CALL 0x00019a40
ADD ESP,0x10
MOV dword ptr [ESI + 0x8],0xffffffff
MOV EBP,0x25
JMP 0x0001aabf
CALL 0x00082f60
(translation_unit "int FUN_0001aa30(undefined1 *param_1)\n\n{\n  char cVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  char *__file;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  int *unaff_retaddr;\n  char *local_2c;\n  size_t local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  entry();\n  iVar2 = *unaff_retaddr;\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = *(undefined4 **)(iVar2 + 0x148);\n  iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);\n  __file = local_2c;\n  if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00082f60();\n}\n\n" (function_definition "int FUN_0001aa30(undefined1 *param_1)\n\n{\n  char cVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  char *__file;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  int *unaff_retaddr;\n  char *local_2c;\n  size_t local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  entry();\n  iVar2 = *unaff_retaddr;\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = *(undefined4 **)(iVar2 + 0x148);\n  iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);\n  __file = local_2c;\n  if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00082f60();\n}" primitive_type (function_declarator "FUN_0001aa30(undefined1 *param_1)" identifier (parameter_list "(undefined1 *param_1)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  char *__file;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  int *unaff_retaddr;\n  char *local_2c;\n  size_t local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  entry();\n  iVar2 = *unaff_retaddr;\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = *(undefined4 **)(iVar2 + 0x148);\n  iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);\n  __file = local_2c;\n  if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00082f60();\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "char *__file;" primitive_type (pointer_declarator "*__file" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (declaration "char *local_2c;" primitive_type (pointer_declarator "*local_2c" * identifier) ;) (declaration "size_t local_28;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1aa39;" (assignment_expression "uStack_14 = 0x1aa39" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar2 = *unaff_retaddr;" (assignment_expression "iVar2 = *unaff_retaddr" identifier = (pointer_expression "*unaff_retaddr" * identifier)) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(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 "puVar3 = *(undefined4 **)(iVar2 + 0x148);" (assignment_expression "puVar3 = *(undefined4 **)(iVar2 + 0x148)" identifier = (pointer_expression "*(undefined4 **)(iVar2 + 0x148)" * (cast_expression "(undefined4 **)(iVar2 + 0x148)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + 0x148)" ( (binary_expression "iVar2 + 0x148" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);" (assignment_expression "iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0)" identifier = (call_expression "FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0)" identifier (argument_list "(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0)" ( identifier , (pointer_expression "*(undefined4 *)(iVar2 + 0xf0c)" * (cast_expression "(undefined4 *)(iVar2 + 0xf0c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xf0c)" ( (binary_expression "iVar2 + 0xf0c" identifier + number_literal) )))) , number_literal , (pointer_expression "&local_2c" & identifier) , (pointer_expression "&local_28" & identifier) , number_literal )))) ;) (expression_statement "__file = local_2c;" (assignment_expression "__file = local_2c" identifier = identifier) ;) (if_statement "if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }" { (expression_statement "pvVar5 = memchr(local_2c,0,local_28);" (assignment_expression "pvVar5 = memchr(local_2c,0,local_28)" identifier = (call_expression "memchr(local_2c,0,local_28)" identifier (argument_list "(local_2c,0,local_28)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }" if (parenthesized_expression "(pvVar5 == (void *)0x0)" ( (binary_expression "pvVar5 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }" { (expression_statement "iVar6 = open64(__file,0);" (assignment_expression "iVar6 = open64(__file,0)" identifier = (call_expression "open64(__file,0)" identifier (argument_list "(__file,0)" ( identifier , number_literal )))) ;) (expression_statement "cVar1 = *(char *)(iVar2 + 0x935);" (assignment_expression "cVar1 = *(char *)(iVar2 + 0x935)" identifier = (pointer_expression "*(char *)(iVar2 + 0x935)" * (cast_expression "(char *)(iVar2 + 0x935)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x935)" ( (binary_expression "iVar2 + 0x935" identifier + number_literal) ))))) ;) (expression_statement "*puVar3 = local_2c;" (assignment_expression "*puVar3 = local_2c" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "puVar3[1] = local_2c;" (assignment_expression "puVar3[1] = local_2c" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[2] = iVar6;" (assignment_expression "puVar3[2] = iVar6" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }" if (parenthesized_expression "((cVar1 == '\x01') || (iVar6 != -1))" ( (binary_expression "(cVar1 == '\x01') || (iVar6 != -1)" (parenthesized_expression "(cVar1 == '\x01')" ( (binary_expression "cVar1 == '\x01'" identifier == (char_literal "'\x01'" ' escape_sequence ')) )) || (parenthesized_expression "(iVar6 != -1)" ( (binary_expression "iVar6 != -1" identifier != number_literal) ))) )) (compound_statement "{\n        *param_1 = 1;\n      }" { (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) }) (else_clause "else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }" else (compound_statement "{\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }" { (expression_statement "iVar4 = 0x25;" (assignment_expression "iVar4 = 0x25" identifier = number_literal) ;) (expression_statement "FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));" (call_expression "FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c))" identifier (argument_list "(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c))" ( identifier , (binary_expression "unaff_EBX + 0x68644" identifier + number_literal) , (pointer_expression "*(undefined4 *)(iVar2 + 0xf0c)" * (cast_expression "(undefined4 *)(iVar2 + 0xf0c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xf0c)" ( (binary_expression "iVar2 + 0xf0c" identifier + number_literal) )))) ))) ;) (expression_statement "puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);" (assignment_expression "puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148)" identifier = (pointer_expression "*(undefined4 **)(*unaff_retaddr + 0x148)" * (cast_expression "(undefined4 **)(*unaff_retaddr + 0x148)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*unaff_retaddr + 0x148)" ( (binary_expression "*unaff_retaddr + 0x148" (pointer_expression "*unaff_retaddr" * identifier) + number_literal) ))))) ;) (if_statement "if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }" if (parenthesized_expression "(puVar3 != (undefined4 *)0x0)" ( (binary_expression "puVar3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }" { (expression_statement "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);" (call_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1])" (parenthesized_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))" ( (pointer_expression "**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" * (pointer_expression "*(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" * (cast_expression "(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" ( (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX + 6" (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX" identifier + identifier) + number_literal) ))))) )) (argument_list "(puVar3[1])" ( (subscript_expression "puVar3[1]" identifier [ number_literal ]) ))) ;) (expression_statement "puVar3[1] = 0;" (assignment_expression "puVar3[1] = 0" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (if_statement "if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }" if (parenthesized_expression "(puVar3[2] != -1)" ( (binary_expression "puVar3[2] != -1" (subscript_expression "puVar3[2]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n            close(puVar3[2]);\n          }" { (expression_statement "close(puVar3[2]);" (call_expression "close(puVar3[2])" identifier (argument_list "(puVar3[2])" ( (subscript_expression "puVar3[2]" identifier [ number_literal ]) ))) ;) })) (expression_statement "puVar3[2] = 0xffffffff;" (assignment_expression "puVar3[2] = 0xffffffff" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar4 = 0x25;" (assignment_expression "iVar4 = 0x25" identifier = number_literal) ;) })) }))) }) (else_clause "else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }" else (compound_statement "{\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }" { (expression_statement "iVar4 = 3;" (assignment_expression "iVar4 = 3" identifier = number_literal) ;) (expression_statement "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);" (call_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file)" (parenthesized_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))" ( (pointer_expression "**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" * (pointer_expression "*(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" * (cast_expression "(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" ( (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX + 6" (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX" identifier + identifier) + number_literal) ))))) )) (argument_list "(__file)" ( identifier ))) ;) }))) })) (if_statement "if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }" if (parenthesized_expression "(local_24 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 == *(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 iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) })) comment (expression_statement "FUN_00082f60();" (call_expression "FUN_00082f60()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nCURLcode file_connect(connectdata *conn,_Bool *done)\n\n{\n  _Bool _Var1;\n  Curl_easy *data;\n  undefined4 *puVar2;\n  char *__file;\n  CURLcode CVar3;\n  void *pvVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *real_path;\n  size_t real_path_len;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  data = conn->data;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (undefined4 *)(data->req).protop;\n  CVar3 = Curl_urldecode(data,(data->state).up.path,0,&real_path,&real_path_len,false);\n  __file = real_path;\n  if (CVar3 == CURLE_OK) {\n    pvVar4 = memchr(real_path,0,real_path_len);\n    if (pvVar4 == (void *)0x0) {\n      iVar5 = open64(__file,0);\n      _Var1 = (data->set).upload;\n      *puVar2 = real_path;\n      puVar2[1] = real_path;\n      puVar2[2] = iVar5;\n      if ((_Var1 == true) || (iVar5 != -1)) {\n        *done = true;\n      }\n      else {\n        CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);\n        puVar2 = (undefined4 *)(conn->data->req).protop;\n        if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }\n      }\n    }\n    else {\n      CVar3 = CURLE_URL_MALFORMAT;\n      (*Curl_cfree)(__file);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment comment (function_definition "CURLcode file_connect(connectdata *conn,_Bool *done)\n\n{\n  _Bool _Var1;\n  Curl_easy *data;\n  undefined4 *puVar2;\n  char *__file;\n  CURLcode CVar3;\n  void *pvVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *real_path;\n  size_t real_path_len;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  data = conn->data;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (undefined4 *)(data->req).protop;\n  CVar3 = Curl_urldecode(data,(data->state).up.path,0,&real_path,&real_path_len,false);\n  __file = real_path;\n  if (CVar3 == CURLE_OK) {\n    pvVar4 = memchr(real_path,0,real_path_len);\n    if (pvVar4 == (void *)0x0) {\n      iVar5 = open64(__file,0);\n      _Var1 = (data->set).upload;\n      *puVar2 = real_path;\n      puVar2[1] = real_path;\n      puVar2[2] = iVar5;\n      if ((_Var1 == true) || (iVar5 != -1)) {\n        *done = true;\n      }\n      else {\n        CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);\n        puVar2 = (undefined4 *)(conn->data->req).protop;\n        if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }\n      }\n    }\n    else {\n      CVar3 = CURLE_URL_MALFORMAT;\n      (*Curl_cfree)(__file);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "file_connect(connectdata *conn,_Bool *done)" identifier (parameter_list "(connectdata *conn,_Bool *done)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "_Bool *done" type_identifier (pointer_declarator "*done" * identifier)) ))) (compound_statement "{\n  _Bool _Var1;\n  Curl_easy *data;\n  undefined4 *puVar2;\n  char *__file;\n  CURLcode CVar3;\n  void *pvVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  char *real_path;\n  size_t real_path_len;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  data = conn->data;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar2 = (undefined4 *)(data->req).protop;\n  CVar3 = Curl_urldecode(data,(data->state).up.path,0,&real_path,&real_path_len,false);\n  __file = real_path;\n  if (CVar3 == CURLE_OK) {\n    pvVar4 = memchr(real_path,0,real_path_len);\n    if (pvVar4 == (void *)0x0) {\n      iVar5 = open64(__file,0);\n      _Var1 = (data->set).upload;\n      *puVar2 = real_path;\n      puVar2[1] = real_path;\n      puVar2[2] = iVar5;\n      if ((_Var1 == true) || (iVar5 != -1)) {\n        *done = true;\n      }\n      else {\n        CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);\n        puVar2 = (undefined4 *)(conn->data->req).protop;\n        if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }\n      }\n    }\n    else {\n      CVar3 = CURLE_URL_MALFORMAT;\n      (*Curl_cfree)(__file);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "_Bool _Var1;" type_identifier identifier ;) (declaration "Curl_easy *data;" type_identifier (pointer_declarator "*data" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "char *__file;" primitive_type (pointer_declarator "*__file" * identifier) ;) (declaration "CURLcode CVar3;" type_identifier identifier ;) (declaration "void *pvVar4;" primitive_type (pointer_declarator "*pvVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *real_path;" primitive_type (pointer_declarator "*real_path" * identifier) ;) (declaration "size_t real_path_len;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1aa39;" (assignment_expression "uStack_14 = 0x1aa39" identifier = number_literal) ;) (expression_statement "data = conn->data;" (assignment_expression "data = conn->data" identifier = (field_expression "conn->data" identifier -> field_identifier)) ;) (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 "puVar2 = (undefined4 *)(data->req).protop;" (assignment_expression "puVar2 = (undefined4 *)(data->req).protop" identifier = (cast_expression "(undefined4 *)(data->req).protop" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(data->req).protop" (parenthesized_expression "(data->req)" ( (field_expression "data->req" identifier -> field_identifier) )) . field_identifier))) ;) (expression_statement "CVar3 = Curl_urldecode(data,(data->state).up.path,0,&real_path,&real_path_len,false);" (assignment_expression "CVar3 = Curl_urldecode(data,(data->state).up.path,0,&real_path,&real_path_len,false)" identifier = (call_expression "Curl_urldecode(data,(data->state).up.path,0,&real_path,&real_path_len,false)" identifier (argument_list "(data,(data->state).up.path,0,&real_path,&real_path_len,false)" ( identifier , (field_expression "(data->state).up.path" (field_expression "(data->state).up" (parenthesized_expression "(data->state)" ( (field_expression "data->state" identifier -> field_identifier) )) . field_identifier) . field_identifier) , number_literal , (pointer_expression "&real_path" & identifier) , (pointer_expression "&real_path_len" & identifier) , false )))) ;) (expression_statement "__file = real_path;" (assignment_expression "__file = real_path" identifier = identifier) ;) (if_statement "if (CVar3 == CURLE_OK) {\n    pvVar4 = memchr(real_path,0,real_path_len);\n    if (pvVar4 == (void *)0x0) {\n      iVar5 = open64(__file,0);\n      _Var1 = (data->set).upload;\n      *puVar2 = real_path;\n      puVar2[1] = real_path;\n      puVar2[2] = iVar5;\n      if ((_Var1 == true) || (iVar5 != -1)) {\n        *done = true;\n      }\n      else {\n        CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);\n        puVar2 = (undefined4 *)(conn->data->req).protop;\n        if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }\n      }\n    }\n    else {\n      CVar3 = CURLE_URL_MALFORMAT;\n      (*Curl_cfree)(__file);\n    }\n  }" if (parenthesized_expression "(CVar3 == CURLE_OK)" ( (binary_expression "CVar3 == CURLE_OK" identifier == identifier) )) (compound_statement "{\n    pvVar4 = memchr(real_path,0,real_path_len);\n    if (pvVar4 == (void *)0x0) {\n      iVar5 = open64(__file,0);\n      _Var1 = (data->set).upload;\n      *puVar2 = real_path;\n      puVar2[1] = real_path;\n      puVar2[2] = iVar5;\n      if ((_Var1 == true) || (iVar5 != -1)) {\n        *done = true;\n      }\n      else {\n        CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);\n        puVar2 = (undefined4 *)(conn->data->req).protop;\n        if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }\n      }\n    }\n    else {\n      CVar3 = CURLE_URL_MALFORMAT;\n      (*Curl_cfree)(__file);\n    }\n  }" { (expression_statement "pvVar4 = memchr(real_path,0,real_path_len);" (assignment_expression "pvVar4 = memchr(real_path,0,real_path_len)" identifier = (call_expression "memchr(real_path,0,real_path_len)" identifier (argument_list "(real_path,0,real_path_len)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (pvVar4 == (void *)0x0) {\n      iVar5 = open64(__file,0);\n      _Var1 = (data->set).upload;\n      *puVar2 = real_path;\n      puVar2[1] = real_path;\n      puVar2[2] = iVar5;\n      if ((_Var1 == true) || (iVar5 != -1)) {\n        *done = true;\n      }\n      else {\n        CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);\n        puVar2 = (undefined4 *)(conn->data->req).protop;\n        if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }\n      }\n    }\n    else {\n      CVar3 = CURLE_URL_MALFORMAT;\n      (*Curl_cfree)(__file);\n    }" if (parenthesized_expression "(pvVar4 == (void *)0x0)" ( (binary_expression "pvVar4 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar5 = open64(__file,0);\n      _Var1 = (data->set).upload;\n      *puVar2 = real_path;\n      puVar2[1] = real_path;\n      puVar2[2] = iVar5;\n      if ((_Var1 == true) || (iVar5 != -1)) {\n        *done = true;\n      }\n      else {\n        CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);\n        puVar2 = (undefined4 *)(conn->data->req).protop;\n        if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }\n      }\n    }" { (expression_statement "iVar5 = open64(__file,0);" (assignment_expression "iVar5 = open64(__file,0)" identifier = (call_expression "open64(__file,0)" identifier (argument_list "(__file,0)" ( identifier , number_literal )))) ;) (expression_statement "_Var1 = (data->set).upload;" (assignment_expression "_Var1 = (data->set).upload" identifier = (field_expression "(data->set).upload" (parenthesized_expression "(data->set)" ( (field_expression "data->set" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "*puVar2 = real_path;" (assignment_expression "*puVar2 = real_path" (pointer_expression "*puVar2" * identifier) = identifier) ;) (expression_statement "puVar2[1] = real_path;" (assignment_expression "puVar2[1] = real_path" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar2[2] = iVar5;" (assignment_expression "puVar2[2] = iVar5" (subscript_expression "puVar2[2]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((_Var1 == true) || (iVar5 != -1)) {\n        *done = true;\n      }\n      else {\n        CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);\n        puVar2 = (undefined4 *)(conn->data->req).protop;\n        if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }\n      }" if (parenthesized_expression "((_Var1 == true) || (iVar5 != -1))" ( (binary_expression "(_Var1 == true) || (iVar5 != -1)" (parenthesized_expression "(_Var1 == true)" ( (binary_expression "_Var1 == true" identifier == true) )) || (parenthesized_expression "(iVar5 != -1)" ( (binary_expression "iVar5 != -1" identifier != number_literal) ))) )) (compound_statement "{\n        *done = true;\n      }" { (expression_statement "*done = true;" (assignment_expression "*done = true" (pointer_expression "*done" * identifier) = true) ;) }) (else_clause "else {\n        CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);\n        puVar2 = (undefined4 *)(conn->data->req).protop;\n        if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }\n      }" else (compound_statement "{\n        CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);\n        puVar2 = (undefined4 *)(conn->data->req).protop;\n        if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }\n      }" { (expression_statement "CVar3 = CURLE_FILE_COULDNT_READ_FILE;" (assignment_expression "CVar3 = CURLE_FILE_COULDNT_READ_FILE" identifier = identifier) ;) (expression_statement "Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path);" (call_expression "Curl_failf(data,"Couldn\'t open file %s",(data->state).up.path)" identifier (argument_list "(data,"Couldn\'t open file %s",(data->state).up.path)" ( identifier , (string_literal ""Couldn\'t open file %s"" " string_content escape_sequence string_content ") , (field_expression "(data->state).up.path" (field_expression "(data->state).up" (parenthesized_expression "(data->state)" ( (field_expression "data->state" identifier -> field_identifier) )) . field_identifier) . field_identifier) ))) ;) (expression_statement "puVar2 = (undefined4 *)(conn->data->req).protop;" (assignment_expression "puVar2 = (undefined4 *)(conn->data->req).protop" identifier = (cast_expression "(undefined4 *)(conn->data->req).protop" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(conn->data->req).protop" (parenthesized_expression "(conn->data->req)" ( (field_expression "conn->data->req" (field_expression "conn->data" identifier -> field_identifier) -> field_identifier) )) . field_identifier))) ;) (if_statement "if (puVar2 != (undefined4 *)0x0) {\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }" if (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" ( (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          (*Curl_cfree)((void *)puVar2[1]);\n          puVar2[1] = 0;\n          *puVar2 = 0;\n          if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }\n          puVar2[2] = 0xffffffff;\n          CVar3 = CURLE_FILE_COULDNT_READ_FILE;\n        }" { (expression_statement "(*Curl_cfree)((void *)puVar2[1]);" (call_expression "(*Curl_cfree)((void *)puVar2[1])" (parenthesized_expression "(*Curl_cfree)" ( (pointer_expression "*Curl_cfree" * identifier) )) (argument_list "((void *)puVar2[1])" ( (cast_expression "(void *)puVar2[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[1]" identifier [ number_literal ])) ))) ;) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (if_statement "if (puVar2[2] != -1) {\n            close(puVar2[2]);\n          }" if (parenthesized_expression "(puVar2[2] != -1)" ( (binary_expression "puVar2[2] != -1" (subscript_expression "puVar2[2]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n            close(puVar2[2]);\n          }" { (expression_statement "close(puVar2[2]);" (call_expression "close(puVar2[2])" identifier (argument_list "(puVar2[2])" ( (subscript_expression "puVar2[2]" identifier [ number_literal ]) ))) ;) })) (expression_statement "puVar2[2] = 0xffffffff;" (assignment_expression "puVar2[2] = 0xffffffff" (subscript_expression "puVar2[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "CVar3 = CURLE_FILE_COULDNT_READ_FILE;" (assignment_expression "CVar3 = CURLE_FILE_COULDNT_READ_FILE" identifier = identifier) ;) })) }))) }) (else_clause "else {\n      CVar3 = CURLE_URL_MALFORMAT;\n      (*Curl_cfree)(__file);\n    }" else (compound_statement "{\n      CVar3 = CURLE_URL_MALFORMAT;\n      (*Curl_cfree)(__file);\n    }" { (expression_statement "CVar3 = CURLE_URL_MALFORMAT;" (assignment_expression "CVar3 = CURLE_URL_MALFORMAT" identifier = identifier) ;) (expression_statement "(*Curl_cfree)(__file);" (call_expression "(*Curl_cfree)(__file)" (parenthesized_expression "(*Curl_cfree)" ( (pointer_expression "*Curl_cfree" * identifier) )) (argument_list "(__file)" ( identifier ))) ;) }))) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CVar3;\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 CVar3;\n  }" { (return_statement "return CVar3;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_0001aa30(undefined1 *param_1)\n\n{\n  char cVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  char *__file;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  int *unaff_retaddr;\n  char *local_2c;\n  size_t local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  entry();\n  iVar2 = *unaff_retaddr;\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = *(undefined4 **)(iVar2 + 0x148);\n  iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);\n  __file = local_2c;\n  if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00082f60();\n}\n\n" (function_definition "int FUN_0001aa30(undefined1 *param_1)\n\n{\n  char cVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  char *__file;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  int *unaff_retaddr;\n  char *local_2c;\n  size_t local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  entry();\n  iVar2 = *unaff_retaddr;\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = *(undefined4 **)(iVar2 + 0x148);\n  iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);\n  __file = local_2c;\n  if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00082f60();\n}" primitive_type (function_declarator "FUN_0001aa30(undefined1 *param_1)" identifier (parameter_list "(undefined1 *param_1)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  char *__file;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  int *unaff_retaddr;\n  char *local_2c;\n  size_t local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  entry();\n  iVar2 = *unaff_retaddr;\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = *(undefined4 **)(iVar2 + 0x148);\n  iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);\n  __file = local_2c;\n  if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00082f60();\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "char *__file;" primitive_type (pointer_declarator "*__file" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (declaration "char *local_2c;" primitive_type (pointer_declarator "*local_2c" * identifier) ;) (declaration "size_t local_28;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1aa39;" (assignment_expression "uStack_14 = 0x1aa39" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar2 = *unaff_retaddr;" (assignment_expression "iVar2 = *unaff_retaddr" identifier = (pointer_expression "*unaff_retaddr" * identifier)) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(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 "puVar3 = *(undefined4 **)(iVar2 + 0x148);" (assignment_expression "puVar3 = *(undefined4 **)(iVar2 + 0x148)" identifier = (pointer_expression "*(undefined4 **)(iVar2 + 0x148)" * (cast_expression "(undefined4 **)(iVar2 + 0x148)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + 0x148)" ( (binary_expression "iVar2 + 0x148" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);" (assignment_expression "iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0)" identifier = (call_expression "FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0)" identifier (argument_list "(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0)" ( identifier , (pointer_expression "*(undefined4 *)(iVar2 + 0xf0c)" * (cast_expression "(undefined4 *)(iVar2 + 0xf0c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xf0c)" ( (binary_expression "iVar2 + 0xf0c" identifier + number_literal) )))) , number_literal , (pointer_expression "&local_2c" & identifier) , (pointer_expression "&local_28" & identifier) , number_literal )))) ;) (expression_statement "__file = local_2c;" (assignment_expression "__file = local_2c" identifier = identifier) ;) (if_statement "if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }" { (expression_statement "pvVar5 = memchr(local_2c,0,local_28);" (assignment_expression "pvVar5 = memchr(local_2c,0,local_28)" identifier = (call_expression "memchr(local_2c,0,local_28)" identifier (argument_list "(local_2c,0,local_28)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }" if (parenthesized_expression "(pvVar5 == (void *)0x0)" ( (binary_expression "pvVar5 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }" { (expression_statement "iVar6 = open64(__file,0);" (assignment_expression "iVar6 = open64(__file,0)" identifier = (call_expression "open64(__file,0)" identifier (argument_list "(__file,0)" ( identifier , number_literal )))) ;) (expression_statement "cVar1 = *(char *)(iVar2 + 0x935);" (assignment_expression "cVar1 = *(char *)(iVar2 + 0x935)" identifier = (pointer_expression "*(char *)(iVar2 + 0x935)" * (cast_expression "(char *)(iVar2 + 0x935)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x935)" ( (binary_expression "iVar2 + 0x935" identifier + number_literal) ))))) ;) (expression_statement "*puVar3 = local_2c;" (assignment_expression "*puVar3 = local_2c" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "puVar3[1] = local_2c;" (assignment_expression "puVar3[1] = local_2c" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[2] = iVar6;" (assignment_expression "puVar3[2] = iVar6" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = identifier) ;) (if_statement "if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }" if (parenthesized_expression "((cVar1 == '\x01') || (iVar6 != -1))" ( (binary_expression "(cVar1 == '\x01') || (iVar6 != -1)" (parenthesized_expression "(cVar1 == '\x01')" ( (binary_expression "cVar1 == '\x01'" identifier == (char_literal "'\x01'" ' escape_sequence ')) )) || (parenthesized_expression "(iVar6 != -1)" ( (binary_expression "iVar6 != -1" identifier != number_literal) ))) )) (compound_statement "{\n        *param_1 = 1;\n      }" { (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) }) (else_clause "else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }" else (compound_statement "{\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }" { (expression_statement "iVar4 = 0x25;" (assignment_expression "iVar4 = 0x25" identifier = number_literal) ;) (expression_statement "FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));" (call_expression "FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c))" identifier (argument_list "(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c))" ( identifier , (binary_expression "unaff_EBX + 0x68644" identifier + number_literal) , (pointer_expression "*(undefined4 *)(iVar2 + 0xf0c)" * (cast_expression "(undefined4 *)(iVar2 + 0xf0c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xf0c)" ( (binary_expression "iVar2 + 0xf0c" identifier + number_literal) )))) ))) ;) (expression_statement "puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);" (assignment_expression "puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148)" identifier = (pointer_expression "*(undefined4 **)(*unaff_retaddr + 0x148)" * (cast_expression "(undefined4 **)(*unaff_retaddr + 0x148)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*unaff_retaddr + 0x148)" ( (binary_expression "*unaff_retaddr + 0x148" (pointer_expression "*unaff_retaddr" * identifier) + number_literal) ))))) ;) (if_statement "if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }" if (parenthesized_expression "(puVar3 != (undefined4 *)0x0)" ( (binary_expression "puVar3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }" { (expression_statement "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);" (call_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1])" (parenthesized_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))" ( (pointer_expression "**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" * (pointer_expression "*(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" * (cast_expression "(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" ( (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX + 6" (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX" identifier + identifier) + number_literal) ))))) )) (argument_list "(puVar3[1])" ( (subscript_expression "puVar3[1]" identifier [ number_literal ]) ))) ;) (expression_statement "puVar3[1] = 0;" (assignment_expression "puVar3[1] = 0" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (if_statement "if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }" if (parenthesized_expression "(puVar3[2] != -1)" ( (binary_expression "puVar3[2] != -1" (subscript_expression "puVar3[2]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n            close(puVar3[2]);\n          }" { (expression_statement "close(puVar3[2]);" (call_expression "close(puVar3[2])" identifier (argument_list "(puVar3[2])" ( (subscript_expression "puVar3[2]" identifier [ number_literal ]) ))) ;) })) (expression_statement "puVar3[2] = 0xffffffff;" (assignment_expression "puVar3[2] = 0xffffffff" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar4 = 0x25;" (assignment_expression "iVar4 = 0x25" identifier = number_literal) ;) })) }))) }) (else_clause "else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }" else (compound_statement "{\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }" { (expression_statement "iVar4 = 3;" (assignment_expression "iVar4 = 3" identifier = number_literal) ;) (expression_statement "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);" (call_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file)" (parenthesized_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))" ( (pointer_expression "**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" * (pointer_expression "*(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" * (cast_expression "(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" ( (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX + 6" (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX" identifier + identifier) + number_literal) ))))) )) (argument_list "(__file)" ( identifier ))) ;) }))) })) (if_statement "if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }" if (parenthesized_expression "(local_24 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 == *(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 iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) })) (expression_statement "FUN_00082f60();" (call_expression "FUN_00082f60()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , (pointer_expression & IDENT) , (pointer_expression & IDENT) , LIT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , 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 ( 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) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) ))))) )) (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) ))))) )) (argument_list ( IDENT ))) ;) }))) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_0001aa30(undefined1 *param_1)\n\n{\n  char cVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  char *__file;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  int *unaff_retaddr;\n  char *local_2c;\n  size_t local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  entry();\n  iVar2 = *unaff_retaddr;\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = *(undefined4 **)(iVar2 + 0x148);\n  iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);\n  __file = local_2c;\n  if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00082f60();\n}" (primitive_type "int") (function_declarator "FUN_0001aa30(undefined1 *param_1)" (identifier "FUN_0001aa30") (parameter_list "(undefined1 *param_1)" (( "(") (parameter_declaration "undefined1 *param_1" (type_identifier "undefined1") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  char *__file;\n  int iVar4;\n  void *pvVar5;\n  int iVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  int *unaff_retaddr;\n  char *local_2c;\n  size_t local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1aa39;\n  entry();\n  iVar2 = *unaff_retaddr;\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = *(undefined4 **)(iVar2 + 0x148);\n  iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);\n  __file = local_2c;\n  if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00082f60();\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "char *__file;" (primitive_type "char") (pointer_declarator "*__file" (* "*") (identifier "__file")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "void *pvVar5;" (primitive_type "void") (pointer_declarator "*pvVar5" (* "*") (identifier "pvVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int *unaff_retaddr;" (primitive_type "int") (pointer_declarator "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (; ";")) (declaration "char *local_2c;" (primitive_type "char") (pointer_declarator "*local_2c" (* "*") (identifier "local_2c")) (; ";")) (declaration "size_t local_28;" (primitive_type "size_t") (identifier "local_28") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1aa39;" (assignment_expression "uStack_14 = 0x1aa39" (identifier "uStack_14") (= "=") (number_literal "0x1aa39")) (; ";")) (expression_statement "entry();" (call_expression "entry()" (identifier "entry") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar2 = *unaff_retaddr;" (assignment_expression "iVar2 = *unaff_retaddr" (identifier "iVar2") (= "=") (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr"))) (; ";")) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (= "=") (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 "puVar3 = *(undefined4 **)(iVar2 + 0x148);" (assignment_expression "puVar3 = *(undefined4 **)(iVar2 + 0x148)" (identifier "puVar3") (= "=") (pointer_expression "*(undefined4 **)(iVar2 + 0x148)" (* "*") (cast_expression "(undefined4 **)(iVar2 + 0x148)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar2 + 0x148)" (( "(") (binary_expression "iVar2 + 0x148" (identifier "iVar2") (+ "+") (number_literal "0x148")) () ")"))))) (; ";")) (expression_statement "iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);" (assignment_expression "iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0)" (identifier "iVar4") (= "=") (call_expression "FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0)" (identifier "FUN_000357b0") (argument_list "(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0)" (( "(") (identifier "iVar2") (, ",") (pointer_expression "*(undefined4 *)(iVar2 + 0xf0c)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0xf0c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xf0c)" (( "(") (binary_expression "iVar2 + 0xf0c" (identifier "iVar2") (+ "+") (number_literal "0xf0c")) () ")")))) (, ",") (number_literal "0") (, ",") (pointer_expression "&local_2c" (& "&") (identifier "local_2c")) (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "__file = local_2c;" (assignment_expression "__file = local_2c" (identifier "__file") (= "=") (identifier "local_2c")) (; ";")) (if_statement "if (iVar4 == 0) {\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    pvVar5 = memchr(local_2c,0,local_28);\n    if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }\n  }" ({ "{") (expression_statement "pvVar5 = memchr(local_2c,0,local_28);" (assignment_expression "pvVar5 = memchr(local_2c,0,local_28)" (identifier "pvVar5") (= "=") (call_expression "memchr(local_2c,0,local_28)" (identifier "memchr") (argument_list "(local_2c,0,local_28)" (( "(") (identifier "local_2c") (, ",") (number_literal "0") (, ",") (identifier "local_28") () ")")))) (; ";")) (if_statement "if (pvVar5 == (void *)0x0) {\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }\n    else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }" (if "if") (parenthesized_expression "(pvVar5 == (void *)0x0)" (( "(") (binary_expression "pvVar5 == (void *)0x0" (identifier "pvVar5") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      iVar6 = open64(__file,0);\n      cVar1 = *(char *)(iVar2 + 0x935);\n      *puVar3 = local_2c;\n      puVar3[1] = local_2c;\n      puVar3[2] = iVar6;\n      if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }\n    }" ({ "{") (expression_statement "iVar6 = open64(__file,0);" (assignment_expression "iVar6 = open64(__file,0)" (identifier "iVar6") (= "=") (call_expression "open64(__file,0)" (identifier "open64") (argument_list "(__file,0)" (( "(") (identifier "__file") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "cVar1 = *(char *)(iVar2 + 0x935);" (assignment_expression "cVar1 = *(char *)(iVar2 + 0x935)" (identifier "cVar1") (= "=") (pointer_expression "*(char *)(iVar2 + 0x935)" (* "*") (cast_expression "(char *)(iVar2 + 0x935)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x935)" (( "(") (binary_expression "iVar2 + 0x935" (identifier "iVar2") (+ "+") (number_literal "0x935")) () ")"))))) (; ";")) (expression_statement "*puVar3 = local_2c;" (assignment_expression "*puVar3 = local_2c" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (identifier "local_2c")) (; ";")) (expression_statement "puVar3[1] = local_2c;" (assignment_expression "puVar3[1] = local_2c" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "local_2c")) (; ";")) (expression_statement "puVar3[2] = iVar6;" (assignment_expression "puVar3[2] = iVar6" (subscript_expression "puVar3[2]" (identifier "puVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar6")) (; ";")) (if_statement "if ((cVar1 == '\x01') || (iVar6 != -1)) {\n        *param_1 = 1;\n      }\n      else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }" (if "if") (parenthesized_expression "((cVar1 == '\x01') || (iVar6 != -1))" (( "(") (binary_expression "(cVar1 == '\x01') || (iVar6 != -1)" (parenthesized_expression "(cVar1 == '\x01')" (( "(") (binary_expression "cVar1 == '\x01'" (identifier "cVar1") (== "==") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(iVar6 != -1)" (( "(") (binary_expression "iVar6 != -1" (identifier "iVar6") (!= "!=") (number_literal "-1")) () ")"))) () ")")) (compound_statement "{\n        *param_1 = 1;\n      }" ({ "{") (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }" (else "else") (compound_statement "{\n        iVar4 = 0x25;\n        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));\n        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);\n        if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }\n      }" ({ "{") (expression_statement "iVar4 = 0x25;" (assignment_expression "iVar4 = 0x25" (identifier "iVar4") (= "=") (number_literal "0x25")) (; ";")) (expression_statement "FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));" (call_expression "FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c))" (identifier "FUN_00027d40") (argument_list "(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c))" (( "(") (identifier "iVar2") (, ",") (binary_expression "unaff_EBX + 0x68644" (identifier "unaff_EBX") (+ "+") (number_literal "0x68644")) (, ",") (pointer_expression "*(undefined4 *)(iVar2 + 0xf0c)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0xf0c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xf0c)" (( "(") (binary_expression "iVar2 + 0xf0c" (identifier "iVar2") (+ "+") (number_literal "0xf0c")) () ")")))) () ")"))) (; ";")) (expression_statement "puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);" (assignment_expression "puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148)" (identifier "puVar3") (= "=") (pointer_expression "*(undefined4 **)(*unaff_retaddr + 0x148)" (* "*") (cast_expression "(undefined4 **)(*unaff_retaddr + 0x148)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*unaff_retaddr + 0x148)" (( "(") (binary_expression "*unaff_retaddr + 0x148" (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (+ "+") (number_literal "0x148")) () ")"))))) (; ";")) (if_statement "if (puVar3 != (undefined4 *)0x0) {\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }" (if "if") (parenthesized_expression "(puVar3 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar3 != (undefined4 *)0x0" (identifier "puVar3") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);\n          puVar3[1] = 0;\n          *puVar3 = 0;\n          if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }\n          puVar3[2] = 0xffffffff;\n          iVar4 = 0x25;\n        }" ({ "{") (expression_statement "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);" (call_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1])" (parenthesized_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))" (( "(") (pointer_expression "**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" (* "*") (pointer_expression "*(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" (* "*") (cast_expression "(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" (( "(") (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX + 6" (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX" (identifier "BYTE_ARRAY_0009c62d") (+ "+") (identifier "unaff_EBX")) (+ "+") (number_literal "6")) () ")"))))) () ")")) (argument_list "(puVar3[1])" (( "(") (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (expression_statement "puVar3[1] = 0;" (assignment_expression "puVar3[1] = 0" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (number_literal "0")) (; ";")) (if_statement "if (puVar3[2] != -1) {\n            close(puVar3[2]);\n          }" (if "if") (parenthesized_expression "(puVar3[2] != -1)" (( "(") (binary_expression "puVar3[2] != -1" (subscript_expression "puVar3[2]" (identifier "puVar3") ([ "[") (number_literal "2") (] "]")) (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n            close(puVar3[2]);\n          }" ({ "{") (expression_statement "close(puVar3[2]);" (call_expression "close(puVar3[2])" (identifier "close") (argument_list "(puVar3[2])" (( "(") (subscript_expression "puVar3[2]" (identifier "puVar3") ([ "[") (number_literal "2") (] "]")) () ")"))) (; ";")) (} "}"))) (expression_statement "puVar3[2] = 0xffffffff;" (assignment_expression "puVar3[2] = 0xffffffff" (subscript_expression "puVar3[2]" (identifier "puVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "iVar4 = 0x25;" (assignment_expression "iVar4 = 0x25" (identifier "iVar4") (= "=") (number_literal "0x25")) (; ";")) (} "}"))) (} "}")))) (} "}")) (else_clause "else {\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }" (else "else") (compound_statement "{\n      iVar4 = 3;\n      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);\n    }" ({ "{") (expression_statement "iVar4 = 3;" (assignment_expression "iVar4 = 3" (identifier "iVar4") (= "=") (number_literal "3")) (; ";")) (expression_statement "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);" (call_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file)" (parenthesized_expression "(**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))" (( "(") (pointer_expression "**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" (* "*") (pointer_expression "*(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" (* "*") (cast_expression "(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(BYTE_ARRAY_0009c62d + unaff_EBX + 6)" (( "(") (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX + 6" (binary_expression "BYTE_ARRAY_0009c62d + unaff_EBX" (identifier "BYTE_ARRAY_0009c62d") (+ "+") (identifier "unaff_EBX")) (+ "+") (number_literal "6")) () ")"))))) () ")")) (argument_list "(__file)" (( "(") (identifier "__file") () ")"))) (; ";")) (} "}")))) (} "}"))) (if_statement "if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }" (if "if") (parenthesized_expression "(local_24 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_24 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (== "==") (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 iVar4;\n  }" ({ "{") (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (expression_statement "FUN_00082f60();" (call_expression "FUN_00082f60()" (identifier "FUN_00082f60") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

type_1 function_1(type_2 *conn,type_3 *done)

{
  type_3 var_8;
  type_4 *data;
  type_5 *var_11;
  char *__file;
  type_1 var_3;
  void *var_6;
  int var_9;
  int var_1;
  char *real_path;
  size_t real_path_len;
  int var_13;
  type_5 uStack_14;
  
  uStack_14 = 0x1aa39;
  data = conn->data;
  var_13 = *(int *)(var_1 + 0x14);
  var_11 = (type_5 *)(data->req).protop;
  var_3 = var_2(data,(data->state).up.path,0,&real_path,&real_path_len,false);
  __file = real_path;
  if (var_3 == var_4) {
    var_6 = var_5(real_path,0,real_path_len);
    if (var_6 == (void *)0x0) {
      var_9 = var_7(__file,0);
      var_8 = (data->set).upload;
      *var_11 = real_path;
      var_11[1] = real_path;
      var_11[2] = var_9;
      if ((var_8 == true) || (var_9 != -1)) {
        *done = true;
      }
      else {
        var_3 = CURLE_FILE_COULDNT_READ_FILE;
        var_10(data,"Couldn\'t open file %s",(data->state).up.path);
        var_11 = (type_5 *)(conn->data->req).protop;
        if (var_11 != (type_5 *)0x0) {
          (*Curl_cfree)((void *)var_11[1]);
          var_11[1] = 0;
          *var_11 = 0;
          if (var_11[2] != -1) {
            var_12(var_11[2]);
          }
          var_11[2] = 0xffffffff;
          var_3 = CURLE_FILE_COULDNT_READ_FILE;
        }
      }
    }
    else {
      var_3 = CURLE_URL_MALFORMAT;
      (*Curl_cfree)(__file);
    }
  }
  if (var_13 == *(int *)(var_1 + 0x14)) {
    return var_3;
  }
                    /* WARNING: Subroutine does not return */
  var_14();
}


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

int MASKED(undefined1 *param_1)

{
  char cVar1;
  int iVar2;
  undefined4 *puVar3;
  char *__file;
  int iVar4;
  void *pvVar5;
  int iVar6;
  int unaff_EBX;
  int in_GS_OFFSET;
  int *unaff_retaddr;
  char *local_2c;
  size_t local_28;
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x1aa39;
  entry();
  iVar2 = *unaff_retaddr;
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  puVar3 = *(undefined4 **)(iVar2 + 0x148);
  iVar4 = FUN_000357b0(iVar2,*(undefined4 *)(iVar2 + 0xf0c),0,&local_2c,&local_28,0);
  __file = local_2c;
  if (iVar4 == 0) {
    pvVar5 = memchr(local_2c,0,local_28);
    if (pvVar5 == (void *)0x0) {
      iVar6 = open64(__file,0);
      cVar1 = *(char *)(iVar2 + 0x935);
      *puVar3 = local_2c;
      puVar3[1] = local_2c;
      puVar3[2] = iVar6;
      if ((cVar1 == '\x01') || (iVar6 != -1)) {
        *param_1 = 1;
      }
      else {
        iVar4 = 0x25;
        FUN_00027d40(iVar2,unaff_EBX + 0x68644,*(undefined4 *)(iVar2 + 0xf0c));
        puVar3 = *(undefined4 **)(*unaff_retaddr + 0x148);
        if (puVar3 != (undefined4 *)0x0) {
          (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(puVar3[1]);
          puVar3[1] = 0;
          *puVar3 = 0;
          if (puVar3[2] != -1) {
            close(puVar3[2]);
          }
          puVar3[2] = 0xffffffff;
          iVar4 = 0x25;
        }
      }
    }
    else {
      iVar4 = 3;
      (**(code **)(BYTE_ARRAY_0009c62d + unaff_EBX + 6))(__file);
    }
  }
  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00082f60();
}

