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

int do_display_target(bfd_target *targ,void *data)

{
  char *pcVar1;
  int iVar2;
  char *pcVar3;
  char *pcVar4;
  char *__format;
  undefined4 uVar5;
  uint uVar6;
  int iVar7;
  int iVar8;
  
  iVar2 = *(int *)((int)data + 8) + 1;
  *(int *)((int)data + 8) = iVar2;
  uVar6 = iVar2 * 0x5c;
  if (*(uint *)((int)data + 0xc) < uVar6) {
    iVar8 = 0x2e00;
    if (0x3f < iVar2) {
      iVar8 = iVar2 * 0xb8;
    }
    iVar2 = xrealloc(*(undefined4 *)((int)data + 0x10),iVar8);
    *(int *)((int)data + 0x10) = iVar2;
    memset((void *)(iVar2 + *(int *)((int)data + 0xc)),0,iVar8 - *(int *)((int)data + 0xc));
    *(int *)((int)data + 0xc) = iVar8;
    uVar6 = *(int *)((int)data + 8) * 0x5c;
  }
  *(char **)(*(int *)((int)data + 0x10) + -0x5c + uVar6) = targ->name;
  pcVar3 = endian_string(targ->byteorder);
  pcVar4 = endian_string(targ->header_byteorder);
  pcVar1 = targ->name;
  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);
  printf(__format,pcVar1,pcVar4,pcVar3);
                    /* WARNING: Load size is inaccurate */
  iVar2 = bfd_openw(*data,targ->name);
  if (iVar2 != 0) {
    iVar7 = 2;
    iVar8 = bfd_set_format(iVar2,1);
    if (iVar8 == 0) {
      iVar8 = bfd_get_error();
      if (iVar8 != 5) {
        bfd_nonfatal(targ->name);
        *(undefined4 *)((int)data + 4) = 1;
      }
    }
    else {
      do {
        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);
        if (iVar8 != 0) {
          uVar5 = bfd_printable_arch_mach(iVar7,0);
          printf("  %s\n",uVar5);
          *(undefined1 *)
           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;
        }
        iVar7 = iVar7 + 1;
      } while (iVar7 != 0x59);
    }
    bfd_close_all_done(iVar2);
    return *(int *)((int)data + 4);
  }
                    /* WARNING: Load size is inaccurate */
  bfd_nonfatal(*data);
  *(undefined4 *)((int)data + 4) = 1;
  return 1;
}



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

undefined4 FUN_00017c20(undefined4 *param_1,undefined4 *param_2)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  char *__format;
  undefined4 uVar4;
  uint uVar5;
  int iVar6;
  int iVar7;
  
  iVar1 = param_2[2] + 1;
  param_2[2] = iVar1;
  uVar5 = iVar1 * 0x5c;
  if ((uint)param_2[3] < uVar5) {
    iVar7 = 0x2e00;
    if (0x3f < iVar1) {
      iVar7 = iVar1 * 0xb8;
    }
    iVar1 = xrealloc(param_2[4],iVar7);
    param_2[4] = iVar1;
    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);
    param_2[3] = iVar7;
    uVar5 = param_2[2] * 0x5c;
  }
  *(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;
  uVar2 = FUN_00017b10();
  uVar3 = FUN_00017b10();
  uVar4 = *param_1;
  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);
  printf(__format,uVar4,uVar3,uVar2);
  iVar1 = bfd_openw(*param_2,*param_1);
  if (iVar1 != 0) {
    iVar6 = 2;
    iVar7 = bfd_set_format(iVar1,1);
    if (iVar7 == 0) {
      iVar7 = bfd_get_error();
      if (iVar7 != 5) {
        FUN_00017b90(*param_1);
        param_2[1] = 1;
      }
    }
    else {
      do {
        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);
        if (iVar7 != 0) {
          uVar4 = bfd_printable_arch_mach(iVar6,0);
          printf("  %s\n",uVar4);
          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;
        }
        iVar6 = iVar6 + 1;
      } while (iVar6 != 0x59);
    }
    bfd_close_all_done(iVar1);
    return param_2[1];
  }
  FUN_00017b90(*param_2);
  param_2[1] = 1;
  return 1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00013710
