
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* DWARF original name: sized_write_ehdr<32, true>
   DWARF original prototype: void sized_write_ehdr<32,_true>(Dwp_output_file * this) */

void __thiscall gold::Dwp_output_file::sized_write_ehdr<32,_true>(Dwp_output_file *this)

{
  uint uVar1;
  char *pcVar2;
  ushort uVar3;
  size_t sVar4;
  char *format;
  uchar e_ident [16];
  uchar buf [52];
  
  buf[4] = '\x01';
  buf[5] = '\x02';
  buf[6] = '\x01';
  buf[7] = '\0';
  buf[8] = '\0';
  buf[9] = '\0';
  buf[10] = '\0';
  buf[0xb] = '\0';
  buf[0xc] = '\0';
  buf[0xd] = '\0';
  buf[0xe] = '\0';
  buf[0xf] = '\0';
  builtin_memcpy(buf,"\x7fELF",4);
  buf[0x10] = '\0';
  buf[0x11] = '\x01';
  uVar3 = (ushort)this->machine_;
  buf[0x14] = '\0';
  buf[0x15] = '\0';
  buf[0x16] = '\0';
  buf[0x17] = '\x01';
  buf._18_2_ = uVar3 << 8 | uVar3 >> 8;
  buf[0x18] = '\0';
  buf[0x19] = '\0';
  buf[0x1a] = '\0';
  buf[0x1b] = '\0';
  uVar1 = (uint)this->shoff_;
  buf[0x1c] = '\0';
  buf[0x1d] = '\0';
  buf[0x1e] = '\0';
  buf[0x1f] = '\0';
  buf._32_4_ = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
  uVar3 = (ushort)this->shnum_;
  buf._48_2_ = uVar3 << 8 | uVar3 >> 8;
  buf[0x24] = '\0';
  buf[0x25] = '\0';
  buf[0x26] = '\0';
  buf[0x27] = '\0';
  if (0xfeff < this->shnum_) {
    buf._48_2_ = 0;
  }
  buf[0x28] = '\0';
  buf[0x29] = '4';
  buf[0x2a] = '\0';
  buf[0x2b] = '\0';
  buf[0x2c] = '\0';
  buf[0x2d] = '\0';
  buf[0x2e] = '\0';
  buf[0x2f] = '(';
  uVar3 = (ushort)this->shstrndx_;
  buf._50_2_ = uVar3 << 8 | uVar3 >> 8;
  if (0xfeff < this->shstrndx_) {
    buf._50_2_ = 0xffff;
  }
  fseek((FILE *)this->fd_,0,0);
  sVar4 = fwrite(buf,1,0x34,(FILE *)this->fd_);
  if (0x33 < sVar4) {
    return;
  }
  pcVar2 = this->name_;
  format = (char *)gettext("%s: error writing ELF header");
                    /* WARNING: Subroutine does not return */
  gold_fatal(format,pcVar2);
}



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

void FUN_0004a870(undefined4 *param_1)

{
  uint uVar1;
  undefined4 uVar2;
  ushort uVar3;
  size_t sVar4;
  undefined4 uVar5;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined2 local_30;
  ushort local_2e;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  uint local_20;
  undefined4 local_1c;
  undefined4 local_18;
  undefined4 local_14;
  ushort local_10;
  ushort local_e;
  undefined4 uStack_c;
  
  uStack_c = 0x4a879;
  local_3c = 0x10201;
  local_38 = 0;
  local_34 = 0;
  local_40 = 0x464c457f;
  local_30 = 0x100;
  local_2c = 0x1000000;
  local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;
  local_28 = 0;
  uVar1 = param_1[0x10];
  local_24 = 0;
  local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
  uVar3 = (ushort)param_1[9];
  local_10 = uVar3 << 8 | uVar3 >> 8;
  local_1c = 0;
  if (0xfeff < (uint)param_1[9]) {
    local_10 = 0;
  }
  local_18 = 0x3400;
  local_14 = 0x28000000;
  uVar3 = (ushort)param_1[0x12];
  local_e = uVar3 << 8 | uVar3 >> 8;
  if (0xfeff < (uint)param_1[0x12]) {
    local_e = 0xffff;
  }
  fseek((FILE *)param_1[6],0,0);
  sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);
  if (0x33 < sVar4) {
    return;
  }
  uVar2 = *param_1;
  uVar5 = gettext("%s: error writing ELF header");
                    /* WARNING: Subroutine does not return */
  FUN_00065450(uVar5,uVar2);
}


