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

void ldfile_add_library_path(char *name,bfd_boolean cmdline)

{
  search_dirs_type *psVar1;
  search_dirs_type *psVar2;
  char *pcVar3;
  int iVar4;
  byte *pbVar5;
  byte *pbVar6;
  bool bVar7;
  bool bVar8;
  byte bVar9;
  
  bVar9 = 0;
  if ((cmdline != 0) || (config.only_cmd_line_lib_dirs == 0)) {
    psVar2 = (search_dirs_type *)xmalloc(0xc);
    psVar2->next = (search_dirs *)0x0;
    psVar2->cmdline = cmdline;
    psVar1 = psVar2;
    *search_tail_ptr = psVar2;
    search_tail_ptr = &psVar1->next;
    bVar7 = (byte)*name < 0x3d;
    bVar8 = *name == 0x3d;
    if (bVar8) {
      pcVar3 = name + 1;
    }
    else {
      iVar4 = 8;
      pbVar5 = (byte *)name;
      pbVar6 = (byte *)"$SYSROOT";
      do {
        if (iVar4 == 0) break;
        iVar4 = iVar4 + -1;
        bVar7 = *pbVar5 < *pbVar6;
        bVar8 = *pbVar5 == *pbVar6;
        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;
        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;
      } while (bVar8);
      if ((!bVar7 && !bVar8) != bVar7) {
        pcVar3 = (char *)xstrdup(name);
        psVar2->name = pcVar3;
        return;
      }
      pcVar3 = name + 8;
    }
    pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);
    psVar2->name = pcVar3;
  }
  return;
}



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