ADD EBX,0x93d7
SUB ESP,0x1c
MOV EDI,dword ptr [ESP + 0x34]
MOV EAX,dword ptr [EDI + 0x8]
ADD EAX,0x1
MOV dword ptr [EDI + 0x8],EAX
IMUL EDX,EAX,0x5c
CMP dword ptr [EDI + 0xc],EDX
JNC 0x00017c83
MOV ESI,0x2e00
CMP EAX,0x3f
JG 0x00017d87
SUB ESP,0x8
PUSH ESI
PUSH dword ptr [EDI + 0x10]
CALL 0x000121a0
MOV ECX,dword ptr [EDI + 0xc]
MOV EDX,ESI
ADD ESP,0xc
MOV dword ptr [EDI + 0x10],EAX
SUB EDX,ECX
ADD EAX,ECX
PUSH EDX
PUSH 0x0
PUSH EAX
CALL 0x000123e0
MOV dword ptr [EDI + 0xc],ESI
IMUL EDX,dword ptr [EDI + 0x8],0x5c
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x30]
MOV EAX,dword ptr [EDI + 0x10]
MOV ECX,dword ptr [ECX]
MOV dword ptr [EAX + EDX*0x1 + -0x5c],ECX
MOV EAX,dword ptr [ESP + 0x30]
MOV EAX,dword ptr [EAX + 0x8]
CALL 0x00017b10
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,dword ptr [ESP + 0x30]
MOV EAX,dword ptr [EAX + 0xc]
CALL 0x00017b10
SUB ESP,0x4
MOV EBP,EAX
MOV EAX,dword ptr [ESP + 0x34]
MOV ESI,dword ptr [EAX]
LEA EAX,[EBX + 0xffffb215]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x00012180
MOV EDX,dword ptr [ESP + 0x1c]
PUSH EDX
PUSH EBP
PUSH ESI
PUSH EAX
CALL 0x000120a0
ADD ESP,0x18
MOV EAX,dword ptr [ESP + 0x38]
PUSH dword ptr [EAX]
PUSH dword ptr [EDI]
CALL 0x00012430
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x00017d92
SUB ESP,0x8
MOV EBP,0x2
PUSH 0x1
PUSH EAX
CALL 0x00012310
ADD ESP,0x10
LEA ECX,[EBX + 0xffffb22f]
MOV dword ptr [ESP + 0xc],ECX
TEST EAX,EAX
JNZ 0x00017d6e
CALL 0x000121e0
CMP EAX,0x5
JNZ 0x00017db3
SUB ESP,0xc
PUSH ESI
CALL 0x00012350
ADD ESP,0x10
MOV EAX,dword ptr [EDI + 0x4]
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH 0x0
PUSH EBP
CALL 0x000123b0
POP EDX
POP ECX
PUSH EAX
PUSH dword ptr [ESP + 0x18]
CALL 0x000120a0
IMUL EAX,dword ptr [EDI + 0x8],0x5c
ADD EAX,dword ptr [EDI + 0x10]
ADD ESP,0x10
MOV byte ptr [EBP + EAX*0x1 + -0x5a],0x1
ADD EBP,0x1
CMP EBP,0x59
JZ 0x00017d20
SUB ESP,0x4
MOV EAX,dword ptr [ESI + 0x4]
PUSH 0x0
PUSH EBP
PUSH ESI
CALL dword ptr [EAX + 0x154]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00017d66
JMP 0x00017d40
IMUL ESI,EAX,0xb8
JMP 0x00017c55
SUB ESP,0xc
PUSH dword ptr [EDI]
CALL 0x00017b90
ADD ESP,0x10
MOV EAX,0x1
MOV dword ptr [EDI + 0x4],0x1
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x3c]
PUSH dword ptr [EAX]
CALL 0x00017b90
MOV dword ptr [EDI + 0x4],0x1
ADD ESP,0x10
JMP 0x00017d20
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00017c20(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  char *__format;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar1 = param_2[2] + 1;\n  param_2[2] = iVar1;\n  uVar5 = iVar1 * 0x5c;\n  if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }\n  *(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;\n  uVar2 = FUN_00017b10();\n  uVar3 = FUN_00017b10();\n  uVar4 = *param_1;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,uVar4,uVar3,uVar2);\n  iVar1 = bfd_openw(*param_2,*param_1);\n  if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }\n  FUN_00017b90(*param_2);\n  param_2[1] = 1;\n  return 1;\n}\n\n" comment (function_definition "undefined4 FUN_00017c20(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  char *__format;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar1 = param_2[2] + 1;\n  param_2[2] = iVar1;\n  uVar5 = iVar1 * 0x5c;\n  if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }\n  *(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;\n  uVar2 = FUN_00017b10();\n  uVar3 = FUN_00017b10();\n  uVar4 = *param_1;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,uVar4,uVar3,uVar2);\n  iVar1 = bfd_openw(*param_2,*param_1);\n  if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }\n  FUN_00017b90(*param_2);\n  param_2[1] = 1;\n  return 1;\n}" type_identifier (function_declarator "FUN_00017c20(undefined4 *param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 *param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  char *__format;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar1 = param_2[2] + 1;\n  param_2[2] = iVar1;\n  uVar5 = iVar1 * 0x5c;\n  if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }\n  *(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;\n  uVar2 = FUN_00017b10();\n  uVar3 = FUN_00017b10();\n  uVar4 = *param_1;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,uVar4,uVar3,uVar2);\n  iVar1 = bfd_openw(*param_2,*param_1);\n  if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }\n  FUN_00017b90(*param_2);\n  param_2[1] = 1;\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "char *__format;" primitive_type (pointer_declarator "*__format" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (expression_statement "iVar1 = param_2[2] + 1;" (assignment_expression "iVar1 = param_2[2] + 1" identifier = (binary_expression "param_2[2] + 1" (subscript_expression "param_2[2]" identifier [ number_literal ]) + number_literal)) ;) (expression_statement "param_2[2] = iVar1;" (assignment_expression "param_2[2] = iVar1" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = iVar1 * 0x5c;" (assignment_expression "uVar5 = iVar1 * 0x5c" identifier = (binary_expression "iVar1 * 0x5c" identifier * number_literal)) ;) (if_statement "if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }" if (parenthesized_expression "((uint)param_2[3] < uVar5)" ( (binary_expression "(uint)param_2[3] < uVar5" (cast_expression "(uint)param_2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_2[3]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }" { (expression_statement "iVar7 = 0x2e00;" (assignment_expression "iVar7 = 0x2e00" identifier = number_literal) ;) (if_statement "if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }" if (parenthesized_expression "(0x3f < iVar1)" ( (binary_expression "0x3f < iVar1" number_literal < identifier) )) (compound_statement "{\n      iVar7 = iVar1 * 0xb8;\n    }" { (expression_statement "iVar7 = iVar1 * 0xb8;" (assignment_expression "iVar7 = iVar1 * 0xb8" identifier = (binary_expression "iVar1 * 0xb8" identifier * number_literal)) ;) })) (expression_statement "iVar1 = xrealloc(param_2[4],iVar7);" (assignment_expression "iVar1 = xrealloc(param_2[4],iVar7)" identifier = (call_expression "xrealloc(param_2[4],iVar7)" identifier (argument_list "(param_2[4],iVar7)" ( (subscript_expression "param_2[4]" identifier [ number_literal ]) , identifier )))) ;) (expression_statement "param_2[4] = iVar1;" (assignment_expression "param_2[4] = iVar1" (subscript_expression "param_2[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);" (call_expression "memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3])" identifier (argument_list "((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3])" ( (cast_expression "(void *)(iVar1 + param_2[3])" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + param_2[3])" ( (binary_expression "iVar1 + param_2[3]" identifier + (subscript_expression "param_2[3]" identifier [ number_literal ])) ))) , number_literal , (binary_expression "iVar7 - param_2[3]" identifier - (subscript_expression "param_2[3]" identifier [ number_literal ])) ))) ;) (expression_statement "param_2[3] = iVar7;" (assignment_expression "param_2[3] = iVar7" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = param_2[2] * 0x5c;" (assignment_expression "uVar5 = param_2[2] * 0x5c" identifier = (binary_expression "param_2[2] * 0x5c" (subscript_expression "param_2[2]" identifier [ number_literal ]) * number_literal)) ;) })) (expression_statement "*(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;" (assignment_expression "*(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1" (pointer_expression "*(undefined4 *)(param_2[4] + -0x5c + uVar5)" * (cast_expression "(undefined4 *)(param_2[4] + -0x5c + uVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[4] + -0x5c + uVar5)" ( (binary_expression "param_2[4] + -0x5c + uVar5" (binary_expression "param_2[4] + -0x5c" (subscript_expression "param_2[4]" identifier [ number_literal ]) + number_literal) + identifier) )))) = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar2 = FUN_00017b10();" (assignment_expression "uVar2 = FUN_00017b10()" identifier = (call_expression "FUN_00017b10()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = FUN_00017b10();" (assignment_expression "uVar3 = FUN_00017b10()" identifier = (call_expression "FUN_00017b10()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = *param_1;" (assignment_expression "uVar4 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "__format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);" (assignment_expression "__format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5)" identifier = (cast_expression "(char *)dcgettext(0,"%s\n (header %s, data %s)\n",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"%s\n (header %s, data %s)\n",5)" identifier (argument_list "(0,"%s\n (header %s, data %s)\n",5)" ( number_literal , (string_literal ""%s\n (header %s, data %s)\n"" " string_content escape_sequence string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "printf(__format,uVar4,uVar3,uVar2);" (call_expression "printf(__format,uVar4,uVar3,uVar2)" identifier (argument_list "(__format,uVar4,uVar3,uVar2)" ( identifier , identifier , identifier , identifier ))) ;) (expression_statement "iVar1 = bfd_openw(*param_2,*param_1);" (assignment_expression "iVar1 = bfd_openw(*param_2,*param_1)" identifier = (call_expression "bfd_openw(*param_2,*param_1)" identifier (argument_list "(*param_2,*param_1)" ( (pointer_expression "*param_2" * identifier) , (pointer_expression "*param_1" * identifier) )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }" { (expression_statement "iVar6 = 2;" (assignment_expression "iVar6 = 2" identifier = number_literal) ;) (expression_statement "iVar7 = bfd_set_format(iVar1,1);" (assignment_expression "iVar7 = bfd_set_format(iVar1,1)" identifier = (call_expression "bfd_set_format(iVar1,1)" identifier (argument_list "(iVar1,1)" ( identifier , number_literal )))) ;) (if_statement "if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }" { (expression_statement "iVar7 = bfd_get_error();" (assignment_expression "iVar7 = bfd_get_error()" identifier = (call_expression "bfd_get_error()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }" if (parenthesized_expression "(iVar7 != 5)" ( (binary_expression "iVar7 != 5" identifier != number_literal) )) (compound_statement "{\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }" { (expression_statement "FUN_00017b90(*param_1);" (call_expression "FUN_00017b90(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) ))) ;) (expression_statement "param_2[1] = 1;" (assignment_expression "param_2[1] = 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) })) }) (else_clause "else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }" else (compound_statement "{\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }" { (do_statement "do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);" do (compound_statement "{\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      }" { (expression_statement "iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);" (assignment_expression "iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0)" identifier = (call_expression "(**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0)" (parenthesized_expression "(**(code **)(*(int *)(iVar1 + 4) + 0x154))" ( (pointer_expression "**(code **)(*(int *)(iVar1 + 4) + 0x154)" * (pointer_expression "*(code **)(*(int *)(iVar1 + 4) + 0x154)" * (cast_expression "(code **)(*(int *)(iVar1 + 4) + 0x154)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar1 + 4) + 0x154)" ( (binary_expression "*(int *)(iVar1 + 4) + 0x154" (pointer_expression "*(int *)(iVar1 + 4)" * (cast_expression "(int *)(iVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(iVar1,iVar6,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }" if (parenthesized_expression "(iVar7 != 0)" ( (binary_expression "iVar7 != 0" identifier != number_literal) )) (compound_statement "{\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }" { (expression_statement "uVar4 = bfd_printable_arch_mach(iVar6,0);" (assignment_expression "uVar4 = bfd_printable_arch_mach(iVar6,0)" identifier = (call_expression "bfd_printable_arch_mach(iVar6,0)" identifier (argument_list "(iVar6,0)" ( identifier , number_literal )))) ;) (expression_statement "printf("  %s\n",uVar4);" (call_expression "printf("  %s\n",uVar4)" identifier (argument_list "("  %s\n",uVar4)" ( (string_literal ""  %s\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "*(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;" (assignment_expression "*(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1" (pointer_expression "*(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4])" * (cast_expression "(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4])" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4])" ( (binary_expression "iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]" (binary_expression "iVar6 + -0x5a + param_2[2] * 0x5c" (binary_expression "iVar6 + -0x5a" identifier + number_literal) + (binary_expression "param_2[2] * 0x5c" (subscript_expression "param_2[2]" identifier [ number_literal ]) * number_literal)) + (subscript_expression "param_2[4]" identifier [ number_literal ])) )))) = number_literal) ;) })) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar6 != 0x59)" ( (binary_expression "iVar6 != 0x59" identifier != number_literal) )) ;) }))) (expression_statement "bfd_close_all_done(iVar1);" (call_expression "bfd_close_all_done(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (return_statement "return param_2[1];" return (subscript_expression "param_2[1]" identifier [ number_literal ]) ;) })) (expression_statement "FUN_00017b90(*param_2);" (call_expression "FUN_00017b90(*param_2)" identifier (argument_list "(*param_2)" ( (pointer_expression "*param_2" * identifier) ))) ;) (expression_statement "param_2[1] = 1;" (assignment_expression "param_2[1] = 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint do_display_target(bfd_target *targ,void *data)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char *__format;\n  undefined4 uVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar2 = *(int *)((int)data + 8) + 1;\n  *(int *)((int)data + 8) = iVar2;\n  uVar6 = iVar2 * 0x5c;\n  if (*(uint *)((int)data + 0xc) < uVar6) {\n    iVar8 = 0x2e00;\n    if (0x3f < iVar2) {\n      iVar8 = iVar2 * 0xb8;\n    }\n    iVar2 = xrealloc(*(undefined4 *)((int)data + 0x10),iVar8);\n    *(int *)((int)data + 0x10) = iVar2;\n    memset((void *)(iVar2 + *(int *)((int)data + 0xc)),0,iVar8 - *(int *)((int)data + 0xc));\n    *(int *)((int)data + 0xc) = iVar8;\n    uVar6 = *(int *)((int)data + 8) * 0x5c;\n  }\n  *(char **)(*(int *)((int)data + 0x10) + -0x5c + uVar6) = targ->name;\n  pcVar3 = endian_string(targ->byteorder);\n  pcVar4 = endian_string(targ->header_byteorder);\n  pcVar1 = targ->name;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,pcVar1,pcVar4,pcVar3);\n                    /* WARNING: Load size is inaccurate */\n  iVar2 = bfd_openw(*data,targ->name);\n  if (iVar2 != 0) {\n    iVar7 = 2;\n    iVar8 = bfd_set_format(iVar2,1);\n    if (iVar8 == 0) {\n      iVar8 = bfd_get_error();\n      if (iVar8 != 5) {\n        bfd_nonfatal(targ->name);\n        *(undefined4 *)((int)data + 4) = 1;\n      }\n    }\n    else {\n      do {\n        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);\n        if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }\n        iVar7 = iVar7 + 1;\n      } while (iVar7 != 0x59);\n    }\n    bfd_close_all_done(iVar2);\n    return *(int *)((int)data + 4);\n  }\n                    /* WARNING: Load size is inaccurate */\n  bfd_nonfatal(*data);\n  *(undefined4 *)((int)data + 4) = 1;\n  return 1;\n}\n\n" comment comment (function_definition "int do_display_target(bfd_target *targ,void *data)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char *__format;\n  undefined4 uVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar2 = *(int *)((int)data + 8) + 1;\n  *(int *)((int)data + 8) = iVar2;\n  uVar6 = iVar2 * 0x5c;\n  if (*(uint *)((int)data + 0xc) < uVar6) {\n    iVar8 = 0x2e00;\n    if (0x3f < iVar2) {\n      iVar8 = iVar2 * 0xb8;\n    }\n    iVar2 = xrealloc(*(undefined4 *)((int)data + 0x10),iVar8);\n    *(int *)((int)data + 0x10) = iVar2;\n    memset((void *)(iVar2 + *(int *)((int)data + 0xc)),0,iVar8 - *(int *)((int)data + 0xc));\n    *(int *)((int)data + 0xc) = iVar8;\n    uVar6 = *(int *)((int)data + 8) * 0x5c;\n  }\n  *(char **)(*(int *)((int)data + 0x10) + -0x5c + uVar6) = targ->name;\n  pcVar3 = endian_string(targ->byteorder);\n  pcVar4 = endian_string(targ->header_byteorder);\n  pcVar1 = targ->name;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,pcVar1,pcVar4,pcVar3);\n                    /* WARNING: Load size is inaccurate */\n  iVar2 = bfd_openw(*data,targ->name);\n  if (iVar2 != 0) {\n    iVar7 = 2;\n    iVar8 = bfd_set_format(iVar2,1);\n    if (iVar8 == 0) {\n      iVar8 = bfd_get_error();\n      if (iVar8 != 5) {\n        bfd_nonfatal(targ->name);\n        *(undefined4 *)((int)data + 4) = 1;\n      }\n    }\n    else {\n      do {\n        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);\n        if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }\n        iVar7 = iVar7 + 1;\n      } while (iVar7 != 0x59);\n    }\n    bfd_close_all_done(iVar2);\n    return *(int *)((int)data + 4);\n  }\n                    /* WARNING: Load size is inaccurate */\n  bfd_nonfatal(*data);\n  *(undefined4 *)((int)data + 4) = 1;\n  return 1;\n}" primitive_type (function_declarator "do_display_target(bfd_target *targ,void *data)" identifier (parameter_list "(bfd_target *targ,void *data)" ( (parameter_declaration "bfd_target *targ" type_identifier (pointer_declarator "*targ" * identifier)) , (parameter_declaration "void *data" primitive_type (pointer_declarator "*data" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  char *__format;\n  undefined4 uVar5;\n  uint uVar6;\n  int iVar7;\n  int iVar8;\n  \n  iVar2 = *(int *)((int)data + 8) + 1;\n  *(int *)((int)data + 8) = iVar2;\n  uVar6 = iVar2 * 0x5c;\n  if (*(uint *)((int)data + 0xc) < uVar6) {\n    iVar8 = 0x2e00;\n    if (0x3f < iVar2) {\n      iVar8 = iVar2 * 0xb8;\n    }\n    iVar2 = xrealloc(*(undefined4 *)((int)data + 0x10),iVar8);\n    *(int *)((int)data + 0x10) = iVar2;\n    memset((void *)(iVar2 + *(int *)((int)data + 0xc)),0,iVar8 - *(int *)((int)data + 0xc));\n    *(int *)((int)data + 0xc) = iVar8;\n    uVar6 = *(int *)((int)data + 8) * 0x5c;\n  }\n  *(char **)(*(int *)((int)data + 0x10) + -0x5c + uVar6) = targ->name;\n  pcVar3 = endian_string(targ->byteorder);\n  pcVar4 = endian_string(targ->header_byteorder);\n  pcVar1 = targ->name;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,pcVar1,pcVar4,pcVar3);\n                    /* WARNING: Load size is inaccurate */\n  iVar2 = bfd_openw(*data,targ->name);\n  if (iVar2 != 0) {\n    iVar7 = 2;\n    iVar8 = bfd_set_format(iVar2,1);\n    if (iVar8 == 0) {\n      iVar8 = bfd_get_error();\n      if (iVar8 != 5) {\n        bfd_nonfatal(targ->name);\n        *(undefined4 *)((int)data + 4) = 1;\n      }\n    }\n    else {\n      do {\n        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);\n        if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }\n        iVar7 = iVar7 + 1;\n      } while (iVar7 != 0x59);\n    }\n    bfd_close_all_done(iVar2);\n    return *(int *)((int)data + 4);\n  }\n                    /* WARNING: Load size is inaccurate */\n  bfd_nonfatal(*data);\n  *(undefined4 *)((int)data + 4) = 1;\n  return 1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *__format;" primitive_type (pointer_declarator "*__format" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (expression_statement "iVar2 = *(int *)((int)data + 8) + 1;" (assignment_expression "iVar2 = *(int *)((int)data + 8) + 1" identifier = (binary_expression "*(int *)((int)data + 8) + 1" (pointer_expression "*(int *)((int)data + 8)" * (cast_expression "(int *)((int)data + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 8)" ( (binary_expression "(int)data + 8" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) + number_literal)) ;) (expression_statement "*(int *)((int)data + 8) = iVar2;" (assignment_expression "*(int *)((int)data + 8) = iVar2" (pointer_expression "*(int *)((int)data + 8)" * (cast_expression "(int *)((int)data + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 8)" ( (binary_expression "(int)data + 8" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "uVar6 = iVar2 * 0x5c;" (assignment_expression "uVar6 = iVar2 * 0x5c" identifier = (binary_expression "iVar2 * 0x5c" identifier * number_literal)) ;) (if_statement "if (*(uint *)((int)data + 0xc) < uVar6) {\n    iVar8 = 0x2e00;\n    if (0x3f < iVar2) {\n      iVar8 = iVar2 * 0xb8;\n    }\n    iVar2 = xrealloc(*(undefined4 *)((int)data + 0x10),iVar8);\n    *(int *)((int)data + 0x10) = iVar2;\n    memset((void *)(iVar2 + *(int *)((int)data + 0xc)),0,iVar8 - *(int *)((int)data + 0xc));\n    *(int *)((int)data + 0xc) = iVar8;\n    uVar6 = *(int *)((int)data + 8) * 0x5c;\n  }" if (parenthesized_expression "(*(uint *)((int)data + 0xc) < uVar6)" ( (binary_expression "*(uint *)((int)data + 0xc) < uVar6" (pointer_expression "*(uint *)((int)data + 0xc)" * (cast_expression "(uint *)((int)data + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0xc)" ( (binary_expression "(int)data + 0xc" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) < identifier) )) (compound_statement "{\n    iVar8 = 0x2e00;\n    if (0x3f < iVar2) {\n      iVar8 = iVar2 * 0xb8;\n    }\n    iVar2 = xrealloc(*(undefined4 *)((int)data + 0x10),iVar8);\n    *(int *)((int)data + 0x10) = iVar2;\n    memset((void *)(iVar2 + *(int *)((int)data + 0xc)),0,iVar8 - *(int *)((int)data + 0xc));\n    *(int *)((int)data + 0xc) = iVar8;\n    uVar6 = *(int *)((int)data + 8) * 0x5c;\n  }" { (expression_statement "iVar8 = 0x2e00;" (assignment_expression "iVar8 = 0x2e00" identifier = number_literal) ;) (if_statement "if (0x3f < iVar2) {\n      iVar8 = iVar2 * 0xb8;\n    }" if (parenthesized_expression "(0x3f < iVar2)" ( (binary_expression "0x3f < iVar2" number_literal < identifier) )) (compound_statement "{\n      iVar8 = iVar2 * 0xb8;\n    }" { (expression_statement "iVar8 = iVar2 * 0xb8;" (assignment_expression "iVar8 = iVar2 * 0xb8" identifier = (binary_expression "iVar2 * 0xb8" identifier * number_literal)) ;) })) (expression_statement "iVar2 = xrealloc(*(undefined4 *)((int)data + 0x10),iVar8);" (assignment_expression "iVar2 = xrealloc(*(undefined4 *)((int)data + 0x10),iVar8)" identifier = (call_expression "xrealloc(*(undefined4 *)((int)data + 0x10),iVar8)" identifier (argument_list "(*(undefined4 *)((int)data + 0x10),iVar8)" ( (pointer_expression "*(undefined4 *)((int)data + 0x10)" * (cast_expression "(undefined4 *)((int)data + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0x10)" ( (binary_expression "(int)data + 0x10" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) , identifier )))) ;) (expression_statement "*(int *)((int)data + 0x10) = iVar2;" (assignment_expression "*(int *)((int)data + 0x10) = iVar2" (pointer_expression "*(int *)((int)data + 0x10)" * (cast_expression "(int *)((int)data + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0x10)" ( (binary_expression "(int)data + 0x10" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "memset((void *)(iVar2 + *(int *)((int)data + 0xc)),0,iVar8 - *(int *)((int)data + 0xc));" (call_expression "memset((void *)(iVar2 + *(int *)((int)data + 0xc)),0,iVar8 - *(int *)((int)data + 0xc))" identifier (argument_list "((void *)(iVar2 + *(int *)((int)data + 0xc)),0,iVar8 - *(int *)((int)data + 0xc))" ( (cast_expression "(void *)(iVar2 + *(int *)((int)data + 0xc))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + *(int *)((int)data + 0xc))" ( (binary_expression "iVar2 + *(int *)((int)data + 0xc)" identifier + (pointer_expression "*(int *)((int)data + 0xc)" * (cast_expression "(int *)((int)data + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0xc)" ( (binary_expression "(int)data + 0xc" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ))) , number_literal , (binary_expression "iVar8 - *(int *)((int)data + 0xc)" identifier - (pointer_expression "*(int *)((int)data + 0xc)" * (cast_expression "(int *)((int)data + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0xc)" ( (binary_expression "(int)data + 0xc" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ))) ;) (expression_statement "*(int *)((int)data + 0xc) = iVar8;" (assignment_expression "*(int *)((int)data + 0xc) = iVar8" (pointer_expression "*(int *)((int)data + 0xc)" * (cast_expression "(int *)((int)data + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0xc)" ( (binary_expression "(int)data + 0xc" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "uVar6 = *(int *)((int)data + 8) * 0x5c;" (assignment_expression "uVar6 = *(int *)((int)data + 8) * 0x5c" identifier = (binary_expression "*(int *)((int)data + 8) * 0x5c" (pointer_expression "*(int *)((int)data + 8)" * (cast_expression "(int *)((int)data + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 8)" ( (binary_expression "(int)data + 8" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) * number_literal)) ;) })) (expression_statement "*(char **)(*(int *)((int)data + 0x10) + -0x5c + uVar6) = targ->name;" (assignment_expression "*(char **)(*(int *)((int)data + 0x10) + -0x5c + uVar6) = targ->name" (pointer_expression "*(char **)(*(int *)((int)data + 0x10) + -0x5c + uVar6)" * (cast_expression "(char **)(*(int *)((int)data + 0x10) + -0x5c + uVar6)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)((int)data + 0x10) + -0x5c + uVar6)" ( (binary_expression "*(int *)((int)data + 0x10) + -0x5c + uVar6" (binary_expression "*(int *)((int)data + 0x10) + -0x5c" (pointer_expression "*(int *)((int)data + 0x10)" * (cast_expression "(int *)((int)data + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0x10)" ( (binary_expression "(int)data + 0x10" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) + number_literal) + identifier) )))) = (field_expression "targ->name" identifier -> field_identifier)) ;) (expression_statement "pcVar3 = endian_string(targ->byteorder);" (assignment_expression "pcVar3 = endian_string(targ->byteorder)" identifier = (call_expression "endian_string(targ->byteorder)" identifier (argument_list "(targ->byteorder)" ( (field_expression "targ->byteorder" identifier -> field_identifier) )))) ;) (expression_statement "pcVar4 = endian_string(targ->header_byteorder);" (assignment_expression "pcVar4 = endian_string(targ->header_byteorder)" identifier = (call_expression "endian_string(targ->header_byteorder)" identifier (argument_list "(targ->header_byteorder)" ( (field_expression "targ->header_byteorder" identifier -> field_identifier) )))) ;) (expression_statement "pcVar1 = targ->name;" (assignment_expression "pcVar1 = targ->name" identifier = (field_expression "targ->name" identifier -> field_identifier)) ;) (expression_statement "__format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);" (assignment_expression "__format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5)" identifier = (cast_expression "(char *)dcgettext(0,"%s\n (header %s, data %s)\n",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"%s\n (header %s, data %s)\n",5)" identifier (argument_list "(0,"%s\n (header %s, data %s)\n",5)" ( number_literal , (string_literal ""%s\n (header %s, data %s)\n"" " string_content escape_sequence string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "printf(__format,pcVar1,pcVar4,pcVar3);" (call_expression "printf(__format,pcVar1,pcVar4,pcVar3)" identifier (argument_list "(__format,pcVar1,pcVar4,pcVar3)" ( identifier , identifier , identifier , identifier ))) ;) comment (expression_statement "iVar2 = bfd_openw(*data,targ->name);" (assignment_expression "iVar2 = bfd_openw(*data,targ->name)" identifier = (call_expression "bfd_openw(*data,targ->name)" identifier (argument_list "(*data,targ->name)" ( (pointer_expression "*data" * identifier) , (field_expression "targ->name" identifier -> field_identifier) )))) ;) (if_statement "if (iVar2 != 0) {\n    iVar7 = 2;\n    iVar8 = bfd_set_format(iVar2,1);\n    if (iVar8 == 0) {\n      iVar8 = bfd_get_error();\n      if (iVar8 != 5) {\n        bfd_nonfatal(targ->name);\n        *(undefined4 *)((int)data + 4) = 1;\n      }\n    }\n    else {\n      do {\n        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);\n        if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }\n        iVar7 = iVar7 + 1;\n      } while (iVar7 != 0x59);\n    }\n    bfd_close_all_done(iVar2);\n    return *(int *)((int)data + 4);\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar7 = 2;\n    iVar8 = bfd_set_format(iVar2,1);\n    if (iVar8 == 0) {\n      iVar8 = bfd_get_error();\n      if (iVar8 != 5) {\n        bfd_nonfatal(targ->name);\n        *(undefined4 *)((int)data + 4) = 1;\n      }\n    }\n    else {\n      do {\n        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);\n        if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }\n        iVar7 = iVar7 + 1;\n      } while (iVar7 != 0x59);\n    }\n    bfd_close_all_done(iVar2);\n    return *(int *)((int)data + 4);\n  }" { (expression_statement "iVar7 = 2;" (assignment_expression "iVar7 = 2" identifier = number_literal) ;) (expression_statement "iVar8 = bfd_set_format(iVar2,1);" (assignment_expression "iVar8 = bfd_set_format(iVar2,1)" identifier = (call_expression "bfd_set_format(iVar2,1)" identifier (argument_list "(iVar2,1)" ( identifier , number_literal )))) ;) (if_statement "if (iVar8 == 0) {\n      iVar8 = bfd_get_error();\n      if (iVar8 != 5) {\n        bfd_nonfatal(targ->name);\n        *(undefined4 *)((int)data + 4) = 1;\n      }\n    }\n    else {\n      do {\n        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);\n        if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }\n        iVar7 = iVar7 + 1;\n      } while (iVar7 != 0x59);\n    }" if (parenthesized_expression "(iVar8 == 0)" ( (binary_expression "iVar8 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar8 = bfd_get_error();\n      if (iVar8 != 5) {\n        bfd_nonfatal(targ->name);\n        *(undefined4 *)((int)data + 4) = 1;\n      }\n    }" { (expression_statement "iVar8 = bfd_get_error();" (assignment_expression "iVar8 = bfd_get_error()" identifier = (call_expression "bfd_get_error()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar8 != 5) {\n        bfd_nonfatal(targ->name);\n        *(undefined4 *)((int)data + 4) = 1;\n      }" if (parenthesized_expression "(iVar8 != 5)" ( (binary_expression "iVar8 != 5" identifier != number_literal) )) (compound_statement "{\n        bfd_nonfatal(targ->name);\n        *(undefined4 *)((int)data + 4) = 1;\n      }" { (expression_statement "bfd_nonfatal(targ->name);" (call_expression "bfd_nonfatal(targ->name)" identifier (argument_list "(targ->name)" ( (field_expression "targ->name" identifier -> field_identifier) ))) ;) (expression_statement "*(undefined4 *)((int)data + 4) = 1;" (assignment_expression "*(undefined4 *)((int)data + 4) = 1" (pointer_expression "*(undefined4 *)((int)data + 4)" * (cast_expression "(undefined4 *)((int)data + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 4)" ( (binary_expression "(int)data + 4" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) })) }) (else_clause "else {\n      do {\n        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);\n        if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }\n        iVar7 = iVar7 + 1;\n      } while (iVar7 != 0x59);\n    }" else (compound_statement "{\n      do {\n        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);\n        if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }\n        iVar7 = iVar7 + 1;\n      } while (iVar7 != 0x59);\n    }" { (do_statement "do {\n        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);\n        if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }\n        iVar7 = iVar7 + 1;\n      } while (iVar7 != 0x59);" do (compound_statement "{\n        iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);\n        if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }\n        iVar7 = iVar7 + 1;\n      }" { (expression_statement "iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0);" (assignment_expression "iVar8 = (**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0)" identifier = (call_expression "(**(code **)(*(int *)(iVar2 + 4) + 0x154))(iVar2,iVar7,0)" (parenthesized_expression "(**(code **)(*(int *)(iVar2 + 4) + 0x154))" ( (pointer_expression "**(code **)(*(int *)(iVar2 + 4) + 0x154)" * (pointer_expression "*(code **)(*(int *)(iVar2 + 4) + 0x154)" * (cast_expression "(code **)(*(int *)(iVar2 + 4) + 0x154)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar2 + 4) + 0x154)" ( (binary_expression "*(int *)(iVar2 + 4) + 0x154" (pointer_expression "*(int *)(iVar2 + 4)" * (cast_expression "(int *)(iVar2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 4)" ( (binary_expression "iVar2 + 4" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(iVar2,iVar7,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar8 != 0) {\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }" if (parenthesized_expression "(iVar8 != 0)" ( (binary_expression "iVar8 != 0" identifier != number_literal) )) (compound_statement "{\n          uVar5 = bfd_printable_arch_mach(iVar7,0);\n          printf("  %s\n",uVar5);\n          *(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;\n        }" { (expression_statement "uVar5 = bfd_printable_arch_mach(iVar7,0);" (assignment_expression "uVar5 = bfd_printable_arch_mach(iVar7,0)" identifier = (call_expression "bfd_printable_arch_mach(iVar7,0)" identifier (argument_list "(iVar7,0)" ( identifier , number_literal )))) ;) (expression_statement "printf("  %s\n",uVar5);" (call_expression "printf("  %s\n",uVar5)" identifier (argument_list "("  %s\n",uVar5)" ( (string_literal ""  %s\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "*(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;" (assignment_expression "*(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1" (pointer_expression "*(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10))" * (cast_expression "(undefined1 *)\n           (iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10))" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10))" ( (binary_expression "iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)" (binary_expression "iVar7 + -0x5a + *(int *)((int)data + 8) * 0x5c" (binary_expression "iVar7 + -0x5a" identifier + number_literal) + (binary_expression "*(int *)((int)data + 8) * 0x5c" (pointer_expression "*(int *)((int)data + 8)" * (cast_expression "(int *)((int)data + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 8)" ( (binary_expression "(int)data + 8" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) * number_literal)) + (pointer_expression "*(int *)((int)data + 0x10)" * (cast_expression "(int *)((int)data + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0x10)" ( (binary_expression "(int)data + 0x10" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) )))) = number_literal) ;) })) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar7 != 0x59)" ( (binary_expression "iVar7 != 0x59" identifier != number_literal) )) ;) }))) (expression_statement "bfd_close_all_done(iVar2);" (call_expression "bfd_close_all_done(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (return_statement "return *(int *)((int)data + 4);" return (pointer_expression "*(int *)((int)data + 4)" * (cast_expression "(int *)((int)data + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 4)" ( (binary_expression "(int)data + 4" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) })) comment (expression_statement "bfd_nonfatal(*data);" (call_expression "bfd_nonfatal(*data)" identifier (argument_list "(*data)" ( (pointer_expression "*data" * identifier) ))) ;) (expression_statement "*(undefined4 *)((int)data + 4) = 1;" (assignment_expression "*(undefined4 *)((int)data + 4) = 1" (pointer_expression "*(undefined4 *)((int)data + 4)" * (cast_expression "(undefined4 *)((int)data + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 4)" ( (binary_expression "(int)data + 4" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00017c20(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  char *__format;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar1 = param_2[2] + 1;\n  param_2[2] = iVar1;\n  uVar5 = iVar1 * 0x5c;\n  if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }\n  *(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;\n  uVar2 = FUN_00017b10();\n  uVar3 = FUN_00017b10();\n  uVar4 = *param_1;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,uVar4,uVar3,uVar2);\n  iVar1 = bfd_openw(*param_2,*param_1);\n  if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }\n  FUN_00017b90(*param_2);\n  param_2[1] = 1;\n  return 1;\n}\n\n" (function_definition "undefined4 FUN_00017c20(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  char *__format;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar1 = param_2[2] + 1;\n  param_2[2] = iVar1;\n  uVar5 = iVar1 * 0x5c;\n  if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }\n  *(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;\n  uVar2 = FUN_00017b10();\n  uVar3 = FUN_00017b10();\n  uVar4 = *param_1;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,uVar4,uVar3,uVar2);\n  iVar1 = bfd_openw(*param_2,*param_1);\n  if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }\n  FUN_00017b90(*param_2);\n  param_2[1] = 1;\n  return 1;\n}" type_identifier (function_declarator "FUN_00017c20(undefined4 *param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 *param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  char *__format;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar1 = param_2[2] + 1;\n  param_2[2] = iVar1;\n  uVar5 = iVar1 * 0x5c;\n  if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }\n  *(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;\n  uVar2 = FUN_00017b10();\n  uVar3 = FUN_00017b10();\n  uVar4 = *param_1;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,uVar4,uVar3,uVar2);\n  iVar1 = bfd_openw(*param_2,*param_1);\n  if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }\n  FUN_00017b90(*param_2);\n  param_2[1] = 1;\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "char *__format;" primitive_type (pointer_declarator "*__format" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (expression_statement "iVar1 = param_2[2] + 1;" (assignment_expression "iVar1 = param_2[2] + 1" identifier = (binary_expression "param_2[2] + 1" (subscript_expression "param_2[2]" identifier [ number_literal ]) + number_literal)) ;) (expression_statement "param_2[2] = iVar1;" (assignment_expression "param_2[2] = iVar1" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = iVar1 * 0x5c;" (assignment_expression "uVar5 = iVar1 * 0x5c" identifier = (binary_expression "iVar1 * 0x5c" identifier * number_literal)) ;) (if_statement "if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }" if (parenthesized_expression "((uint)param_2[3] < uVar5)" ( (binary_expression "(uint)param_2[3] < uVar5" (cast_expression "(uint)param_2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_2[3]" identifier [ number_literal ])) < identifier) )) (compound_statement "{\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }" { (expression_statement "iVar7 = 0x2e00;" (assignment_expression "iVar7 = 0x2e00" identifier = number_literal) ;) (if_statement "if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }" if (parenthesized_expression "(0x3f < iVar1)" ( (binary_expression "0x3f < iVar1" number_literal < identifier) )) (compound_statement "{\n      iVar7 = iVar1 * 0xb8;\n    }" { (expression_statement "iVar7 = iVar1 * 0xb8;" (assignment_expression "iVar7 = iVar1 * 0xb8" identifier = (binary_expression "iVar1 * 0xb8" identifier * number_literal)) ;) })) (expression_statement "iVar1 = xrealloc(param_2[4],iVar7);" (assignment_expression "iVar1 = xrealloc(param_2[4],iVar7)" identifier = (call_expression "xrealloc(param_2[4],iVar7)" identifier (argument_list "(param_2[4],iVar7)" ( (subscript_expression "param_2[4]" identifier [ number_literal ]) , identifier )))) ;) (expression_statement "param_2[4] = iVar1;" (assignment_expression "param_2[4] = iVar1" (subscript_expression "param_2[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);" (call_expression "memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3])" identifier (argument_list "((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3])" ( (cast_expression "(void *)(iVar1 + param_2[3])" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + param_2[3])" ( (binary_expression "iVar1 + param_2[3]" identifier + (subscript_expression "param_2[3]" identifier [ number_literal ])) ))) , number_literal , (binary_expression "iVar7 - param_2[3]" identifier - (subscript_expression "param_2[3]" identifier [ number_literal ])) ))) ;) (expression_statement "param_2[3] = iVar7;" (assignment_expression "param_2[3] = iVar7" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = param_2[2] * 0x5c;" (assignment_expression "uVar5 = param_2[2] * 0x5c" identifier = (binary_expression "param_2[2] * 0x5c" (subscript_expression "param_2[2]" identifier [ number_literal ]) * number_literal)) ;) })) (expression_statement "*(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;" (assignment_expression "*(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1" (pointer_expression "*(undefined4 *)(param_2[4] + -0x5c + uVar5)" * (cast_expression "(undefined4 *)(param_2[4] + -0x5c + uVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[4] + -0x5c + uVar5)" ( (binary_expression "param_2[4] + -0x5c + uVar5" (binary_expression "param_2[4] + -0x5c" (subscript_expression "param_2[4]" identifier [ number_literal ]) + number_literal) + identifier) )))) = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar2 = FUN_00017b10();" (assignment_expression "uVar2 = FUN_00017b10()" identifier = (call_expression "FUN_00017b10()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = FUN_00017b10();" (assignment_expression "uVar3 = FUN_00017b10()" identifier = (call_expression "FUN_00017b10()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar4 = *param_1;" (assignment_expression "uVar4 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "__format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);" (assignment_expression "__format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5)" identifier = (cast_expression "(char *)dcgettext(0,"%s\n (header %s, data %s)\n",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"%s\n (header %s, data %s)\n",5)" identifier (argument_list "(0,"%s\n (header %s, data %s)\n",5)" ( number_literal , (string_literal ""%s\n (header %s, data %s)\n"" " string_content escape_sequence string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "printf(__format,uVar4,uVar3,uVar2);" (call_expression "printf(__format,uVar4,uVar3,uVar2)" identifier (argument_list "(__format,uVar4,uVar3,uVar2)" ( identifier , identifier , identifier , identifier ))) ;) (expression_statement "iVar1 = bfd_openw(*param_2,*param_1);" (assignment_expression "iVar1 = bfd_openw(*param_2,*param_1)" identifier = (call_expression "bfd_openw(*param_2,*param_1)" identifier (argument_list "(*param_2,*param_1)" ( (pointer_expression "*param_2" * identifier) , (pointer_expression "*param_1" * identifier) )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }" { (expression_statement "iVar6 = 2;" (assignment_expression "iVar6 = 2" identifier = number_literal) ;) (expression_statement "iVar7 = bfd_set_format(iVar1,1);" (assignment_expression "iVar7 = bfd_set_format(iVar1,1)" identifier = (call_expression "bfd_set_format(iVar1,1)" identifier (argument_list "(iVar1,1)" ( identifier , number_literal )))) ;) (if_statement "if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }" { (expression_statement "iVar7 = bfd_get_error();" (assignment_expression "iVar7 = bfd_get_error()" identifier = (call_expression "bfd_get_error()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }" if (parenthesized_expression "(iVar7 != 5)" ( (binary_expression "iVar7 != 5" identifier != number_literal) )) (compound_statement "{\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }" { (expression_statement "FUN_00017b90(*param_1);" (call_expression "FUN_00017b90(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) ))) ;) (expression_statement "param_2[1] = 1;" (assignment_expression "param_2[1] = 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) })) }) (else_clause "else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }" else (compound_statement "{\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }" { (do_statement "do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);" do (compound_statement "{\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      }" { (expression_statement "iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);" (assignment_expression "iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0)" identifier = (call_expression "(**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0)" (parenthesized_expression "(**(code **)(*(int *)(iVar1 + 4) + 0x154))" ( (pointer_expression "**(code **)(*(int *)(iVar1 + 4) + 0x154)" * (pointer_expression "*(code **)(*(int *)(iVar1 + 4) + 0x154)" * (cast_expression "(code **)(*(int *)(iVar1 + 4) + 0x154)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar1 + 4) + 0x154)" ( (binary_expression "*(int *)(iVar1 + 4) + 0x154" (pointer_expression "*(int *)(iVar1 + 4)" * (cast_expression "(int *)(iVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(iVar1,iVar6,0)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }" if (parenthesized_expression "(iVar7 != 0)" ( (binary_expression "iVar7 != 0" identifier != number_literal) )) (compound_statement "{\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }" { (expression_statement "uVar4 = bfd_printable_arch_mach(iVar6,0);" (assignment_expression "uVar4 = bfd_printable_arch_mach(iVar6,0)" identifier = (call_expression "bfd_printable_arch_mach(iVar6,0)" identifier (argument_list "(iVar6,0)" ( identifier , number_literal )))) ;) (expression_statement "printf("  %s\n",uVar4);" (call_expression "printf("  %s\n",uVar4)" identifier (argument_list "("  %s\n",uVar4)" ( (string_literal ""  %s\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "*(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;" (assignment_expression "*(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1" (pointer_expression "*(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4])" * (cast_expression "(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4])" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4])" ( (binary_expression "iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]" (binary_expression "iVar6 + -0x5a + param_2[2] * 0x5c" (binary_expression "iVar6 + -0x5a" identifier + number_literal) + (binary_expression "param_2[2] * 0x5c" (subscript_expression "param_2[2]" identifier [ number_literal ]) * number_literal)) + (subscript_expression "param_2[4]" identifier [ number_literal ])) )))) = number_literal) ;) })) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar6 != 0x59)" ( (binary_expression "iVar6 != 0x59" identifier != number_literal) )) ;) }))) (expression_statement "bfd_close_all_done(iVar1);" (call_expression "bfd_close_all_done(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (return_statement "return param_2[1];" return (subscript_expression "param_2[1]" identifier [ number_literal ]) ;) })) (expression_statement "FUN_00017b90(*param_2);" (call_expression "FUN_00017b90(*param_2)" identifier (argument_list "(*param_2)" ( (pointer_expression "*param_2" * identifier) ))) ;) (expression_statement "param_2[1] = 1;" (assignment_expression "param_2[1] = 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (subscript_expression IDENT [ LIT ])) ))) , LIT , (binary_expression IDENT - (subscript_expression IDENT [ LIT ])) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) * LIT)) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) + IDENT) )))) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence string_content escape_sequence ") , LIT ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (pointer_expression * IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) }) (else_clause else (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) )) (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (binary_expression IDENT + LIT) + (binary_expression (subscript_expression IDENT [ LIT ]) * LIT)) + (subscript_expression IDENT [ LIT ])) )))) = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return (subscript_expression IDENT [ LIT ]) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00017c20(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  char *__format;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar1 = param_2[2] + 1;\n  param_2[2] = iVar1;\n  uVar5 = iVar1 * 0x5c;\n  if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }\n  *(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;\n  uVar2 = FUN_00017b10();\n  uVar3 = FUN_00017b10();\n  uVar4 = *param_1;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,uVar4,uVar3,uVar2);\n  iVar1 = bfd_openw(*param_2,*param_1);\n  if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }\n  FUN_00017b90(*param_2);\n  param_2[1] = 1;\n  return 1;\n}" (type_identifier "undefined4") (function_declarator "FUN_00017c20(undefined4 *param_1,undefined4 *param_2)" (identifier "FUN_00017c20") (parameter_list "(undefined4 *param_1,undefined4 *param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  char *__format;\n  undefined4 uVar4;\n  uint uVar5;\n  int iVar6;\n  int iVar7;\n  \n  iVar1 = param_2[2] + 1;\n  param_2[2] = iVar1;\n  uVar5 = iVar1 * 0x5c;\n  if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }\n  *(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;\n  uVar2 = FUN_00017b10();\n  uVar3 = FUN_00017b10();\n  uVar4 = *param_1;\n  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);\n  printf(__format,uVar4,uVar3,uVar2);\n  iVar1 = bfd_openw(*param_2,*param_1);\n  if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }\n  FUN_00017b90(*param_2);\n  param_2[1] = 1;\n  return 1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "char *__format;" (primitive_type "char") (pointer_declarator "*__format" (* "*") (identifier "__format")) (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (expression_statement "iVar1 = param_2[2] + 1;" (assignment_expression "iVar1 = param_2[2] + 1" (identifier "iVar1") (= "=") (binary_expression "param_2[2] + 1" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_2[2] = iVar1;" (assignment_expression "param_2[2] = iVar1" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "uVar5 = iVar1 * 0x5c;" (assignment_expression "uVar5 = iVar1 * 0x5c" (identifier "uVar5") (= "=") (binary_expression "iVar1 * 0x5c" (identifier "iVar1") (* "*") (number_literal "0x5c"))) (; ";")) (if_statement "if ((uint)param_2[3] < uVar5) {\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }" (if "if") (parenthesized_expression "((uint)param_2[3] < uVar5)" (( "(") (binary_expression "(uint)param_2[3] < uVar5" (cast_expression "(uint)param_2[3]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]"))) (< "<") (identifier "uVar5")) () ")")) (compound_statement "{\n    iVar7 = 0x2e00;\n    if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }\n    iVar1 = xrealloc(param_2[4],iVar7);\n    param_2[4] = iVar1;\n    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);\n    param_2[3] = iVar7;\n    uVar5 = param_2[2] * 0x5c;\n  }" ({ "{") (expression_statement "iVar7 = 0x2e00;" (assignment_expression "iVar7 = 0x2e00" (identifier "iVar7") (= "=") (number_literal "0x2e00")) (; ";")) (if_statement "if (0x3f < iVar1) {\n      iVar7 = iVar1 * 0xb8;\n    }" (if "if") (parenthesized_expression "(0x3f < iVar1)" (( "(") (binary_expression "0x3f < iVar1" (number_literal "0x3f") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n      iVar7 = iVar1 * 0xb8;\n    }" ({ "{") (expression_statement "iVar7 = iVar1 * 0xb8;" (assignment_expression "iVar7 = iVar1 * 0xb8" (identifier "iVar7") (= "=") (binary_expression "iVar1 * 0xb8" (identifier "iVar1") (* "*") (number_literal "0xb8"))) (; ";")) (} "}"))) (expression_statement "iVar1 = xrealloc(param_2[4],iVar7);" (assignment_expression "iVar1 = xrealloc(param_2[4],iVar7)" (identifier "iVar1") (= "=") (call_expression "xrealloc(param_2[4],iVar7)" (identifier "xrealloc") (argument_list "(param_2[4],iVar7)" (( "(") (subscript_expression "param_2[4]" (identifier "param_2") ([ "[") (number_literal "4") (] "]")) (, ",") (identifier "iVar7") () ")")))) (; ";")) (expression_statement "param_2[4] = iVar1;" (assignment_expression "param_2[4] = iVar1" (subscript_expression "param_2[4]" (identifier "param_2") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);" (call_expression "memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3])" (identifier "memset") (argument_list "((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3])" (( "(") (cast_expression "(void *)(iVar1 + param_2[3])" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + param_2[3])" (( "(") (binary_expression "iVar1 + param_2[3]" (identifier "iVar1") (+ "+") (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]"))) () ")"))) (, ",") (number_literal "0") (, ",") (binary_expression "iVar7 - param_2[3]" (identifier "iVar7") (- "-") (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]"))) () ")"))) (; ";")) (expression_statement "param_2[3] = iVar7;" (assignment_expression "param_2[3] = iVar7" (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar7")) (; ";")) (expression_statement "uVar5 = param_2[2] * 0x5c;" (assignment_expression "uVar5 = param_2[2] * 0x5c" (identifier "uVar5") (= "=") (binary_expression "param_2[2] * 0x5c" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (* "*") (number_literal "0x5c"))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;" (assignment_expression "*(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1" (pointer_expression "*(undefined4 *)(param_2[4] + -0x5c + uVar5)" (* "*") (cast_expression "(undefined4 *)(param_2[4] + -0x5c + uVar5)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2[4] + -0x5c + uVar5)" (( "(") (binary_expression "param_2[4] + -0x5c + uVar5" (binary_expression "param_2[4] + -0x5c" (subscript_expression "param_2[4]" (identifier "param_2") ([ "[") (number_literal "4") (] "]")) (+ "+") (number_literal "-0x5c")) (+ "+") (identifier "uVar5")) () ")")))) (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar2 = FUN_00017b10();" (assignment_expression "uVar2 = FUN_00017b10()" (identifier "uVar2") (= "=") (call_expression "FUN_00017b10()" (identifier "FUN_00017b10") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar3 = FUN_00017b10();" (assignment_expression "uVar3 = FUN_00017b10()" (identifier "uVar3") (= "=") (call_expression "FUN_00017b10()" (identifier "FUN_00017b10") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar4 = *param_1;" (assignment_expression "uVar4 = *param_1" (identifier "uVar4") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "__format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);" (assignment_expression "__format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5)" (identifier "__format") (= "=") (cast_expression "(char *)dcgettext(0,"%s\n (header %s, data %s)\n",5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "dcgettext(0,"%s\n (header %s, data %s)\n",5)" (identifier "dcgettext") (argument_list "(0,"%s\n (header %s, data %s)\n",5)" (( "(") (number_literal "0") (, ",") (string_literal ""%s\n (header %s, data %s)\n"" (" """) (string_content "%s") (escape_sequence "\n") (string_content " (header %s, data %s)") (escape_sequence "\n") (" """)) (, ",") (number_literal "5") () ")"))))) (; ";")) (expression_statement "printf(__format,uVar4,uVar3,uVar2);" (call_expression "printf(__format,uVar4,uVar3,uVar2)" (identifier "printf") (argument_list "(__format,uVar4,uVar3,uVar2)" (( "(") (identifier "__format") (, ",") (identifier "uVar4") (, ",") (identifier "uVar3") (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "iVar1 = bfd_openw(*param_2,*param_1);" (assignment_expression "iVar1 = bfd_openw(*param_2,*param_1)" (identifier "iVar1") (= "=") (call_expression "bfd_openw(*param_2,*param_1)" (identifier "bfd_openw") (argument_list "(*param_2,*param_1)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) (, ",") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar6 = 2;\n    iVar7 = bfd_set_format(iVar1,1);\n    if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }\n    bfd_close_all_done(iVar1);\n    return param_2[1];\n  }" ({ "{") (expression_statement "iVar6 = 2;" (assignment_expression "iVar6 = 2" (identifier "iVar6") (= "=") (number_literal "2")) (; ";")) (expression_statement "iVar7 = bfd_set_format(iVar1,1);" (assignment_expression "iVar7 = bfd_set_format(iVar1,1)" (identifier "iVar7") (= "=") (call_expression "bfd_set_format(iVar1,1)" (identifier "bfd_set_format") (argument_list "(iVar1,1)" (( "(") (identifier "iVar1") (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (iVar7 == 0) {\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }\n    else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }" (if "if") (parenthesized_expression "(iVar7 == 0)" (( "(") (binary_expression "iVar7 == 0" (identifier "iVar7") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar7 = bfd_get_error();\n      if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }\n    }" ({ "{") (expression_statement "iVar7 = bfd_get_error();" (assignment_expression "iVar7 = bfd_get_error()" (identifier "iVar7") (= "=") (call_expression "bfd_get_error()" (identifier "bfd_get_error") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar7 != 5) {\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }" (if "if") (parenthesized_expression "(iVar7 != 5)" (( "(") (binary_expression "iVar7 != 5" (identifier "iVar7") (!= "!=") (number_literal "5")) () ")")) (compound_statement "{\n        FUN_00017b90(*param_1);\n        param_2[1] = 1;\n      }" ({ "{") (expression_statement "FUN_00017b90(*param_1);" (call_expression "FUN_00017b90(*param_1)" (identifier "FUN_00017b90") (argument_list "(*param_1)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")"))) (; ";")) (expression_statement "param_2[1] = 1;" (assignment_expression "param_2[1] = 1" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "1")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }" (else "else") (compound_statement "{\n      do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);\n    }" ({ "{") (do_statement "do {\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      } while (iVar6 != 0x59);" (do "do") (compound_statement "{\n        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);\n        if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }\n        iVar6 = iVar6 + 1;\n      }" ({ "{") (expression_statement "iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);" (assignment_expression "iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0)" (identifier "iVar7") (= "=") (call_expression "(**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0)" (parenthesized_expression "(**(code **)(*(int *)(iVar1 + 4) + 0x154))" (( "(") (pointer_expression "**(code **)(*(int *)(iVar1 + 4) + 0x154)" (* "*") (pointer_expression "*(code **)(*(int *)(iVar1 + 4) + 0x154)" (* "*") (cast_expression "(code **)(*(int *)(iVar1 + 4) + 0x154)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(iVar1 + 4) + 0x154)" (( "(") (binary_expression "*(int *)(iVar1 + 4) + 0x154" (pointer_expression "*(int *)(iVar1 + 4)" (* "*") (cast_expression "(int *)(iVar1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "0x154")) () ")"))))) () ")")) (argument_list "(iVar1,iVar6,0)" (( "(") (identifier "iVar1") (, ",") (identifier "iVar6") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar7 != 0) {\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }" (if "if") (parenthesized_expression "(iVar7 != 0)" (( "(") (binary_expression "iVar7 != 0" (identifier "iVar7") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          uVar4 = bfd_printable_arch_mach(iVar6,0);\n          printf("  %s\n",uVar4);\n          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;\n        }" ({ "{") (expression_statement "uVar4 = bfd_printable_arch_mach(iVar6,0);" (assignment_expression "uVar4 = bfd_printable_arch_mach(iVar6,0)" (identifier "uVar4") (= "=") (call_expression "bfd_printable_arch_mach(iVar6,0)" (identifier "bfd_printable_arch_mach") (argument_list "(iVar6,0)" (( "(") (identifier "iVar6") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "printf("  %s\n",uVar4);" (call_expression "printf("  %s\n",uVar4)" (identifier "printf") (argument_list "("  %s\n",uVar4)" (( "(") (string_literal ""  %s\n"" (" """) (string_content "  %s") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar4") () ")"))) (; ";")) (expression_statement "*(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;" (assignment_expression "*(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1" (pointer_expression "*(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4])" (* "*") (cast_expression "(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4])" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4])" (( "(") (binary_expression "iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]" (binary_expression "iVar6 + -0x5a + param_2[2] * 0x5c" (binary_expression "iVar6 + -0x5a" (identifier "iVar6") (+ "+") (number_literal "-0x5a")) (+ "+") (binary_expression "param_2[2] * 0x5c" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (* "*") (number_literal "0x5c"))) (+ "+") (subscript_expression "param_2[4]" (identifier "param_2") ([ "[") (number_literal "4") (] "]"))) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar6 != 0x59)" (( "(") (binary_expression "iVar6 != 0x59" (identifier "iVar6") (!= "!=") (number_literal "0x59")) () ")")) (; ";")) (} "}")))) (expression_statement "bfd_close_all_done(iVar1);" (call_expression "bfd_close_all_done(iVar1)" (identifier "bfd_close_all_done") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (return_statement "return param_2[1];" (return "return") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (; ";")) (} "}"))) (expression_statement "FUN_00017b90(*param_2);" (call_expression "FUN_00017b90(*param_2)" (identifier "FUN_00017b90") (argument_list "(*param_2)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")"))) (; ";")) (expression_statement "param_2[1] = 1;" (assignment_expression "param_2[1] = 1" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "1")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

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

int function_1(type_1 *targ,void *data)

{
  char *pcVar1;
  int var_1;
  char *pcVar3;
  char *pcVar4;
  char *__format;
  type_2 uVar5;
  type_3 var_2;
  int var_14;
  int var_5;
  
  var_1 = *(int *)((int)data + 8) + 1;
  *(int *)((int)data + 8) = var_1;
  var_2 = var_1 * 0x5c;
  if (*(type_3 *)((int)data + 0xc) < var_2) {
    var_5 = 0x2e00;
    if (0x3f < var_1) {
      var_5 = var_1 * 0xb8;
    }
    var_1 = var_3(*(type_2 *)((int)data + 0x10),var_5);
    *(int *)((int)data + 0x10) = var_1;
    var_4((void *)(var_1 + *(int *)((int)data + 0xc)),0,var_5 - *(int *)((int)data + 0xc));
    *(int *)((int)data + 0xc) = var_5;
    var_2 = *(int *)((int)data + 8) * 0x5c;
  }
  *(char **)(*(int *)((int)data + 0x10) + -0x5c + var_2) = targ->name;
  pcVar3 = var_6(targ->byteorder);
  pcVar4 = var_6(targ->header_byteorder);
  pcVar1 = targ->name;
  __format = (char *)var_7(0,"%s\n (header %s, data %s)\n",5);
  var_8(__format,pcVar1,pcVar4,pcVar3);
                    /* WARNING: Load size is inaccurate */
  var_1 = var_9(*data,targ->name);
  if (var_1 != 0) {
    var_14 = 2;
    var_5 = var_10(var_1,1);
    if (var_5 == 0) {
      var_5 = var_11();
      if (var_5 != 5) {
        var_12(targ->name);
        *(type_2 *)((int)data + 4) = 1;
      }
    }
    else {
      do {
        var_5 = (**(type_4 **)(*(int *)(var_1 + 4) + 0x154))(var_1,var_14,0);
        if (var_5 != 0) {
          uVar5 = var_13(var_14,0);
          var_8("  %s\n",uVar5);
          *(type_5 *)
           (var_14 + -0x5a + *(int *)((int)data + 8) * 0x5c + *(int *)((int)data + 0x10)) = 1;
        }
        var_14 = var_14 + 1;
      } while (var_14 != 0x59);
    }
    var_15(var_1);
    return *(int *)((int)data + 4);
  }
                    /* WARNING: Load size is inaccurate */
  var_12(*data);
  *(type_2 *)((int)data + 4) = 1;
  return 1;
}


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

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

undefined4 MASKED(undefined4 *param_1,undefined4 *param_2)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  char *__format;
  undefined4 uVar4;
  uint uVar5;
  int iVar6;
  int iVar7;
  
  iVar1 = param_2[2] + 1;
  param_2[2] = iVar1;
  uVar5 = iVar1 * 0x5c;
  if ((uint)param_2[3] < uVar5) {
    iVar7 = 0x2e00;
    if (0x3f < iVar1) {
      iVar7 = iVar1 * 0xb8;
    }
    iVar1 = xrealloc(param_2[4],iVar7);
    param_2[4] = iVar1;
    memset((void *)(iVar1 + param_2[3]),0,iVar7 - param_2[3]);
    param_2[3] = iVar7;
    uVar5 = param_2[2] * 0x5c;
  }
  *(undefined4 *)(param_2[4] + -0x5c + uVar5) = *param_1;
  uVar2 = FUN_00017b10();
  uVar3 = FUN_00017b10();
  uVar4 = *param_1;
  __format = (char *)dcgettext(0,"%s\n (header %s, data %s)\n",5);
  printf(__format,uVar4,uVar3,uVar2);
  iVar1 = bfd_openw(*param_2,*param_1);
  if (iVar1 != 0) {
    iVar6 = 2;
    iVar7 = bfd_set_format(iVar1,1);
    if (iVar7 == 0) {
      iVar7 = bfd_get_error();
      if (iVar7 != 5) {
        FUN_00017b90(*param_1);
        param_2[1] = 1;
      }
    }
    else {
      do {
        iVar7 = (**(code **)(*(int *)(iVar1 + 4) + 0x154))(iVar1,iVar6,0);
        if (iVar7 != 0) {
          uVar4 = bfd_printable_arch_mach(iVar6,0);
          printf("  %s\n",uVar4);
          *(undefined1 *)(iVar6 + -0x5a + param_2[2] * 0x5c + param_2[4]) = 1;
        }
        iVar6 = iVar6 + 1;
      } while (iVar6 != 0x59);
    }
    bfd_close_all_done(iVar1);
    return param_2[1];
  }
  FUN_00017b90(*param_2);
  param_2[1] = 1;
  return 1;
}

