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

char * __regparm3 normalize(char *file,bfd *abfd)

{
  byte bVar1;
  bfd_target *pbVar2;
  char *pcVar3;
  size_t sVar4;
  char *pcVar5;
  int iVar6;
  uint uVar7;
  undefined4 *puVar8;
  byte bVar9;
  
  bVar9 = 0;
  pcVar3 = (char *)lbasename(file);
  if ((ar_truncate == 0) || (abfd == (bfd *)0x0)) {
    return pcVar3;
  }
  sVar4 = strlen(pcVar3);
  uVar7 = (uint)abfd->xvec->ar_max_namelen;
  if (sVar4 <= uVar7) {
    return pcVar3;
  }
  pcVar5 = (char *)xmalloc(uVar7 + 1);
  pbVar2 = abfd->xvec;
  bVar1 = pbVar2->ar_max_namelen;
  uVar7 = (uint)bVar1;
  if (uVar7 < 4) {
    if (uVar7 == 0) goto LAB_00016214;
    *pcVar5 = *pcVar3;
    if ((bVar1 & 2) != 0) {
      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));
      uVar7 = (uint)pbVar2->ar_max_namelen;
      goto LAB_00016214;
    }
  }
  else {
    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;
    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));
    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);
    pcVar3 = pcVar3 + -iVar6;
    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);
    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {
      *puVar8 = *(undefined4 *)pcVar3;
      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;
      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;
    }
  }
  uVar7 = (uint)pbVar2->ar_max_namelen;
LAB_00016214:
  pcVar5[uVar7] = '\0';
  return pcVar5;
}



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

char * __regparm3 FUN_00016190(undefined4 param_1,int param_2)

{
  byte bVar1;
  int iVar2;
  char *pcVar3;
  size_t sVar4;
  char *pcVar5;
  int iVar6;
  uint uVar7;
  undefined4 *puVar8;
  byte bVar9;
  
  bVar9 = 0;
  pcVar3 = (char *)lbasename(param_1);
  if ((DAT_000212c8 == 0) || (param_2 == 0)) {
    return pcVar3;
  }
  sVar4 = strlen(pcVar3);
  uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);
  if (sVar4 <= uVar7) {
    return pcVar3;
  }
  pcVar5 = (char *)xmalloc(uVar7 + 1);
  iVar2 = *(int *)(param_2 + 4);
  bVar1 = *(byte *)(iVar2 + 0x1a);
  uVar7 = (uint)bVar1;
  if (uVar7 < 4) {
    if (uVar7 == 0) goto LAB_00016214;
    *pcVar5 = *pcVar3;
    if ((bVar1 & 2) != 0) {
      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));
      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);
      goto LAB_00016214;
    }
  }
  else {
    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;
    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));
    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);
    pcVar3 = pcVar3 + -iVar6;
    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);
    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {
      *puVar8 = *(undefined4 *)pcVar3;
      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;
      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;
    }
  }
  uVar7 = (uint)*(byte *)(iVar2 + 0x1a);
LAB_00016214:
  pcVar5[uVar7] = '\0';
  return pcVar5;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