void FUN_000319e0(byte *param_1,int param_2)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  int iVar4;
  byte *pbVar5;
  byte *pbVar6;
  bool bVar7;
  bool bVar8;
  byte bVar9;
  
  bVar9 = 0;
  if ((param_2 != 0) || (DAT_000bbf3c == 0)) {
    puVar2 = (undefined4 *)xmalloc(0xc);
    *puVar2 = 0;
    puVar2[2] = param_2;
    puVar1 = puVar2;
    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;
    PTR_DAT_000bb3b4 = (undefined *)puVar1;
    bVar7 = *param_1 < 0x3d;
    bVar8 = *param_1 == 0x3d;
    if (bVar8) {
      param_1 = param_1 + 1;
    }
    else {
      iVar4 = 8;
      pbVar5 = param_1;
      pbVar6 = (byte *)"$SYSROOT";
      do {
        if (iVar4 == 0) break;
        iVar4 = iVar4 + -1;
        bVar7 = *pbVar5 < *pbVar6;
        bVar8 = *pbVar5 == *pbVar6;
        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;
        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;
      } while (bVar8);
      if ((!bVar7 && !bVar8) != bVar7) {
        uVar3 = xstrdup(param_1);
        puVar2[1] = uVar3;
        return;
      }
      param_1 = param_1 + 8;
    }
    uVar3 = concat(DAT_000bbe88,param_1,0);
    puVar2[1] = uVar3;
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00015a10
ADD EBX,0x89617
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x24]
TEST ESI,ESI
JNZ 0x00031a07
LEA EAX,[EBX + 0xf00]
MOV EAX,dword ptr [EAX + 0x3c]
TEST EAX,EAX
JNZ 0x00031a70
SUB ESP,0xc
PUSH 0xc
CALL 0x00014c58
ADD ESP,0x10
MOV EBP,EAX
MOV dword ptr [EAX],0x0
MOV dword ptr [EAX + 0x8],ESI
MOV EAX,dword ptr [EBX + 0x3b4]
MOV dword ptr [EBX + 0x3b4],EBP
MOV dword ptr [EAX],EBP
MOV EAX,dword ptr [ESP + 0x20]
CMP byte ptr [EAX],0x3d
JZ 0x00031aa0
MOV ESI,dword ptr [ESP + 0x20]
MOV ECX,0x8
LEA EDI,[EBX + 0xfff94089]
CMPSB.REPE ES:EDI,ESI
SETA AL
SBB AL,0x0
TEST AL,AL
JNZ 0x00031a80
SUB ESP,0x4
PUSH 0x0
MOV EAX,dword ptr [ESP + 0x28]
ADD EAX,0x8
PUSH EAX
LEA EAX,[EBX + 0xe88]
PUSH dword ptr [EAX]
CALL 0x000143e0
ADD ESP,0x10
MOV dword ptr [EBP + 0x4],EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [ESP + 0x2c]
CALL 0x00014490
ADD ESP,0x10
MOV dword ptr [EBP + 0x4],EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH 0x0
MOV EAX,dword ptr [ESP + 0x28]
ADD EAX,0x1
JMP 0x00031a5c
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_000319e0(byte *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_000319e0(byte *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000319e0(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (if_statement "if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }" if (parenthesized_expression "((param_2 != 0) || (DAT_000bbf3c == 0))" ( (binary_expression "(param_2 != 0) || (DAT_000bbf3c == 0)" (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) || (parenthesized_expression "(DAT_000bbf3c == 0)" ( (binary_expression "DAT_000bbf3c == 0" identifier == number_literal) ))) )) (compound_statement "{\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }" { (expression_statement "puVar2 = (undefined4 *)xmalloc(0xc);" (assignment_expression "puVar2 = (undefined4 *)xmalloc(0xc)" identifier = (cast_expression "(undefined4 *)xmalloc(0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0xc)" identifier (argument_list "(0xc)" ( number_literal ))))) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2[2] = param_2;" (assignment_expression "puVar2[2] = param_2" (subscript_expression "puVar2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) (expression_statement "*(undefined4 **)PTR_DAT_000bb3b4 = puVar2;" (assignment_expression "*(undefined4 **)PTR_DAT_000bb3b4 = puVar2" (pointer_expression "*(undefined4 **)PTR_DAT_000bb3b4" * (cast_expression "(undefined4 **)PTR_DAT_000bb3b4" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "PTR_DAT_000bb3b4 = (undefined *)puVar1;" (assignment_expression "PTR_DAT_000bb3b4 = (undefined *)puVar1" identifier = (cast_expression "(undefined *)puVar1" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "bVar7 = *param_1 < 0x3d;" (assignment_expression "bVar7 = *param_1 < 0x3d" identifier = (binary_expression "*param_1 < 0x3d" (pointer_expression "*param_1" * identifier) < number_literal)) ;) (expression_statement "bVar8 = *param_1 == 0x3d;" (assignment_expression "bVar8 = *param_1 == 0x3d" identifier = (binary_expression "*param_1 == 0x3d" (pointer_expression "*param_1" * identifier) == number_literal)) ;) (if_statement "if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n      param_1 = param_1 + 1;\n    }" { (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }" else (compound_statement "{\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }" { (expression_statement "iVar4 = 8;" (assignment_expression "iVar4 = 8" identifier = number_literal) ;) (expression_statement "pbVar5 = param_1;" (assignment_expression "pbVar5 = param_1" identifier = identifier) ;) (expression_statement "pbVar6 = (byte *)"$SYSROOT";" (assignment_expression "pbVar6 = (byte *)"$SYSROOT"" identifier = (cast_expression "(byte *)"$SYSROOT"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""$SYSROOT"" " string_content "))) ;) (do_statement "do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);" do (compound_statement "{\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      }" { (if_statement "if (iVar4 == 0) break;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar7 = *pbVar5 < *pbVar6;" (assignment_expression "bVar7 = *pbVar5 < *pbVar6" identifier = (binary_expression "*pbVar5 < *pbVar6" (pointer_expression "*pbVar5" * identifier) < (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "bVar8 = *pbVar5 == *pbVar6;" (assignment_expression "bVar8 = *pbVar5 == *pbVar6" identifier = (binary_expression "*pbVar5 == *pbVar6" (pointer_expression "*pbVar5" * identifier) == (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "pbVar5 + (uint)bVar9 * -2 + 1" (binary_expression "pbVar5 + (uint)bVar9 * -2" identifier + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "pbVar6 + (uint)bVar9 * -2 + 1" (binary_expression "pbVar6 + (uint)bVar9 * -2" identifier + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar8)" ( identifier )) ;) (if_statement "if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }" if (parenthesized_expression "((!bVar7 && !bVar8) != bVar7)" ( (binary_expression "(!bVar7 && !bVar8) != bVar7" (parenthesized_expression "(!bVar7 && !bVar8)" ( (binary_expression "!bVar7 && !bVar8" (unary_expression "!bVar7" ! identifier) && (unary_expression "!bVar8" ! identifier)) )) != identifier) )) (compound_statement "{\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }" { (expression_statement "uVar3 = xstrdup(param_1);" (assignment_expression "uVar3 = xstrdup(param_1)" identifier = (call_expression "xstrdup(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "param_1 = param_1 + 8;" (assignment_expression "param_1 = param_1 + 8" identifier = (binary_expression "param_1 + 8" identifier + number_literal)) ;) }))) (expression_statement "uVar3 = concat(DAT_000bbe88,param_1,0);" (assignment_expression "uVar3 = concat(DAT_000bbe88,param_1,0)" identifier = (call_expression "concat(DAT_000bbe88,param_1,0)" identifier (argument_list "(DAT_000bbe88,param_1,0)" ( identifier , identifier , number_literal )))) ;) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid ldfile_add_library_path(char *name,bfd_boolean cmdline)\n\n{\n  search_dirs_type *psVar1;\n  search_dirs_type *psVar2;\n  char *pcVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((cmdline != 0) || (config.only_cmd_line_lib_dirs == 0)) {\n    psVar2 = (search_dirs_type *)xmalloc(0xc);\n    psVar2->next = (search_dirs *)0x0;\n    psVar2->cmdline = cmdline;\n    psVar1 = psVar2;\n    *search_tail_ptr = psVar2;\n    search_tail_ptr = &psVar1->next;\n    bVar7 = (byte)*name < 0x3d;\n    bVar8 = *name == 0x3d;\n    if (bVar8) {\n      pcVar3 = name + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = (byte *)name;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        pcVar3 = (char *)xstrdup(name);\n        psVar2->name = pcVar3;\n        return;\n      }\n      pcVar3 = name + 8;\n    }\n    pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n    psVar2->name = pcVar3;\n  }\n  return;\n}\n\n" comment (function_definition "void ldfile_add_library_path(char *name,bfd_boolean cmdline)\n\n{\n  search_dirs_type *psVar1;\n  search_dirs_type *psVar2;\n  char *pcVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((cmdline != 0) || (config.only_cmd_line_lib_dirs == 0)) {\n    psVar2 = (search_dirs_type *)xmalloc(0xc);\n    psVar2->next = (search_dirs *)0x0;\n    psVar2->cmdline = cmdline;\n    psVar1 = psVar2;\n    *search_tail_ptr = psVar2;\n    search_tail_ptr = &psVar1->next;\n    bVar7 = (byte)*name < 0x3d;\n    bVar8 = *name == 0x3d;\n    if (bVar8) {\n      pcVar3 = name + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = (byte *)name;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        pcVar3 = (char *)xstrdup(name);\n        psVar2->name = pcVar3;\n        return;\n      }\n      pcVar3 = name + 8;\n    }\n    pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n    psVar2->name = pcVar3;\n  }\n  return;\n}" primitive_type (function_declarator "ldfile_add_library_path(char *name,bfd_boolean cmdline)" identifier (parameter_list "(char *name,bfd_boolean cmdline)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "bfd_boolean cmdline" type_identifier identifier) ))) (compound_statement "{\n  search_dirs_type *psVar1;\n  search_dirs_type *psVar2;\n  char *pcVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((cmdline != 0) || (config.only_cmd_line_lib_dirs == 0)) {\n    psVar2 = (search_dirs_type *)xmalloc(0xc);\n    psVar2->next = (search_dirs *)0x0;\n    psVar2->cmdline = cmdline;\n    psVar1 = psVar2;\n    *search_tail_ptr = psVar2;\n    search_tail_ptr = &psVar1->next;\n    bVar7 = (byte)*name < 0x3d;\n    bVar8 = *name == 0x3d;\n    if (bVar8) {\n      pcVar3 = name + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = (byte *)name;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        pcVar3 = (char *)xstrdup(name);\n        psVar2->name = pcVar3;\n        return;\n      }\n      pcVar3 = name + 8;\n    }\n    pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n    psVar2->name = pcVar3;\n  }\n  return;\n}" { (declaration "search_dirs_type *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "search_dirs_type *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (if_statement "if ((cmdline != 0) || (config.only_cmd_line_lib_dirs == 0)) {\n    psVar2 = (search_dirs_type *)xmalloc(0xc);\n    psVar2->next = (search_dirs *)0x0;\n    psVar2->cmdline = cmdline;\n    psVar1 = psVar2;\n    *search_tail_ptr = psVar2;\n    search_tail_ptr = &psVar1->next;\n    bVar7 = (byte)*name < 0x3d;\n    bVar8 = *name == 0x3d;\n    if (bVar8) {\n      pcVar3 = name + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = (byte *)name;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        pcVar3 = (char *)xstrdup(name);\n        psVar2->name = pcVar3;\n        return;\n      }\n      pcVar3 = name + 8;\n    }\n    pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n    psVar2->name = pcVar3;\n  }" if (parenthesized_expression "((cmdline != 0) || (config.only_cmd_line_lib_dirs == 0))" ( (binary_expression "(cmdline != 0) || (config.only_cmd_line_lib_dirs == 0)" (parenthesized_expression "(cmdline != 0)" ( (binary_expression "cmdline != 0" identifier != number_literal) )) || (parenthesized_expression "(config.only_cmd_line_lib_dirs == 0)" ( (binary_expression "config.only_cmd_line_lib_dirs == 0" (field_expression "config.only_cmd_line_lib_dirs" identifier . field_identifier) == number_literal) ))) )) (compound_statement "{\n    psVar2 = (search_dirs_type *)xmalloc(0xc);\n    psVar2->next = (search_dirs *)0x0;\n    psVar2->cmdline = cmdline;\n    psVar1 = psVar2;\n    *search_tail_ptr = psVar2;\n    search_tail_ptr = &psVar1->next;\n    bVar7 = (byte)*name < 0x3d;\n    bVar8 = *name == 0x3d;\n    if (bVar8) {\n      pcVar3 = name + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = (byte *)name;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        pcVar3 = (char *)xstrdup(name);\n        psVar2->name = pcVar3;\n        return;\n      }\n      pcVar3 = name + 8;\n    }\n    pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);\n    psVar2->name = pcVar3;\n  }" { (expression_statement "psVar2 = (search_dirs_type *)xmalloc(0xc);" (assignment_expression "psVar2 = (search_dirs_type *)xmalloc(0xc)" identifier = (cast_expression "(search_dirs_type *)xmalloc(0xc)" ( (type_descriptor "search_dirs_type *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0xc)" identifier (argument_list "(0xc)" ( number_literal ))))) ;) (expression_statement "psVar2->next = (search_dirs *)0x0;" (assignment_expression "psVar2->next = (search_dirs *)0x0" (field_expression "psVar2->next" identifier -> field_identifier) = (cast_expression "(search_dirs *)0x0" ( (type_descriptor "search_dirs *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "psVar2->cmdline = cmdline;" (assignment_expression "psVar2->cmdline = cmdline" (field_expression "psVar2->cmdline" identifier -> field_identifier) = identifier) ;) (expression_statement "psVar1 = psVar2;" (assignment_expression "psVar1 = psVar2" identifier = identifier) ;) (expression_statement "*search_tail_ptr = psVar2;" (assignment_expression "*search_tail_ptr = psVar2" (pointer_expression "*search_tail_ptr" * identifier) = identifier) ;) (expression_statement "search_tail_ptr = &psVar1->next;" (assignment_expression "search_tail_ptr = &psVar1->next" identifier = (pointer_expression "&psVar1->next" & (field_expression "psVar1->next" identifier -> field_identifier))) ;) (expression_statement "bVar7 = (byte)*name < 0x3d;" (assignment_expression "bVar7 = (byte)*name < 0x3d" identifier = (binary_expression "(byte)*name < 0x3d" (binary_expression "(byte)*name" (parenthesized_expression "(byte)" ( identifier )) * identifier) < number_literal)) ;) (expression_statement "bVar8 = *name == 0x3d;" (assignment_expression "bVar8 = *name == 0x3d" identifier = (binary_expression "*name == 0x3d" (pointer_expression "*name" * identifier) == number_literal)) ;) (if_statement "if (bVar8) {\n      pcVar3 = name + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = (byte *)name;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        pcVar3 = (char *)xstrdup(name);\n        psVar2->name = pcVar3;\n        return;\n      }\n      pcVar3 = name + 8;\n    }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n      pcVar3 = name + 1;\n    }" { (expression_statement "pcVar3 = name + 1;" (assignment_expression "pcVar3 = name + 1" identifier = (binary_expression "name + 1" identifier + number_literal)) ;) }) (else_clause "else {\n      iVar4 = 8;\n      pbVar5 = (byte *)name;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        pcVar3 = (char *)xstrdup(name);\n        psVar2->name = pcVar3;\n        return;\n      }\n      pcVar3 = name + 8;\n    }" else (compound_statement "{\n      iVar4 = 8;\n      pbVar5 = (byte *)name;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        pcVar3 = (char *)xstrdup(name);\n        psVar2->name = pcVar3;\n        return;\n      }\n      pcVar3 = name + 8;\n    }" { (expression_statement "iVar4 = 8;" (assignment_expression "iVar4 = 8" identifier = number_literal) ;) (expression_statement "pbVar5 = (byte *)name;" (assignment_expression "pbVar5 = (byte *)name" identifier = (cast_expression "(byte *)name" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar6 = (byte *)"$SYSROOT";" (assignment_expression "pbVar6 = (byte *)"$SYSROOT"" identifier = (cast_expression "(byte *)"$SYSROOT"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""$SYSROOT"" " string_content "))) ;) (do_statement "do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);" do (compound_statement "{\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      }" { (if_statement "if (iVar4 == 0) break;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar7 = *pbVar5 < *pbVar6;" (assignment_expression "bVar7 = *pbVar5 < *pbVar6" identifier = (binary_expression "*pbVar5 < *pbVar6" (pointer_expression "*pbVar5" * identifier) < (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "bVar8 = *pbVar5 == *pbVar6;" (assignment_expression "bVar8 = *pbVar5 == *pbVar6" identifier = (binary_expression "*pbVar5 == *pbVar6" (pointer_expression "*pbVar5" * identifier) == (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "pbVar5 + (uint)bVar9 * -2 + 1" (binary_expression "pbVar5 + (uint)bVar9 * -2" identifier + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "pbVar6 + (uint)bVar9 * -2 + 1" (binary_expression "pbVar6 + (uint)bVar9 * -2" identifier + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar8)" ( identifier )) ;) (if_statement "if ((!bVar7 && !bVar8) != bVar7) {\n        pcVar3 = (char *)xstrdup(name);\n        psVar2->name = pcVar3;\n        return;\n      }" if (parenthesized_expression "((!bVar7 && !bVar8) != bVar7)" ( (binary_expression "(!bVar7 && !bVar8) != bVar7" (parenthesized_expression "(!bVar7 && !bVar8)" ( (binary_expression "!bVar7 && !bVar8" (unary_expression "!bVar7" ! identifier) && (unary_expression "!bVar8" ! identifier)) )) != identifier) )) (compound_statement "{\n        pcVar3 = (char *)xstrdup(name);\n        psVar2->name = pcVar3;\n        return;\n      }" { (expression_statement "pcVar3 = (char *)xstrdup(name);" (assignment_expression "pcVar3 = (char *)xstrdup(name)" identifier = (cast_expression "(char *)xstrdup(name)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xstrdup(name)" identifier (argument_list "(name)" ( identifier ))))) ;) (expression_statement "psVar2->name = pcVar3;" (assignment_expression "psVar2->name = pcVar3" (field_expression "psVar2->name" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "pcVar3 = name + 8;" (assignment_expression "pcVar3 = name + 8" identifier = (binary_expression "name + 8" identifier + number_literal)) ;) }))) (expression_statement "pcVar3 = (char *)concat(ld_sysroot,pcVar3,0);" (assignment_expression "pcVar3 = (char *)concat(ld_sysroot,pcVar3,0)" identifier = (cast_expression "(char *)concat(ld_sysroot,pcVar3,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(ld_sysroot,pcVar3,0)" identifier (argument_list "(ld_sysroot,pcVar3,0)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "psVar2->name = pcVar3;" (assignment_expression "psVar2->name = pcVar3" (field_expression "psVar2->name" identifier -> field_identifier) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_000319e0(byte *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }\n  return;\n}\n\n" (function_definition "void FUN_000319e0(byte *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000319e0(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "byte *pbVar6;" type_identifier (pointer_declarator "*pbVar6" * identifier) ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "bool bVar8;" primitive_type identifier ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (if_statement "if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }" if (parenthesized_expression "((param_2 != 0) || (DAT_000bbf3c == 0))" ( (binary_expression "(param_2 != 0) || (DAT_000bbf3c == 0)" (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) || (parenthesized_expression "(DAT_000bbf3c == 0)" ( (binary_expression "DAT_000bbf3c == 0" identifier == number_literal) ))) )) (compound_statement "{\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }" { (expression_statement "puVar2 = (undefined4 *)xmalloc(0xc);" (assignment_expression "puVar2 = (undefined4 *)xmalloc(0xc)" identifier = (cast_expression "(undefined4 *)xmalloc(0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0xc)" identifier (argument_list "(0xc)" ( number_literal ))))) ;) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "puVar2[2] = param_2;" (assignment_expression "puVar2[2] = param_2" (subscript_expression "puVar2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) (expression_statement "*(undefined4 **)PTR_DAT_000bb3b4 = puVar2;" (assignment_expression "*(undefined4 **)PTR_DAT_000bb3b4 = puVar2" (pointer_expression "*(undefined4 **)PTR_DAT_000bb3b4" * (cast_expression "(undefined4 **)PTR_DAT_000bb3b4" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "PTR_DAT_000bb3b4 = (undefined *)puVar1;" (assignment_expression "PTR_DAT_000bb3b4 = (undefined *)puVar1" identifier = (cast_expression "(undefined *)puVar1" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "bVar7 = *param_1 < 0x3d;" (assignment_expression "bVar7 = *param_1 < 0x3d" identifier = (binary_expression "*param_1 < 0x3d" (pointer_expression "*param_1" * identifier) < number_literal)) ;) (expression_statement "bVar8 = *param_1 == 0x3d;" (assignment_expression "bVar8 = *param_1 == 0x3d" identifier = (binary_expression "*param_1 == 0x3d" (pointer_expression "*param_1" * identifier) == number_literal)) ;) (if_statement "if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }" if (parenthesized_expression "(bVar8)" ( identifier )) (compound_statement "{\n      param_1 = param_1 + 1;\n    }" { (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }" else (compound_statement "{\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }" { (expression_statement "iVar4 = 8;" (assignment_expression "iVar4 = 8" identifier = number_literal) ;) (expression_statement "pbVar5 = param_1;" (assignment_expression "pbVar5 = param_1" identifier = identifier) ;) (expression_statement "pbVar6 = (byte *)"$SYSROOT";" (assignment_expression "pbVar6 = (byte *)"$SYSROOT"" identifier = (cast_expression "(byte *)"$SYSROOT"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""$SYSROOT"" " string_content "))) ;) (do_statement "do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);" do (compound_statement "{\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      }" { (if_statement "if (iVar4 == 0) break;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar7 = *pbVar5 < *pbVar6;" (assignment_expression "bVar7 = *pbVar5 < *pbVar6" identifier = (binary_expression "*pbVar5 < *pbVar6" (pointer_expression "*pbVar5" * identifier) < (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "bVar8 = *pbVar5 == *pbVar6;" (assignment_expression "bVar8 = *pbVar5 == *pbVar6" identifier = (binary_expression "*pbVar5 == *pbVar6" (pointer_expression "*pbVar5" * identifier) == (pointer_expression "*pbVar6" * identifier))) ;) (expression_statement "pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "pbVar5 + (uint)bVar9 * -2 + 1" (binary_expression "pbVar5 + (uint)bVar9 * -2" identifier + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "pbVar6 + (uint)bVar9 * -2 + 1" (binary_expression "pbVar6 + (uint)bVar9 * -2" identifier + (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar8)" ( identifier )) ;) (if_statement "if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }" if (parenthesized_expression "((!bVar7 && !bVar8) != bVar7)" ( (binary_expression "(!bVar7 && !bVar8) != bVar7" (parenthesized_expression "(!bVar7 && !bVar8)" ( (binary_expression "!bVar7 && !bVar8" (unary_expression "!bVar7" ! identifier) && (unary_expression "!bVar8" ! identifier)) )) != identifier) )) (compound_statement "{\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }" { (expression_statement "uVar3 = xstrdup(param_1);" (assignment_expression "uVar3 = xstrdup(param_1)" identifier = (call_expression "xstrdup(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "param_1 = param_1 + 8;" (assignment_expression "param_1 = param_1 + 8" identifier = (binary_expression "param_1 + 8" identifier + number_literal)) ;) }))) (expression_statement "uVar3 = concat(DAT_000bbe88,param_1,0);" (assignment_expression "uVar3 = concat(DAT_000bbe88,param_1,0)" identifier = (call_expression "concat(DAT_000bbe88,param_1,0)" identifier (argument_list "(DAT_000bbe88,param_1,0)" ( identifier , identifier , number_literal )))) ;) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * 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) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) || (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 ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (string_literal " string_content "))) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! IDENT) && (unary_expression ! IDENT)) )) != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) })) (return_statement return ;) })))
(function_definition "void FUN_000319e0(byte *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000319e0(byte *param_1,int param_2)" (identifier "FUN_000319e0") (parameter_list "(byte *param_1,int param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  byte *pbVar5;\n  byte *pbVar6;\n  bool bVar7;\n  bool bVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }\n  return;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "byte *pbVar6;" (type_identifier "byte") (pointer_declarator "*pbVar6" (* "*") (identifier "pbVar6")) (; ";")) (declaration "bool bVar7;" (primitive_type "bool") (identifier "bVar7") (; ";")) (declaration "bool bVar8;" (primitive_type "bool") (identifier "bVar8") (; ";")) (declaration "byte bVar9;" (type_identifier "byte") (identifier "bVar9") (; ";")) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" (identifier "bVar9") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((param_2 != 0) || (DAT_000bbf3c == 0)) {\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }" (if "if") (parenthesized_expression "((param_2 != 0) || (DAT_000bbf3c == 0))" (( "(") (binary_expression "(param_2 != 0) || (DAT_000bbf3c == 0)" (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(DAT_000bbf3c == 0)" (( "(") (binary_expression "DAT_000bbf3c == 0" (identifier "DAT_000bbf3c") (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    puVar2 = (undefined4 *)xmalloc(0xc);\n    *puVar2 = 0;\n    puVar2[2] = param_2;\n    puVar1 = puVar2;\n    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;\n    PTR_DAT_000bb3b4 = (undefined *)puVar1;\n    bVar7 = *param_1 < 0x3d;\n    bVar8 = *param_1 == 0x3d;\n    if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }\n    uVar3 = concat(DAT_000bbe88,param_1,0);\n    puVar2[1] = uVar3;\n  }" ({ "{") (expression_statement "puVar2 = (undefined4 *)xmalloc(0xc);" (assignment_expression "puVar2 = (undefined4 *)xmalloc(0xc)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)xmalloc(0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(0xc)" (identifier "xmalloc") (argument_list "(0xc)" (( "(") (number_literal "0xc") () ")"))))) (; ";")) (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar2[2] = param_2;" (assignment_expression "puVar2[2] = param_2" (subscript_expression "puVar2[2]" (identifier "puVar2") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" (identifier "puVar1") (= "=") (identifier "puVar2")) (; ";")) (expression_statement "*(undefined4 **)PTR_DAT_000bb3b4 = puVar2;" (assignment_expression "*(undefined4 **)PTR_DAT_000bb3b4 = puVar2" (pointer_expression "*(undefined4 **)PTR_DAT_000bb3b4" (* "*") (cast_expression "(undefined4 **)PTR_DAT_000bb3b4" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR_DAT_000bb3b4"))) (= "=") (identifier "puVar2")) (; ";")) (expression_statement "PTR_DAT_000bb3b4 = (undefined *)puVar1;" (assignment_expression "PTR_DAT_000bb3b4 = (undefined *)puVar1" (identifier "PTR_DAT_000bb3b4") (= "=") (cast_expression "(undefined *)puVar1" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) (; ";")) (expression_statement "bVar7 = *param_1 < 0x3d;" (assignment_expression "bVar7 = *param_1 < 0x3d" (identifier "bVar7") (= "=") (binary_expression "*param_1 < 0x3d" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (< "<") (number_literal "0x3d"))) (; ";")) (expression_statement "bVar8 = *param_1 == 0x3d;" (assignment_expression "bVar8 = *param_1 == 0x3d" (identifier "bVar8") (= "=") (binary_expression "*param_1 == 0x3d" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (number_literal "0x3d"))) (; ";")) (if_statement "if (bVar8) {\n      param_1 = param_1 + 1;\n    }\n    else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }" (if "if") (parenthesized_expression "(bVar8)" (( "(") (identifier "bVar8") () ")")) (compound_statement "{\n      param_1 = param_1 + 1;\n    }" ({ "{") (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }" (else "else") (compound_statement "{\n      iVar4 = 8;\n      pbVar5 = param_1;\n      pbVar6 = (byte *)"$SYSROOT";\n      do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);\n      if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }\n      param_1 = param_1 + 8;\n    }" ({ "{") (expression_statement "iVar4 = 8;" (assignment_expression "iVar4 = 8" (identifier "iVar4") (= "=") (number_literal "8")) (; ";")) (expression_statement "pbVar5 = param_1;" (assignment_expression "pbVar5 = param_1" (identifier "pbVar5") (= "=") (identifier "param_1")) (; ";")) (expression_statement "pbVar6 = (byte *)"$SYSROOT";" (assignment_expression "pbVar6 = (byte *)"$SYSROOT"" (identifier "pbVar6") (= "=") (cast_expression "(byte *)"$SYSROOT"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""$SYSROOT"" (" """) (string_content "$SYSROOT") (" """)))) (; ";")) (do_statement "do {\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      } while (bVar8);" (do "do") (compound_statement "{\n        if (iVar4 == 0) break;\n        iVar4 = iVar4 + -1;\n        bVar7 = *pbVar5 < *pbVar6;\n        bVar8 = *pbVar5 == *pbVar6;\n        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;\n        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;\n      }" ({ "{") (if_statement "if (iVar4 == 0) break;" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar7 = *pbVar5 < *pbVar6;" (assignment_expression "bVar7 = *pbVar5 < *pbVar6" (identifier "bVar7") (= "=") (binary_expression "*pbVar5 < *pbVar6" (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")) (< "<") (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")))) (; ";")) (expression_statement "bVar8 = *pbVar5 == *pbVar6;" (assignment_expression "bVar8 = *pbVar5 == *pbVar6" (identifier "bVar8") (= "=") (binary_expression "*pbVar5 == *pbVar6" (pointer_expression "*pbVar5" (* "*") (identifier "pbVar5")) (== "==") (pointer_expression "*pbVar6" (* "*") (identifier "pbVar6")))) (; ";")) (expression_statement "pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1" (identifier "pbVar5") (= "=") (binary_expression "pbVar5 + (uint)bVar9 * -2 + 1" (binary_expression "pbVar5 + (uint)bVar9 * -2" (identifier "pbVar5") (+ "+") (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar9")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;" (assignment_expression "pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1" (identifier "pbVar6") (= "=") (binary_expression "pbVar6 + (uint)bVar9 * -2 + 1" (binary_expression "pbVar6 + (uint)bVar9 * -2" (identifier "pbVar6") (+ "+") (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar9")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar8)" (( "(") (identifier "bVar8") () ")")) (; ";")) (if_statement "if ((!bVar7 && !bVar8) != bVar7) {\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }" (if "if") (parenthesized_expression "((!bVar7 && !bVar8) != bVar7)" (( "(") (binary_expression "(!bVar7 && !bVar8) != bVar7" (parenthesized_expression "(!bVar7 && !bVar8)" (( "(") (binary_expression "!bVar7 && !bVar8" (unary_expression "!bVar7" (! "!") (identifier "bVar7")) (&& "&&") (unary_expression "!bVar8" (! "!") (identifier "bVar8"))) () ")")) (!= "!=") (identifier "bVar7")) () ")")) (compound_statement "{\n        uVar3 = xstrdup(param_1);\n        puVar2[1] = uVar3;\n        return;\n      }" ({ "{") (expression_statement "uVar3 = xstrdup(param_1);" (assignment_expression "uVar3 = xstrdup(param_1)" (identifier "uVar3") (= "=") (call_expression "xstrdup(param_1)" (identifier "xstrdup") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "param_1 = param_1 + 8;" (assignment_expression "param_1 = param_1 + 8" (identifier "param_1") (= "=") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8"))) (; ";")) (} "}")))) (expression_statement "uVar3 = concat(DAT_000bbe88,param_1,0);" (assignment_expression "uVar3 = concat(DAT_000bbe88,param_1,0)" (identifier "uVar3") (= "=") (call_expression "concat(DAT_000bbe88,param_1,0)" (identifier "concat") (argument_list "(DAT_000bbe88,param_1,0)" (( "(") (identifier "DAT_000bbe88") (, ",") (identifier "param_1") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "puVar2[1] = uVar3;" (assignment_expression "puVar2[1] = uVar3" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(char *var_3,type_1 var_1)

{
  type_2 *psVar1;
  type_2 *psVar2;
  char *pcVar3;
  int var_4;
  type_3 *var_5;
  type_3 *var_6;
  bool var_7;
  bool bVar8;
  type_3 bVar9;
  
  bVar9 = 0;
  if ((var_1 != 0) || (config.only_cmd_line_lib_dirs == 0)) {
    psVar2 = (type_2 *)var_2(0xc);
    psVar2->next = (type_4 *)0x0;
    psVar2->var_1 = var_1;
    psVar1 = psVar2;
    *search_tail_ptr = psVar2;
    search_tail_ptr = &psVar1->next;
    var_7 = (type_3)*var_3 < 0x3d;
    bVar8 = *var_3 == 0x3d;
    if (bVar8) {
      pcVar3 = var_3 + 1;
    }
    else {
      var_4 = 8;
      var_5 = (type_3 *)var_3;
      var_6 = (type_3 *)"$SYSROOT";
      do {
        if (var_4 == 0) break;
        var_4 = var_4 + -1;
        var_7 = *var_5 < *var_6;
        bVar8 = *var_5 == *var_6;
        var_5 = var_5 + (type_5)bVar9 * -2 + 1;
        var_6 = var_6 + (type_5)bVar9 * -2 + 1;
      } while (bVar8);
      if ((!var_7 && !bVar8) != var_7) {
        pcVar3 = (char *)var_8(var_3);
        psVar2->var_3 = pcVar3;
        return;
      }
      pcVar3 = var_3 + 8;
    }
    pcVar3 = (char *)var_9(ld_sysroot,pcVar3,0);
    psVar2->var_3 = pcVar3;
  }
  return;
}


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

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

void MASKED(byte *param_1,int param_2)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  int iVar4;
  byte *pbVar5;
  byte *pbVar6;
  bool bVar7;
  bool bVar8;
  byte bVar9;
  
  bVar9 = 0;
  if ((param_2 != 0) || (DAT_000bbf3c == 0)) {
    puVar2 = (undefined4 *)xmalloc(0xc);
    *puVar2 = 0;
    puVar2[2] = param_2;
    puVar1 = puVar2;
    *(undefined4 **)PTR_DAT_000bb3b4 = puVar2;
    PTR_DAT_000bb3b4 = (undefined *)puVar1;
    bVar7 = *param_1 < 0x3d;
    bVar8 = *param_1 == 0x3d;
    if (bVar8) {
      param_1 = param_1 + 1;
    }
    else {
      iVar4 = 8;
      pbVar5 = param_1;
      pbVar6 = (byte *)"$SYSROOT";
      do {
        if (iVar4 == 0) break;
        iVar4 = iVar4 + -1;
        bVar7 = *pbVar5 < *pbVar6;
        bVar8 = *pbVar5 == *pbVar6;
        pbVar5 = pbVar5 + (uint)bVar9 * -2 + 1;
        pbVar6 = pbVar6 + (uint)bVar9 * -2 + 1;
      } while (bVar8);
      if ((!bVar7 && !bVar8) != bVar7) {
        uVar3 = xstrdup(param_1);
        puVar2[1] = uVar3;
        return;
      }
      param_1 = param_1 + 8;
    }
    uVar3 = concat(DAT_000bbe88,param_1,0);
    puVar2[1] = uVar3;
  }
  return;
}