PUSH ESI
XOR EAX,EAX
PUSH EBX
CALL 0x00035840
ADD EBX,0x344787
SUB ESP,0x58
MOV word ptr [ESP + 0x1e],AX
MOV EAX,0x201
MOV ESI,dword ptr [ESP + 0x64]
MOV dword ptr [ESP + 0x16],0x0
MOV word ptr [ESP + 0x14],AX
MOV EDX,dword ptr [ESI + 0x24]
MOV byte ptr [ESP + 0x16],0x1
MOV EAX,dword ptr [ESP + 0x14]
MOV dword ptr [ESP + 0x1a],0x0
MOV dword ptr [ESP + 0x24],EAX
MOV EAX,dword ptr [ESP + 0x18]
MOV dword ptr [ESP + 0x10],0x464c457f
MOV dword ptr [ESP + 0x28],EAX
MOV EAX,dword ptr [ESP + 0x1c]
MOV dword ptr [ESP + 0x20],0x464c457f
MOV dword ptr [ESP + 0x2c],EAX
MOV EAX,0x100
MOV word ptr [ESP + 0x30],AX
MOVZX EAX,word ptr [ESI + 0x4]
MOV dword ptr [ESP + 0x34],0x1000000
ROL AX,0x8
MOV dword ptr [ESP + 0x38],0x0
MOV word ptr [ESP + 0x32],AX
MOV EAX,dword ptr [ESI + 0x40]
MOV dword ptr [ESP + 0x3c],0x0
BSWAP EAX
MOV dword ptr [ESP + 0x40],EAX
MOV EAX,EDX
ROL AX,0x8
CMP EDX,0xff00
MOV EDX,0x0
MOV dword ptr [ESP + 0x44],0x0
CMOVNC EAX,EDX
MOV EDX,dword ptr [ESI + 0x48]
MOV dword ptr [ESP + 0x48],0x3400
MOV dword ptr [ESP + 0x4c],0x28000000
MOV word ptr [ESP + 0x50],AX
MOV EAX,EDX
ROL AX,0x8
CMP EDX,0xff00
MOV EDX,0xffffffff
CMOVNC EAX,EDX
MOV word ptr [ESP + 0x52],AX
PUSH 0x0
PUSH 0x0
PUSH dword ptr [ESI + 0x18]
CALL 0x000294f0
ADD ESP,0x10
PUSH dword ptr [ESI + 0x18]
PUSH 0x34
PUSH 0x1
LEA EAX,[ESP + 0x28]
PUSH EAX
CALL 0x00029730
ADD ESP,0x10
CMP EAX,0x33
JBE 0x0004a988
ADD ESP,0x54
POP EBX
POP ESI
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xffef17e9]
MOV ESI,dword ptr [ESI]
PUSH EAX
CALL 0x000293b0
POP EDX
POP ECX
PUSH ESI
PUSH EAX
CALL 0x00065450
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0004a870(undefined4 *param_1)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined4 uVar5;\n  undefined4 local_40;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined2 local_30;\n  ushort local_2e;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  uint local_20;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  ushort local_10;\n  ushort local_e;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x4a879;\n  local_3c = 0x10201;\n  local_38 = 0;\n  local_34 = 0;\n  local_40 = 0x464c457f;\n  local_30 = 0x100;\n  local_2c = 0x1000000;\n  local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  local_28 = 0;\n  uVar1 = param_1[0x10];\n  local_24 = 0;\n  local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n  uVar3 = (ushort)param_1[9];\n  local_10 = uVar3 << 8 | uVar3 >> 8;\n  local_1c = 0;\n  if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }\n  local_18 = 0x3400;\n  local_14 = 0x28000000;\n  uVar3 = (ushort)param_1[0x12];\n  local_e = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }\n  fseek((FILE *)param_1[6],0,0);\n  sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);\n  if (0x33 < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    /* WARNING: Subroutine does not return */\n  FUN_00065450(uVar5,uVar2);\n}\n\n" comment (function_definition "void FUN_0004a870(undefined4 *param_1)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined4 uVar5;\n  undefined4 local_40;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined2 local_30;\n  ushort local_2e;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  uint local_20;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  ushort local_10;\n  ushort local_e;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x4a879;\n  local_3c = 0x10201;\n  local_38 = 0;\n  local_34 = 0;\n  local_40 = 0x464c457f;\n  local_30 = 0x100;\n  local_2c = 0x1000000;\n  local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  local_28 = 0;\n  uVar1 = param_1[0x10];\n  local_24 = 0;\n  local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n  uVar3 = (ushort)param_1[9];\n  local_10 = uVar3 << 8 | uVar3 >> 8;\n  local_1c = 0;\n  if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }\n  local_18 = 0x3400;\n  local_14 = 0x28000000;\n  uVar3 = (ushort)param_1[0x12];\n  local_e = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }\n  fseek((FILE *)param_1[6],0,0);\n  sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);\n  if (0x33 < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    /* WARNING: Subroutine does not return */\n  FUN_00065450(uVar5,uVar2);\n}" primitive_type (function_declarator "FUN_0004a870(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined4 uVar5;\n  undefined4 local_40;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined2 local_30;\n  ushort local_2e;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  uint local_20;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  ushort local_10;\n  ushort local_e;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x4a879;\n  local_3c = 0x10201;\n  local_38 = 0;\n  local_34 = 0;\n  local_40 = 0x464c457f;\n  local_30 = 0x100;\n  local_2c = 0x1000000;\n  local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  local_28 = 0;\n  uVar1 = param_1[0x10];\n  local_24 = 0;\n  local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n  uVar3 = (ushort)param_1[9];\n  local_10 = uVar3 << 8 | uVar3 >> 8;\n  local_1c = 0;\n  if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }\n  local_18 = 0x3400;\n  local_14 = 0x28000000;\n  uVar3 = (ushort)param_1[0x12];\n  local_e = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }\n  fseek((FILE *)param_1[6],0,0);\n  sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);\n  if (0x33 < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    /* WARNING: Subroutine does not return */\n  FUN_00065450(uVar5,uVar2);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (declaration "undefined4 local_3c;" type_identifier identifier ;) (declaration "undefined4 local_38;" type_identifier identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined2 local_30;" type_identifier identifier ;) (declaration "ushort local_2e;" type_identifier identifier ;) (declaration "undefined4 local_2c;" type_identifier identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "undefined4 local_24;" type_identifier identifier ;) (declaration "uint local_20;" type_identifier identifier ;) (declaration "undefined4 local_1c;" type_identifier identifier ;) (declaration "undefined4 local_18;" type_identifier identifier ;) (declaration "undefined4 local_14;" type_identifier identifier ;) (declaration "ushort local_10;" type_identifier identifier ;) (declaration "ushort local_e;" type_identifier identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x4a879;" (assignment_expression "uStack_c = 0x4a879" identifier = number_literal) ;) (expression_statement "local_3c = 0x10201;" (assignment_expression "local_3c = 0x10201" identifier = number_literal) ;) (expression_statement "local_38 = 0;" (assignment_expression "local_38 = 0" identifier = number_literal) ;) (expression_statement "local_34 = 0;" (assignment_expression "local_34 = 0" identifier = number_literal) ;) (expression_statement "local_40 = 0x464c457f;" (assignment_expression "local_40 = 0x464c457f" identifier = number_literal) ;) (expression_statement "local_30 = 0x100;" (assignment_expression "local_30 = 0x100" identifier = number_literal) ;) (expression_statement "local_2c = 0x1000000;" (assignment_expression "local_2c = 0x1000000" identifier = number_literal) ;) (expression_statement "local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;" (assignment_expression "local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" identifier = (binary_expression "*(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" (binary_expression "*(ushort *)(param_1 + 1) << 8" (pointer_expression "*(ushort *)(param_1 + 1)" * (cast_expression "(ushort *)(param_1 + 1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) << number_literal) | (binary_expression "*(ushort *)(param_1 + 1) >> 8" (pointer_expression "*(ushort *)(param_1 + 1)" * (cast_expression "(ushort *)(param_1 + 1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) >> number_literal))) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "uVar1 = param_1[0x10];" (assignment_expression "uVar1 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;" (assignment_expression "local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" identifier = (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8" (binary_expression "uVar1 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar1 & 0xff0000) >> 8" (parenthesized_expression "(uVar1 & 0xff0000)" ( (binary_expression "uVar1 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff00) << 8" (parenthesized_expression "(uVar1 & 0xff00)" ( (binary_expression "uVar1 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar1 << 0x18" identifier << number_literal))) ;) (expression_statement "uVar3 = (ushort)param_1[9];" (assignment_expression "uVar3 = (ushort)param_1[9]" identifier = (cast_expression "(ushort)param_1[9]" ( (type_descriptor "ushort" type_identifier) ) (subscript_expression "param_1[9]" identifier [ number_literal ]))) ;) (expression_statement "local_10 = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_10 = uVar3 << 8 | uVar3 >> 8" identifier = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (expression_statement "local_1c = 0;" (assignment_expression "local_1c = 0" identifier = number_literal) ;) (if_statement "if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }" if (parenthesized_expression "(0xfeff < (uint)param_1[9])" ( (binary_expression "0xfeff < (uint)param_1[9]" number_literal < (cast_expression "(uint)param_1[9]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[9]" identifier [ number_literal ]))) )) (compound_statement "{\n    local_10 = 0;\n  }" { (expression_statement "local_10 = 0;" (assignment_expression "local_10 = 0" identifier = number_literal) ;) })) (expression_statement "local_18 = 0x3400;" (assignment_expression "local_18 = 0x3400" identifier = number_literal) ;) (expression_statement "local_14 = 0x28000000;" (assignment_expression "local_14 = 0x28000000" identifier = number_literal) ;) (expression_statement "uVar3 = (ushort)param_1[0x12];" (assignment_expression "uVar3 = (ushort)param_1[0x12]" identifier = (cast_expression "(ushort)param_1[0x12]" ( (type_descriptor "ushort" type_identifier) ) (subscript_expression "param_1[0x12]" identifier [ number_literal ]))) ;) (expression_statement "local_e = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_e = uVar3 << 8 | uVar3 >> 8" identifier = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (if_statement "if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }" if (parenthesized_expression "(0xfeff < (uint)param_1[0x12])" ( (binary_expression "0xfeff < (uint)param_1[0x12]" number_literal < (cast_expression "(uint)param_1[0x12]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[0x12]" identifier [ number_literal ]))) )) (compound_statement "{\n    local_e = 0xffff;\n  }" { (expression_statement "local_e = 0xffff;" (assignment_expression "local_e = 0xffff" identifier = number_literal) ;) })) (expression_statement "fseek((FILE *)param_1[6],0,0);" (call_expression "fseek((FILE *)param_1[6],0,0)" identifier (argument_list "((FILE *)param_1[6],0,0)" ( (cast_expression "(FILE *)param_1[6]" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ])) , number_literal , number_literal ))) ;) (expression_statement "sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);" (assignment_expression "sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6])" identifier = (call_expression "fwrite(&local_40,1,0x34,(FILE *)param_1[6])" identifier (argument_list "(&local_40,1,0x34,(FILE *)param_1[6])" ( (pointer_expression "&local_40" & identifier) , number_literal , number_literal , (cast_expression "(FILE *)param_1[6]" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ])) )))) ;) (if_statement "if (0x33 < sVar4) {\n    return;\n  }" if (parenthesized_expression "(0x33 < sVar4)" ( (binary_expression "0x33 < sVar4" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = gettext("%s: error writing ELF header");" (assignment_expression "uVar5 = gettext("%s: error writing ELF header")" identifier = (call_expression "gettext("%s: error writing ELF header")" identifier (argument_list "("%s: error writing ELF header")" ( (string_literal ""%s: error writing ELF header"" " string_content ") )))) ;) comment (expression_statement "FUN_00065450(uVar5,uVar2);" (call_expression "FUN_00065450(uVar5,uVar2)" identifier (argument_list "(uVar5,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* DWARF original name: sized_write_ehdr<32, true>\n   DWARF original prototype: void sized_write_ehdr<32,_true>(Dwp_output_file * this) */\n\nvoid __thiscall gold::Dwp_output_file::sized_write_ehdr<32,_true>(Dwp_output_file *this)\n\n{\n  uint uVar1;\n  char *pcVar2;\n  ushort uVar3;\n  size_t sVar4;\n  char *format;\n  uchar e_ident [16];\n  uchar buf [52];\n  \n  buf[4] = '\x01';\n  buf[5] = '\x02';\n  buf[6] = '\x01';\n  buf[7] = '\0';\n  buf[8] = '\0';\n  buf[9] = '\0';\n  buf[10] = '\0';\n  buf[0xb] = '\0';\n  buf[0xc] = '\0';\n  buf[0xd] = '\0';\n  buf[0xe] = '\0';\n  buf[0xf] = '\0';\n  builtin_memcpy(buf,"\x7fELF",4);\n  buf[0x10] = '\0';\n  buf[0x11] = '\x01';\n  uVar3 = (ushort)this->machine_;\n  buf[0x14] = '\0';\n  buf[0x15] = '\0';\n  buf[0x16] = '\0';\n  buf[0x17] = '\x01';\n  buf._18_2_ = uVar3 << 8 | uVar3 >> 8;\n  buf[0x18] = '\0';\n  buf[0x19] = '\0';\n  buf[0x1a] = '\0';\n  buf[0x1b] = '\0';\n  uVar1 = (uint)this->shoff_;\n  buf[0x1c] = '\0';\n  buf[0x1d] = '\0';\n  buf[0x1e] = '\0';\n  buf[0x1f] = '\0';\n  buf._32_4_ = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n  uVar3 = (ushort)this->shnum_;\n  buf._48_2_ = uVar3 << 8 | uVar3 >> 8;\n  buf[0x24] = '\0';\n  buf[0x25] = '\0';\n  buf[0x26] = '\0';\n  buf[0x27] = '\0';\n  if (0xfeff < this->shnum_) {\n    buf._48_2_ = 0;\n  }\n  buf[0x28] = '\0';\n  buf[0x29] = '4';\n  buf[0x2a] = '\0';\n  buf[0x2b] = '\0';\n  buf[0x2c] = '\0';\n  buf[0x2d] = '\0';\n  buf[0x2e] = '\0';\n  buf[0x2f] = '(';\n  uVar3 = (ushort)this->shstrndx_;\n  buf._50_2_ = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < this->shstrndx_) {\n    buf._50_2_ = 0xffff;\n  }\n  fseek((FILE *)this->fd_,0,0);\n  sVar4 = fwrite(buf,1,0x34,(FILE *)this->fd_);\n  if (0x33 < sVar4) {\n    return;\n  }\n  pcVar2 = this->name_;\n  format = (char *)gettext("%s: error writing ELF header");\n                    /* WARNING: Subroutine does not return */\n  gold_fatal(format,pcVar2);\n}\n\n" comment comment (declaration "void __thiscall gold::Dwp_output_file::sized_write_ehdr<32,_true>(Dwp_output_file *this)\n\n{\n  uint uVar1;" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "gold::Dwp_output_file::" identifier : : identifier : :) identifier (ERROR "<32" < number_literal) , (ERROR "_true>(Dwp_output_file *this)\n\n{\n  uint" identifier > ( identifier (pointer_declarator "*this" * identifier) ) { identifier) identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "char *format;" primitive_type (pointer_declarator "*format" * identifier) ;) (declaration "uchar e_ident [16];" type_identifier (array_declarator "e_ident [16]" identifier [ number_literal ]) ;) (declaration "uchar buf [52];" type_identifier (array_declarator "buf [52]" identifier [ number_literal ]) ;) (expression_statement "buf[4] = '\x01';" (assignment_expression "buf[4] = '\x01'" (subscript_expression "buf[4]" identifier [ number_literal ]) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "buf[5] = '\x02';" (assignment_expression "buf[5] = '\x02'" (subscript_expression "buf[5]" identifier [ number_literal ]) = (char_literal "'\x02'" ' escape_sequence ')) ;) (expression_statement "buf[6] = '\x01';" (assignment_expression "buf[6] = '\x01'" (subscript_expression "buf[6]" identifier [ number_literal ]) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "buf[7] = '\0';" (assignment_expression "buf[7] = '\0'" (subscript_expression "buf[7]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[8] = '\0';" (assignment_expression "buf[8] = '\0'" (subscript_expression "buf[8]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[9] = '\0';" (assignment_expression "buf[9] = '\0'" (subscript_expression "buf[9]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[10] = '\0';" (assignment_expression "buf[10] = '\0'" (subscript_expression "buf[10]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0xb] = '\0';" (assignment_expression "buf[0xb] = '\0'" (subscript_expression "buf[0xb]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0xc] = '\0';" (assignment_expression "buf[0xc] = '\0'" (subscript_expression "buf[0xc]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0xd] = '\0';" (assignment_expression "buf[0xd] = '\0'" (subscript_expression "buf[0xd]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0xe] = '\0';" (assignment_expression "buf[0xe] = '\0'" (subscript_expression "buf[0xe]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0xf] = '\0';" (assignment_expression "buf[0xf] = '\0'" (subscript_expression "buf[0xf]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "builtin_memcpy(buf,"\x7fELF",4);" (call_expression "builtin_memcpy(buf,"\x7fELF",4)" identifier (argument_list "(buf,"\x7fELF",4)" ( identifier , (string_literal ""\x7fELF"" " escape_sequence string_content ") , number_literal ))) ;) (expression_statement "buf[0x10] = '\0';" (assignment_expression "buf[0x10] = '\0'" (subscript_expression "buf[0x10]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x11] = '\x01';" (assignment_expression "buf[0x11] = '\x01'" (subscript_expression "buf[0x11]" identifier [ number_literal ]) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "uVar3 = (ushort)this->machine_;" (assignment_expression "uVar3 = (ushort)this->machine_" identifier = (cast_expression "(ushort)this->machine_" ( (type_descriptor "ushort" type_identifier) ) (field_expression "this->machine_" identifier -> field_identifier))) ;) (expression_statement "buf[0x14] = '\0';" (assignment_expression "buf[0x14] = '\0'" (subscript_expression "buf[0x14]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x15] = '\0';" (assignment_expression "buf[0x15] = '\0'" (subscript_expression "buf[0x15]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x16] = '\0';" (assignment_expression "buf[0x16] = '\0'" (subscript_expression "buf[0x16]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x17] = '\x01';" (assignment_expression "buf[0x17] = '\x01'" (subscript_expression "buf[0x17]" identifier [ number_literal ]) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "buf._18_2_ = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "buf._18_2_ = uVar3 << 8 | uVar3 >> 8" (field_expression "buf._18_2_" identifier . field_identifier) = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (expression_statement "buf[0x18] = '\0';" (assignment_expression "buf[0x18] = '\0'" (subscript_expression "buf[0x18]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x19] = '\0';" (assignment_expression "buf[0x19] = '\0'" (subscript_expression "buf[0x19]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1a] = '\0';" (assignment_expression "buf[0x1a] = '\0'" (subscript_expression "buf[0x1a]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1b] = '\0';" (assignment_expression "buf[0x1b] = '\0'" (subscript_expression "buf[0x1b]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "uVar1 = (uint)this->shoff_;" (assignment_expression "uVar1 = (uint)this->shoff_" identifier = (cast_expression "(uint)this->shoff_" ( (type_descriptor "uint" type_identifier) ) (field_expression "this->shoff_" identifier -> field_identifier))) ;) (expression_statement "buf[0x1c] = '\0';" (assignment_expression "buf[0x1c] = '\0'" (subscript_expression "buf[0x1c]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1d] = '\0';" (assignment_expression "buf[0x1d] = '\0'" (subscript_expression "buf[0x1d]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1e] = '\0';" (assignment_expression "buf[0x1e] = '\0'" (subscript_expression "buf[0x1e]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x1f] = '\0';" (assignment_expression "buf[0x1f] = '\0'" (subscript_expression "buf[0x1f]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf._32_4_ = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;" (assignment_expression "buf._32_4_ = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" (field_expression "buf._32_4_" identifier . field_identifier) = (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8" (binary_expression "uVar1 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar1 & 0xff0000) >> 8" (parenthesized_expression "(uVar1 & 0xff0000)" ( (binary_expression "uVar1 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff00) << 8" (parenthesized_expression "(uVar1 & 0xff00)" ( (binary_expression "uVar1 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar1 << 0x18" identifier << number_literal))) ;) (expression_statement "uVar3 = (ushort)this->shnum_;" (assignment_expression "uVar3 = (ushort)this->shnum_" identifier = (cast_expression "(ushort)this->shnum_" ( (type_descriptor "ushort" type_identifier) ) (field_expression "this->shnum_" identifier -> field_identifier))) ;) (expression_statement "buf._48_2_ = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "buf._48_2_ = uVar3 << 8 | uVar3 >> 8" (field_expression "buf._48_2_" identifier . field_identifier) = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (expression_statement "buf[0x24] = '\0';" (assignment_expression "buf[0x24] = '\0'" (subscript_expression "buf[0x24]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x25] = '\0';" (assignment_expression "buf[0x25] = '\0'" (subscript_expression "buf[0x25]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x26] = '\0';" (assignment_expression "buf[0x26] = '\0'" (subscript_expression "buf[0x26]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x27] = '\0';" (assignment_expression "buf[0x27] = '\0'" (subscript_expression "buf[0x27]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (0xfeff < this->shnum_) {\n    buf._48_2_ = 0;\n  }" if (parenthesized_expression "(0xfeff < this->shnum_)" ( (binary_expression "0xfeff < this->shnum_" number_literal < (field_expression "this->shnum_" identifier -> field_identifier)) )) (compound_statement "{\n    buf._48_2_ = 0;\n  }" { (expression_statement "buf._48_2_ = 0;" (assignment_expression "buf._48_2_ = 0" (field_expression "buf._48_2_" identifier . field_identifier) = number_literal) ;) })) (expression_statement "buf[0x28] = '\0';" (assignment_expression "buf[0x28] = '\0'" (subscript_expression "buf[0x28]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x29] = '4';" (assignment_expression "buf[0x29] = '4'" (subscript_expression "buf[0x29]" identifier [ number_literal ]) = (char_literal "'4'" ' character ')) ;) (expression_statement "buf[0x2a] = '\0';" (assignment_expression "buf[0x2a] = '\0'" (subscript_expression "buf[0x2a]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x2b] = '\0';" (assignment_expression "buf[0x2b] = '\0'" (subscript_expression "buf[0x2b]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x2c] = '\0';" (assignment_expression "buf[0x2c] = '\0'" (subscript_expression "buf[0x2c]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x2d] = '\0';" (assignment_expression "buf[0x2d] = '\0'" (subscript_expression "buf[0x2d]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x2e] = '\0';" (assignment_expression "buf[0x2e] = '\0'" (subscript_expression "buf[0x2e]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "buf[0x2f] = '(';" (assignment_expression "buf[0x2f] = '('" (subscript_expression "buf[0x2f]" identifier [ number_literal ]) = (char_literal "'('" ' character ')) ;) (expression_statement "uVar3 = (ushort)this->shstrndx_;" (assignment_expression "uVar3 = (ushort)this->shstrndx_" identifier = (cast_expression "(ushort)this->shstrndx_" ( (type_descriptor "ushort" type_identifier) ) (field_expression "this->shstrndx_" identifier -> field_identifier))) ;) (expression_statement "buf._50_2_ = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "buf._50_2_ = uVar3 << 8 | uVar3 >> 8" (field_expression "buf._50_2_" identifier . field_identifier) = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (if_statement "if (0xfeff < this->shstrndx_) {\n    buf._50_2_ = 0xffff;\n  }" if (parenthesized_expression "(0xfeff < this->shstrndx_)" ( (binary_expression "0xfeff < this->shstrndx_" number_literal < (field_expression "this->shstrndx_" identifier -> field_identifier)) )) (compound_statement "{\n    buf._50_2_ = 0xffff;\n  }" { (expression_statement "buf._50_2_ = 0xffff;" (assignment_expression "buf._50_2_ = 0xffff" (field_expression "buf._50_2_" identifier . field_identifier) = number_literal) ;) })) (expression_statement "fseek((FILE *)this->fd_,0,0);" (call_expression "fseek((FILE *)this->fd_,0,0)" identifier (argument_list "((FILE *)this->fd_,0,0)" ( (cast_expression "(FILE *)this->fd_" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "this->fd_" identifier -> field_identifier)) , number_literal , number_literal ))) ;) (expression_statement "sVar4 = fwrite(buf,1,0x34,(FILE *)this->fd_);" (assignment_expression "sVar4 = fwrite(buf,1,0x34,(FILE *)this->fd_)" identifier = (call_expression "fwrite(buf,1,0x34,(FILE *)this->fd_)" identifier (argument_list "(buf,1,0x34,(FILE *)this->fd_)" ( identifier , number_literal , number_literal , (cast_expression "(FILE *)this->fd_" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "this->fd_" identifier -> field_identifier)) )))) ;) (if_statement "if (0x33 < sVar4) {\n    return;\n  }" if (parenthesized_expression "(0x33 < sVar4)" ( (binary_expression "0x33 < sVar4" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "pcVar2 = this->name_;" (assignment_expression "pcVar2 = this->name_" identifier = (field_expression "this->name_" identifier -> field_identifier)) ;) (expression_statement "format = (char *)gettext("%s: error writing ELF header");" (assignment_expression "format = (char *)gettext("%s: error writing ELF header")" identifier = (cast_expression "(char *)gettext("%s: error writing ELF header")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "gettext("%s: error writing ELF header")" identifier (argument_list "("%s: error writing ELF header")" ( (string_literal ""%s: error writing ELF header"" " string_content ") ))))) ;) comment (expression_statement "gold_fatal(format,pcVar2);" (call_expression "gold_fatal(format,pcVar2)" identifier (argument_list "(format,pcVar2)" ( identifier , identifier ))) ;) (ERROR "}" }))
(translation_unit "void FUN_0004a870(undefined4 *param_1)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined4 uVar5;\n  undefined4 local_40;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined2 local_30;\n  ushort local_2e;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  uint local_20;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  ushort local_10;\n  ushort local_e;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x4a879;\n  local_3c = 0x10201;\n  local_38 = 0;\n  local_34 = 0;\n  local_40 = 0x464c457f;\n  local_30 = 0x100;\n  local_2c = 0x1000000;\n  local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  local_28 = 0;\n  uVar1 = param_1[0x10];\n  local_24 = 0;\n  local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n  uVar3 = (ushort)param_1[9];\n  local_10 = uVar3 << 8 | uVar3 >> 8;\n  local_1c = 0;\n  if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }\n  local_18 = 0x3400;\n  local_14 = 0x28000000;\n  uVar3 = (ushort)param_1[0x12];\n  local_e = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }\n  fseek((FILE *)param_1[6],0,0);\n  sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);\n  if (0x33 < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    \n  FUN_00065450(uVar5,uVar2);\n}\n\n" (function_definition "void FUN_0004a870(undefined4 *param_1)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined4 uVar5;\n  undefined4 local_40;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined2 local_30;\n  ushort local_2e;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  uint local_20;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  ushort local_10;\n  ushort local_e;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x4a879;\n  local_3c = 0x10201;\n  local_38 = 0;\n  local_34 = 0;\n  local_40 = 0x464c457f;\n  local_30 = 0x100;\n  local_2c = 0x1000000;\n  local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  local_28 = 0;\n  uVar1 = param_1[0x10];\n  local_24 = 0;\n  local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n  uVar3 = (ushort)param_1[9];\n  local_10 = uVar3 << 8 | uVar3 >> 8;\n  local_1c = 0;\n  if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }\n  local_18 = 0x3400;\n  local_14 = 0x28000000;\n  uVar3 = (ushort)param_1[0x12];\n  local_e = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }\n  fseek((FILE *)param_1[6],0,0);\n  sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);\n  if (0x33 < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    \n  FUN_00065450(uVar5,uVar2);\n}" primitive_type (function_declarator "FUN_0004a870(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined4 uVar5;\n  undefined4 local_40;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined2 local_30;\n  ushort local_2e;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  uint local_20;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  ushort local_10;\n  ushort local_e;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x4a879;\n  local_3c = 0x10201;\n  local_38 = 0;\n  local_34 = 0;\n  local_40 = 0x464c457f;\n  local_30 = 0x100;\n  local_2c = 0x1000000;\n  local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  local_28 = 0;\n  uVar1 = param_1[0x10];\n  local_24 = 0;\n  local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n  uVar3 = (ushort)param_1[9];\n  local_10 = uVar3 << 8 | uVar3 >> 8;\n  local_1c = 0;\n  if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }\n  local_18 = 0x3400;\n  local_14 = 0x28000000;\n  uVar3 = (ushort)param_1[0x12];\n  local_e = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }\n  fseek((FILE *)param_1[6],0,0);\n  sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);\n  if (0x33 < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    \n  FUN_00065450(uVar5,uVar2);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (declaration "undefined4 local_3c;" type_identifier identifier ;) (declaration "undefined4 local_38;" type_identifier identifier ;) (declaration "undefined4 local_34;" type_identifier identifier ;) (declaration "undefined2 local_30;" type_identifier identifier ;) (declaration "ushort local_2e;" type_identifier identifier ;) (declaration "undefined4 local_2c;" type_identifier identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "undefined4 local_24;" type_identifier identifier ;) (declaration "uint local_20;" type_identifier identifier ;) (declaration "undefined4 local_1c;" type_identifier identifier ;) (declaration "undefined4 local_18;" type_identifier identifier ;) (declaration "undefined4 local_14;" type_identifier identifier ;) (declaration "ushort local_10;" type_identifier identifier ;) (declaration "ushort local_e;" type_identifier identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x4a879;" (assignment_expression "uStack_c = 0x4a879" identifier = number_literal) ;) (expression_statement "local_3c = 0x10201;" (assignment_expression "local_3c = 0x10201" identifier = number_literal) ;) (expression_statement "local_38 = 0;" (assignment_expression "local_38 = 0" identifier = number_literal) ;) (expression_statement "local_34 = 0;" (assignment_expression "local_34 = 0" identifier = number_literal) ;) (expression_statement "local_40 = 0x464c457f;" (assignment_expression "local_40 = 0x464c457f" identifier = number_literal) ;) (expression_statement "local_30 = 0x100;" (assignment_expression "local_30 = 0x100" identifier = number_literal) ;) (expression_statement "local_2c = 0x1000000;" (assignment_expression "local_2c = 0x1000000" identifier = number_literal) ;) (expression_statement "local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;" (assignment_expression "local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" identifier = (binary_expression "*(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" (binary_expression "*(ushort *)(param_1 + 1) << 8" (pointer_expression "*(ushort *)(param_1 + 1)" * (cast_expression "(ushort *)(param_1 + 1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) << number_literal) | (binary_expression "*(ushort *)(param_1 + 1) >> 8" (pointer_expression "*(ushort *)(param_1 + 1)" * (cast_expression "(ushort *)(param_1 + 1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) >> number_literal))) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "uVar1 = param_1[0x10];" (assignment_expression "uVar1 = param_1[0x10]" identifier = (subscript_expression "param_1[0x10]" identifier [ number_literal ])) ;) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;" (assignment_expression "local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" identifier = (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8" (binary_expression "uVar1 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar1 & 0xff0000) >> 8" (parenthesized_expression "(uVar1 & 0xff0000)" ( (binary_expression "uVar1 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar1 & 0xff00) << 8" (parenthesized_expression "(uVar1 & 0xff00)" ( (binary_expression "uVar1 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar1 << 0x18" identifier << number_literal))) ;) (expression_statement "uVar3 = (ushort)param_1[9];" (assignment_expression "uVar3 = (ushort)param_1[9]" identifier = (cast_expression "(ushort)param_1[9]" ( (type_descriptor "ushort" type_identifier) ) (subscript_expression "param_1[9]" identifier [ number_literal ]))) ;) (expression_statement "local_10 = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_10 = uVar3 << 8 | uVar3 >> 8" identifier = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (expression_statement "local_1c = 0;" (assignment_expression "local_1c = 0" identifier = number_literal) ;) (if_statement "if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }" if (parenthesized_expression "(0xfeff < (uint)param_1[9])" ( (binary_expression "0xfeff < (uint)param_1[9]" number_literal < (cast_expression "(uint)param_1[9]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[9]" identifier [ number_literal ]))) )) (compound_statement "{\n    local_10 = 0;\n  }" { (expression_statement "local_10 = 0;" (assignment_expression "local_10 = 0" identifier = number_literal) ;) })) (expression_statement "local_18 = 0x3400;" (assignment_expression "local_18 = 0x3400" identifier = number_literal) ;) (expression_statement "local_14 = 0x28000000;" (assignment_expression "local_14 = 0x28000000" identifier = number_literal) ;) (expression_statement "uVar3 = (ushort)param_1[0x12];" (assignment_expression "uVar3 = (ushort)param_1[0x12]" identifier = (cast_expression "(ushort)param_1[0x12]" ( (type_descriptor "ushort" type_identifier) ) (subscript_expression "param_1[0x12]" identifier [ number_literal ]))) ;) (expression_statement "local_e = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_e = uVar3 << 8 | uVar3 >> 8" identifier = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (if_statement "if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }" if (parenthesized_expression "(0xfeff < (uint)param_1[0x12])" ( (binary_expression "0xfeff < (uint)param_1[0x12]" number_literal < (cast_expression "(uint)param_1[0x12]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[0x12]" identifier [ number_literal ]))) )) (compound_statement "{\n    local_e = 0xffff;\n  }" { (expression_statement "local_e = 0xffff;" (assignment_expression "local_e = 0xffff" identifier = number_literal) ;) })) (expression_statement "fseek((FILE *)param_1[6],0,0);" (call_expression "fseek((FILE *)param_1[6],0,0)" identifier (argument_list "((FILE *)param_1[6],0,0)" ( (cast_expression "(FILE *)param_1[6]" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ])) , number_literal , number_literal ))) ;) (expression_statement "sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);" (assignment_expression "sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6])" identifier = (call_expression "fwrite(&local_40,1,0x34,(FILE *)param_1[6])" identifier (argument_list "(&local_40,1,0x34,(FILE *)param_1[6])" ( (pointer_expression "&local_40" & identifier) , number_literal , number_literal , (cast_expression "(FILE *)param_1[6]" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ])) )))) ;) (if_statement "if (0x33 < sVar4) {\n    return;\n  }" if (parenthesized_expression "(0x33 < sVar4)" ( (binary_expression "0x33 < sVar4" number_literal < identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar5 = gettext("%s: error writing ELF header");" (assignment_expression "uVar5 = gettext("%s: error writing ELF header")" identifier = (call_expression "gettext("%s: error writing ELF header")" identifier (argument_list "("%s: error writing ELF header")" ( (string_literal ""%s: error writing ELF header"" " string_content ") )))) ;) (expression_statement "FUN_00065450(uVar5,uVar2);" (call_expression "FUN_00065450(uVar5,uVar2)" identifier (argument_list "(uVar5,uVar2)" ( identifier , identifier ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) << LIT) | (binary_expression (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 = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) , LIT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT , LIT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })))
(function_definition "void FUN_0004a870(undefined4 *param_1)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined4 uVar5;\n  undefined4 local_40;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined2 local_30;\n  ushort local_2e;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  uint local_20;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  ushort local_10;\n  ushort local_e;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x4a879;\n  local_3c = 0x10201;\n  local_38 = 0;\n  local_34 = 0;\n  local_40 = 0x464c457f;\n  local_30 = 0x100;\n  local_2c = 0x1000000;\n  local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  local_28 = 0;\n  uVar1 = param_1[0x10];\n  local_24 = 0;\n  local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n  uVar3 = (ushort)param_1[9];\n  local_10 = uVar3 << 8 | uVar3 >> 8;\n  local_1c = 0;\n  if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }\n  local_18 = 0x3400;\n  local_14 = 0x28000000;\n  uVar3 = (ushort)param_1[0x12];\n  local_e = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }\n  fseek((FILE *)param_1[6],0,0);\n  sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);\n  if (0x33 < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    \n  FUN_00065450(uVar5,uVar2);\n}" (primitive_type "void") (function_declarator "FUN_0004a870(undefined4 *param_1)" (identifier "FUN_0004a870") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  ushort uVar3;\n  size_t sVar4;\n  undefined4 uVar5;\n  undefined4 local_40;\n  undefined4 local_3c;\n  undefined4 local_38;\n  undefined4 local_34;\n  undefined2 local_30;\n  ushort local_2e;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  uint local_20;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  ushort local_10;\n  ushort local_e;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x4a879;\n  local_3c = 0x10201;\n  local_38 = 0;\n  local_34 = 0;\n  local_40 = 0x464c457f;\n  local_30 = 0x100;\n  local_2c = 0x1000000;\n  local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;\n  local_28 = 0;\n  uVar1 = param_1[0x10];\n  local_24 = 0;\n  local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;\n  uVar3 = (ushort)param_1[9];\n  local_10 = uVar3 << 8 | uVar3 >> 8;\n  local_1c = 0;\n  if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }\n  local_18 = 0x3400;\n  local_14 = 0x28000000;\n  uVar3 = (ushort)param_1[0x12];\n  local_e = uVar3 << 8 | uVar3 >> 8;\n  if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }\n  fseek((FILE *)param_1[6],0,0);\n  sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);\n  if (0x33 < sVar4) {\n    return;\n  }\n  uVar2 = *param_1;\n  uVar5 = gettext("%s: error writing ELF header");\n                    \n  FUN_00065450(uVar5,uVar2);\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "ushort uVar3;" (type_identifier "ushort") (identifier "uVar3") (; ";")) (declaration "size_t sVar4;" (primitive_type "size_t") (identifier "sVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "undefined4 local_40;" (type_identifier "undefined4") (identifier "local_40") (; ";")) (declaration "undefined4 local_3c;" (type_identifier "undefined4") (identifier "local_3c") (; ";")) (declaration "undefined4 local_38;" (type_identifier "undefined4") (identifier "local_38") (; ";")) (declaration "undefined4 local_34;" (type_identifier "undefined4") (identifier "local_34") (; ";")) (declaration "undefined2 local_30;" (type_identifier "undefined2") (identifier "local_30") (; ";")) (declaration "ushort local_2e;" (type_identifier "ushort") (identifier "local_2e") (; ";")) (declaration "undefined4 local_2c;" (type_identifier "undefined4") (identifier "local_2c") (; ";")) (declaration "undefined4 local_28;" (type_identifier "undefined4") (identifier "local_28") (; ";")) (declaration "undefined4 local_24;" (type_identifier "undefined4") (identifier "local_24") (; ";")) (declaration "uint local_20;" (type_identifier "uint") (identifier "local_20") (; ";")) (declaration "undefined4 local_1c;" (type_identifier "undefined4") (identifier "local_1c") (; ";")) (declaration "undefined4 local_18;" (type_identifier "undefined4") (identifier "local_18") (; ";")) (declaration "undefined4 local_14;" (type_identifier "undefined4") (identifier "local_14") (; ";")) (declaration "ushort local_10;" (type_identifier "ushort") (identifier "local_10") (; ";")) (declaration "ushort local_e;" (type_identifier "ushort") (identifier "local_e") (; ";")) (declaration "undefined4 uStack_c;" (type_identifier "undefined4") (identifier "uStack_c") (; ";")) (expression_statement "uStack_c = 0x4a879;" (assignment_expression "uStack_c = 0x4a879" (identifier "uStack_c") (= "=") (number_literal "0x4a879")) (; ";")) (expression_statement "local_3c = 0x10201;" (assignment_expression "local_3c = 0x10201" (identifier "local_3c") (= "=") (number_literal "0x10201")) (; ";")) (expression_statement "local_38 = 0;" (assignment_expression "local_38 = 0" (identifier "local_38") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_34 = 0;" (assignment_expression "local_34 = 0" (identifier "local_34") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_40 = 0x464c457f;" (assignment_expression "local_40 = 0x464c457f" (identifier "local_40") (= "=") (number_literal "0x464c457f")) (; ";")) (expression_statement "local_30 = 0x100;" (assignment_expression "local_30 = 0x100" (identifier "local_30") (= "=") (number_literal "0x100")) (; ";")) (expression_statement "local_2c = 0x1000000;" (assignment_expression "local_2c = 0x1000000" (identifier "local_2c") (= "=") (number_literal "0x1000000")) (; ";")) (expression_statement "local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;" (assignment_expression "local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" (identifier "local_2e") (= "=") (binary_expression "*(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8" (binary_expression "*(ushort *)(param_1 + 1) << 8" (pointer_expression "*(ushort *)(param_1 + 1)" (* "*") (cast_expression "(ushort *)(param_1 + 1)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 1)" (( "(") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1")) () ")")))) (<< "<<") (number_literal "8")) (| "|") (binary_expression "*(ushort *)(param_1 + 1) >> 8" (pointer_expression "*(ushort *)(param_1 + 1)" (* "*") (cast_expression "(ushort *)(param_1 + 1)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 1)" (( "(") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1")) () ")")))) (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar1 = param_1[0x10];" (assignment_expression "uVar1 = param_1[0x10]" (identifier "uVar1") (= "=") (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]"))) (; ";")) (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" (identifier "local_24") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;" (assignment_expression "local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" (identifier "local_20") (= "=") (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8" (binary_expression "uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8" (binary_expression "uVar1 >> 0x18" (identifier "uVar1") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(uVar1 & 0xff0000) >> 8" (parenthesized_expression "(uVar1 & 0xff0000)" (( "(") (binary_expression "uVar1 & 0xff0000" (identifier "uVar1") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar1 & 0xff00) << 8" (parenthesized_expression "(uVar1 & 0xff00)" (( "(") (binary_expression "uVar1 & 0xff00" (identifier "uVar1") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "uVar1 << 0x18" (identifier "uVar1") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "uVar3 = (ushort)param_1[9];" (assignment_expression "uVar3 = (ushort)param_1[9]" (identifier "uVar3") (= "=") (cast_expression "(ushort)param_1[9]" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]")))) (; ";")) (expression_statement "local_10 = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_10 = uVar3 << 8 | uVar3 >> 8" (identifier "local_10") (= "=") (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" (identifier "uVar3") (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar3 >> 8" (identifier "uVar3") (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "local_1c = 0;" (assignment_expression "local_1c = 0" (identifier "local_1c") (= "=") (number_literal "0")) (; ";")) (if_statement "if (0xfeff < (uint)param_1[9]) {\n    local_10 = 0;\n  }" (if "if") (parenthesized_expression "(0xfeff < (uint)param_1[9])" (( "(") (binary_expression "0xfeff < (uint)param_1[9]" (number_literal "0xfeff") (< "<") (cast_expression "(uint)param_1[9]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]")))) () ")")) (compound_statement "{\n    local_10 = 0;\n  }" ({ "{") (expression_statement "local_10 = 0;" (assignment_expression "local_10 = 0" (identifier "local_10") (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "local_18 = 0x3400;" (assignment_expression "local_18 = 0x3400" (identifier "local_18") (= "=") (number_literal "0x3400")) (; ";")) (expression_statement "local_14 = 0x28000000;" (assignment_expression "local_14 = 0x28000000" (identifier "local_14") (= "=") (number_literal "0x28000000")) (; ";")) (expression_statement "uVar3 = (ushort)param_1[0x12];" (assignment_expression "uVar3 = (ushort)param_1[0x12]" (identifier "uVar3") (= "=") (cast_expression "(ushort)param_1[0x12]" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (subscript_expression "param_1[0x12]" (identifier "param_1") ([ "[") (number_literal "0x12") (] "]")))) (; ";")) (expression_statement "local_e = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "local_e = uVar3 << 8 | uVar3 >> 8" (identifier "local_e") (= "=") (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" (identifier "uVar3") (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar3 >> 8" (identifier "uVar3") (>> ">>") (number_literal "8")))) (; ";")) (if_statement "if (0xfeff < (uint)param_1[0x12]) {\n    local_e = 0xffff;\n  }" (if "if") (parenthesized_expression "(0xfeff < (uint)param_1[0x12])" (( "(") (binary_expression "0xfeff < (uint)param_1[0x12]" (number_literal "0xfeff") (< "<") (cast_expression "(uint)param_1[0x12]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[0x12]" (identifier "param_1") ([ "[") (number_literal "0x12") (] "]")))) () ")")) (compound_statement "{\n    local_e = 0xffff;\n  }" ({ "{") (expression_statement "local_e = 0xffff;" (assignment_expression "local_e = 0xffff" (identifier "local_e") (= "=") (number_literal "0xffff")) (; ";")) (} "}"))) (expression_statement "fseek((FILE *)param_1[6],0,0);" (call_expression "fseek((FILE *)param_1[6],0,0)" (identifier "fseek") (argument_list "((FILE *)param_1[6],0,0)" (( "(") (cast_expression "(FILE *)param_1[6]" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]"))) (, ",") (number_literal "0") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);" (assignment_expression "sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6])" (identifier "sVar4") (= "=") (call_expression "fwrite(&local_40,1,0x34,(FILE *)param_1[6])" (identifier "fwrite") (argument_list "(&local_40,1,0x34,(FILE *)param_1[6])" (( "(") (pointer_expression "&local_40" (& "&") (identifier "local_40")) (, ",") (number_literal "1") (, ",") (number_literal "0x34") (, ",") (cast_expression "(FILE *)param_1[6]" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]"))) () ")")))) (; ";")) (if_statement "if (0x33 < sVar4) {\n    return;\n  }" (if "if") (parenthesized_expression "(0x33 < sVar4)" (( "(") (binary_expression "0x33 < sVar4" (number_literal "0x33") (< "<") (identifier "sVar4")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" (identifier "uVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar5 = gettext("%s: error writing ELF header");" (assignment_expression "uVar5 = gettext("%s: error writing ELF header")" (identifier "uVar5") (= "=") (call_expression "gettext("%s: error writing ELF header")" (identifier "gettext") (argument_list "("%s: error writing ELF header")" (( "(") (string_literal ""%s: error writing ELF header"" (" """) (string_content "%s: error writing ELF header") (" """)) () ")")))) (; ";")) (expression_statement "FUN_00065450(uVar5,uVar2);" (call_expression "FUN_00065450(uVar5,uVar2)" (identifier "FUN_00065450") (argument_list "(uVar5,uVar2)" (( "(") (identifier "uVar5") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* DWARF original name: sized_write_ehdr<32, true>
   DWARF original prototype: void sized_write_ehdr<32,_true>(Dwp_output_file * this) */

void __thiscall gold::Dwp_output_file::sized_write_ehdr<32,_true>(Dwp_output_file *this)

{
  type_3 var_3;
  char *pcVar2;
  type_1 var_2;
  size_t var_6;
  char *format;
  type_2 e_ident [16];
  type_2 buf [52];
  
  buf[4] = '\x01';
  buf[5] = '\x02';
  buf[6] = '\x01';
  buf[7] = '\0';
  buf[8] = '\0';
  buf[9] = '\0';
  buf[10] = '\0';
  buf[0xb] = '\0';
  buf[0xc] = '\0';
  buf[0xd] = '\0';
  buf[0xe] = '\0';
  buf[0xf] = '\0';
  var_1(buf,"\x7fELF",4);
  buf[0x10] = '\0';
  buf[0x11] = '\x01';
  var_2 = (type_1)this->machine_;
  buf[0x14] = '\0';
  buf[0x15] = '\0';
  buf[0x16] = '\0';
  buf[0x17] = '\x01';
  buf._18_2_ = var_2 << 8 | var_2 >> 8;
  buf[0x18] = '\0';
  buf[0x19] = '\0';
  buf[0x1a] = '\0';
  buf[0x1b] = '\0';
  var_3 = (type_3)this->shoff_;
  buf[0x1c] = '\0';
  buf[0x1d] = '\0';
  buf[0x1e] = '\0';
  buf[0x1f] = '\0';
  buf._32_4_ = var_3 >> 0x18 | (var_3 & 0xff0000) >> 8 | (var_3 & 0xff00) << 8 | var_3 << 0x18;
  var_2 = (type_1)this->shnum_;
  buf._48_2_ = var_2 << 8 | var_2 >> 8;
  buf[0x24] = '\0';
  buf[0x25] = '\0';
  buf[0x26] = '\0';
  buf[0x27] = '\0';
  if (0xfeff < this->shnum_) {
    buf._48_2_ = 0;
  }
  buf[0x28] = '\0';
  buf[0x29] = '4';
  buf[0x2a] = '\0';
  buf[0x2b] = '\0';
  buf[0x2c] = '\0';
  buf[0x2d] = '\0';
  buf[0x2e] = '\0';
  buf[0x2f] = '(';
  var_2 = (type_1)this->shstrndx_;
  buf._50_2_ = var_2 << 8 | var_2 >> 8;
  if (0xfeff < this->shstrndx_) {
    buf._50_2_ = 0xffff;
  }
  var_4((type_4 *)this->fd_,0,0);
  var_6 = var_5(buf,1,0x34,(type_4 *)this->fd_);
  if (0x33 < var_6) {
    return;
  }
  pcVar2 = this->name_;
  format = (char *)var_7("%s: error writing ELF header");
                    /* WARNING: Subroutine does not return */
  var_8(format,pcVar2);
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))) (number_literal) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (number_literal) (number_literal) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))))

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

void MASKED(undefined4 *param_1)

{
  uint uVar1;
  undefined4 uVar2;
  ushort uVar3;
  size_t sVar4;
  undefined4 uVar5;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined2 local_30;
  ushort local_2e;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  uint local_20;
  undefined4 local_1c;
  undefined4 local_18;
  undefined4 local_14;
  ushort local_10;
  ushort local_e;
  undefined4 uStack_c;
  
  uStack_c = 0x4a879;
  local_3c = 0x10201;
  local_38 = 0;
  local_34 = 0;
  local_40 = 0x464c457f;
  local_30 = 0x100;
  local_2c = 0x1000000;
  local_2e = *(ushort *)(param_1 + 1) << 8 | *(ushort *)(param_1 + 1) >> 8;
  local_28 = 0;
  uVar1 = param_1[0x10];
  local_24 = 0;
  local_20 = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18;
  uVar3 = (ushort)param_1[9];
  local_10 = uVar3 << 8 | uVar3 >> 8;
  local_1c = 0;
  if (0xfeff < (uint)param_1[9]) {
    local_10 = 0;
  }
  local_18 = 0x3400;
  local_14 = 0x28000000;
  uVar3 = (ushort)param_1[0x12];
  local_e = uVar3 << 8 | uVar3 >> 8;
  if (0xfeff < (uint)param_1[0x12]) {
    local_e = 0xffff;
  }
  fseek((FILE *)param_1[6],0,0);
  sVar4 = fwrite(&local_40,1,0x34,(FILE *)param_1[6]);
  if (0x33 < sVar4) {
    return;
  }
  uVar2 = *param_1;
  uVar5 = gettext("%s: error writing ELF header");
                    /* WARNING: Subroutine does not return */
  FUN_00065450(uVar5,uVar2);
}