MOV EDI,EDX
PUSH ESI
PUSH EBX
CALL 0x00013710
ADD EBX,0xae63
SUB ESP,0x18
PUSH EAX
CALL 0x00012290
ADD ESP,0x10
MOV ESI,EAX
MOV EAX,dword ptr [EBX + 0x2c8]
TEST EAX,EAX
JZ 0x000161d6
TEST EDI,EDI
JZ 0x000161d6
SUB ESP,0xc
PUSH ESI
CALL 0x00012360
MOV EDX,dword ptr [EDI + 0x4]
ADD ESP,0x10
MOVZX EDX,byte ptr [EDX + 0x1a]
CMP EAX,EDX
JA 0x000161e0
LEA ESP,[EBP + -0xc]
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD EDX,0x1
SUB ESP,0xc
PUSH EDX
CALL 0x00012220
MOV EDX,dword ptr [EDI + 0x4]
MOVZX EBX,byte ptr [EDX + 0x1a]
CMP EBX,0x4
JNC 0x00016230
TEST EBX,EBX
JZ 0x00016214
MOVZX ECX,byte ptr [ESI]
MOV byte ptr [EAX],CL
TEST BL,0x2
JZ 0x0001624f
MOVZX ECX,word ptr [ESI + EBX*0x1 + -0x2]
MOV word ptr [EAX + EBX*0x1 + -0x2],CX
MOVZX EBX,byte ptr [EDX + 0x1a]
MOV byte ptr [EAX + EBX*0x1],0x0
MOV ESI,EAX
ADD ESP,0x10
LEA ESP,[EBP + -0xc]
POP EBX
MOV EAX,ESI
POP ESI
POP EDI
POP EBP
RET
MOV ECX,dword ptr [ESI]
LEA EDI,[EAX + 0x4]
AND EDI,0xfffffffc
MOV dword ptr [EAX],ECX
MOV ECX,dword ptr [ESI + EBX*0x1 + -0x4]
MOV dword ptr [EAX + EBX*0x1 + -0x4],ECX
MOV ECX,EAX
SUB ECX,EDI
SUB ESI,ECX
ADD ECX,EBX
SHR ECX,0x2
MOVSD.REP ES:EDI,ESI
MOVZX EBX,byte ptr [EDX + 0x1a]
JMP 0x00016214
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 FUN_00016190(undefined4 param_1,int param_2)\n\n{\n  byte bVar1;\n  int iVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(param_1);\n  if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  iVar2 = *(int *)(param_2 + 4);\n  bVar1 = *(byte *)(iVar2 + 0x1a);\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}\n\n" comment (function_definition "char * __regparm3 FUN_00016190(undefined4 param_1,int param_2)\n\n{\n  byte bVar1;\n  int iVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(param_1);\n  if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  iVar2 = *(int *)(param_2 + 4);\n  bVar1 = *(byte *)(iVar2 + 0x1a);\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_00016190(undefined4 param_1,int param_2)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_00016190(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  byte bVar1;\n  int iVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(param_1);\n  if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  iVar2 = *(int *)(param_2 + 4);\n  bVar1 = *(byte *)(iVar2 + 0x1a);\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (expression_statement "pcVar3 = (char *)lbasename(param_1);" (assignment_expression "pcVar3 = (char *)lbasename(param_1)" identifier = (cast_expression "(char *)lbasename(param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "lbasename(param_1)" identifier (argument_list "(param_1)" ( identifier ))))) ;) (if_statement "if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }" if (parenthesized_expression "((DAT_000212c8 == 0) || (param_2 == 0))" ( (binary_expression "(DAT_000212c8 == 0) || (param_2 == 0)" (parenthesized_expression "(DAT_000212c8 == 0)" ( (binary_expression "DAT_000212c8 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) ))) )) (compound_statement "{\n    return pcVar3;\n  }" { (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "sVar4 = strlen(pcVar3);" (assignment_expression "sVar4 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);" (assignment_expression "uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a)" identifier = (binary_expression "(uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(*(int *)(param_2 + 4) + 0x1a)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 4) + 0x1a)" ( (binary_expression "*(int *)(param_2 + 4) + 0x1a" (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) (if_statement "if (sVar4 <= uVar7) {\n    return pcVar3;\n  }" if (parenthesized_expression "(sVar4 <= uVar7)" ( (binary_expression "sVar4 <= uVar7" identifier <= identifier) )) (compound_statement "{\n    return pcVar3;\n  }" { (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pcVar5 = (char *)xmalloc(uVar7 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(uVar7 + 1)" identifier = (cast_expression "(char *)xmalloc(uVar7 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(uVar7 + 1)" identifier (argument_list "(uVar7 + 1)" ( (binary_expression "uVar7 + 1" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = *(int *)(param_2 + 4);" (assignment_expression "iVar2 = *(int *)(param_2 + 4)" identifier = (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) ))))) ;) (expression_statement "bVar1 = *(byte *)(iVar2 + 0x1a);" (assignment_expression "bVar1 = *(byte *)(iVar2 + 0x1a)" identifier = (pointer_expression "*(byte *)(iVar2 + 0x1a)" * (cast_expression "(byte *)(iVar2 + 0x1a)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1a)" ( (binary_expression "iVar2 + 0x1a" identifier + number_literal) ))))) ;) (expression_statement "uVar7 = (uint)bVar1;" (assignment_expression "uVar7 = (uint)bVar1" identifier = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" if (parenthesized_expression "(uVar7 < 4)" ( (binary_expression "uVar7 < 4" identifier < number_literal) )) (compound_statement "{\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }" { (if_statement "if (uVar7 == 0) goto LAB_00016214;" if (parenthesized_expression "(uVar7 == 0)" ( (binary_expression "uVar7 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00016214;" goto statement_identifier ;)) (expression_statement "*pcVar5 = *pcVar3;" (assignment_expression "*pcVar5 = *pcVar3" (pointer_expression "*pcVar5" * identifier) = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }" if (parenthesized_expression "((bVar1 & 2) != 0)" ( (binary_expression "(bVar1 & 2) != 0" (parenthesized_expression "(bVar1 & 2)" ( (binary_expression "bVar1 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }" { (expression_statement "*(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));" (assignment_expression "*(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2))" (pointer_expression "*(undefined2 *)(pcVar5 + (uVar7 - 2))" * (cast_expression "(undefined2 *)(pcVar5 + (uVar7 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar5 + (uVar7 - 2))" ( (binary_expression "pcVar5 + (uVar7 - 2)" identifier + (parenthesized_expression "(uVar7 - 2)" ( (binary_expression "uVar7 - 2" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined2 *)(pcVar3 + (uVar7 - 2))" * (cast_expression "(undefined2 *)(pcVar3 + (uVar7 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar3 + (uVar7 - 2))" ( (binary_expression "pcVar3 + (uVar7 - 2)" identifier + (parenthesized_expression "(uVar7 - 2)" ( (binary_expression "uVar7 - 2" identifier - number_literal) ))) ))))) ;) (expression_statement "uVar7 = (uint)*(byte *)(iVar2 + 0x1a);" (assignment_expression "uVar7 = (uint)*(byte *)(iVar2 + 0x1a)" identifier = (binary_expression "(uint)*(byte *)(iVar2 + 0x1a)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(iVar2 + 0x1a)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1a)" ( (binary_expression "iVar2 + 0x1a" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_00016214;" goto statement_identifier ;) })) }) (else_clause "else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" else (compound_statement "{\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" { (expression_statement "*(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;" (assignment_expression "*(undefined4 *)pcVar5 = *(undefined4 *)pcVar3" (pointer_expression "*(undefined4 *)pcVar5" * (cast_expression "(undefined4 *)pcVar5" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (pointer_expression "*(undefined4 *)pcVar3" * (cast_expression "(undefined4 *)pcVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));" (assignment_expression "*(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4))" (pointer_expression "*(undefined4 *)(pcVar5 + (uVar7 - 4))" * (cast_expression "(undefined4 *)(pcVar5 + (uVar7 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar5 + (uVar7 - 4))" ( (binary_expression "pcVar5 + (uVar7 - 4)" identifier + (parenthesized_expression "(uVar7 - 4)" ( (binary_expression "uVar7 - 4" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined4 *)(pcVar3 + (uVar7 - 4))" * (cast_expression "(undefined4 *)(pcVar3 + (uVar7 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar3 + (uVar7 - 4))" ( (binary_expression "pcVar3 + (uVar7 - 4)" identifier + (parenthesized_expression "(uVar7 - 4)" ( (binary_expression "uVar7 - 4" identifier - number_literal) ))) ))))) ;) (expression_statement "iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);" (assignment_expression "iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc)" identifier = (binary_expression "(int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc)" (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)((uint)(pcVar5 + 4) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(pcVar5 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(pcVar5 + 4) & 0xfffffffc" (call_expression "(uint)(pcVar5 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pcVar5 + 4)" ( (binary_expression "pcVar5 + 4" identifier + number_literal) ))) & number_literal) ))))) ;) (expression_statement "pcVar3 = pcVar3 + -iVar6;" (assignment_expression "pcVar3 = pcVar3 + -iVar6" identifier = (binary_expression "pcVar3 + -iVar6" identifier + (unary_expression "-iVar6" - identifier))) ;) (expression_statement "puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);" (assignment_expression "puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(pcVar5 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(pcVar5 + 4) & 0xfffffffc" (call_expression "(uint)(pcVar5 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pcVar5 + 4)" ( (binary_expression "pcVar5 + 4" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }" for ( (assignment_expression "uVar7 = iVar6 + uVar7 >> 2" identifier = (binary_expression "iVar6 + uVar7 >> 2" (binary_expression "iVar6 + uVar7" identifier + identifier) >> number_literal)) ; (binary_expression "uVar7 != 0" identifier != number_literal) ; (assignment_expression "uVar7 = uVar7 - 1" identifier = (binary_expression "uVar7 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }" { (expression_statement "*puVar8 = *(undefined4 *)pcVar3;" (assignment_expression "*puVar8 = *(undefined4 *)pcVar3" (pointer_expression "*puVar8" * identifier) = (pointer_expression "*(undefined4 *)pcVar3" * (cast_expression "(undefined4 *)pcVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;" (assignment_expression "pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4" identifier = (binary_expression "pcVar3 + ((uint)bVar9 * -2 + 1) * 4" identifier + (binary_expression "((uint)bVar9 * -2 + 1) * 4" (parenthesized_expression "((uint)bVar9 * -2 + 1)" ( (binary_expression "(uint)bVar9 * -2 + 1" (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal) + number_literal) )) * number_literal))) ;) (expression_statement "puVar8 = puVar8 + (uint)bVar9 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "puVar8 + (uint)bVar9 * -2 + 1" (binary_expression "puVar8 + (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 "uVar7 = (uint)*(byte *)(iVar2 + 0x1a);" (assignment_expression "uVar7 = (uint)*(byte *)(iVar2 + 0x1a)" identifier = (binary_expression "(uint)*(byte *)(iVar2 + 0x1a)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(iVar2 + 0x1a)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1a)" ( (binary_expression "iVar2 + 0x1a" identifier + number_literal) ))))) ;) (labeled_statement "LAB_00016214:\n  pcVar5[uVar7] = '\0';" statement_identifier : (expression_statement "pcVar5[uVar7] = '\0';" (assignment_expression "pcVar5[uVar7] = '\0'" (subscript_expression "pcVar5[uVar7]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;)) (return_statement "return pcVar5;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 normalize(char *file,bfd *abfd)\n\n{\n  byte bVar1;\n  bfd_target *pbVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(file);\n  if ((ar_truncate == 0) || (abfd == (bfd *)0x0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)abfd->xvec->ar_max_namelen;\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  pbVar2 = abfd->xvec;\n  bVar1 = pbVar2->ar_max_namelen;\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)pbVar2->ar_max_namelen;\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)pbVar2->ar_max_namelen;\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}\n\n" comment (function_definition "char * __regparm3 normalize(char *file,bfd *abfd)\n\n{\n  byte bVar1;\n  bfd_target *pbVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(file);\n  if ((ar_truncate == 0) || (abfd == (bfd *)0x0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)abfd->xvec->ar_max_namelen;\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  pbVar2 = abfd->xvec;\n  bVar1 = pbVar2->ar_max_namelen;\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)pbVar2->ar_max_namelen;\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)pbVar2->ar_max_namelen;\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}" primitive_type (pointer_declarator "* __regparm3 normalize(char *file,bfd *abfd)" * (ERROR "__regparm3" identifier) (function_declarator "normalize(char *file,bfd *abfd)" identifier (parameter_list "(char *file,bfd *abfd)" ( (parameter_declaration "char *file" primitive_type (pointer_declarator "*file" * identifier)) , (parameter_declaration "bfd *abfd" type_identifier (pointer_declarator "*abfd" * identifier)) )))) (compound_statement "{\n  byte bVar1;\n  bfd_target *pbVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(file);\n  if ((ar_truncate == 0) || (abfd == (bfd *)0x0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)abfd->xvec->ar_max_namelen;\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  pbVar2 = abfd->xvec;\n  bVar1 = pbVar2->ar_max_namelen;\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)pbVar2->ar_max_namelen;\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)pbVar2->ar_max_namelen;\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "bfd_target *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (expression_statement "pcVar3 = (char *)lbasename(file);" (assignment_expression "pcVar3 = (char *)lbasename(file)" identifier = (cast_expression "(char *)lbasename(file)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "lbasename(file)" identifier (argument_list "(file)" ( identifier ))))) ;) (if_statement "if ((ar_truncate == 0) || (abfd == (bfd *)0x0)) {\n    return pcVar3;\n  }" if (parenthesized_expression "((ar_truncate == 0) || (abfd == (bfd *)0x0))" ( (binary_expression "(ar_truncate == 0) || (abfd == (bfd *)0x0)" (parenthesized_expression "(ar_truncate == 0)" ( (binary_expression "ar_truncate == 0" identifier == number_literal) )) || (parenthesized_expression "(abfd == (bfd *)0x0)" ( (binary_expression "abfd == (bfd *)0x0" identifier == (cast_expression "(bfd *)0x0" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    return pcVar3;\n  }" { (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "sVar4 = strlen(pcVar3);" (assignment_expression "sVar4 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "uVar7 = (uint)abfd->xvec->ar_max_namelen;" (assignment_expression "uVar7 = (uint)abfd->xvec->ar_max_namelen" identifier = (cast_expression "(uint)abfd->xvec->ar_max_namelen" ( (type_descriptor "uint" type_identifier) ) (field_expression "abfd->xvec->ar_max_namelen" (field_expression "abfd->xvec" identifier -> field_identifier) -> field_identifier))) ;) (if_statement "if (sVar4 <= uVar7) {\n    return pcVar3;\n  }" if (parenthesized_expression "(sVar4 <= uVar7)" ( (binary_expression "sVar4 <= uVar7" identifier <= identifier) )) (compound_statement "{\n    return pcVar3;\n  }" { (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pcVar5 = (char *)xmalloc(uVar7 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(uVar7 + 1)" identifier = (cast_expression "(char *)xmalloc(uVar7 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(uVar7 + 1)" identifier (argument_list "(uVar7 + 1)" ( (binary_expression "uVar7 + 1" identifier + number_literal) ))))) ;) (expression_statement "pbVar2 = abfd->xvec;" (assignment_expression "pbVar2 = abfd->xvec" identifier = (field_expression "abfd->xvec" identifier -> field_identifier)) ;) (expression_statement "bVar1 = pbVar2->ar_max_namelen;" (assignment_expression "bVar1 = pbVar2->ar_max_namelen" identifier = (field_expression "pbVar2->ar_max_namelen" identifier -> field_identifier)) ;) (expression_statement "uVar7 = (uint)bVar1;" (assignment_expression "uVar7 = (uint)bVar1" identifier = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)pbVar2->ar_max_namelen;\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" if (parenthesized_expression "(uVar7 < 4)" ( (binary_expression "uVar7 < 4" identifier < number_literal) )) (compound_statement "{\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)pbVar2->ar_max_namelen;\n      goto LAB_00016214;\n    }\n  }" { (if_statement "if (uVar7 == 0) goto LAB_00016214;" if (parenthesized_expression "(uVar7 == 0)" ( (binary_expression "uVar7 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00016214;" goto statement_identifier ;)) (expression_statement "*pcVar5 = *pcVar3;" (assignment_expression "*pcVar5 = *pcVar3" (pointer_expression "*pcVar5" * identifier) = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)pbVar2->ar_max_namelen;\n      goto LAB_00016214;\n    }" if (parenthesized_expression "((bVar1 & 2) != 0)" ( (binary_expression "(bVar1 & 2) != 0" (parenthesized_expression "(bVar1 & 2)" ( (binary_expression "bVar1 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)pbVar2->ar_max_namelen;\n      goto LAB_00016214;\n    }" { (expression_statement "*(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));" (assignment_expression "*(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2))" (pointer_expression "*(undefined2 *)(pcVar5 + (uVar7 - 2))" * (cast_expression "(undefined2 *)(pcVar5 + (uVar7 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar5 + (uVar7 - 2))" ( (binary_expression "pcVar5 + (uVar7 - 2)" identifier + (parenthesized_expression "(uVar7 - 2)" ( (binary_expression "uVar7 - 2" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined2 *)(pcVar3 + (uVar7 - 2))" * (cast_expression "(undefined2 *)(pcVar3 + (uVar7 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar3 + (uVar7 - 2))" ( (binary_expression "pcVar3 + (uVar7 - 2)" identifier + (parenthesized_expression "(uVar7 - 2)" ( (binary_expression "uVar7 - 2" identifier - number_literal) ))) ))))) ;) (expression_statement "uVar7 = (uint)pbVar2->ar_max_namelen;" (assignment_expression "uVar7 = (uint)pbVar2->ar_max_namelen" identifier = (cast_expression "(uint)pbVar2->ar_max_namelen" ( (type_descriptor "uint" type_identifier) ) (field_expression "pbVar2->ar_max_namelen" identifier -> field_identifier))) ;) (goto_statement "goto LAB_00016214;" goto statement_identifier ;) })) }) (else_clause "else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" else (compound_statement "{\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" { (expression_statement "*(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;" (assignment_expression "*(undefined4 *)pcVar5 = *(undefined4 *)pcVar3" (pointer_expression "*(undefined4 *)pcVar5" * (cast_expression "(undefined4 *)pcVar5" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (pointer_expression "*(undefined4 *)pcVar3" * (cast_expression "(undefined4 *)pcVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));" (assignment_expression "*(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4))" (pointer_expression "*(undefined4 *)(pcVar5 + (uVar7 - 4))" * (cast_expression "(undefined4 *)(pcVar5 + (uVar7 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar5 + (uVar7 - 4))" ( (binary_expression "pcVar5 + (uVar7 - 4)" identifier + (parenthesized_expression "(uVar7 - 4)" ( (binary_expression "uVar7 - 4" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined4 *)(pcVar3 + (uVar7 - 4))" * (cast_expression "(undefined4 *)(pcVar3 + (uVar7 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar3 + (uVar7 - 4))" ( (binary_expression "pcVar3 + (uVar7 - 4)" identifier + (parenthesized_expression "(uVar7 - 4)" ( (binary_expression "uVar7 - 4" identifier - number_literal) ))) ))))) ;) (expression_statement "iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);" (assignment_expression "iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc)" identifier = (binary_expression "(int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc)" (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)((uint)(pcVar5 + 4) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(pcVar5 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(pcVar5 + 4) & 0xfffffffc" (call_expression "(uint)(pcVar5 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pcVar5 + 4)" ( (binary_expression "pcVar5 + 4" identifier + number_literal) ))) & number_literal) ))))) ;) (expression_statement "pcVar3 = pcVar3 + -iVar6;" (assignment_expression "pcVar3 = pcVar3 + -iVar6" identifier = (binary_expression "pcVar3 + -iVar6" identifier + (unary_expression "-iVar6" - identifier))) ;) (expression_statement "puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);" (assignment_expression "puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(pcVar5 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(pcVar5 + 4) & 0xfffffffc" (call_expression "(uint)(pcVar5 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pcVar5 + 4)" ( (binary_expression "pcVar5 + 4" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }" for ( (assignment_expression "uVar7 = iVar6 + uVar7 >> 2" identifier = (binary_expression "iVar6 + uVar7 >> 2" (binary_expression "iVar6 + uVar7" identifier + identifier) >> number_literal)) ; (binary_expression "uVar7 != 0" identifier != number_literal) ; (assignment_expression "uVar7 = uVar7 - 1" identifier = (binary_expression "uVar7 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }" { (expression_statement "*puVar8 = *(undefined4 *)pcVar3;" (assignment_expression "*puVar8 = *(undefined4 *)pcVar3" (pointer_expression "*puVar8" * identifier) = (pointer_expression "*(undefined4 *)pcVar3" * (cast_expression "(undefined4 *)pcVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;" (assignment_expression "pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4" identifier = (binary_expression "pcVar3 + ((uint)bVar9 * -2 + 1) * 4" identifier + (binary_expression "((uint)bVar9 * -2 + 1) * 4" (parenthesized_expression "((uint)bVar9 * -2 + 1)" ( (binary_expression "(uint)bVar9 * -2 + 1" (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal) + number_literal) )) * number_literal))) ;) (expression_statement "puVar8 = puVar8 + (uint)bVar9 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "puVar8 + (uint)bVar9 * -2 + 1" (binary_expression "puVar8 + (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 "uVar7 = (uint)pbVar2->ar_max_namelen;" (assignment_expression "uVar7 = (uint)pbVar2->ar_max_namelen" identifier = (cast_expression "(uint)pbVar2->ar_max_namelen" ( (type_descriptor "uint" type_identifier) ) (field_expression "pbVar2->ar_max_namelen" identifier -> field_identifier))) ;) (labeled_statement "LAB_00016214:\n  pcVar5[uVar7] = '\0';" statement_identifier : (expression_statement "pcVar5[uVar7] = '\0';" (assignment_expression "pcVar5[uVar7] = '\0'" (subscript_expression "pcVar5[uVar7]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;)) (return_statement "return pcVar5;" return identifier ;) })))
(translation_unit "char * __regparm3 FUN_00016190(undefined4 param_1,int param_2)\n\n{\n  byte bVar1;\n  int iVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(param_1);\n  if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  iVar2 = *(int *)(param_2 + 4);\n  bVar1 = *(byte *)(iVar2 + 0x1a);\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}\n\n" (function_definition "char * __regparm3 FUN_00016190(undefined4 param_1,int param_2)\n\n{\n  byte bVar1;\n  int iVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(param_1);\n  if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  iVar2 = *(int *)(param_2 + 4);\n  bVar1 = *(byte *)(iVar2 + 0x1a);\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_00016190(undefined4 param_1,int param_2)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_00016190(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  byte bVar1;\n  int iVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(param_1);\n  if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  iVar2 = *(int *)(param_2 + 4);\n  bVar1 = *(byte *)(iVar2 + 0x1a);\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "byte bVar9;" type_identifier identifier ;) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" identifier = number_literal) ;) (expression_statement "pcVar3 = (char *)lbasename(param_1);" (assignment_expression "pcVar3 = (char *)lbasename(param_1)" identifier = (cast_expression "(char *)lbasename(param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "lbasename(param_1)" identifier (argument_list "(param_1)" ( identifier ))))) ;) (if_statement "if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }" if (parenthesized_expression "((DAT_000212c8 == 0) || (param_2 == 0))" ( (binary_expression "(DAT_000212c8 == 0) || (param_2 == 0)" (parenthesized_expression "(DAT_000212c8 == 0)" ( (binary_expression "DAT_000212c8 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) ))) )) (compound_statement "{\n    return pcVar3;\n  }" { (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "sVar4 = strlen(pcVar3);" (assignment_expression "sVar4 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);" (assignment_expression "uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a)" identifier = (binary_expression "(uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(*(int *)(param_2 + 4) + 0x1a)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 4) + 0x1a)" ( (binary_expression "*(int *)(param_2 + 4) + 0x1a" (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + number_literal) ))))) ;) (if_statement "if (sVar4 <= uVar7) {\n    return pcVar3;\n  }" if (parenthesized_expression "(sVar4 <= uVar7)" ( (binary_expression "sVar4 <= uVar7" identifier <= identifier) )) (compound_statement "{\n    return pcVar3;\n  }" { (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pcVar5 = (char *)xmalloc(uVar7 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(uVar7 + 1)" identifier = (cast_expression "(char *)xmalloc(uVar7 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(uVar7 + 1)" identifier (argument_list "(uVar7 + 1)" ( (binary_expression "uVar7 + 1" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = *(int *)(param_2 + 4);" (assignment_expression "iVar2 = *(int *)(param_2 + 4)" identifier = (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) ))))) ;) (expression_statement "bVar1 = *(byte *)(iVar2 + 0x1a);" (assignment_expression "bVar1 = *(byte *)(iVar2 + 0x1a)" identifier = (pointer_expression "*(byte *)(iVar2 + 0x1a)" * (cast_expression "(byte *)(iVar2 + 0x1a)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1a)" ( (binary_expression "iVar2 + 0x1a" identifier + number_literal) ))))) ;) (expression_statement "uVar7 = (uint)bVar1;" (assignment_expression "uVar7 = (uint)bVar1" identifier = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" if (parenthesized_expression "(uVar7 < 4)" ( (binary_expression "uVar7 < 4" identifier < number_literal) )) (compound_statement "{\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }" { (if_statement "if (uVar7 == 0) goto LAB_00016214;" if (parenthesized_expression "(uVar7 == 0)" ( (binary_expression "uVar7 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00016214;" goto statement_identifier ;)) (expression_statement "*pcVar5 = *pcVar3;" (assignment_expression "*pcVar5 = *pcVar3" (pointer_expression "*pcVar5" * identifier) = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }" if (parenthesized_expression "((bVar1 & 2) != 0)" ( (binary_expression "(bVar1 & 2) != 0" (parenthesized_expression "(bVar1 & 2)" ( (binary_expression "bVar1 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }" { (expression_statement "*(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));" (assignment_expression "*(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2))" (pointer_expression "*(undefined2 *)(pcVar5 + (uVar7 - 2))" * (cast_expression "(undefined2 *)(pcVar5 + (uVar7 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar5 + (uVar7 - 2))" ( (binary_expression "pcVar5 + (uVar7 - 2)" identifier + (parenthesized_expression "(uVar7 - 2)" ( (binary_expression "uVar7 - 2" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined2 *)(pcVar3 + (uVar7 - 2))" * (cast_expression "(undefined2 *)(pcVar3 + (uVar7 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar3 + (uVar7 - 2))" ( (binary_expression "pcVar3 + (uVar7 - 2)" identifier + (parenthesized_expression "(uVar7 - 2)" ( (binary_expression "uVar7 - 2" identifier - number_literal) ))) ))))) ;) (expression_statement "uVar7 = (uint)*(byte *)(iVar2 + 0x1a);" (assignment_expression "uVar7 = (uint)*(byte *)(iVar2 + 0x1a)" identifier = (binary_expression "(uint)*(byte *)(iVar2 + 0x1a)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(iVar2 + 0x1a)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1a)" ( (binary_expression "iVar2 + 0x1a" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_00016214;" goto statement_identifier ;) })) }) (else_clause "else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" else (compound_statement "{\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" { (expression_statement "*(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;" (assignment_expression "*(undefined4 *)pcVar5 = *(undefined4 *)pcVar3" (pointer_expression "*(undefined4 *)pcVar5" * (cast_expression "(undefined4 *)pcVar5" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (pointer_expression "*(undefined4 *)pcVar3" * (cast_expression "(undefined4 *)pcVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));" (assignment_expression "*(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4))" (pointer_expression "*(undefined4 *)(pcVar5 + (uVar7 - 4))" * (cast_expression "(undefined4 *)(pcVar5 + (uVar7 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar5 + (uVar7 - 4))" ( (binary_expression "pcVar5 + (uVar7 - 4)" identifier + (parenthesized_expression "(uVar7 - 4)" ( (binary_expression "uVar7 - 4" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined4 *)(pcVar3 + (uVar7 - 4))" * (cast_expression "(undefined4 *)(pcVar3 + (uVar7 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar3 + (uVar7 - 4))" ( (binary_expression "pcVar3 + (uVar7 - 4)" identifier + (parenthesized_expression "(uVar7 - 4)" ( (binary_expression "uVar7 - 4" identifier - number_literal) ))) ))))) ;) (expression_statement "iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);" (assignment_expression "iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc)" identifier = (binary_expression "(int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc)" (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)((uint)(pcVar5 + 4) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(pcVar5 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(pcVar5 + 4) & 0xfffffffc" (call_expression "(uint)(pcVar5 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pcVar5 + 4)" ( (binary_expression "pcVar5 + 4" identifier + number_literal) ))) & number_literal) ))))) ;) (expression_statement "pcVar3 = pcVar3 + -iVar6;" (assignment_expression "pcVar3 = pcVar3 + -iVar6" identifier = (binary_expression "pcVar3 + -iVar6" identifier + (unary_expression "-iVar6" - identifier))) ;) (expression_statement "puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);" (assignment_expression "puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(pcVar5 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(pcVar5 + 4) & 0xfffffffc" (call_expression "(uint)(pcVar5 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pcVar5 + 4)" ( (binary_expression "pcVar5 + 4" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }" for ( (assignment_expression "uVar7 = iVar6 + uVar7 >> 2" identifier = (binary_expression "iVar6 + uVar7 >> 2" (binary_expression "iVar6 + uVar7" identifier + identifier) >> number_literal)) ; (binary_expression "uVar7 != 0" identifier != number_literal) ; (assignment_expression "uVar7 = uVar7 - 1" identifier = (binary_expression "uVar7 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }" { (expression_statement "*puVar8 = *(undefined4 *)pcVar3;" (assignment_expression "*puVar8 = *(undefined4 *)pcVar3" (pointer_expression "*puVar8" * identifier) = (pointer_expression "*(undefined4 *)pcVar3" * (cast_expression "(undefined4 *)pcVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;" (assignment_expression "pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4" identifier = (binary_expression "pcVar3 + ((uint)bVar9 * -2 + 1) * 4" identifier + (binary_expression "((uint)bVar9 * -2 + 1) * 4" (parenthesized_expression "((uint)bVar9 * -2 + 1)" ( (binary_expression "(uint)bVar9 * -2 + 1" (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal) + number_literal) )) * number_literal))) ;) (expression_statement "puVar8 = puVar8 + (uint)bVar9 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar9 * -2 + 1" identifier = (binary_expression "puVar8 + (uint)bVar9 * -2 + 1" (binary_expression "puVar8 + (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 "uVar7 = (uint)*(byte *)(iVar2 + 0x1a);" (assignment_expression "uVar7 = (uint)*(byte *)(iVar2 + 0x1a)" identifier = (binary_expression "(uint)*(byte *)(iVar2 + 0x1a)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(iVar2 + 0x1a)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1a)" ( (binary_expression "iVar2 + 0x1a" identifier + number_literal) ))))) ;) (labeled_statement "LAB_00016214:\n  pcVar5[uVar7] = '\0';" statement_identifier : (expression_statement "pcVar5[uVar7] = '\0';" (assignment_expression "pcVar5[uVar7] = '\0'" (subscript_expression "pcVar5[uVar7]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;)) (return_statement "return pcVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - LIT) ))) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - LIT) ))) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - LIT) ))) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT - LIT) ))) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (unary_expression - IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ;) (for_statement for ( (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) >> LIT)) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT - LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT) + LIT) )) * LIT))) ;) (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 (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' escape_sequence ')) ;)) (return_statement return IDENT ;) })))
(function_definition "char * __regparm3 FUN_00016190(undefined4 param_1,int param_2)\n\n{\n  byte bVar1;\n  int iVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(param_1);\n  if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  iVar2 = *(int *)(param_2 + 4);\n  bVar1 = *(byte *)(iVar2 + 0x1a);\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}" (primitive_type "char") (pointer_declarator "* __regparm3 FUN_00016190(undefined4 param_1,int param_2)" (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00016190(undefined4 param_1,int param_2)" (identifier "FUN_00016190") (parameter_list "(undefined4 param_1,int param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")")))) (compound_statement "{\n  byte bVar1;\n  int iVar2;\n  char *pcVar3;\n  size_t sVar4;\n  char *pcVar5;\n  int iVar6;\n  uint uVar7;\n  undefined4 *puVar8;\n  byte bVar9;\n  \n  bVar9 = 0;\n  pcVar3 = (char *)lbasename(param_1);\n  if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }\n  sVar4 = strlen(pcVar3);\n  uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);\n  if (sVar4 <= uVar7) {\n    return pcVar3;\n  }\n  pcVar5 = (char *)xmalloc(uVar7 + 1);\n  iVar2 = *(int *)(param_2 + 4);\n  bVar1 = *(byte *)(iVar2 + 0x1a);\n  uVar7 = (uint)bVar1;\n  if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }\n  uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\nLAB_00016214:\n  pcVar5[uVar7] = '\0';\n  return pcVar5;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "size_t sVar4;" (primitive_type "size_t") (identifier "sVar4") (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "undefined4 *puVar8;" (type_identifier "undefined4") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "byte bVar9;" (type_identifier "byte") (identifier "bVar9") (; ";")) (expression_statement "bVar9 = 0;" (assignment_expression "bVar9 = 0" (identifier "bVar9") (= "=") (number_literal "0")) (; ";")) (expression_statement "pcVar3 = (char *)lbasename(param_1);" (assignment_expression "pcVar3 = (char *)lbasename(param_1)" (identifier "pcVar3") (= "=") (cast_expression "(char *)lbasename(param_1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "lbasename(param_1)" (identifier "lbasename") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))))) (; ";")) (if_statement "if ((DAT_000212c8 == 0) || (param_2 == 0)) {\n    return pcVar3;\n  }" (if "if") (parenthesized_expression "((DAT_000212c8 == 0) || (param_2 == 0))" (( "(") (binary_expression "(DAT_000212c8 == 0) || (param_2 == 0)" (parenthesized_expression "(DAT_000212c8 == 0)" (( "(") (binary_expression "DAT_000212c8 == 0" (identifier "DAT_000212c8") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    return pcVar3;\n  }" ({ "{") (return_statement "return pcVar3;" (return "return") (identifier "pcVar3") (; ";")) (} "}"))) (expression_statement "sVar4 = strlen(pcVar3);" (assignment_expression "sVar4 = strlen(pcVar3)" (identifier "sVar4") (= "=") (call_expression "strlen(pcVar3)" (identifier "strlen") (argument_list "(pcVar3)" (( "(") (identifier "pcVar3") () ")")))) (; ";")) (expression_statement "uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);" (assignment_expression "uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a)" (identifier "uVar7") (= "=") (binary_expression "(uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(*(int *)(param_2 + 4) + 0x1a)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_2 + 4) + 0x1a)" (( "(") (binary_expression "*(int *)(param_2 + 4) + 0x1a" (pointer_expression "*(int *)(param_2 + 4)" (* "*") (cast_expression "(int *)(param_2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "0x1a")) () ")"))))) (; ";")) (if_statement "if (sVar4 <= uVar7) {\n    return pcVar3;\n  }" (if "if") (parenthesized_expression "(sVar4 <= uVar7)" (( "(") (binary_expression "sVar4 <= uVar7" (identifier "sVar4") (<= "<=") (identifier "uVar7")) () ")")) (compound_statement "{\n    return pcVar3;\n  }" ({ "{") (return_statement "return pcVar3;" (return "return") (identifier "pcVar3") (; ";")) (} "}"))) (expression_statement "pcVar5 = (char *)xmalloc(uVar7 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(uVar7 + 1)" (identifier "pcVar5") (= "=") (cast_expression "(char *)xmalloc(uVar7 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(uVar7 + 1)" (identifier "xmalloc") (argument_list "(uVar7 + 1)" (( "(") (binary_expression "uVar7 + 1" (identifier "uVar7") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "iVar2 = *(int *)(param_2 + 4);" (assignment_expression "iVar2 = *(int *)(param_2 + 4)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_2 + 4)" (* "*") (cast_expression "(int *)(param_2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "bVar1 = *(byte *)(iVar2 + 0x1a);" (assignment_expression "bVar1 = *(byte *)(iVar2 + 0x1a)" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)(iVar2 + 0x1a)" (* "*") (cast_expression "(byte *)(iVar2 + 0x1a)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x1a)" (( "(") (binary_expression "iVar2 + 0x1a" (identifier "iVar2") (+ "+") (number_literal "0x1a")) () ")"))))) (; ";")) (expression_statement "uVar7 = (uint)bVar1;" (assignment_expression "uVar7 = (uint)bVar1" (identifier "uVar7") (= "=") (cast_expression "(uint)bVar1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar1"))) (; ";")) (if_statement "if (uVar7 < 4) {\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }\n  else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" (if "if") (parenthesized_expression "(uVar7 < 4)" (( "(") (binary_expression "uVar7 < 4" (identifier "uVar7") (< "<") (number_literal "4")) () ")")) (compound_statement "{\n    if (uVar7 == 0) goto LAB_00016214;\n    *pcVar5 = *pcVar3;\n    if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }\n  }" ({ "{") (if_statement "if (uVar7 == 0) goto LAB_00016214;" (if "if") (parenthesized_expression "(uVar7 == 0)" (( "(") (binary_expression "uVar7 == 0" (identifier "uVar7") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00016214;" (goto "goto") (statement_identifier "LAB_00016214") (; ";"))) (expression_statement "*pcVar5 = *pcVar3;" (assignment_expression "*pcVar5 = *pcVar3" (pointer_expression "*pcVar5" (* "*") (identifier "pcVar5")) (= "=") (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3"))) (; ";")) (if_statement "if ((bVar1 & 2) != 0) {\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }" (if "if") (parenthesized_expression "((bVar1 & 2) != 0)" (( "(") (binary_expression "(bVar1 & 2) != 0" (parenthesized_expression "(bVar1 & 2)" (( "(") (binary_expression "bVar1 & 2" (identifier "bVar1") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));\n      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);\n      goto LAB_00016214;\n    }" ({ "{") (expression_statement "*(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));" (assignment_expression "*(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2))" (pointer_expression "*(undefined2 *)(pcVar5 + (uVar7 - 2))" (* "*") (cast_expression "(undefined2 *)(pcVar5 + (uVar7 - 2))" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar5 + (uVar7 - 2))" (( "(") (binary_expression "pcVar5 + (uVar7 - 2)" (identifier "pcVar5") (+ "+") (parenthesized_expression "(uVar7 - 2)" (( "(") (binary_expression "uVar7 - 2" (identifier "uVar7") (- "-") (number_literal "2")) () ")"))) () ")")))) (= "=") (pointer_expression "*(undefined2 *)(pcVar3 + (uVar7 - 2))" (* "*") (cast_expression "(undefined2 *)(pcVar3 + (uVar7 - 2))" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar3 + (uVar7 - 2))" (( "(") (binary_expression "pcVar3 + (uVar7 - 2)" (identifier "pcVar3") (+ "+") (parenthesized_expression "(uVar7 - 2)" (( "(") (binary_expression "uVar7 - 2" (identifier "uVar7") (- "-") (number_literal "2")) () ")"))) () ")"))))) (; ";")) (expression_statement "uVar7 = (uint)*(byte *)(iVar2 + 0x1a);" (assignment_expression "uVar7 = (uint)*(byte *)(iVar2 + 0x1a)" (identifier "uVar7") (= "=") (binary_expression "(uint)*(byte *)(iVar2 + 0x1a)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(iVar2 + 0x1a)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x1a)" (( "(") (binary_expression "iVar2 + 0x1a" (identifier "iVar2") (+ "+") (number_literal "0x1a")) () ")"))))) (; ";")) (goto_statement "goto LAB_00016214;" (goto "goto") (statement_identifier "LAB_00016214") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" (else "else") (compound_statement "{\n    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;\n    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));\n    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);\n    pcVar3 = pcVar3 + -iVar6;\n    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);\n    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }\n  }" ({ "{") (expression_statement "*(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;" (assignment_expression "*(undefined4 *)pcVar5 = *(undefined4 *)pcVar3" (pointer_expression "*(undefined4 *)pcVar5" (* "*") (cast_expression "(undefined4 *)pcVar5" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pcVar5"))) (= "=") (pointer_expression "*(undefined4 *)pcVar3" (* "*") (cast_expression "(undefined4 *)pcVar3" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pcVar3")))) (; ";")) (expression_statement "*(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));" (assignment_expression "*(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4))" (pointer_expression "*(undefined4 *)(pcVar5 + (uVar7 - 4))" (* "*") (cast_expression "(undefined4 *)(pcVar5 + (uVar7 - 4))" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar5 + (uVar7 - 4))" (( "(") (binary_expression "pcVar5 + (uVar7 - 4)" (identifier "pcVar5") (+ "+") (parenthesized_expression "(uVar7 - 4)" (( "(") (binary_expression "uVar7 - 4" (identifier "uVar7") (- "-") (number_literal "4")) () ")"))) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(pcVar3 + (uVar7 - 4))" (* "*") (cast_expression "(undefined4 *)(pcVar3 + (uVar7 - 4))" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pcVar3 + (uVar7 - 4))" (( "(") (binary_expression "pcVar3 + (uVar7 - 4)" (identifier "pcVar3") (+ "+") (parenthesized_expression "(uVar7 - 4)" (( "(") (binary_expression "uVar7 - 4" (identifier "uVar7") (- "-") (number_literal "4")) () ")"))) () ")"))))) (; ";")) (expression_statement "iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);" (assignment_expression "iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc)" (identifier "iVar6") (= "=") (binary_expression "(int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc)" (cast_expression "(int)pcVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar5")) (- "-") (cast_expression "(int)((uint)(pcVar5 + 4) & 0xfffffffc)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((uint)(pcVar5 + 4) & 0xfffffffc)" (( "(") (binary_expression "(uint)(pcVar5 + 4) & 0xfffffffc" (call_expression "(uint)(pcVar5 + 4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(pcVar5 + 4)" (( "(") (binary_expression "pcVar5 + 4" (identifier "pcVar5") (+ "+") (number_literal "4")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")"))))) (; ";")) (expression_statement "pcVar3 = pcVar3 + -iVar6;" (assignment_expression "pcVar3 = pcVar3 + -iVar6" (identifier "pcVar3") (= "=") (binary_expression "pcVar3 + -iVar6" (identifier "pcVar3") (+ "+") (unary_expression "-iVar6" (- "-") (identifier "iVar6")))) (; ";")) (expression_statement "puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);" (assignment_expression "puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc)" (identifier "puVar8") (= "=") (cast_expression "(undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((uint)(pcVar5 + 4) & 0xfffffffc)" (( "(") (binary_expression "(uint)(pcVar5 + 4) & 0xfffffffc" (call_expression "(uint)(pcVar5 + 4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(pcVar5 + 4)" (( "(") (binary_expression "pcVar5 + 4" (identifier "pcVar5") (+ "+") (number_literal "4")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) (; ";")) (for_statement "for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }" (for "for") (( "(") (assignment_expression "uVar7 = iVar6 + uVar7 >> 2" (identifier "uVar7") (= "=") (binary_expression "iVar6 + uVar7 >> 2" (binary_expression "iVar6 + uVar7" (identifier "iVar6") (+ "+") (identifier "uVar7")) (>> ">>") (number_literal "2"))) (; ";") (binary_expression "uVar7 != 0" (identifier "uVar7") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "uVar7 = uVar7 - 1" (identifier "uVar7") (= "=") (binary_expression "uVar7 - 1" (identifier "uVar7") (- "-") (number_literal "1"))) () ")") (compound_statement "{\n      *puVar8 = *(undefined4 *)pcVar3;\n      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;\n      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;\n    }" ({ "{") (expression_statement "*puVar8 = *(undefined4 *)pcVar3;" (assignment_expression "*puVar8 = *(undefined4 *)pcVar3" (pointer_expression "*puVar8" (* "*") (identifier "puVar8")) (= "=") (pointer_expression "*(undefined4 *)pcVar3" (* "*") (cast_expression "(undefined4 *)pcVar3" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pcVar3")))) (; ";")) (expression_statement "pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;" (assignment_expression "pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4" (identifier "pcVar3") (= "=") (binary_expression "pcVar3 + ((uint)bVar9 * -2 + 1) * 4" (identifier "pcVar3") (+ "+") (binary_expression "((uint)bVar9 * -2 + 1) * 4" (parenthesized_expression "((uint)bVar9 * -2 + 1)" (( "(") (binary_expression "(uint)bVar9 * -2 + 1" (binary_expression "(uint)bVar9 * -2" (cast_expression "(uint)bVar9" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar9")) (* "*") (number_literal "-2")) (+ "+") (number_literal "1")) () ")")) (* "*") (number_literal "4")))) (; ";")) (expression_statement "puVar8 = puVar8 + (uint)bVar9 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar9 * -2 + 1" (identifier "puVar8") (= "=") (binary_expression "puVar8 + (uint)bVar9 * -2 + 1" (binary_expression "puVar8 + (uint)bVar9 * -2" (identifier "puVar8") (+ "+") (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 "uVar7 = (uint)*(byte *)(iVar2 + 0x1a);" (assignment_expression "uVar7 = (uint)*(byte *)(iVar2 + 0x1a)" (identifier "uVar7") (= "=") (binary_expression "(uint)*(byte *)(iVar2 + 0x1a)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(iVar2 + 0x1a)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x1a)" (( "(") (binary_expression "iVar2 + 0x1a" (identifier "iVar2") (+ "+") (number_literal "0x1a")) () ")"))))) (; ";")) (labeled_statement "LAB_00016214:\n  pcVar5[uVar7] = '\0';" (statement_identifier "LAB_00016214") (: ":") (expression_statement "pcVar5[uVar7] = '\0';" (assignment_expression "pcVar5[uVar7] = '\0'" (subscript_expression "pcVar5[uVar7]" (identifier "pcVar5") ([ "[") (identifier "uVar7") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";"))) (return_statement "return pcVar5;" (return "return") (identifier "pcVar5") (; ";")) (} "}")))

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

char * __regparm3 function_1(char *file,type_1 *var_3)

{
  type_2 var_8;
  type_3 *pbVar2;
  char *var_10;
  size_t var_5;
  char *var_9;
  int var_11;
  type_4 var_6;
  type_5 *var_12;
  type_2 bVar9;
  
  bVar9 = 0;
  var_10 = (char *)var_1(file);
  if ((var_2 == 0) || (var_3 == (type_1 *)0x0)) {
    return var_10;
  }
  var_5 = var_4(var_10);
  var_6 = (type_4)var_3->xvec->ar_max_namelen;
  if (var_5 <= var_6) {
    return var_10;
  }
  var_9 = (char *)var_7(var_6 + 1);
  pbVar2 = var_3->xvec;
  var_8 = pbVar2->ar_max_namelen;
  var_6 = (type_4)var_8;
  if (var_6 < 4) {
    if (var_6 == 0) goto LAB_00016214;
    *var_9 = *var_10;
    if ((var_8 & 2) != 0) {
      *(type_6 *)(var_9 + (var_6 - 2)) = *(type_6 *)(var_10 + (var_6 - 2));
      var_6 = (type_4)pbVar2->ar_max_namelen;
      goto LAB_00016214;
    }
  }
  else {
    *(type_5 *)var_9 = *(type_5 *)var_10;
    *(type_5 *)(var_9 + (var_6 - 4)) = *(type_5 *)(var_10 + (var_6 - 4));
    var_11 = (int)var_9 - (int)((type_4)(var_9 + 4) & 0xfffffffc);
    var_10 = var_10 + -var_11;
    var_12 = (type_5 *)((type_4)(var_9 + 4) & 0xfffffffc);
    for (var_6 = var_11 + var_6 >> 2; var_6 != 0; var_6 = var_6 - 1) {
      *var_12 = *(type_5 *)var_10;
      var_10 = var_10 + ((type_4)bVar9 * -2 + 1) * 4;
      var_12 = var_12 + (type_4)bVar9 * -2 + 1;
    }
  }
  var_6 = (type_4)pbVar2->ar_max_namelen;
LAB_00016214:
  var_9[var_6] = '\0';
  return var_9;
}


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

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

char * __regparm3 MASKED(undefined4 param_1,int param_2)

{
  byte bVar1;
  int iVar2;
  char *pcVar3;
  size_t sVar4;
  char *pcVar5;
  int iVar6;
  uint uVar7;
  undefined4 *puVar8;
  byte bVar9;
  
  bVar9 = 0;
  pcVar3 = (char *)lbasename(param_1);
  if ((DAT_000212c8 == 0) || (param_2 == 0)) {
    return pcVar3;
  }
  sVar4 = strlen(pcVar3);
  uVar7 = (uint)*(byte *)(*(int *)(param_2 + 4) + 0x1a);
  if (sVar4 <= uVar7) {
    return pcVar3;
  }
  pcVar5 = (char *)xmalloc(uVar7 + 1);
  iVar2 = *(int *)(param_2 + 4);
  bVar1 = *(byte *)(iVar2 + 0x1a);
  uVar7 = (uint)bVar1;
  if (uVar7 < 4) {
    if (uVar7 == 0) goto LAB_00016214;
    *pcVar5 = *pcVar3;
    if ((bVar1 & 2) != 0) {
      *(undefined2 *)(pcVar5 + (uVar7 - 2)) = *(undefined2 *)(pcVar3 + (uVar7 - 2));
      uVar7 = (uint)*(byte *)(iVar2 + 0x1a);
      goto LAB_00016214;
    }
  }
  else {
    *(undefined4 *)pcVar5 = *(undefined4 *)pcVar3;
    *(undefined4 *)(pcVar5 + (uVar7 - 4)) = *(undefined4 *)(pcVar3 + (uVar7 - 4));
    iVar6 = (int)pcVar5 - (int)((uint)(pcVar5 + 4) & 0xfffffffc);
    pcVar3 = pcVar3 + -iVar6;
    puVar8 = (undefined4 *)((uint)(pcVar5 + 4) & 0xfffffffc);
    for (uVar7 = iVar6 + uVar7 >> 2; uVar7 != 0; uVar7 = uVar7 - 1) {
      *puVar8 = *(undefined4 *)pcVar3;
      pcVar3 = pcVar3 + ((uint)bVar9 * -2 + 1) * 4;
      puVar8 = puVar8 + (uint)bVar9 * -2 + 1;
    }
  }
  uVar7 = (uint)*(byte *)(iVar2 + 0x1a);
LAB_00016214:
  pcVar5[uVar7] = '\0';
  return pcVar5;
}

