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

FILE * __regparm3 try_open(char *name,bfd_boolean *sysrooted)

{
  FILE *pFVar1;
  char *pcVar2;
  size_t sVar3;
  int iVar4;
  uint local_28;
  
  pFVar1 = fopen64(name,"r");
  if (pFVar1 == (FILE *)0x0) {
    if (verbose == 0) {
      return (FILE *)0x0;
    }
    pcVar2 = "cannot find script file %s\n";
  }
  else {
    local_28 = 0;
    if (ld_canon_sysroot != (char *)0x0) {
      pcVar2 = (char *)lrealpath(name);
      sVar3 = strlen(pcVar2);
      if ((ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/')) {
        pcVar2[ld_canon_sysroot_len] = '\0';
        iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);
        local_28 = (uint)(iVar4 == 0);
      }
      free(pcVar2);
    }
    *sysrooted = local_28;
    if (verbose == 0) {
      return (FILE *)pFVar1;
    }
    pcVar2 = "opened script file %s\n";
  }
  pcVar2 = (char *)dcgettext(0,pcVar2,5);
  info_msg(pcVar2,name);
  return (FILE *)pFVar1;
}



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

FILE * __regparm3 FUN_00031900(char *param_1,uint *param_2)

{
  FILE *pFVar1;
  char *pcVar2;
  size_t sVar3;
  undefined4 uVar4;
  int iVar5;
  uint local_28;
  
  pFVar1 = fopen64(param_1,"r");
  if (pFVar1 == (FILE *)0x0) {
    if (DAT_00091d90 == 0) {
      return (FILE *)0x0;
    }
    pcVar2 = "cannot find script file %s\n";
  }
  else {
    local_28 = 0;
    if (DAT_00091d98 != 0) {
      pcVar2 = (char *)lrealpath(param_1);
      sVar3 = strlen(pcVar2);
      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {
        pcVar2[DAT_00091c08] = '\0';
        iVar5 = filename_cmp(DAT_00091d98,pcVar2);
        local_28 = (uint)(iVar5 == 0);
      }
      free(pcVar2);
    }
    *param_2 = local_28;
    if (DAT_00091d90 == 0) {
      return pFVar1;
    }
    pcVar2 = "opened script file %s\n";
  }
  uVar4 = dcgettext(0,pcVar2,5);
  FUN_00031730(uVar4,param_1);
  return pFVar1;
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00015a80
ADD EBX,0x5f6f3
SUB ESP,0x24
LEA EAX,[EBX + 0xfffb9adb]
PUSH EAX
PUSH ESI
CALL 0x00014450
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x000319c0
LEA EAX,[EBX + 0xd98]
MOV dword ptr [ESP + 0x4],0x0
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x00031983
SUB ESP,0xc
PUSH ESI
CALL 0x000142a0
MOV dword ptr [ESP],EAX
MOV dword ptr [ESP + 0x18],EAX
CALL 0x00014720
LEA ECX,[EBX + 0xc08]
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
MOV ECX,dword ptr [ECX]
CMP EAX,ECX
JLE 0x00031977
ADD ECX,EDX
CMP byte ptr [ECX],0x2f
JZ 0x000319e0
SUB ESP,0xc
PUSH EDX
CALL 0x00014cb0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x4]
MOV dword ptr [EDI],EAX
LEA EAX,[EBX + 0xd90]
MOV EDI,dword ptr [EAX]
TEST EDI,EDI
JZ 0x000319b4
SUB ESP,0x4
LEA EAX,[EBX + 0xfffbdb1a]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x000142f0
POP EDX
POP ECX
PUSH ESI
PUSH EAX
CALL 0x00031730
ADD ESP,0x10
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EBX + 0xd90]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x000319b4
SUB ESP,0x4
LEA EAX,[EBX + 0xfffbdafe]
PUSH 0x5
JMP 0x000319a0
SUB ESP,0x8
MOV byte ptr [ECX],0x0
PUSH EDX
MOV EAX,dword ptr [ESP + 0x18]
MOV dword ptr [ESP + 0x14],EDX
PUSH dword ptr [EAX]
CALL 0x00014220
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
TEST EAX,EAX
SETZ AL
MOVZX EAX,AL
MOV dword ptr [ESP + 0x4],EAX
JMP 0x00031977
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nFILE * __regparm3 FUN_00031900(char *param_1,uint *param_2)\n\n{\n  FILE *pFVar1;\n  char *pcVar2;\n  size_t sVar3;\n  undefined4 uVar4;\n  int iVar5;\n  uint local_28;\n  \n  pFVar1 = fopen64(param_1,"r");\n  if (pFVar1 == (FILE *)0x0) {\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }\n  uVar4 = dcgettext(0,pcVar2,5);\n  FUN_00031730(uVar4,param_1);\n  return pFVar1;\n}\n\n" comment (ERROR "FILE * __regparm3 FUN_00031900(char *param_1,uint *param_2)" (binary_expression "FILE * __regparm3 FUN_00031900(char *param_1,uint *param_2)" identifier * (ERROR "__regparm3" identifier) (call_expression "FUN_00031900(char *param_1,uint *param_2)" identifier (argument_list "(char *param_1,uint *param_2)" ( (binary_expression "char *param_1" identifier * identifier) , (binary_expression "uint *param_2" identifier * identifier) ))))) (compound_statement "{\n  FILE *pFVar1;\n  char *pcVar2;\n  size_t sVar3;\n  undefined4 uVar4;\n  int iVar5;\n  uint local_28;\n  \n  pFVar1 = fopen64(param_1,"r");\n  if (pFVar1 == (FILE *)0x0) {\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }\n  uVar4 = dcgettext(0,pcVar2,5);\n  FUN_00031730(uVar4,param_1);\n  return pFVar1;\n}" { (declaration "FILE *pFVar1;" type_identifier (pointer_declarator "*pFVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint local_28;" type_identifier identifier ;) (expression_statement "pFVar1 = fopen64(param_1,"r");" (assignment_expression "pFVar1 = fopen64(param_1,"r")" identifier = (call_expression "fopen64(param_1,"r")" identifier (argument_list "(param_1,"r")" ( identifier , (string_literal ""r"" " string_content ") )))) ;) (if_statement "if (pFVar1 == (FILE *)0x0) {\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" if (parenthesized_expression "(pFVar1 == (FILE *)0x0)" ( (binary_expression "pFVar1 == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }" { (if_statement "if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }" if (parenthesized_expression "(DAT_00091d90 == 0)" ( (binary_expression "DAT_00091d90 == 0" identifier == number_literal) )) (compound_statement "{\n      return (FILE *)0x0;\n    }" { (return_statement "return (FILE *)0x0;" return (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar2 = "cannot find script file %s\n";" (assignment_expression "pcVar2 = "cannot find script file %s\n"" identifier = (string_literal ""cannot find script file %s\n"" " string_content escape_sequence ")) ;) }) (else_clause "else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" else (compound_statement "{\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (if_statement "if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }" if (parenthesized_expression "(DAT_00091d98 != 0)" ( (binary_expression "DAT_00091d98 != 0" identifier != number_literal) )) (compound_statement "{\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }" { (expression_statement "pcVar2 = (char *)lrealpath(param_1);" (assignment_expression "pcVar2 = (char *)lrealpath(param_1)" identifier = (cast_expression "(char *)lrealpath(param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "lrealpath(param_1)" identifier (argument_list "(param_1)" ( identifier ))))) ;) (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (if_statement "if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }" if (parenthesized_expression "((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/'))" ( (binary_expression "(DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')" (parenthesized_expression "(DAT_00091c08 < (int)sVar3)" ( (binary_expression "DAT_00091c08 < (int)sVar3" identifier < (cast_expression "(int)sVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(pcVar2[DAT_00091c08] == '/')" ( (binary_expression "pcVar2[DAT_00091c08] == '/'" (subscript_expression "pcVar2[DAT_00091c08]" identifier [ identifier ]) == (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }" { (expression_statement "pcVar2[DAT_00091c08] = '\0';" (assignment_expression "pcVar2[DAT_00091c08] = '\0'" (subscript_expression "pcVar2[DAT_00091c08]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar5 = filename_cmp(DAT_00091d98,pcVar2);" (assignment_expression "iVar5 = filename_cmp(DAT_00091d98,pcVar2)" identifier = (call_expression "filename_cmp(DAT_00091d98,pcVar2)" identifier (argument_list "(DAT_00091d98,pcVar2)" ( identifier , identifier )))) ;) (expression_statement "local_28 = (uint)(iVar5 == 0);" (assignment_expression "local_28 = (uint)(iVar5 == 0)" identifier = (call_expression "(uint)(iVar5 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )))) ;) })) (expression_statement "free(pcVar2);" (call_expression "free(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) })) (expression_statement "*param_2 = local_28;" (assignment_expression "*param_2 = local_28" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }" if (parenthesized_expression "(DAT_00091d90 == 0)" ( (binary_expression "DAT_00091d90 == 0" identifier == number_literal) )) (compound_statement "{\n      return pFVar1;\n    }" { (return_statement "return pFVar1;" return identifier ;) })) (expression_statement "pcVar2 = "opened script file %s\n";" (assignment_expression "pcVar2 = "opened script file %s\n"" identifier = (string_literal ""opened script file %s\n"" " string_content escape_sequence ")) ;) }))) (expression_statement "uVar4 = dcgettext(0,pcVar2,5);" (assignment_expression "uVar4 = dcgettext(0,pcVar2,5)" identifier = (call_expression "dcgettext(0,pcVar2,5)" identifier (argument_list "(0,pcVar2,5)" ( number_literal , identifier , number_literal )))) ;) (expression_statement "FUN_00031730(uVar4,param_1);" (call_expression "FUN_00031730(uVar4,param_1)" identifier (argument_list "(uVar4,param_1)" ( identifier , identifier ))) ;) (return_statement "return pFVar1;" return identifier ;) }))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nFILE * __regparm3 try_open(char *name,bfd_boolean *sysrooted)\n\n{\n  FILE *pFVar1;\n  char *pcVar2;\n  size_t sVar3;\n  int iVar4;\n  uint local_28;\n  \n  pFVar1 = fopen64(name,"r");\n  if (pFVar1 == (FILE *)0x0) {\n    if (verbose == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (ld_canon_sysroot != (char *)0x0) {\n      pcVar2 = (char *)lrealpath(name);\n      sVar3 = strlen(pcVar2);\n      if ((ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/')) {\n        pcVar2[ld_canon_sysroot_len] = '\0';\n        iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);\n        local_28 = (uint)(iVar4 == 0);\n      }\n      free(pcVar2);\n    }\n    *sysrooted = local_28;\n    if (verbose == 0) {\n      return (FILE *)pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }\n  pcVar2 = (char *)dcgettext(0,pcVar2,5);\n  info_msg(pcVar2,name);\n  return (FILE *)pFVar1;\n}\n\n" comment (ERROR "FILE * __regparm3 try_open(char *name,bfd_boolean *sysrooted)" (binary_expression "FILE * __regparm3 try_open(char *name,bfd_boolean *sysrooted)" identifier * (ERROR "__regparm3" identifier) (call_expression "try_open(char *name,bfd_boolean *sysrooted)" identifier (argument_list "(char *name,bfd_boolean *sysrooted)" ( (binary_expression "char *name" identifier * identifier) , (binary_expression "bfd_boolean *sysrooted" identifier * identifier) ))))) (compound_statement "{\n  FILE *pFVar1;\n  char *pcVar2;\n  size_t sVar3;\n  int iVar4;\n  uint local_28;\n  \n  pFVar1 = fopen64(name,"r");\n  if (pFVar1 == (FILE *)0x0) {\n    if (verbose == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (ld_canon_sysroot != (char *)0x0) {\n      pcVar2 = (char *)lrealpath(name);\n      sVar3 = strlen(pcVar2);\n      if ((ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/')) {\n        pcVar2[ld_canon_sysroot_len] = '\0';\n        iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);\n        local_28 = (uint)(iVar4 == 0);\n      }\n      free(pcVar2);\n    }\n    *sysrooted = local_28;\n    if (verbose == 0) {\n      return (FILE *)pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }\n  pcVar2 = (char *)dcgettext(0,pcVar2,5);\n  info_msg(pcVar2,name);\n  return (FILE *)pFVar1;\n}" { (declaration "FILE *pFVar1;" type_identifier (pointer_declarator "*pFVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint local_28;" type_identifier identifier ;) (expression_statement "pFVar1 = fopen64(name,"r");" (assignment_expression "pFVar1 = fopen64(name,"r")" identifier = (call_expression "fopen64(name,"r")" identifier (argument_list "(name,"r")" ( identifier , (string_literal ""r"" " string_content ") )))) ;) (if_statement "if (pFVar1 == (FILE *)0x0) {\n    if (verbose == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (ld_canon_sysroot != (char *)0x0) {\n      pcVar2 = (char *)lrealpath(name);\n      sVar3 = strlen(pcVar2);\n      if ((ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/')) {\n        pcVar2[ld_canon_sysroot_len] = '\0';\n        iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);\n        local_28 = (uint)(iVar4 == 0);\n      }\n      free(pcVar2);\n    }\n    *sysrooted = local_28;\n    if (verbose == 0) {\n      return (FILE *)pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" if (parenthesized_expression "(pFVar1 == (FILE *)0x0)" ( (binary_expression "pFVar1 == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (verbose == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }" { (if_statement "if (verbose == 0) {\n      return (FILE *)0x0;\n    }" if (parenthesized_expression "(verbose == 0)" ( (binary_expression "verbose == 0" identifier == number_literal) )) (compound_statement "{\n      return (FILE *)0x0;\n    }" { (return_statement "return (FILE *)0x0;" return (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar2 = "cannot find script file %s\n";" (assignment_expression "pcVar2 = "cannot find script file %s\n"" identifier = (string_literal ""cannot find script file %s\n"" " string_content escape_sequence ")) ;) }) (else_clause "else {\n    local_28 = 0;\n    if (ld_canon_sysroot != (char *)0x0) {\n      pcVar2 = (char *)lrealpath(name);\n      sVar3 = strlen(pcVar2);\n      if ((ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/')) {\n        pcVar2[ld_canon_sysroot_len] = '\0';\n        iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);\n        local_28 = (uint)(iVar4 == 0);\n      }\n      free(pcVar2);\n    }\n    *sysrooted = local_28;\n    if (verbose == 0) {\n      return (FILE *)pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" else (compound_statement "{\n    local_28 = 0;\n    if (ld_canon_sysroot != (char *)0x0) {\n      pcVar2 = (char *)lrealpath(name);\n      sVar3 = strlen(pcVar2);\n      if ((ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/')) {\n        pcVar2[ld_canon_sysroot_len] = '\0';\n        iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);\n        local_28 = (uint)(iVar4 == 0);\n      }\n      free(pcVar2);\n    }\n    *sysrooted = local_28;\n    if (verbose == 0) {\n      return (FILE *)pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (if_statement "if (ld_canon_sysroot != (char *)0x0) {\n      pcVar2 = (char *)lrealpath(name);\n      sVar3 = strlen(pcVar2);\n      if ((ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/')) {\n        pcVar2[ld_canon_sysroot_len] = '\0';\n        iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);\n        local_28 = (uint)(iVar4 == 0);\n      }\n      free(pcVar2);\n    }" if (parenthesized_expression "(ld_canon_sysroot != (char *)0x0)" ( (binary_expression "ld_canon_sysroot != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pcVar2 = (char *)lrealpath(name);\n      sVar3 = strlen(pcVar2);\n      if ((ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/')) {\n        pcVar2[ld_canon_sysroot_len] = '\0';\n        iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);\n        local_28 = (uint)(iVar4 == 0);\n      }\n      free(pcVar2);\n    }" { (expression_statement "pcVar2 = (char *)lrealpath(name);" (assignment_expression "pcVar2 = (char *)lrealpath(name)" identifier = (cast_expression "(char *)lrealpath(name)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "lrealpath(name)" identifier (argument_list "(name)" ( identifier ))))) ;) (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (if_statement "if ((ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/')) {\n        pcVar2[ld_canon_sysroot_len] = '\0';\n        iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);\n        local_28 = (uint)(iVar4 == 0);\n      }" if (parenthesized_expression "((ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/'))" ( (binary_expression "(ld_canon_sysroot_len < (int)sVar3) && (pcVar2[ld_canon_sysroot_len] == '/')" (parenthesized_expression "(ld_canon_sysroot_len < (int)sVar3)" ( (binary_expression "ld_canon_sysroot_len < (int)sVar3" identifier < (cast_expression "(int)sVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(pcVar2[ld_canon_sysroot_len] == '/')" ( (binary_expression "pcVar2[ld_canon_sysroot_len] == '/'" (subscript_expression "pcVar2[ld_canon_sysroot_len]" identifier [ identifier ]) == (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n        pcVar2[ld_canon_sysroot_len] = '\0';\n        iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);\n        local_28 = (uint)(iVar4 == 0);\n      }" { (expression_statement "pcVar2[ld_canon_sysroot_len] = '\0';" (assignment_expression "pcVar2[ld_canon_sysroot_len] = '\0'" (subscript_expression "pcVar2[ld_canon_sysroot_len]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar4 = filename_cmp(ld_canon_sysroot,pcVar2);" (assignment_expression "iVar4 = filename_cmp(ld_canon_sysroot,pcVar2)" identifier = (call_expression "filename_cmp(ld_canon_sysroot,pcVar2)" identifier (argument_list "(ld_canon_sysroot,pcVar2)" ( identifier , identifier )))) ;) (expression_statement "local_28 = (uint)(iVar4 == 0);" (assignment_expression "local_28 = (uint)(iVar4 == 0)" identifier = (call_expression "(uint)(iVar4 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )))) ;) })) (expression_statement "free(pcVar2);" (call_expression "free(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) })) (expression_statement "*sysrooted = local_28;" (assignment_expression "*sysrooted = local_28" (pointer_expression "*sysrooted" * identifier) = identifier) ;) (if_statement "if (verbose == 0) {\n      return (FILE *)pFVar1;\n    }" if (parenthesized_expression "(verbose == 0)" ( (binary_expression "verbose == 0" identifier == number_literal) )) (compound_statement "{\n      return (FILE *)pFVar1;\n    }" { (return_statement "return (FILE *)pFVar1;" return (cast_expression "(FILE *)pFVar1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ;) })) (expression_statement "pcVar2 = "opened script file %s\n";" (assignment_expression "pcVar2 = "opened script file %s\n"" identifier = (string_literal ""opened script file %s\n"" " string_content escape_sequence ")) ;) }))) (expression_statement "pcVar2 = (char *)dcgettext(0,pcVar2,5);" (assignment_expression "pcVar2 = (char *)dcgettext(0,pcVar2,5)" identifier = (cast_expression "(char *)dcgettext(0,pcVar2,5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,pcVar2,5)" identifier (argument_list "(0,pcVar2,5)" ( number_literal , identifier , number_literal ))))) ;) (expression_statement "info_msg(pcVar2,name);" (call_expression "info_msg(pcVar2,name)" identifier (argument_list "(pcVar2,name)" ( identifier , identifier ))) ;) (return_statement "return (FILE *)pFVar1;" return (cast_expression "(FILE *)pFVar1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ;) }))
(translation_unit "FILE * __regparm3 FUN_00031900(char *param_1,uint *param_2)\n\n{\n  FILE *pFVar1;\n  char *pcVar2;\n  size_t sVar3;\n  undefined4 uVar4;\n  int iVar5;\n  uint local_28;\n  \n  pFVar1 = fopen64(param_1,"r");\n  if (pFVar1 == (FILE *)0x0) {\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }\n  uVar4 = dcgettext(0,pcVar2,5);\n  FUN_00031730(uVar4,param_1);\n  return pFVar1;\n}\n\n" (ERROR "FILE * __regparm3 FUN_00031900(char *param_1,uint *param_2)" (binary_expression "FILE * __regparm3 FUN_00031900(char *param_1,uint *param_2)" identifier * (ERROR "__regparm3" identifier) (call_expression "FUN_00031900(char *param_1,uint *param_2)" identifier (argument_list "(char *param_1,uint *param_2)" ( (binary_expression "char *param_1" identifier * identifier) , (binary_expression "uint *param_2" identifier * identifier) ))))) (compound_statement "{\n  FILE *pFVar1;\n  char *pcVar2;\n  size_t sVar3;\n  undefined4 uVar4;\n  int iVar5;\n  uint local_28;\n  \n  pFVar1 = fopen64(param_1,"r");\n  if (pFVar1 == (FILE *)0x0) {\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }\n  uVar4 = dcgettext(0,pcVar2,5);\n  FUN_00031730(uVar4,param_1);\n  return pFVar1;\n}" { (declaration "FILE *pFVar1;" type_identifier (pointer_declarator "*pFVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint local_28;" type_identifier identifier ;) (expression_statement "pFVar1 = fopen64(param_1,"r");" (assignment_expression "pFVar1 = fopen64(param_1,"r")" identifier = (call_expression "fopen64(param_1,"r")" identifier (argument_list "(param_1,"r")" ( identifier , (string_literal ""r"" " string_content ") )))) ;) (if_statement "if (pFVar1 == (FILE *)0x0) {\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" if (parenthesized_expression "(pFVar1 == (FILE *)0x0)" ( (binary_expression "pFVar1 == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }" { (if_statement "if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }" if (parenthesized_expression "(DAT_00091d90 == 0)" ( (binary_expression "DAT_00091d90 == 0" identifier == number_literal) )) (compound_statement "{\n      return (FILE *)0x0;\n    }" { (return_statement "return (FILE *)0x0;" return (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pcVar2 = "cannot find script file %s\n";" (assignment_expression "pcVar2 = "cannot find script file %s\n"" identifier = (string_literal ""cannot find script file %s\n"" " string_content escape_sequence ")) ;) }) (else_clause "else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" else (compound_statement "{\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (if_statement "if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }" if (parenthesized_expression "(DAT_00091d98 != 0)" ( (binary_expression "DAT_00091d98 != 0" identifier != number_literal) )) (compound_statement "{\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }" { (expression_statement "pcVar2 = (char *)lrealpath(param_1);" (assignment_expression "pcVar2 = (char *)lrealpath(param_1)" identifier = (cast_expression "(char *)lrealpath(param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "lrealpath(param_1)" identifier (argument_list "(param_1)" ( identifier ))))) ;) (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (if_statement "if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }" if (parenthesized_expression "((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/'))" ( (binary_expression "(DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')" (parenthesized_expression "(DAT_00091c08 < (int)sVar3)" ( (binary_expression "DAT_00091c08 < (int)sVar3" identifier < (cast_expression "(int)sVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(pcVar2[DAT_00091c08] == '/')" ( (binary_expression "pcVar2[DAT_00091c08] == '/'" (subscript_expression "pcVar2[DAT_00091c08]" identifier [ identifier ]) == (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }" { (expression_statement "pcVar2[DAT_00091c08] = '\0';" (assignment_expression "pcVar2[DAT_00091c08] = '\0'" (subscript_expression "pcVar2[DAT_00091c08]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar5 = filename_cmp(DAT_00091d98,pcVar2);" (assignment_expression "iVar5 = filename_cmp(DAT_00091d98,pcVar2)" identifier = (call_expression "filename_cmp(DAT_00091d98,pcVar2)" identifier (argument_list "(DAT_00091d98,pcVar2)" ( identifier , identifier )))) ;) (expression_statement "local_28 = (uint)(iVar5 == 0);" (assignment_expression "local_28 = (uint)(iVar5 == 0)" identifier = (call_expression "(uint)(iVar5 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )))) ;) })) (expression_statement "free(pcVar2);" (call_expression "free(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) })) (expression_statement "*param_2 = local_28;" (assignment_expression "*param_2 = local_28" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }" if (parenthesized_expression "(DAT_00091d90 == 0)" ( (binary_expression "DAT_00091d90 == 0" identifier == number_literal) )) (compound_statement "{\n      return pFVar1;\n    }" { (return_statement "return pFVar1;" return identifier ;) })) (expression_statement "pcVar2 = "opened script file %s\n";" (assignment_expression "pcVar2 = "opened script file %s\n"" identifier = (string_literal ""opened script file %s\n"" " string_content escape_sequence ")) ;) }))) (expression_statement "uVar4 = dcgettext(0,pcVar2,5);" (assignment_expression "uVar4 = dcgettext(0,pcVar2,5)" identifier = (call_expression "dcgettext(0,pcVar2,5)" identifier (argument_list "(0,pcVar2,5)" ( number_literal , identifier , number_literal )))) ;) (expression_statement "FUN_00031730(uVar4,param_1);" (call_expression "FUN_00031730(uVar4,param_1)" identifier (argument_list "(uVar4,param_1)" ( identifier , identifier ))) ;) (return_statement "return pFVar1;" return identifier ;) }))
(translation_unit (ERROR (binary_expression IDENT * (ERROR IDENT) (call_expression IDENT (argument_list ( (binary_expression IDENT * IDENT) , (binary_expression IDENT * IDENT) ))))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = (string_literal " string_content escape_sequence ")) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) == (char_literal ' character ')) ))) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == LIT) )))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (string_literal " string_content escape_sequence ")) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return IDENT ;) }))
(ERROR "FILE * __regparm3 FUN_00031900(char *param_1,uint *param_2)" (binary_expression "FILE * __regparm3 FUN_00031900(char *param_1,uint *param_2)" (identifier "FILE") (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (call_expression "FUN_00031900(char *param_1,uint *param_2)" (identifier "FUN_00031900") (argument_list "(char *param_1,uint *param_2)" (( "(") (binary_expression "char *param_1" (identifier "char") (* "*") (identifier "param_1")) (, ",") (binary_expression "uint *param_2" (identifier "uint") (* "*") (identifier "param_2")) () ")"))))) (compound_statement "{\n  FILE *pFVar1;\n  char *pcVar2;\n  size_t sVar3;\n  undefined4 uVar4;\n  int iVar5;\n  uint local_28;\n  \n  pFVar1 = fopen64(param_1,"r");\n  if (pFVar1 == (FILE *)0x0) {\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }\n  uVar4 = dcgettext(0,pcVar2,5);\n  FUN_00031730(uVar4,param_1);\n  return pFVar1;\n}" ({ "{") (declaration "FILE *pFVar1;" (type_identifier "FILE") (pointer_declarator "*pFVar1" (* "*") (identifier "pFVar1")) (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "uint local_28;" (type_identifier "uint") (identifier "local_28") (; ";")) (expression_statement "pFVar1 = fopen64(param_1,"r");" (assignment_expression "pFVar1 = fopen64(param_1,"r")" (identifier "pFVar1") (= "=") (call_expression "fopen64(param_1,"r")" (identifier "fopen64") (argument_list "(param_1,"r")" (( "(") (identifier "param_1") (, ",") (string_literal ""r"" (" """) (string_content "r") (" """)) () ")")))) (; ";")) (if_statement "if (pFVar1 == (FILE *)0x0) {\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }\n  else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" (if "if") (parenthesized_expression "(pFVar1 == (FILE *)0x0)" (( "(") (binary_expression "pFVar1 == (FILE *)0x0" (identifier "pFVar1") (== "==") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }\n    pcVar2 = "cannot find script file %s\n";\n  }" ({ "{") (if_statement "if (DAT_00091d90 == 0) {\n      return (FILE *)0x0;\n    }" (if "if") (parenthesized_expression "(DAT_00091d90 == 0)" (( "(") (binary_expression "DAT_00091d90 == 0" (identifier "DAT_00091d90") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return (FILE *)0x0;\n    }" ({ "{") (return_statement "return (FILE *)0x0;" (return "return") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "pcVar2 = "cannot find script file %s\n";" (assignment_expression "pcVar2 = "cannot find script file %s\n"" (identifier "pcVar2") (= "=") (string_literal ""cannot find script file %s\n"" (" """) (string_content "cannot find script file %s") (escape_sequence "\n") (" """))) (; ";")) (} "}")) (else_clause "else {\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" (else "else") (compound_statement "{\n    local_28 = 0;\n    if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }\n    *param_2 = local_28;\n    if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }\n    pcVar2 = "opened script file %s\n";\n  }" ({ "{") (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (if_statement "if (DAT_00091d98 != 0) {\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }" (if "if") (parenthesized_expression "(DAT_00091d98 != 0)" (( "(") (binary_expression "DAT_00091d98 != 0" (identifier "DAT_00091d98") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      pcVar2 = (char *)lrealpath(param_1);\n      sVar3 = strlen(pcVar2);\n      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }\n      free(pcVar2);\n    }" ({ "{") (expression_statement "pcVar2 = (char *)lrealpath(param_1);" (assignment_expression "pcVar2 = (char *)lrealpath(param_1)" (identifier "pcVar2") (= "=") (cast_expression "(char *)lrealpath(param_1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "lrealpath(param_1)" (identifier "lrealpath") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))))) (; ";")) (expression_statement "sVar3 = strlen(pcVar2);" (assignment_expression "sVar3 = strlen(pcVar2)" (identifier "sVar3") (= "=") (call_expression "strlen(pcVar2)" (identifier "strlen") (argument_list "(pcVar2)" (( "(") (identifier "pcVar2") () ")")))) (; ";")) (if_statement "if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }" (if "if") (parenthesized_expression "((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/'))" (( "(") (binary_expression "(DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')" (parenthesized_expression "(DAT_00091c08 < (int)sVar3)" (( "(") (binary_expression "DAT_00091c08 < (int)sVar3" (identifier "DAT_00091c08") (< "<") (cast_expression "(int)sVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "sVar3"))) () ")")) (&& "&&") (parenthesized_expression "(pcVar2[DAT_00091c08] == '/')" (( "(") (binary_expression "pcVar2[DAT_00091c08] == '/'" (subscript_expression "pcVar2[DAT_00091c08]" (identifier "pcVar2") ([ "[") (identifier "DAT_00091c08") (] "]")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")"))) () ")")) (compound_statement "{\n        pcVar2[DAT_00091c08] = '\0';\n        iVar5 = filename_cmp(DAT_00091d98,pcVar2);\n        local_28 = (uint)(iVar5 == 0);\n      }" ({ "{") (expression_statement "pcVar2[DAT_00091c08] = '\0';" (assignment_expression "pcVar2[DAT_00091c08] = '\0'" (subscript_expression "pcVar2[DAT_00091c08]" (identifier "pcVar2") ([ "[") (identifier "DAT_00091c08") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "iVar5 = filename_cmp(DAT_00091d98,pcVar2);" (assignment_expression "iVar5 = filename_cmp(DAT_00091d98,pcVar2)" (identifier "iVar5") (= "=") (call_expression "filename_cmp(DAT_00091d98,pcVar2)" (identifier "filename_cmp") (argument_list "(DAT_00091d98,pcVar2)" (( "(") (identifier "DAT_00091d98") (, ",") (identifier "pcVar2") () ")")))) (; ";")) (expression_statement "local_28 = (uint)(iVar5 == 0);" (assignment_expression "local_28 = (uint)(iVar5 == 0)" (identifier "local_28") (= "=") (call_expression "(uint)(iVar5 == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")))) (; ";")) (} "}"))) (expression_statement "free(pcVar2);" (call_expression "free(pcVar2)" (identifier "free") (argument_list "(pcVar2)" (( "(") (identifier "pcVar2") () ")"))) (; ";")) (} "}"))) (expression_statement "*param_2 = local_28;" (assignment_expression "*param_2 = local_28" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "local_28")) (; ";")) (if_statement "if (DAT_00091d90 == 0) {\n      return pFVar1;\n    }" (if "if") (parenthesized_expression "(DAT_00091d90 == 0)" (( "(") (binary_expression "DAT_00091d90 == 0" (identifier "DAT_00091d90") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return pFVar1;\n    }" ({ "{") (return_statement "return pFVar1;" (return "return") (identifier "pFVar1") (; ";")) (} "}"))) (expression_statement "pcVar2 = "opened script file %s\n";" (assignment_expression "pcVar2 = "opened script file %s\n"" (identifier "pcVar2") (= "=") (string_literal ""opened script file %s\n"" (" """) (string_content "opened script file %s") (escape_sequence "\n") (" """))) (; ";")) (} "}")))) (expression_statement "uVar4 = dcgettext(0,pcVar2,5);" (assignment_expression "uVar4 = dcgettext(0,pcVar2,5)" (identifier "uVar4") (= "=") (call_expression "dcgettext(0,pcVar2,5)" (identifier "dcgettext") (argument_list "(0,pcVar2,5)" (( "(") (number_literal "0") (, ",") (identifier "pcVar2") (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_00031730(uVar4,param_1);" (call_expression "FUN_00031730(uVar4,param_1)" (identifier "FUN_00031730") (argument_list "(uVar4,param_1)" (( "(") (identifier "uVar4") (, ",") (identifier "param_1") () ")"))) (; ";")) (return_statement "return pFVar1;" (return "return") (identifier "pFVar1") (; ";")) (} "}"))

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

type_1 * __regparm3 try_open(char *name,bfd_boolean *sysrooted)

{
  type_1 *var_2;
  char *pcVar2;
  size_t sVar3;
  int var_9;
  type_2 local_28;
  
  var_2 = var_1(name,"r");
  if (var_2 == (type_1 *)0x0) {
    if (var_3 == 0) {
      return (type_1 *)0x0;
    }
    pcVar2 = "cannot find script file %s\n";
  }
  else {
    local_28 = 0;
    if (var_4 != (char *)0x0) {
      pcVar2 = (char *)var_5(name);
      sVar3 = var_6(pcVar2);
      if ((var_7 < (int)sVar3) && (pcVar2[var_7] == '/')) {
        pcVar2[var_7] = '\0';
        var_9 = var_8(var_4,pcVar2);
        local_28 = (type_2)(var_9 == 0);
      }
      var_10(pcVar2);
    }
    *sysrooted = local_28;
    if (var_3 == 0) {
      return (type_1 *)var_2;
    }
    pcVar2 = "opened script file %s\n";
  }
  pcVar2 = (char *)var_11(0,pcVar2,5);
  var_12(pcVar2,name);
  return (type_1 *)var_2;
}


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

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

FILE * __regparm3 MASKED(char *param_1,uint *param_2)

{
  FILE *pFVar1;
  char *pcVar2;
  size_t sVar3;
  undefined4 uVar4;
  int iVar5;
  uint local_28;
  
  pFVar1 = fopen64(param_1,"r");
  if (pFVar1 == (FILE *)0x0) {
    if (DAT_00091d90 == 0) {
      return (FILE *)0x0;
    }
    pcVar2 = "cannot find script file %s\n";
  }
  else {
    local_28 = 0;
    if (DAT_00091d98 != 0) {
      pcVar2 = (char *)lrealpath(param_1);
      sVar3 = strlen(pcVar2);
      if ((DAT_00091c08 < (int)sVar3) && (pcVar2[DAT_00091c08] == '/')) {
        pcVar2[DAT_00091c08] = '\0';
        iVar5 = filename_cmp(DAT_00091d98,pcVar2);
        local_28 = (uint)(iVar5 == 0);
      }
      free(pcVar2);
    }
    *param_2 = local_28;
    if (DAT_00091d90 == 0) {
      return pFVar1;
    }
    pcVar2 = "opened script file %s\n";
  }
  uVar4 = dcgettext(0,pcVar2,5);
  FUN_00031730(uVar4,param_1);
  return pFVar1;
}

