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

bfd * __regparm3 make_tail(bfd *parent)

{
  uint uVar1;
  char *pcVar2;
  bfd *abfd;
  asection *paVar3;
  asection *paVar4;
  asection *sec;
  uchar *puVar5;
  uchar *puVar6;
  size_t sVar7;
  uchar *__dest;
  uint uVar8;
  int align;
  int in_stack_ffffffc0;
  
  pcVar2 = (char *)xmalloc(0x14);
  sprintf(pcVar2,"d%06d.o",tmp_seq);
  tmp_seq = tmp_seq + 1;
  abfd = (bfd *)bfd_create(pcVar2,parent);
  bfd_find_target(pep_details->object_target,abfd);
  bfd_make_writable(abfd);
  bfd_set_format(abfd,1);
  (*abfd->xvec->_bfd_set_arch_mach)(abfd,pep_details->bfd_arch,0);
  symptr = 0;
  align = 0x14;
  symtab = (asymbol **)xmalloc();
  paVar3 = quick_section(abfd,".idata$4",0x100,align);
  paVar4 = quick_section(abfd,".idata$5",0x100,align);
  sec = quick_section(abfd,".idata$7",0x100,align);
  pcVar2 = "";
  if (pep_details->underscored != 0) {
    pcVar2 = "_";
  }
  quick_symbol(abfd,pcVar2,dll_symname,"_iname",sec,2,in_stack_ffffffc0);
  bfd_set_section_size(abfd,paVar3,8,0);
  puVar5 = (uchar *)xmalloc(8);
  paVar3->contents = puVar5;
  puVar5[0] = '\0';
  puVar5[1] = '\0';
  puVar5[2] = '\0';
  puVar5[3] = '\0';
  puVar5[4] = '\0';
  puVar5[5] = '\0';
  puVar5[6] = '\0';
  puVar5[7] = '\0';
  bfd_set_section_size(abfd,paVar4,8,0);
  puVar6 = (uchar *)xmalloc(8);
  paVar4->contents = puVar6;
  puVar6[0] = '\0';
  puVar6[1] = '\0';
  puVar6[2] = '\0';
  puVar6[3] = '\0';
  puVar6[4] = '\0';
  puVar6[5] = '\0';
  puVar6[6] = '\0';
  puVar6[7] = '\0';
  sVar7 = strlen(dll_filename);
  uVar1 = sVar7 + 1;
  uVar8 = uVar1;
  if ((uVar1 & 1) != 0) {
    uVar8 = sVar7 + 2;
    sVar7 = uVar1;
  }
  bfd_set_section_size(abfd,sec,uVar8,(int)uVar8 >> 0x1f);
  __dest = (uchar *)xmalloc(uVar8);
  sec->contents = __dest;
  strcpy((char *)__dest,dll_filename);
  __dest[sVar7] = '\0';
  bfd_set_symtab(abfd,symtab,symptr);
  bfd_set_section_contents(abfd,paVar3,puVar5,0,0,8,0);
  bfd_set_section_contents(abfd,paVar4,puVar6,0,0,8,0);
  bfd_set_section_contents(abfd,sec,__dest,0,0,uVar8,(int)uVar8 >> 0x1f);
  bfd_make_readable(abfd);
  return abfd;
}



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

int __regparm3 FUN_0005ca40(undefined4 param_1)

{
  uint uVar1;
  char *pcVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  undefined4 *puVar7;
  undefined4 *puVar8;
  size_t sVar9;
  uint uVar10;
  
  pcVar2 = (char *)xmalloc(0x14);
  sprintf(pcVar2,"d%06d.o",DAT_001d0188);
  DAT_001d0188 = DAT_001d0188 + 1;
  iVar3 = bfd_create(pcVar2,param_1);
  bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);
  bfd_make_writable(iVar3);
  bfd_set_format(iVar3,1);
  (**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);
  DAT_001d018c = 0;
  DAT_001d0190 = xmalloc(0x14);
  iVar4 = FUN_0005be40();
  iVar5 = FUN_0005be40();
  iVar6 = FUN_0005be40();
  FUN_0005bd80("_iname",iVar6,2);
  bfd_set_section_size(iVar3,iVar4,8,0);
  puVar7 = (undefined4 *)xmalloc(8);
  *(undefined4 **)(iVar4 + 0x84) = puVar7;
  *puVar7 = 0;
  puVar7[1] = 0;
  bfd_set_section_size(iVar3,iVar5,8,0);
  puVar8 = (undefined4 *)xmalloc(8);
  *(undefined4 **)(iVar5 + 0x84) = puVar8;
  *puVar8 = 0;
  puVar8[1] = 0;
  sVar9 = strlen(DAT_001d0184);
  uVar1 = sVar9 + 1;
  uVar10 = uVar1;
  if ((uVar1 & 1) != 0) {
    uVar10 = sVar9 + 2;
    sVar9 = uVar1;
  }
  bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);
  pcVar2 = (char *)xmalloc(uVar10);
  *(char **)(iVar6 + 0x84) = pcVar2;
  strcpy(pcVar2,DAT_001d0184);
  pcVar2[sVar9] = '\0';
  bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);
  bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);
  bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);
  bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);
  bfd_make_readable(iVar3);
  return iVar3;
}


PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
PUSH EBX
CALL 0x00017b80
ADD EBX,0x1715b5
SUB ESP,0x38
PUSH 0x14
CALL 0x00016dc8
ADD ESP,0xc
PUSH dword ptr [EBX + 0x2188]
MOV ESI,EAX
LEA EAX,[EBX + 0xfffdec61]
PUSH EAX
PUSH ESI
CALL 0x00016af0
POP EBP
POP EAX
PUSH EDI
PUSH ESI
ADD dword ptr [EBX + 0x2188],0x1
CALL 0x00016570
POP EDX
POP ECX
MOV ESI,EAX
PUSH EAX
MOV EAX,dword ptr [EBX + 0x21c4]
PUSH dword ptr [EAX + 0x4]
CALL 0x00016b60
MOV dword ptr [ESP],ESI
CALL 0x000160f0
POP EDI
POP EBP
PUSH 0x1
PUSH ESI
CALL 0x00016680
MOV EDX,dword ptr [EBX + 0x21c4]
ADD ESP,0xc
MOV EAX,dword ptr [ESI + 0x4]
PUSH 0x0
PUSH dword ptr [EDX + 0x10]
PUSH ESI
CALL dword ptr [EAX + 0x154]
MOV dword ptr [EBX + 0x218c],0x0
MOV dword ptr [ESP],0x14
CALL 0x00016dc8
MOV ECX,0x100
LEA EDX,[EBX + 0xfffdec7b]
MOV dword ptr [EBX + 0x2190],EAX
MOV EAX,ESI
CALL 0x0005be40
MOV ECX,0x100
LEA EDX,[EBX + 0xfffdec72]
MOV dword ptr [ESP + 0x20],EAX
MOV EAX,ESI
CALL 0x0005be40
MOV ECX,0x100
LEA EDX,[EBX + 0xfffdec69]
MOV dword ptr [ESP + 0x24],EAX
MOV EAX,ESI
CALL 0x0005be40
MOV ECX,dword ptr [EBX + 0x2180]
LEA EDX,[EBX + 0xfffded3b]
MOV dword ptr [ESP + 0x14],EAX
MOV EAX,dword ptr [EBX + 0x21c4]
ADD ESP,0x10
MOV EAX,dword ptr [EAX + 0x14]
TEST EAX,EAX
JZ 0x0005cb40
LEA EDX,[EBX + 0xffeae179]
SUB ESP,0x4
LEA EAX,[EBX + 0xfffdec48]
PUSH 0x2
PUSH dword ptr [ESP + 0xc]
PUSH EAX
MOV EAX,ESI
CALL 0x0005bd80
PUSH 0x0
PUSH 0x8
MOV EDI,dword ptr [ESP + 0x28]
PUSH EDI
PUSH ESI
CALL 0x000167f0
ADD ESP,0x14
PUSH 0x8
CALL 0x00016dc8
MOV EBP,EAX
MOV dword ptr [EDI + 0x84],EBP
MOV dword ptr [EBP],0x0
MOV dword ptr [EBP + 0x4],0x0
PUSH 0x0
PUSH 0x8
MOV EDI,dword ptr [ESP + 0x2c]
PUSH EDI
PUSH ESI
CALL 0x000167f0
ADD ESP,0x14
PUSH 0x8
CALL 0x00016dc8
MOV ECX,EAX
MOV dword ptr [EDI + 0x84],ECX
MOV dword ptr [ESP + 0x18],ECX
MOV dword ptr [ECX],0x0
MOV dword ptr [ECX + 0x4],0x0
POP ECX
PUSH dword ptr [EBX + 0x2184]
CALL 0x00016760
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x8]
LEA EDI,[EAX + 0x1]
MOV EDX,EAX
TEST EDI,0x1
MOV EAX,EDI
JZ 0x0005cbe1
LEA EAX,[EDX + 0x2]
MOV EDX,EDI
MOV EDI,EAX
MOV dword ptr [ESP + 0x18],EDX
CDQ
MOV dword ptr [ESP + 0x1c],ECX
MOV dword ptr [ESP + 0xc],EDX
MOV dword ptr [ESP + 0x8],EAX
PUSH EDX
PUSH EAX
PUSH dword ptr [ESP + 0xc]
PUSH ESI
CALL 0x000167f0
MOV dword ptr [ESP],EDI
CALL 0x00016dc8
MOV ECX,dword ptr [ESP + 0x14]
MOV EDI,EAX
MOV dword ptr [ECX + 0x84],EAX
POP EAX
POP EDX
PUSH dword ptr [EBX + 0x2184]
PUSH EDI
CALL 0x00016530
MOV EDX,dword ptr [ESP + 0x28]
ADD ESP,0xc
MOV byte ptr [EDI + EDX*0x1],0x0
PUSH dword ptr [EBX + 0x218c]
PUSH dword ptr [EBX + 0x2190]
PUSH ESI
CALL 0x00016650
ADD ESP,0xc
PUSH 0x0
PUSH 0x8
PUSH 0x0
PUSH 0x0
PUSH EBP
PUSH dword ptr [ESP + 0x28]
PUSH ESI
CALL 0x00016460
ADD ESP,0x1c
PUSH 0x0
PUSH 0x8
PUSH 0x0
PUSH 0x0
MOV ECX,dword ptr [ESP + 0x30]
PUSH ECX
PUSH dword ptr [ESP + 0x2c]
PUSH ESI
CALL 0x00016460
ADD ESP,0x1c
PUSH dword ptr [ESP + 0x10]
PUSH dword ptr [ESP + 0x10]
PUSH 0x0
PUSH 0x0
PUSH EDI
PUSH dword ptr [ESP + 0x1c]
PUSH ESI
CALL 0x00016460
ADD ESP,0x14
PUSH ESI
CALL 0x00016160
ADD ESP,0x3c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 FUN_0005ca40(undefined4 param_1)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined4 *puVar8;\n  size_t sVar9;\n  uint uVar10;\n  \n  pcVar2 = (char *)xmalloc(0x14);\n  sprintf(pcVar2,"d%06d.o",DAT_001d0188);\n  DAT_001d0188 = DAT_001d0188 + 1;\n  iVar3 = bfd_create(pcVar2,param_1);\n  bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);\n  bfd_make_writable(iVar3);\n  bfd_set_format(iVar3,1);\n  (**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);\n  DAT_001d018c = 0;\n  DAT_001d0190 = xmalloc(0x14);\n  iVar4 = FUN_0005be40();\n  iVar5 = FUN_0005be40();\n  iVar6 = FUN_0005be40();\n  FUN_0005bd80("_iname",iVar6,2);\n  bfd_set_section_size(iVar3,iVar4,8,0);\n  puVar7 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar4 + 0x84) = puVar7;\n  *puVar7 = 0;\n  puVar7[1] = 0;\n  bfd_set_section_size(iVar3,iVar5,8,0);\n  puVar8 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar5 + 0x84) = puVar8;\n  *puVar8 = 0;\n  puVar8[1] = 0;\n  sVar9 = strlen(DAT_001d0184);\n  uVar1 = sVar9 + 1;\n  uVar10 = uVar1;\n  if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }\n  bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);\n  pcVar2 = (char *)xmalloc(uVar10);\n  *(char **)(iVar6 + 0x84) = pcVar2;\n  strcpy(pcVar2,DAT_001d0184);\n  pcVar2[sVar9] = '\0';\n  bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);\n  bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);\n  bfd_make_readable(iVar3);\n  return iVar3;\n}\n\n" comment (function_definition "int __regparm3 FUN_0005ca40(undefined4 param_1)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined4 *puVar8;\n  size_t sVar9;\n  uint uVar10;\n  \n  pcVar2 = (char *)xmalloc(0x14);\n  sprintf(pcVar2,"d%06d.o",DAT_001d0188);\n  DAT_001d0188 = DAT_001d0188 + 1;\n  iVar3 = bfd_create(pcVar2,param_1);\n  bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);\n  bfd_make_writable(iVar3);\n  bfd_set_format(iVar3,1);\n  (**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);\n  DAT_001d018c = 0;\n  DAT_001d0190 = xmalloc(0x14);\n  iVar4 = FUN_0005be40();\n  iVar5 = FUN_0005be40();\n  iVar6 = FUN_0005be40();\n  FUN_0005bd80("_iname",iVar6,2);\n  bfd_set_section_size(iVar3,iVar4,8,0);\n  puVar7 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar4 + 0x84) = puVar7;\n  *puVar7 = 0;\n  puVar7[1] = 0;\n  bfd_set_section_size(iVar3,iVar5,8,0);\n  puVar8 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar5 + 0x84) = puVar8;\n  *puVar8 = 0;\n  puVar8[1] = 0;\n  sVar9 = strlen(DAT_001d0184);\n  uVar1 = sVar9 + 1;\n  uVar10 = uVar1;\n  if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }\n  bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);\n  pcVar2 = (char *)xmalloc(uVar10);\n  *(char **)(iVar6 + 0x84) = pcVar2;\n  strcpy(pcVar2,DAT_001d0184);\n  pcVar2[sVar9] = '\0';\n  bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);\n  bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);\n  bfd_make_readable(iVar3);\n  return iVar3;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0005ca40(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined4 *puVar8;\n  size_t sVar9;\n  uint uVar10;\n  \n  pcVar2 = (char *)xmalloc(0x14);\n  sprintf(pcVar2,"d%06d.o",DAT_001d0188);\n  DAT_001d0188 = DAT_001d0188 + 1;\n  iVar3 = bfd_create(pcVar2,param_1);\n  bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);\n  bfd_make_writable(iVar3);\n  bfd_set_format(iVar3,1);\n  (**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);\n  DAT_001d018c = 0;\n  DAT_001d0190 = xmalloc(0x14);\n  iVar4 = FUN_0005be40();\n  iVar5 = FUN_0005be40();\n  iVar6 = FUN_0005be40();\n  FUN_0005bd80("_iname",iVar6,2);\n  bfd_set_section_size(iVar3,iVar4,8,0);\n  puVar7 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar4 + 0x84) = puVar7;\n  *puVar7 = 0;\n  puVar7[1] = 0;\n  bfd_set_section_size(iVar3,iVar5,8,0);\n  puVar8 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar5 + 0x84) = puVar8;\n  *puVar8 = 0;\n  puVar8[1] = 0;\n  sVar9 = strlen(DAT_001d0184);\n  uVar1 = sVar9 + 1;\n  uVar10 = uVar1;\n  if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }\n  bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);\n  pcVar2 = (char *)xmalloc(uVar10);\n  *(char **)(iVar6 + 0x84) = pcVar2;\n  strcpy(pcVar2,DAT_001d0184);\n  pcVar2[sVar9] = '\0';\n  bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);\n  bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);\n  bfd_make_readable(iVar3);\n  return iVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "size_t sVar9;" primitive_type identifier ;) (declaration "uint uVar10;" type_identifier identifier ;) (expression_statement "pcVar2 = (char *)xmalloc(0x14);" (assignment_expression "pcVar2 = (char *)xmalloc(0x14)" identifier = (cast_expression "(char *)xmalloc(0x14)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x14)" identifier (argument_list "(0x14)" ( number_literal ))))) ;) (expression_statement "sprintf(pcVar2,"d%06d.o",DAT_001d0188);" (call_expression "sprintf(pcVar2,"d%06d.o",DAT_001d0188)" identifier (argument_list "(pcVar2,"d%06d.o",DAT_001d0188)" ( identifier , (string_literal ""d%06d.o"" " string_content ") , identifier ))) ;) (expression_statement "DAT_001d0188 = DAT_001d0188 + 1;" (assignment_expression "DAT_001d0188 = DAT_001d0188 + 1" identifier = (binary_expression "DAT_001d0188 + 1" identifier + number_literal)) ;) (expression_statement "iVar3 = bfd_create(pcVar2,param_1);" (assignment_expression "iVar3 = bfd_create(pcVar2,param_1)" identifier = (call_expression "bfd_create(pcVar2,param_1)" identifier (argument_list "(pcVar2,param_1)" ( identifier , identifier )))) ;) (expression_statement "bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);" (call_expression "bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3)" identifier (argument_list "(*(undefined4 *)(DAT_001d01c4 + 4),iVar3)" ( (pointer_expression "*(undefined4 *)(DAT_001d01c4 + 4)" * (cast_expression "(undefined4 *)(DAT_001d01c4 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_001d01c4 + 4)" ( (binary_expression "DAT_001d01c4 + 4" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "bfd_make_writable(iVar3);" (call_expression "bfd_make_writable(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "bfd_set_format(iVar3,1);" (call_expression "bfd_set_format(iVar3,1)" identifier (argument_list "(iVar3,1)" ( identifier , number_literal ))) ;) (expression_statement "(**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);" (call_expression "(**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0)" (parenthesized_expression "(**(code **)(*(int *)(iVar3 + 4) + 0x154))" ( (pointer_expression "**(code **)(*(int *)(iVar3 + 4) + 0x154)" * (pointer_expression "*(code **)(*(int *)(iVar3 + 4) + 0x154)" * (cast_expression "(code **)(*(int *)(iVar3 + 4) + 0x154)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar3 + 4) + 0x154)" ( (binary_expression "*(int *)(iVar3 + 4) + 0x154" (pointer_expression "*(int *)(iVar3 + 4)" * (cast_expression "(int *)(iVar3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0)" ( identifier , (pointer_expression "*(undefined4 *)(DAT_001d01c4 + 0x10)" * (cast_expression "(undefined4 *)(DAT_001d01c4 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_001d01c4 + 0x10)" ( (binary_expression "DAT_001d01c4 + 0x10" identifier + number_literal) )))) , number_literal ))) ;) (expression_statement "DAT_001d018c = 0;" (assignment_expression "DAT_001d018c = 0" identifier = number_literal) ;) (expression_statement "DAT_001d0190 = xmalloc(0x14);" (assignment_expression "DAT_001d0190 = xmalloc(0x14)" identifier = (call_expression "xmalloc(0x14)" identifier (argument_list "(0x14)" ( number_literal )))) ;) (expression_statement "iVar4 = FUN_0005be40();" (assignment_expression "iVar4 = FUN_0005be40()" identifier = (call_expression "FUN_0005be40()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar5 = FUN_0005be40();" (assignment_expression "iVar5 = FUN_0005be40()" identifier = (call_expression "FUN_0005be40()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar6 = FUN_0005be40();" (assignment_expression "iVar6 = FUN_0005be40()" identifier = (call_expression "FUN_0005be40()" identifier (argument_list "()" ( )))) ;) (expression_statement "FUN_0005bd80("_iname",iVar6,2);" (call_expression "FUN_0005bd80("_iname",iVar6,2)" identifier (argument_list "("_iname",iVar6,2)" ( (string_literal ""_iname"" " string_content ") , identifier , number_literal ))) ;) (expression_statement "bfd_set_section_size(iVar3,iVar4,8,0);" (call_expression "bfd_set_section_size(iVar3,iVar4,8,0)" identifier (argument_list "(iVar3,iVar4,8,0)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "puVar7 = (undefined4 *)xmalloc(8);" (assignment_expression "puVar7 = (undefined4 *)xmalloc(8)" identifier = (cast_expression "(undefined4 *)xmalloc(8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "*(undefined4 **)(iVar4 + 0x84) = puVar7;" (assignment_expression "*(undefined4 **)(iVar4 + 0x84) = puVar7" (pointer_expression "*(undefined4 **)(iVar4 + 0x84)" * (cast_expression "(undefined4 **)(iVar4 + 0x84)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 0x84)" ( (binary_expression "iVar4 + 0x84" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" * identifier) = number_literal) ;) (expression_statement "puVar7[1] = 0;" (assignment_expression "puVar7[1] = 0" (subscript_expression "puVar7[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "bfd_set_section_size(iVar3,iVar5,8,0);" (call_expression "bfd_set_section_size(iVar3,iVar5,8,0)" identifier (argument_list "(iVar3,iVar5,8,0)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "puVar8 = (undefined4 *)xmalloc(8);" (assignment_expression "puVar8 = (undefined4 *)xmalloc(8)" identifier = (cast_expression "(undefined4 *)xmalloc(8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "*(undefined4 **)(iVar5 + 0x84) = puVar8;" (assignment_expression "*(undefined4 **)(iVar5 + 0x84) = puVar8" (pointer_expression "*(undefined4 **)(iVar5 + 0x84)" * (cast_expression "(undefined4 **)(iVar5 + 0x84)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar5 + 0x84)" ( (binary_expression "iVar5 + 0x84" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar8 = 0;" (assignment_expression "*puVar8 = 0" (pointer_expression "*puVar8" * identifier) = number_literal) ;) (expression_statement "puVar8[1] = 0;" (assignment_expression "puVar8[1] = 0" (subscript_expression "puVar8[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "sVar9 = strlen(DAT_001d0184);" (assignment_expression "sVar9 = strlen(DAT_001d0184)" identifier = (call_expression "strlen(DAT_001d0184)" identifier (argument_list "(DAT_001d0184)" ( identifier )))) ;) (expression_statement "uVar1 = sVar9 + 1;" (assignment_expression "uVar1 = sVar9 + 1" identifier = (binary_expression "sVar9 + 1" identifier + number_literal)) ;) (expression_statement "uVar10 = uVar1;" (assignment_expression "uVar10 = uVar1" identifier = identifier) ;) (if_statement "if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }" if (parenthesized_expression "((uVar1 & 1) != 0)" ( (binary_expression "(uVar1 & 1) != 0" (parenthesized_expression "(uVar1 & 1)" ( (binary_expression "uVar1 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }" { (expression_statement "uVar10 = sVar9 + 2;" (assignment_expression "uVar10 = sVar9 + 2" identifier = (binary_expression "sVar9 + 2" identifier + number_literal)) ;) (expression_statement "sVar9 = uVar1;" (assignment_expression "sVar9 = uVar1" identifier = identifier) ;) })) (expression_statement "bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);" (call_expression "bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f)" identifier (argument_list "(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f)" ( identifier , identifier , identifier , (binary_expression "(int)uVar10 >> 0x1f" (cast_expression "(int)uVar10" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) ;) (expression_statement "pcVar2 = (char *)xmalloc(uVar10);" (assignment_expression "pcVar2 = (char *)xmalloc(uVar10)" identifier = (cast_expression "(char *)xmalloc(uVar10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(uVar10)" identifier (argument_list "(uVar10)" ( identifier ))))) ;) (expression_statement "*(char **)(iVar6 + 0x84) = pcVar2;" (assignment_expression "*(char **)(iVar6 + 0x84) = pcVar2" (pointer_expression "*(char **)(iVar6 + 0x84)" * (cast_expression "(char **)(iVar6 + 0x84)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar6 + 0x84)" ( (binary_expression "iVar6 + 0x84" identifier + number_literal) )))) = identifier) ;) (expression_statement "strcpy(pcVar2,DAT_001d0184);" (call_expression "strcpy(pcVar2,DAT_001d0184)" identifier (argument_list "(pcVar2,DAT_001d0184)" ( identifier , identifier ))) ;) (expression_statement "pcVar2[sVar9] = '\0';" (assignment_expression "pcVar2[sVar9] = '\0'" (subscript_expression "pcVar2[sVar9]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);" (call_expression "bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c)" identifier (argument_list "(iVar3,DAT_001d0190,DAT_001d018c)" ( identifier , identifier , identifier ))) ;) (expression_statement "bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);" (call_expression "bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0)" identifier (argument_list "(iVar3,iVar4,puVar7,0,0,8,0)" ( identifier , identifier , identifier , number_literal , number_literal , number_literal , number_literal ))) ;) (expression_statement "bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);" (call_expression "bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0)" identifier (argument_list "(iVar3,iVar5,puVar8,0,0,8,0)" ( identifier , identifier , identifier , number_literal , number_literal , number_literal , number_literal ))) ;) (expression_statement "bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);" (call_expression "bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f)" identifier (argument_list "(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f)" ( identifier , identifier , identifier , number_literal , number_literal , identifier , (binary_expression "(int)uVar10 >> 0x1f" (cast_expression "(int)uVar10" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) ;) (expression_statement "bfd_make_readable(iVar3);" (call_expression "bfd_make_readable(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nbfd * __regparm3 make_tail(bfd *parent)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  bfd *abfd;\n  asection *paVar3;\n  asection *paVar4;\n  asection *sec;\n  uchar *puVar5;\n  uchar *puVar6;\n  size_t sVar7;\n  uchar *__dest;\n  uint uVar8;\n  int align;\n  int in_stack_ffffffc0;\n  \n  pcVar2 = (char *)xmalloc(0x14);\n  sprintf(pcVar2,"d%06d.o",tmp_seq);\n  tmp_seq = tmp_seq + 1;\n  abfd = (bfd *)bfd_create(pcVar2,parent);\n  bfd_find_target(pep_details->object_target,abfd);\n  bfd_make_writable(abfd);\n  bfd_set_format(abfd,1);\n  (*abfd->xvec->_bfd_set_arch_mach)(abfd,pep_details->bfd_arch,0);\n  symptr = 0;\n  align = 0x14;\n  symtab = (asymbol **)xmalloc();\n  paVar3 = quick_section(abfd,".idata$4",0x100,align);\n  paVar4 = quick_section(abfd,".idata$5",0x100,align);\n  sec = quick_section(abfd,".idata$7",0x100,align);\n  pcVar2 = "";\n  if (pep_details->underscored != 0) {\n    pcVar2 = "_";\n  }\n  quick_symbol(abfd,pcVar2,dll_symname,"_iname",sec,2,in_stack_ffffffc0);\n  bfd_set_section_size(abfd,paVar3,8,0);\n  puVar5 = (uchar *)xmalloc(8);\n  paVar3->contents = puVar5;\n  puVar5[0] = '\0';\n  puVar5[1] = '\0';\n  puVar5[2] = '\0';\n  puVar5[3] = '\0';\n  puVar5[4] = '\0';\n  puVar5[5] = '\0';\n  puVar5[6] = '\0';\n  puVar5[7] = '\0';\n  bfd_set_section_size(abfd,paVar4,8,0);\n  puVar6 = (uchar *)xmalloc(8);\n  paVar4->contents = puVar6;\n  puVar6[0] = '\0';\n  puVar6[1] = '\0';\n  puVar6[2] = '\0';\n  puVar6[3] = '\0';\n  puVar6[4] = '\0';\n  puVar6[5] = '\0';\n  puVar6[6] = '\0';\n  puVar6[7] = '\0';\n  sVar7 = strlen(dll_filename);\n  uVar1 = sVar7 + 1;\n  uVar8 = uVar1;\n  if ((uVar1 & 1) != 0) {\n    uVar8 = sVar7 + 2;\n    sVar7 = uVar1;\n  }\n  bfd_set_section_size(abfd,sec,uVar8,(int)uVar8 >> 0x1f);\n  __dest = (uchar *)xmalloc(uVar8);\n  sec->contents = __dest;\n  strcpy((char *)__dest,dll_filename);\n  __dest[sVar7] = '\0';\n  bfd_set_symtab(abfd,symtab,symptr);\n  bfd_set_section_contents(abfd,paVar3,puVar5,0,0,8,0);\n  bfd_set_section_contents(abfd,paVar4,puVar6,0,0,8,0);\n  bfd_set_section_contents(abfd,sec,__dest,0,0,uVar8,(int)uVar8 >> 0x1f);\n  bfd_make_readable(abfd);\n  return abfd;\n}\n\n" comment (ERROR "bfd * __regparm3 make_tail(bfd *parent)" (binary_expression "bfd * __regparm3 make_tail(bfd *parent)" identifier * (ERROR "__regparm3" identifier) (call_expression "make_tail(bfd *parent)" identifier (argument_list "(bfd *parent)" ( (binary_expression "bfd *parent" identifier * identifier) ))))) (compound_statement "{\n  uint uVar1;\n  char *pcVar2;\n  bfd *abfd;\n  asection *paVar3;\n  asection *paVar4;\n  asection *sec;\n  uchar *puVar5;\n  uchar *puVar6;\n  size_t sVar7;\n  uchar *__dest;\n  uint uVar8;\n  int align;\n  int in_stack_ffffffc0;\n  \n  pcVar2 = (char *)xmalloc(0x14);\n  sprintf(pcVar2,"d%06d.o",tmp_seq);\n  tmp_seq = tmp_seq + 1;\n  abfd = (bfd *)bfd_create(pcVar2,parent);\n  bfd_find_target(pep_details->object_target,abfd);\n  bfd_make_writable(abfd);\n  bfd_set_format(abfd,1);\n  (*abfd->xvec->_bfd_set_arch_mach)(abfd,pep_details->bfd_arch,0);\n  symptr = 0;\n  align = 0x14;\n  symtab = (asymbol **)xmalloc();\n  paVar3 = quick_section(abfd,".idata$4",0x100,align);\n  paVar4 = quick_section(abfd,".idata$5",0x100,align);\n  sec = quick_section(abfd,".idata$7",0x100,align);\n  pcVar2 = "";\n  if (pep_details->underscored != 0) {\n    pcVar2 = "_";\n  }\n  quick_symbol(abfd,pcVar2,dll_symname,"_iname",sec,2,in_stack_ffffffc0);\n  bfd_set_section_size(abfd,paVar3,8,0);\n  puVar5 = (uchar *)xmalloc(8);\n  paVar3->contents = puVar5;\n  puVar5[0] = '\0';\n  puVar5[1] = '\0';\n  puVar5[2] = '\0';\n  puVar5[3] = '\0';\n  puVar5[4] = '\0';\n  puVar5[5] = '\0';\n  puVar5[6] = '\0';\n  puVar5[7] = '\0';\n  bfd_set_section_size(abfd,paVar4,8,0);\n  puVar6 = (uchar *)xmalloc(8);\n  paVar4->contents = puVar6;\n  puVar6[0] = '\0';\n  puVar6[1] = '\0';\n  puVar6[2] = '\0';\n  puVar6[3] = '\0';\n  puVar6[4] = '\0';\n  puVar6[5] = '\0';\n  puVar6[6] = '\0';\n  puVar6[7] = '\0';\n  sVar7 = strlen(dll_filename);\n  uVar1 = sVar7 + 1;\n  uVar8 = uVar1;\n  if ((uVar1 & 1) != 0) {\n    uVar8 = sVar7 + 2;\n    sVar7 = uVar1;\n  }\n  bfd_set_section_size(abfd,sec,uVar8,(int)uVar8 >> 0x1f);\n  __dest = (uchar *)xmalloc(uVar8);\n  sec->contents = __dest;\n  strcpy((char *)__dest,dll_filename);\n  __dest[sVar7] = '\0';\n  bfd_set_symtab(abfd,symtab,symptr);\n  bfd_set_section_contents(abfd,paVar3,puVar5,0,0,8,0);\n  bfd_set_section_contents(abfd,paVar4,puVar6,0,0,8,0);\n  bfd_set_section_contents(abfd,sec,__dest,0,0,uVar8,(int)uVar8 >> 0x1f);\n  bfd_make_readable(abfd);\n  return abfd;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "bfd *abfd;" type_identifier (pointer_declarator "*abfd" * identifier) ;) (declaration "asection *paVar3;" type_identifier (pointer_declarator "*paVar3" * identifier) ;) (declaration "asection *paVar4;" type_identifier (pointer_declarator "*paVar4" * identifier) ;) (declaration "asection *sec;" type_identifier (pointer_declarator "*sec" * identifier) ;) (declaration "uchar *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "uchar *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "uchar *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int align;" primitive_type identifier ;) (declaration "int in_stack_ffffffc0;" primitive_type identifier ;) (expression_statement "pcVar2 = (char *)xmalloc(0x14);" (assignment_expression "pcVar2 = (char *)xmalloc(0x14)" identifier = (cast_expression "(char *)xmalloc(0x14)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x14)" identifier (argument_list "(0x14)" ( number_literal ))))) ;) (expression_statement "sprintf(pcVar2,"d%06d.o",tmp_seq);" (call_expression "sprintf(pcVar2,"d%06d.o",tmp_seq)" identifier (argument_list "(pcVar2,"d%06d.o",tmp_seq)" ( identifier , (string_literal ""d%06d.o"" " string_content ") , identifier ))) ;) (expression_statement "tmp_seq = tmp_seq + 1;" (assignment_expression "tmp_seq = tmp_seq + 1" identifier = (binary_expression "tmp_seq + 1" identifier + number_literal)) ;) (expression_statement "abfd = (bfd *)bfd_create(pcVar2,parent);" (assignment_expression "abfd = (bfd *)bfd_create(pcVar2,parent)" identifier = (cast_expression "(bfd *)bfd_create(pcVar2,parent)" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_create(pcVar2,parent)" identifier (argument_list "(pcVar2,parent)" ( identifier , identifier ))))) ;) (expression_statement "bfd_find_target(pep_details->object_target,abfd);" (call_expression "bfd_find_target(pep_details->object_target,abfd)" identifier (argument_list "(pep_details->object_target,abfd)" ( (field_expression "pep_details->object_target" identifier -> field_identifier) , identifier ))) ;) (expression_statement "bfd_make_writable(abfd);" (call_expression "bfd_make_writable(abfd)" identifier (argument_list "(abfd)" ( identifier ))) ;) (expression_statement "bfd_set_format(abfd,1);" (call_expression "bfd_set_format(abfd,1)" identifier (argument_list "(abfd,1)" ( identifier , number_literal ))) ;) (expression_statement "(*abfd->xvec->_bfd_set_arch_mach)(abfd,pep_details->bfd_arch,0);" (call_expression "(*abfd->xvec->_bfd_set_arch_mach)(abfd,pep_details->bfd_arch,0)" (parenthesized_expression "(*abfd->xvec->_bfd_set_arch_mach)" ( (pointer_expression "*abfd->xvec->_bfd_set_arch_mach" * (field_expression "abfd->xvec->_bfd_set_arch_mach" (field_expression "abfd->xvec" identifier -> field_identifier) -> field_identifier)) )) (argument_list "(abfd,pep_details->bfd_arch,0)" ( identifier , (field_expression "pep_details->bfd_arch" identifier -> field_identifier) , number_literal ))) ;) (expression_statement "symptr = 0;" (assignment_expression "symptr = 0" identifier = number_literal) ;) (expression_statement "align = 0x14;" (assignment_expression "align = 0x14" identifier = number_literal) ;) (expression_statement "symtab = (asymbol **)xmalloc();" (assignment_expression "symtab = (asymbol **)xmalloc()" identifier = (cast_expression "(asymbol **)xmalloc()" ( (type_descriptor "asymbol **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "xmalloc()" identifier (argument_list "()" ( ))))) ;) (expression_statement "paVar3 = quick_section(abfd,".idata$4",0x100,align);" (assignment_expression "paVar3 = quick_section(abfd,".idata$4",0x100,align)" identifier = (call_expression "quick_section(abfd,".idata$4",0x100,align)" identifier (argument_list "(abfd,".idata$4",0x100,align)" ( identifier , (string_literal "".idata$4"" " string_content ") , number_literal , identifier )))) ;) (expression_statement "paVar4 = quick_section(abfd,".idata$5",0x100,align);" (assignment_expression "paVar4 = quick_section(abfd,".idata$5",0x100,align)" identifier = (call_expression "quick_section(abfd,".idata$5",0x100,align)" identifier (argument_list "(abfd,".idata$5",0x100,align)" ( identifier , (string_literal "".idata$5"" " string_content ") , number_literal , identifier )))) ;) (expression_statement "sec = quick_section(abfd,".idata$7",0x100,align);" (assignment_expression "sec = quick_section(abfd,".idata$7",0x100,align)" identifier = (call_expression "quick_section(abfd,".idata$7",0x100,align)" identifier (argument_list "(abfd,".idata$7",0x100,align)" ( identifier , (string_literal "".idata$7"" " string_content ") , number_literal , identifier )))) ;) (expression_statement "pcVar2 = "";" (assignment_expression "pcVar2 = """ identifier = (string_literal """" " ")) ;) (if_statement "if (pep_details->underscored != 0) {\n    pcVar2 = "_";\n  }" if (parenthesized_expression "(pep_details->underscored != 0)" ( (binary_expression "pep_details->underscored != 0" (field_expression "pep_details->underscored" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n    pcVar2 = "_";\n  }" { (expression_statement "pcVar2 = "_";" (assignment_expression "pcVar2 = "_"" identifier = (string_literal ""_"" " string_content ")) ;) })) (expression_statement "quick_symbol(abfd,pcVar2,dll_symname,"_iname",sec,2,in_stack_ffffffc0);" (call_expression "quick_symbol(abfd,pcVar2,dll_symname,"_iname",sec,2,in_stack_ffffffc0)" identifier (argument_list "(abfd,pcVar2,dll_symname,"_iname",sec,2,in_stack_ffffffc0)" ( identifier , identifier , identifier , (string_literal ""_iname"" " string_content ") , identifier , number_literal , identifier ))) ;) (expression_statement "bfd_set_section_size(abfd,paVar3,8,0);" (call_expression "bfd_set_section_size(abfd,paVar3,8,0)" identifier (argument_list "(abfd,paVar3,8,0)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "puVar5 = (uchar *)xmalloc(8);" (assignment_expression "puVar5 = (uchar *)xmalloc(8)" identifier = (cast_expression "(uchar *)xmalloc(8)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "paVar3->contents = puVar5;" (assignment_expression "paVar3->contents = puVar5" (field_expression "paVar3->contents" identifier -> field_identifier) = identifier) ;) (expression_statement "puVar5[0] = '\0';" (assignment_expression "puVar5[0] = '\0'" (subscript_expression "puVar5[0]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar5[1] = '\0';" (assignment_expression "puVar5[1] = '\0'" (subscript_expression "puVar5[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar5[2] = '\0';" (assignment_expression "puVar5[2] = '\0'" (subscript_expression "puVar5[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar5[3] = '\0';" (assignment_expression "puVar5[3] = '\0'" (subscript_expression "puVar5[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar5[4] = '\0';" (assignment_expression "puVar5[4] = '\0'" (subscript_expression "puVar5[4]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar5[5] = '\0';" (assignment_expression "puVar5[5] = '\0'" (subscript_expression "puVar5[5]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar5[6] = '\0';" (assignment_expression "puVar5[6] = '\0'" (subscript_expression "puVar5[6]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar5[7] = '\0';" (assignment_expression "puVar5[7] = '\0'" (subscript_expression "puVar5[7]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "bfd_set_section_size(abfd,paVar4,8,0);" (call_expression "bfd_set_section_size(abfd,paVar4,8,0)" identifier (argument_list "(abfd,paVar4,8,0)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "puVar6 = (uchar *)xmalloc(8);" (assignment_expression "puVar6 = (uchar *)xmalloc(8)" identifier = (cast_expression "(uchar *)xmalloc(8)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "paVar4->contents = puVar6;" (assignment_expression "paVar4->contents = puVar6" (field_expression "paVar4->contents" identifier -> field_identifier) = identifier) ;) (expression_statement "puVar6[0] = '\0';" (assignment_expression "puVar6[0] = '\0'" (subscript_expression "puVar6[0]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar6[1] = '\0';" (assignment_expression "puVar6[1] = '\0'" (subscript_expression "puVar6[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar6[2] = '\0';" (assignment_expression "puVar6[2] = '\0'" (subscript_expression "puVar6[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar6[3] = '\0';" (assignment_expression "puVar6[3] = '\0'" (subscript_expression "puVar6[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar6[4] = '\0';" (assignment_expression "puVar6[4] = '\0'" (subscript_expression "puVar6[4]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar6[5] = '\0';" (assignment_expression "puVar6[5] = '\0'" (subscript_expression "puVar6[5]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar6[6] = '\0';" (assignment_expression "puVar6[6] = '\0'" (subscript_expression "puVar6[6]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar6[7] = '\0';" (assignment_expression "puVar6[7] = '\0'" (subscript_expression "puVar6[7]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "sVar7 = strlen(dll_filename);" (assignment_expression "sVar7 = strlen(dll_filename)" identifier = (call_expression "strlen(dll_filename)" identifier (argument_list "(dll_filename)" ( identifier )))) ;) (expression_statement "uVar1 = sVar7 + 1;" (assignment_expression "uVar1 = sVar7 + 1" identifier = (binary_expression "sVar7 + 1" identifier + number_literal)) ;) (expression_statement "uVar8 = uVar1;" (assignment_expression "uVar8 = uVar1" identifier = identifier) ;) (if_statement "if ((uVar1 & 1) != 0) {\n    uVar8 = sVar7 + 2;\n    sVar7 = uVar1;\n  }" if (parenthesized_expression "((uVar1 & 1) != 0)" ( (binary_expression "(uVar1 & 1) != 0" (parenthesized_expression "(uVar1 & 1)" ( (binary_expression "uVar1 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar8 = sVar7 + 2;\n    sVar7 = uVar1;\n  }" { (expression_statement "uVar8 = sVar7 + 2;" (assignment_expression "uVar8 = sVar7 + 2" identifier = (binary_expression "sVar7 + 2" identifier + number_literal)) ;) (expression_statement "sVar7 = uVar1;" (assignment_expression "sVar7 = uVar1" identifier = identifier) ;) })) (expression_statement "bfd_set_section_size(abfd,sec,uVar8,(int)uVar8 >> 0x1f);" (call_expression "bfd_set_section_size(abfd,sec,uVar8,(int)uVar8 >> 0x1f)" identifier (argument_list "(abfd,sec,uVar8,(int)uVar8 >> 0x1f)" ( identifier , identifier , identifier , (binary_expression "(int)uVar8 >> 0x1f" (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) ;) (expression_statement "__dest = (uchar *)xmalloc(uVar8);" (assignment_expression "__dest = (uchar *)xmalloc(uVar8)" identifier = (cast_expression "(uchar *)xmalloc(uVar8)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(uVar8)" identifier (argument_list "(uVar8)" ( identifier ))))) ;) (expression_statement "sec->contents = __dest;" (assignment_expression "sec->contents = __dest" (field_expression "sec->contents" identifier -> field_identifier) = identifier) ;) (expression_statement "strcpy((char *)__dest,dll_filename);" (call_expression "strcpy((char *)__dest,dll_filename)" identifier (argument_list "((char *)__dest,dll_filename)" ( (cast_expression "(char *)__dest" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "__dest[sVar7] = '\0';" (assignment_expression "__dest[sVar7] = '\0'" (subscript_expression "__dest[sVar7]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "bfd_set_symtab(abfd,symtab,symptr);" (call_expression "bfd_set_symtab(abfd,symtab,symptr)" identifier (argument_list "(abfd,symtab,symptr)" ( identifier , identifier , identifier ))) ;) (expression_statement "bfd_set_section_contents(abfd,paVar3,puVar5,0,0,8,0);" (call_expression "bfd_set_section_contents(abfd,paVar3,puVar5,0,0,8,0)" identifier (argument_list "(abfd,paVar3,puVar5,0,0,8,0)" ( identifier , identifier , identifier , number_literal , number_literal , number_literal , number_literal ))) ;) (expression_statement "bfd_set_section_contents(abfd,paVar4,puVar6,0,0,8,0);" (call_expression "bfd_set_section_contents(abfd,paVar4,puVar6,0,0,8,0)" identifier (argument_list "(abfd,paVar4,puVar6,0,0,8,0)" ( identifier , identifier , identifier , number_literal , number_literal , number_literal , number_literal ))) ;) (expression_statement "bfd_set_section_contents(abfd,sec,__dest,0,0,uVar8,(int)uVar8 >> 0x1f);" (call_expression "bfd_set_section_contents(abfd,sec,__dest,0,0,uVar8,(int)uVar8 >> 0x1f)" identifier (argument_list "(abfd,sec,__dest,0,0,uVar8,(int)uVar8 >> 0x1f)" ( identifier , identifier , identifier , number_literal , number_literal , identifier , (binary_expression "(int)uVar8 >> 0x1f" (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) ;) (expression_statement "bfd_make_readable(abfd);" (call_expression "bfd_make_readable(abfd)" identifier (argument_list "(abfd)" ( identifier ))) ;) (return_statement "return abfd;" return identifier ;) }))
(translation_unit "int __regparm3 FUN_0005ca40(undefined4 param_1)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined4 *puVar8;\n  size_t sVar9;\n  uint uVar10;\n  \n  pcVar2 = (char *)xmalloc(0x14);\n  sprintf(pcVar2,"d%06d.o",DAT_001d0188);\n  DAT_001d0188 = DAT_001d0188 + 1;\n  iVar3 = bfd_create(pcVar2,param_1);\n  bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);\n  bfd_make_writable(iVar3);\n  bfd_set_format(iVar3,1);\n  (**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);\n  DAT_001d018c = 0;\n  DAT_001d0190 = xmalloc(0x14);\n  iVar4 = FUN_0005be40();\n  iVar5 = FUN_0005be40();\n  iVar6 = FUN_0005be40();\n  FUN_0005bd80("_iname",iVar6,2);\n  bfd_set_section_size(iVar3,iVar4,8,0);\n  puVar7 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar4 + 0x84) = puVar7;\n  *puVar7 = 0;\n  puVar7[1] = 0;\n  bfd_set_section_size(iVar3,iVar5,8,0);\n  puVar8 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar5 + 0x84) = puVar8;\n  *puVar8 = 0;\n  puVar8[1] = 0;\n  sVar9 = strlen(DAT_001d0184);\n  uVar1 = sVar9 + 1;\n  uVar10 = uVar1;\n  if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }\n  bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);\n  pcVar2 = (char *)xmalloc(uVar10);\n  *(char **)(iVar6 + 0x84) = pcVar2;\n  strcpy(pcVar2,DAT_001d0184);\n  pcVar2[sVar9] = '\0';\n  bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);\n  bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);\n  bfd_make_readable(iVar3);\n  return iVar3;\n}\n\n" (function_definition "int __regparm3 FUN_0005ca40(undefined4 param_1)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined4 *puVar8;\n  size_t sVar9;\n  uint uVar10;\n  \n  pcVar2 = (char *)xmalloc(0x14);\n  sprintf(pcVar2,"d%06d.o",DAT_001d0188);\n  DAT_001d0188 = DAT_001d0188 + 1;\n  iVar3 = bfd_create(pcVar2,param_1);\n  bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);\n  bfd_make_writable(iVar3);\n  bfd_set_format(iVar3,1);\n  (**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);\n  DAT_001d018c = 0;\n  DAT_001d0190 = xmalloc(0x14);\n  iVar4 = FUN_0005be40();\n  iVar5 = FUN_0005be40();\n  iVar6 = FUN_0005be40();\n  FUN_0005bd80("_iname",iVar6,2);\n  bfd_set_section_size(iVar3,iVar4,8,0);\n  puVar7 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar4 + 0x84) = puVar7;\n  *puVar7 = 0;\n  puVar7[1] = 0;\n  bfd_set_section_size(iVar3,iVar5,8,0);\n  puVar8 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar5 + 0x84) = puVar8;\n  *puVar8 = 0;\n  puVar8[1] = 0;\n  sVar9 = strlen(DAT_001d0184);\n  uVar1 = sVar9 + 1;\n  uVar10 = uVar1;\n  if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }\n  bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);\n  pcVar2 = (char *)xmalloc(uVar10);\n  *(char **)(iVar6 + 0x84) = pcVar2;\n  strcpy(pcVar2,DAT_001d0184);\n  pcVar2[sVar9] = '\0';\n  bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);\n  bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);\n  bfd_make_readable(iVar3);\n  return iVar3;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0005ca40(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined4 *puVar8;\n  size_t sVar9;\n  uint uVar10;\n  \n  pcVar2 = (char *)xmalloc(0x14);\n  sprintf(pcVar2,"d%06d.o",DAT_001d0188);\n  DAT_001d0188 = DAT_001d0188 + 1;\n  iVar3 = bfd_create(pcVar2,param_1);\n  bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);\n  bfd_make_writable(iVar3);\n  bfd_set_format(iVar3,1);\n  (**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);\n  DAT_001d018c = 0;\n  DAT_001d0190 = xmalloc(0x14);\n  iVar4 = FUN_0005be40();\n  iVar5 = FUN_0005be40();\n  iVar6 = FUN_0005be40();\n  FUN_0005bd80("_iname",iVar6,2);\n  bfd_set_section_size(iVar3,iVar4,8,0);\n  puVar7 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar4 + 0x84) = puVar7;\n  *puVar7 = 0;\n  puVar7[1] = 0;\n  bfd_set_section_size(iVar3,iVar5,8,0);\n  puVar8 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar5 + 0x84) = puVar8;\n  *puVar8 = 0;\n  puVar8[1] = 0;\n  sVar9 = strlen(DAT_001d0184);\n  uVar1 = sVar9 + 1;\n  uVar10 = uVar1;\n  if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }\n  bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);\n  pcVar2 = (char *)xmalloc(uVar10);\n  *(char **)(iVar6 + 0x84) = pcVar2;\n  strcpy(pcVar2,DAT_001d0184);\n  pcVar2[sVar9] = '\0';\n  bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);\n  bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);\n  bfd_make_readable(iVar3);\n  return iVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "size_t sVar9;" primitive_type identifier ;) (declaration "uint uVar10;" type_identifier identifier ;) (expression_statement "pcVar2 = (char *)xmalloc(0x14);" (assignment_expression "pcVar2 = (char *)xmalloc(0x14)" identifier = (cast_expression "(char *)xmalloc(0x14)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x14)" identifier (argument_list "(0x14)" ( number_literal ))))) ;) (expression_statement "sprintf(pcVar2,"d%06d.o",DAT_001d0188);" (call_expression "sprintf(pcVar2,"d%06d.o",DAT_001d0188)" identifier (argument_list "(pcVar2,"d%06d.o",DAT_001d0188)" ( identifier , (string_literal ""d%06d.o"" " string_content ") , identifier ))) ;) (expression_statement "DAT_001d0188 = DAT_001d0188 + 1;" (assignment_expression "DAT_001d0188 = DAT_001d0188 + 1" identifier = (binary_expression "DAT_001d0188 + 1" identifier + number_literal)) ;) (expression_statement "iVar3 = bfd_create(pcVar2,param_1);" (assignment_expression "iVar3 = bfd_create(pcVar2,param_1)" identifier = (call_expression "bfd_create(pcVar2,param_1)" identifier (argument_list "(pcVar2,param_1)" ( identifier , identifier )))) ;) (expression_statement "bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);" (call_expression "bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3)" identifier (argument_list "(*(undefined4 *)(DAT_001d01c4 + 4),iVar3)" ( (pointer_expression "*(undefined4 *)(DAT_001d01c4 + 4)" * (cast_expression "(undefined4 *)(DAT_001d01c4 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_001d01c4 + 4)" ( (binary_expression "DAT_001d01c4 + 4" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "bfd_make_writable(iVar3);" (call_expression "bfd_make_writable(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "bfd_set_format(iVar3,1);" (call_expression "bfd_set_format(iVar3,1)" identifier (argument_list "(iVar3,1)" ( identifier , number_literal ))) ;) (expression_statement "(**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);" (call_expression "(**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0)" (parenthesized_expression "(**(code **)(*(int *)(iVar3 + 4) + 0x154))" ( (pointer_expression "**(code **)(*(int *)(iVar3 + 4) + 0x154)" * (pointer_expression "*(code **)(*(int *)(iVar3 + 4) + 0x154)" * (cast_expression "(code **)(*(int *)(iVar3 + 4) + 0x154)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(iVar3 + 4) + 0x154)" ( (binary_expression "*(int *)(iVar3 + 4) + 0x154" (pointer_expression "*(int *)(iVar3 + 4)" * (cast_expression "(int *)(iVar3 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0)" ( identifier , (pointer_expression "*(undefined4 *)(DAT_001d01c4 + 0x10)" * (cast_expression "(undefined4 *)(DAT_001d01c4 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_001d01c4 + 0x10)" ( (binary_expression "DAT_001d01c4 + 0x10" identifier + number_literal) )))) , number_literal ))) ;) (expression_statement "DAT_001d018c = 0;" (assignment_expression "DAT_001d018c = 0" identifier = number_literal) ;) (expression_statement "DAT_001d0190 = xmalloc(0x14);" (assignment_expression "DAT_001d0190 = xmalloc(0x14)" identifier = (call_expression "xmalloc(0x14)" identifier (argument_list "(0x14)" ( number_literal )))) ;) (expression_statement "iVar4 = FUN_0005be40();" (assignment_expression "iVar4 = FUN_0005be40()" identifier = (call_expression "FUN_0005be40()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar5 = FUN_0005be40();" (assignment_expression "iVar5 = FUN_0005be40()" identifier = (call_expression "FUN_0005be40()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar6 = FUN_0005be40();" (assignment_expression "iVar6 = FUN_0005be40()" identifier = (call_expression "FUN_0005be40()" identifier (argument_list "()" ( )))) ;) (expression_statement "FUN_0005bd80("_iname",iVar6,2);" (call_expression "FUN_0005bd80("_iname",iVar6,2)" identifier (argument_list "("_iname",iVar6,2)" ( (string_literal ""_iname"" " string_content ") , identifier , number_literal ))) ;) (expression_statement "bfd_set_section_size(iVar3,iVar4,8,0);" (call_expression "bfd_set_section_size(iVar3,iVar4,8,0)" identifier (argument_list "(iVar3,iVar4,8,0)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "puVar7 = (undefined4 *)xmalloc(8);" (assignment_expression "puVar7 = (undefined4 *)xmalloc(8)" identifier = (cast_expression "(undefined4 *)xmalloc(8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "*(undefined4 **)(iVar4 + 0x84) = puVar7;" (assignment_expression "*(undefined4 **)(iVar4 + 0x84) = puVar7" (pointer_expression "*(undefined4 **)(iVar4 + 0x84)" * (cast_expression "(undefined4 **)(iVar4 + 0x84)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + 0x84)" ( (binary_expression "iVar4 + 0x84" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" * identifier) = number_literal) ;) (expression_statement "puVar7[1] = 0;" (assignment_expression "puVar7[1] = 0" (subscript_expression "puVar7[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "bfd_set_section_size(iVar3,iVar5,8,0);" (call_expression "bfd_set_section_size(iVar3,iVar5,8,0)" identifier (argument_list "(iVar3,iVar5,8,0)" ( identifier , identifier , number_literal , number_literal ))) ;) (expression_statement "puVar8 = (undefined4 *)xmalloc(8);" (assignment_expression "puVar8 = (undefined4 *)xmalloc(8)" identifier = (cast_expression "(undefined4 *)xmalloc(8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(8)" identifier (argument_list "(8)" ( number_literal ))))) ;) (expression_statement "*(undefined4 **)(iVar5 + 0x84) = puVar8;" (assignment_expression "*(undefined4 **)(iVar5 + 0x84) = puVar8" (pointer_expression "*(undefined4 **)(iVar5 + 0x84)" * (cast_expression "(undefined4 **)(iVar5 + 0x84)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar5 + 0x84)" ( (binary_expression "iVar5 + 0x84" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar8 = 0;" (assignment_expression "*puVar8 = 0" (pointer_expression "*puVar8" * identifier) = number_literal) ;) (expression_statement "puVar8[1] = 0;" (assignment_expression "puVar8[1] = 0" (subscript_expression "puVar8[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "sVar9 = strlen(DAT_001d0184);" (assignment_expression "sVar9 = strlen(DAT_001d0184)" identifier = (call_expression "strlen(DAT_001d0184)" identifier (argument_list "(DAT_001d0184)" ( identifier )))) ;) (expression_statement "uVar1 = sVar9 + 1;" (assignment_expression "uVar1 = sVar9 + 1" identifier = (binary_expression "sVar9 + 1" identifier + number_literal)) ;) (expression_statement "uVar10 = uVar1;" (assignment_expression "uVar10 = uVar1" identifier = identifier) ;) (if_statement "if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }" if (parenthesized_expression "((uVar1 & 1) != 0)" ( (binary_expression "(uVar1 & 1) != 0" (parenthesized_expression "(uVar1 & 1)" ( (binary_expression "uVar1 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }" { (expression_statement "uVar10 = sVar9 + 2;" (assignment_expression "uVar10 = sVar9 + 2" identifier = (binary_expression "sVar9 + 2" identifier + number_literal)) ;) (expression_statement "sVar9 = uVar1;" (assignment_expression "sVar9 = uVar1" identifier = identifier) ;) })) (expression_statement "bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);" (call_expression "bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f)" identifier (argument_list "(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f)" ( identifier , identifier , identifier , (binary_expression "(int)uVar10 >> 0x1f" (cast_expression "(int)uVar10" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) ;) (expression_statement "pcVar2 = (char *)xmalloc(uVar10);" (assignment_expression "pcVar2 = (char *)xmalloc(uVar10)" identifier = (cast_expression "(char *)xmalloc(uVar10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(uVar10)" identifier (argument_list "(uVar10)" ( identifier ))))) ;) (expression_statement "*(char **)(iVar6 + 0x84) = pcVar2;" (assignment_expression "*(char **)(iVar6 + 0x84) = pcVar2" (pointer_expression "*(char **)(iVar6 + 0x84)" * (cast_expression "(char **)(iVar6 + 0x84)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar6 + 0x84)" ( (binary_expression "iVar6 + 0x84" identifier + number_literal) )))) = identifier) ;) (expression_statement "strcpy(pcVar2,DAT_001d0184);" (call_expression "strcpy(pcVar2,DAT_001d0184)" identifier (argument_list "(pcVar2,DAT_001d0184)" ( identifier , identifier ))) ;) (expression_statement "pcVar2[sVar9] = '\0';" (assignment_expression "pcVar2[sVar9] = '\0'" (subscript_expression "pcVar2[sVar9]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);" (call_expression "bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c)" identifier (argument_list "(iVar3,DAT_001d0190,DAT_001d018c)" ( identifier , identifier , identifier ))) ;) (expression_statement "bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);" (call_expression "bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0)" identifier (argument_list "(iVar3,iVar4,puVar7,0,0,8,0)" ( identifier , identifier , identifier , number_literal , number_literal , number_literal , number_literal ))) ;) (expression_statement "bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);" (call_expression "bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0)" identifier (argument_list "(iVar3,iVar5,puVar8,0,0,8,0)" ( identifier , identifier , identifier , number_literal , number_literal , number_literal , number_literal ))) ;) (expression_statement "bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);" (call_expression "bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f)" identifier (argument_list "(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f)" ( identifier , identifier , identifier , number_literal , number_literal , identifier , (binary_expression "(int)uVar10 >> 0x1f" (cast_expression "(int)uVar10" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ))) ;) (expression_statement "bfd_make_readable(iVar3);" (call_expression "bfd_make_readable(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) )) (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (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 = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT , LIT , LIT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT , LIT , LIT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT , LIT , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_0005ca40(undefined4 param_1)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined4 *puVar8;\n  size_t sVar9;\n  uint uVar10;\n  \n  pcVar2 = (char *)xmalloc(0x14);\n  sprintf(pcVar2,"d%06d.o",DAT_001d0188);\n  DAT_001d0188 = DAT_001d0188 + 1;\n  iVar3 = bfd_create(pcVar2,param_1);\n  bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);\n  bfd_make_writable(iVar3);\n  bfd_set_format(iVar3,1);\n  (**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);\n  DAT_001d018c = 0;\n  DAT_001d0190 = xmalloc(0x14);\n  iVar4 = FUN_0005be40();\n  iVar5 = FUN_0005be40();\n  iVar6 = FUN_0005be40();\n  FUN_0005bd80("_iname",iVar6,2);\n  bfd_set_section_size(iVar3,iVar4,8,0);\n  puVar7 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar4 + 0x84) = puVar7;\n  *puVar7 = 0;\n  puVar7[1] = 0;\n  bfd_set_section_size(iVar3,iVar5,8,0);\n  puVar8 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar5 + 0x84) = puVar8;\n  *puVar8 = 0;\n  puVar8[1] = 0;\n  sVar9 = strlen(DAT_001d0184);\n  uVar1 = sVar9 + 1;\n  uVar10 = uVar1;\n  if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }\n  bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);\n  pcVar2 = (char *)xmalloc(uVar10);\n  *(char **)(iVar6 + 0x84) = pcVar2;\n  strcpy(pcVar2,DAT_001d0184);\n  pcVar2[sVar9] = '\0';\n  bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);\n  bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);\n  bfd_make_readable(iVar3);\n  return iVar3;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0005ca40(undefined4 param_1)" (identifier "FUN_0005ca40") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  uint uVar1;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  undefined4 *puVar8;\n  size_t sVar9;\n  uint uVar10;\n  \n  pcVar2 = (char *)xmalloc(0x14);\n  sprintf(pcVar2,"d%06d.o",DAT_001d0188);\n  DAT_001d0188 = DAT_001d0188 + 1;\n  iVar3 = bfd_create(pcVar2,param_1);\n  bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);\n  bfd_make_writable(iVar3);\n  bfd_set_format(iVar3,1);\n  (**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);\n  DAT_001d018c = 0;\n  DAT_001d0190 = xmalloc(0x14);\n  iVar4 = FUN_0005be40();\n  iVar5 = FUN_0005be40();\n  iVar6 = FUN_0005be40();\n  FUN_0005bd80("_iname",iVar6,2);\n  bfd_set_section_size(iVar3,iVar4,8,0);\n  puVar7 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar4 + 0x84) = puVar7;\n  *puVar7 = 0;\n  puVar7[1] = 0;\n  bfd_set_section_size(iVar3,iVar5,8,0);\n  puVar8 = (undefined4 *)xmalloc(8);\n  *(undefined4 **)(iVar5 + 0x84) = puVar8;\n  *puVar8 = 0;\n  puVar8[1] = 0;\n  sVar9 = strlen(DAT_001d0184);\n  uVar1 = sVar9 + 1;\n  uVar10 = uVar1;\n  if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }\n  bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);\n  pcVar2 = (char *)xmalloc(uVar10);\n  *(char **)(iVar6 + 0x84) = pcVar2;\n  strcpy(pcVar2,DAT_001d0184);\n  pcVar2[sVar9] = '\0';\n  bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);\n  bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);\n  bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);\n  bfd_make_readable(iVar3);\n  return iVar3;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "undefined4 *puVar7;" (type_identifier "undefined4") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "undefined4 *puVar8;" (type_identifier "undefined4") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "size_t sVar9;" (primitive_type "size_t") (identifier "sVar9") (; ";")) (declaration "uint uVar10;" (type_identifier "uint") (identifier "uVar10") (; ";")) (expression_statement "pcVar2 = (char *)xmalloc(0x14);" (assignment_expression "pcVar2 = (char *)xmalloc(0x14)" (identifier "pcVar2") (= "=") (cast_expression "(char *)xmalloc(0x14)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(0x14)" (identifier "xmalloc") (argument_list "(0x14)" (( "(") (number_literal "0x14") () ")"))))) (; ";")) (expression_statement "sprintf(pcVar2,"d%06d.o",DAT_001d0188);" (call_expression "sprintf(pcVar2,"d%06d.o",DAT_001d0188)" (identifier "sprintf") (argument_list "(pcVar2,"d%06d.o",DAT_001d0188)" (( "(") (identifier "pcVar2") (, ",") (string_literal ""d%06d.o"" (" """) (string_content "d%06d.o") (" """)) (, ",") (identifier "DAT_001d0188") () ")"))) (; ";")) (expression_statement "DAT_001d0188 = DAT_001d0188 + 1;" (assignment_expression "DAT_001d0188 = DAT_001d0188 + 1" (identifier "DAT_001d0188") (= "=") (binary_expression "DAT_001d0188 + 1" (identifier "DAT_001d0188") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar3 = bfd_create(pcVar2,param_1);" (assignment_expression "iVar3 = bfd_create(pcVar2,param_1)" (identifier "iVar3") (= "=") (call_expression "bfd_create(pcVar2,param_1)" (identifier "bfd_create") (argument_list "(pcVar2,param_1)" (( "(") (identifier "pcVar2") (, ",") (identifier "param_1") () ")")))) (; ";")) (expression_statement "bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);" (call_expression "bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3)" (identifier "bfd_find_target") (argument_list "(*(undefined4 *)(DAT_001d01c4 + 4),iVar3)" (( "(") (pointer_expression "*(undefined4 *)(DAT_001d01c4 + 4)" (* "*") (cast_expression "(undefined4 *)(DAT_001d01c4 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(DAT_001d01c4 + 4)" (( "(") (binary_expression "DAT_001d01c4 + 4" (identifier "DAT_001d01c4") (+ "+") (number_literal "4")) () ")")))) (, ",") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "bfd_make_writable(iVar3);" (call_expression "bfd_make_writable(iVar3)" (identifier "bfd_make_writable") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "bfd_set_format(iVar3,1);" (call_expression "bfd_set_format(iVar3,1)" (identifier "bfd_set_format") (argument_list "(iVar3,1)" (( "(") (identifier "iVar3") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "(**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);" (call_expression "(**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0)" (parenthesized_expression "(**(code **)(*(int *)(iVar3 + 4) + 0x154))" (( "(") (pointer_expression "**(code **)(*(int *)(iVar3 + 4) + 0x154)" (* "*") (pointer_expression "*(code **)(*(int *)(iVar3 + 4) + 0x154)" (* "*") (cast_expression "(code **)(*(int *)(iVar3 + 4) + 0x154)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(iVar3 + 4) + 0x154)" (( "(") (binary_expression "*(int *)(iVar3 + 4) + 0x154" (pointer_expression "*(int *)(iVar3 + 4)" (* "*") (cast_expression "(int *)(iVar3 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 4)" (( "(") (binary_expression "iVar3 + 4" (identifier "iVar3") (+ "+") (number_literal "4")) () ")")))) (+ "+") (number_literal "0x154")) () ")"))))) () ")")) (argument_list "(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0)" (( "(") (identifier "iVar3") (, ",") (pointer_expression "*(undefined4 *)(DAT_001d01c4 + 0x10)" (* "*") (cast_expression "(undefined4 *)(DAT_001d01c4 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(DAT_001d01c4 + 0x10)" (( "(") (binary_expression "DAT_001d01c4 + 0x10" (identifier "DAT_001d01c4") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "DAT_001d018c = 0;" (assignment_expression "DAT_001d018c = 0" (identifier "DAT_001d018c") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_001d0190 = xmalloc(0x14);" (assignment_expression "DAT_001d0190 = xmalloc(0x14)" (identifier "DAT_001d0190") (= "=") (call_expression "xmalloc(0x14)" (identifier "xmalloc") (argument_list "(0x14)" (( "(") (number_literal "0x14") () ")")))) (; ";")) (expression_statement "iVar4 = FUN_0005be40();" (assignment_expression "iVar4 = FUN_0005be40()" (identifier "iVar4") (= "=") (call_expression "FUN_0005be40()" (identifier "FUN_0005be40") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar5 = FUN_0005be40();" (assignment_expression "iVar5 = FUN_0005be40()" (identifier "iVar5") (= "=") (call_expression "FUN_0005be40()" (identifier "FUN_0005be40") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar6 = FUN_0005be40();" (assignment_expression "iVar6 = FUN_0005be40()" (identifier "iVar6") (= "=") (call_expression "FUN_0005be40()" (identifier "FUN_0005be40") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "FUN_0005bd80("_iname",iVar6,2);" (call_expression "FUN_0005bd80("_iname",iVar6,2)" (identifier "FUN_0005bd80") (argument_list "("_iname",iVar6,2)" (( "(") (string_literal ""_iname"" (" """) (string_content "_iname") (" """)) (, ",") (identifier "iVar6") (, ",") (number_literal "2") () ")"))) (; ";")) (expression_statement "bfd_set_section_size(iVar3,iVar4,8,0);" (call_expression "bfd_set_section_size(iVar3,iVar4,8,0)" (identifier "bfd_set_section_size") (argument_list "(iVar3,iVar4,8,0)" (( "(") (identifier "iVar3") (, ",") (identifier "iVar4") (, ",") (number_literal "8") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "puVar7 = (undefined4 *)xmalloc(8);" (assignment_expression "puVar7 = (undefined4 *)xmalloc(8)" (identifier "puVar7") (= "=") (cast_expression "(undefined4 *)xmalloc(8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(8)" (identifier "xmalloc") (argument_list "(8)" (( "(") (number_literal "8") () ")"))))) (; ";")) (expression_statement "*(undefined4 **)(iVar4 + 0x84) = puVar7;" (assignment_expression "*(undefined4 **)(iVar4 + 0x84) = puVar7" (pointer_expression "*(undefined4 **)(iVar4 + 0x84)" (* "*") (cast_expression "(undefined4 **)(iVar4 + 0x84)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar4 + 0x84)" (( "(") (binary_expression "iVar4 + 0x84" (identifier "iVar4") (+ "+") (number_literal "0x84")) () ")")))) (= "=") (identifier "puVar7")) (; ";")) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar7[1] = 0;" (assignment_expression "puVar7[1] = 0" (subscript_expression "puVar7[1]" (identifier "puVar7") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "bfd_set_section_size(iVar3,iVar5,8,0);" (call_expression "bfd_set_section_size(iVar3,iVar5,8,0)" (identifier "bfd_set_section_size") (argument_list "(iVar3,iVar5,8,0)" (( "(") (identifier "iVar3") (, ",") (identifier "iVar5") (, ",") (number_literal "8") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "puVar8 = (undefined4 *)xmalloc(8);" (assignment_expression "puVar8 = (undefined4 *)xmalloc(8)" (identifier "puVar8") (= "=") (cast_expression "(undefined4 *)xmalloc(8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(8)" (identifier "xmalloc") (argument_list "(8)" (( "(") (number_literal "8") () ")"))))) (; ";")) (expression_statement "*(undefined4 **)(iVar5 + 0x84) = puVar8;" (assignment_expression "*(undefined4 **)(iVar5 + 0x84) = puVar8" (pointer_expression "*(undefined4 **)(iVar5 + 0x84)" (* "*") (cast_expression "(undefined4 **)(iVar5 + 0x84)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar5 + 0x84)" (( "(") (binary_expression "iVar5 + 0x84" (identifier "iVar5") (+ "+") (number_literal "0x84")) () ")")))) (= "=") (identifier "puVar8")) (; ";")) (expression_statement "*puVar8 = 0;" (assignment_expression "*puVar8 = 0" (pointer_expression "*puVar8" (* "*") (identifier "puVar8")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar8[1] = 0;" (assignment_expression "puVar8[1] = 0" (subscript_expression "puVar8[1]" (identifier "puVar8") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "sVar9 = strlen(DAT_001d0184);" (assignment_expression "sVar9 = strlen(DAT_001d0184)" (identifier "sVar9") (= "=") (call_expression "strlen(DAT_001d0184)" (identifier "strlen") (argument_list "(DAT_001d0184)" (( "(") (identifier "DAT_001d0184") () ")")))) (; ";")) (expression_statement "uVar1 = sVar9 + 1;" (assignment_expression "uVar1 = sVar9 + 1" (identifier "uVar1") (= "=") (binary_expression "sVar9 + 1" (identifier "sVar9") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar10 = uVar1;" (assignment_expression "uVar10 = uVar1" (identifier "uVar10") (= "=") (identifier "uVar1")) (; ";")) (if_statement "if ((uVar1 & 1) != 0) {\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }" (if "if") (parenthesized_expression "((uVar1 & 1) != 0)" (( "(") (binary_expression "(uVar1 & 1) != 0" (parenthesized_expression "(uVar1 & 1)" (( "(") (binary_expression "uVar1 & 1" (identifier "uVar1") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar10 = sVar9 + 2;\n    sVar9 = uVar1;\n  }" ({ "{") (expression_statement "uVar10 = sVar9 + 2;" (assignment_expression "uVar10 = sVar9 + 2" (identifier "uVar10") (= "=") (binary_expression "sVar9 + 2" (identifier "sVar9") (+ "+") (number_literal "2"))) (; ";")) (expression_statement "sVar9 = uVar1;" (assignment_expression "sVar9 = uVar1" (identifier "sVar9") (= "=") (identifier "uVar1")) (; ";")) (} "}"))) (expression_statement "bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);" (call_expression "bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f)" (identifier "bfd_set_section_size") (argument_list "(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f)" (( "(") (identifier "iVar3") (, ",") (identifier "iVar6") (, ",") (identifier "uVar10") (, ",") (binary_expression "(int)uVar10 >> 0x1f" (cast_expression "(int)uVar10" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar10")) (>> ">>") (number_literal "0x1f")) () ")"))) (; ";")) (expression_statement "pcVar2 = (char *)xmalloc(uVar10);" (assignment_expression "pcVar2 = (char *)xmalloc(uVar10)" (identifier "pcVar2") (= "=") (cast_expression "(char *)xmalloc(uVar10)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(uVar10)" (identifier "xmalloc") (argument_list "(uVar10)" (( "(") (identifier "uVar10") () ")"))))) (; ";")) (expression_statement "*(char **)(iVar6 + 0x84) = pcVar2;" (assignment_expression "*(char **)(iVar6 + 0x84) = pcVar2" (pointer_expression "*(char **)(iVar6 + 0x84)" (* "*") (cast_expression "(char **)(iVar6 + 0x84)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar6 + 0x84)" (( "(") (binary_expression "iVar6 + 0x84" (identifier "iVar6") (+ "+") (number_literal "0x84")) () ")")))) (= "=") (identifier "pcVar2")) (; ";")) (expression_statement "strcpy(pcVar2,DAT_001d0184);" (call_expression "strcpy(pcVar2,DAT_001d0184)" (identifier "strcpy") (argument_list "(pcVar2,DAT_001d0184)" (( "(") (identifier "pcVar2") (, ",") (identifier "DAT_001d0184") () ")"))) (; ";")) (expression_statement "pcVar2[sVar9] = '\0';" (assignment_expression "pcVar2[sVar9] = '\0'" (subscript_expression "pcVar2[sVar9]" (identifier "pcVar2") ([ "[") (identifier "sVar9") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);" (call_expression "bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c)" (identifier "bfd_set_symtab") (argument_list "(iVar3,DAT_001d0190,DAT_001d018c)" (( "(") (identifier "iVar3") (, ",") (identifier "DAT_001d0190") (, ",") (identifier "DAT_001d018c") () ")"))) (; ";")) (expression_statement "bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);" (call_expression "bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0)" (identifier "bfd_set_section_contents") (argument_list "(iVar3,iVar4,puVar7,0,0,8,0)" (( "(") (identifier "iVar3") (, ",") (identifier "iVar4") (, ",") (identifier "puVar7") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "8") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);" (call_expression "bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0)" (identifier "bfd_set_section_contents") (argument_list "(iVar3,iVar5,puVar8,0,0,8,0)" (( "(") (identifier "iVar3") (, ",") (identifier "iVar5") (, ",") (identifier "puVar8") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "8") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);" (call_expression "bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f)" (identifier "bfd_set_section_contents") (argument_list "(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f)" (( "(") (identifier "iVar3") (, ",") (identifier "iVar6") (, ",") (identifier "pcVar2") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (identifier "uVar10") (, ",") (binary_expression "(int)uVar10 >> 0x1f" (cast_expression "(int)uVar10" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar10")) (>> ">>") (number_literal "0x1f")) () ")"))) (; ";")) (expression_statement "bfd_make_readable(iVar3);" (call_expression "bfd_make_readable(iVar3)" (identifier "bfd_make_readable") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

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

type_2 * __regparm3 make_tail(type_2 *parent)

{
  type_1 var_13;
  char *pcVar2;
  type_2 *abfd;
  type_3 *paVar3;
  type_3 *paVar4;
  type_3 *sec;
  type_4 *puVar5;
  type_4 *puVar6;
  size_t var_12;
  type_4 *__dest;
  type_1 uVar8;
  int align;
  int in_stack_ffffffc0;
  
  pcVar2 = (char *)var_1(0x14);
  var_2(pcVar2,"d%06d.o",var_3);
  var_3 = var_3 + 1;
  abfd = (type_2 *)var_4(pcVar2,parent);
  var_5(pep_details->object_target,abfd);
  var_6(abfd);
  var_7(abfd,1);
  (*abfd->xvec->_bfd_set_arch_mach)(abfd,pep_details->bfd_arch,0);
  symptr = 0;
  align = 0x14;
  symtab = (type_5 **)var_1();
  paVar3 = var_8(abfd,".idata$4",0x100,align);
  paVar4 = var_8(abfd,".idata$5",0x100,align);
  sec = var_8(abfd,".idata$7",0x100,align);
  pcVar2 = "";
  if (pep_details->underscored != 0) {
    pcVar2 = "_";
  }
  var_9(abfd,pcVar2,dll_symname,"_iname",sec,2,in_stack_ffffffc0);
  var_10(abfd,paVar3,8,0);
  puVar5 = (type_4 *)var_1(8);
  paVar3->contents = puVar5;
  puVar5[0] = '\0';
  puVar5[1] = '\0';
  puVar5[2] = '\0';
  puVar5[3] = '\0';
  puVar5[4] = '\0';
  puVar5[5] = '\0';
  puVar5[6] = '\0';
  puVar5[7] = '\0';
  var_10(abfd,paVar4,8,0);
  puVar6 = (type_4 *)var_1(8);
  paVar4->contents = puVar6;
  puVar6[0] = '\0';
  puVar6[1] = '\0';
  puVar6[2] = '\0';
  puVar6[3] = '\0';
  puVar6[4] = '\0';
  puVar6[5] = '\0';
  puVar6[6] = '\0';
  puVar6[7] = '\0';
  var_12 = var_11(dll_filename);
  var_13 = var_12 + 1;
  uVar8 = var_13;
  if ((var_13 & 1) != 0) {
    uVar8 = var_12 + 2;
    var_12 = var_13;
  }
  var_10(abfd,sec,uVar8,(int)uVar8 >> 0x1f);
  __dest = (type_4 *)var_1(uVar8);
  sec->contents = __dest;
  var_14((char *)__dest,dll_filename);
  __dest[var_12] = '\0';
  var_15(abfd,symtab,symptr);
  var_16(abfd,paVar3,puVar5,0,0,8,0);
  var_16(abfd,paVar4,puVar6,0,0,8,0);
  var_16(abfd,sec,__dest,0,0,uVar8,(int)uVar8 >> 0x1f);
  var_17(abfd);
  return abfd;
}


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

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

int __regparm3 MASKED(undefined4 param_1)

{
  uint uVar1;
  char *pcVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  undefined4 *puVar7;
  undefined4 *puVar8;
  size_t sVar9;
  uint uVar10;
  
  pcVar2 = (char *)xmalloc(0x14);
  sprintf(pcVar2,"d%06d.o",DAT_001d0188);
  DAT_001d0188 = DAT_001d0188 + 1;
  iVar3 = bfd_create(pcVar2,param_1);
  bfd_find_target(*(undefined4 *)(DAT_001d01c4 + 4),iVar3);
  bfd_make_writable(iVar3);
  bfd_set_format(iVar3,1);
  (**(code **)(*(int *)(iVar3 + 4) + 0x154))(iVar3,*(undefined4 *)(DAT_001d01c4 + 0x10),0);
  DAT_001d018c = 0;
  DAT_001d0190 = xmalloc(0x14);
  iVar4 = FUN_0005be40();
  iVar5 = FUN_0005be40();
  iVar6 = FUN_0005be40();
  FUN_0005bd80("_iname",iVar6,2);
  bfd_set_section_size(iVar3,iVar4,8,0);
  puVar7 = (undefined4 *)xmalloc(8);
  *(undefined4 **)(iVar4 + 0x84) = puVar7;
  *puVar7 = 0;
  puVar7[1] = 0;
  bfd_set_section_size(iVar3,iVar5,8,0);
  puVar8 = (undefined4 *)xmalloc(8);
  *(undefined4 **)(iVar5 + 0x84) = puVar8;
  *puVar8 = 0;
  puVar8[1] = 0;
  sVar9 = strlen(DAT_001d0184);
  uVar1 = sVar9 + 1;
  uVar10 = uVar1;
  if ((uVar1 & 1) != 0) {
    uVar10 = sVar9 + 2;
    sVar9 = uVar1;
  }
  bfd_set_section_size(iVar3,iVar6,uVar10,(int)uVar10 >> 0x1f);
  pcVar2 = (char *)xmalloc(uVar10);
  *(char **)(iVar6 + 0x84) = pcVar2;
  strcpy(pcVar2,DAT_001d0184);
  pcVar2[sVar9] = '\0';
  bfd_set_symtab(iVar3,DAT_001d0190,DAT_001d018c);
  bfd_set_section_contents(iVar3,iVar4,puVar7,0,0,8,0);
  bfd_set_section_contents(iVar3,iVar5,puVar8,0,0,8,0);
  bfd_set_section_contents(iVar3,iVar6,pcVar2,0,0,uVar10,(int)uVar10 >> 0x1f);
  bfd_make_readable(iVar3);
  return iVar3;
}

