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

void plugin_maybe_claim(lang_input_statement_type *entry)

{
  undefined1 *puVar1;
  bfd *pbVar2;
  bfd *pbVar3;
  bfd_target *pbVar4;
  
  if ((entry->header).type != lang_input_statement_enum) {
    info_assert("../../ld/plugin.c",0x49f);
  }
  pbVar4 = plugin_object_p(entry->the_bfd);
  if (pbVar4 != (bfd_target *)0x0) {
    pbVar2 = entry->the_bfd;
    pbVar3 = pbVar2->plugin_dummy_bfd;
    if (pbVar2->my_archive == (bfd *)0x0) {
      bfd_close(pbVar2);
    }
    puVar1 = &(entry->flags).field_0x1;
    *puVar1 = *puVar1 | 0x20;
    entry->the_bfd = pbVar3;
  }
  return;
}



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

void FUN_00036600(int param_1)

{
  undefined4 uVar1;
  int iVar2;
  
  if (*(int *)(param_1 + 4) != 2) {
    FUN_00032bf0("../../ld/plugin.c",0x49f);
  }
  iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));
  if (iVar2 != 0) {
    iVar2 = *(int *)(param_1 + 0x10);
    uVar1 = *(undefined4 *)(iVar2 + 0x30);
    if (*(int *)(iVar2 + 0x8c) == 0) {
      bfd_close(iVar2);
    }
    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;
    *(undefined4 *)(param_1 + 0x10) = uVar1;
  }
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x10]
CALL 0x00015a30
ADD EBX,0x5c9f4
CMP dword ptr [ESI + 0x4],0x2
JZ 0x0003662f
SUB ESP,0x8
LEA EAX,[EBX + 0xfffbe05f]
PUSH 0x49f
PUSH EAX
CALL 0x00032bf0
ADD ESP,0x10
SUB ESP,0xc
PUSH dword ptr [ESI + 0x10]
CALL 0x00035c50
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00036658
MOV EAX,dword ptr [ESI + 0x10]
MOV EDX,dword ptr [EAX + 0x8c]
MOV EDI,dword ptr [EAX + 0x30]
TEST EDX,EDX
JZ 0x00036660
OR byte ptr [ESI + 0x25],0x20
MOV dword ptr [ESI + 0x10],EDI
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0xc
PUSH EAX
CALL 0x00014960
ADD ESP,0x10
JMP 0x00036651
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00036600(int param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }\n  iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));\n  if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_00036600(int param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }\n  iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));\n  if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00036600(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }\n  iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));\n  if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 4) != 2)" ( (binary_expression "*(int *)(param_1 + 4) != 2" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }" { (expression_statement "FUN_00032bf0("../../ld/plugin.c",0x49f);" (call_expression "FUN_00032bf0("../../ld/plugin.c",0x49f)" identifier (argument_list "("../../ld/plugin.c",0x49f)" ( (string_literal ""../../ld/plugin.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));" (assignment_expression "iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10))" identifier = (call_expression "FUN_00035c50(*(undefined4 *)(param_1 + 0x10))" identifier (argument_list "(*(undefined4 *)(param_1 + 0x10))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) )))) ;) (if_statement "if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = *(undefined4 *)(iVar2 + 0x30);" (assignment_expression "uVar1 = *(undefined4 *)(iVar2 + 0x30)" identifier = (pointer_expression "*(undefined4 *)(iVar2 + 0x30)" * (cast_expression "(undefined4 *)(iVar2 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x30)" ( (binary_expression "iVar2 + 0x30" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }" if (parenthesized_expression "(*(int *)(iVar2 + 0x8c) == 0)" ( (binary_expression "*(int *)(iVar2 + 0x8c) == 0" (pointer_expression "*(int *)(iVar2 + 0x8c)" * (cast_expression "(int *)(iVar2 + 0x8c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x8c)" ( (binary_expression "iVar2 + 0x8c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      bfd_close(iVar2);\n    }" { (expression_statement "bfd_close(iVar2);" (call_expression "bfd_close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) })) (expression_statement "*(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;" (assignment_expression "*(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20" (pointer_expression "*(byte *)(param_1 + 0x25)" * (cast_expression "(byte *)(param_1 + 0x25)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x25)" ( (binary_expression "param_1 + 0x25" identifier + number_literal) )))) = (binary_expression "*(byte *)(param_1 + 0x25) | 0x20" (pointer_expression "*(byte *)(param_1 + 0x25)" * (cast_expression "(byte *)(param_1 + 0x25)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x25)" ( (binary_expression "param_1 + 0x25" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10) = uVar1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = uVar1" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid plugin_maybe_claim(lang_input_statement_type *entry)\n\n{\n  undefined1 *puVar1;\n  bfd *pbVar2;\n  bfd *pbVar3;\n  bfd_target *pbVar4;\n  \n  if ((entry->header).type != lang_input_statement_enum) {\n    info_assert("../../ld/plugin.c",0x49f);\n  }\n  pbVar4 = plugin_object_p(entry->the_bfd);\n  if (pbVar4 != (bfd_target *)0x0) {\n    pbVar2 = entry->the_bfd;\n    pbVar3 = pbVar2->plugin_dummy_bfd;\n    if (pbVar2->my_archive == (bfd *)0x0) {\n      bfd_close(pbVar2);\n    }\n    puVar1 = &(entry->flags).field_0x1;\n    *puVar1 = *puVar1 | 0x20;\n    entry->the_bfd = pbVar3;\n  }\n  return;\n}\n\n" comment (function_definition "void plugin_maybe_claim(lang_input_statement_type *entry)\n\n{\n  undefined1 *puVar1;\n  bfd *pbVar2;\n  bfd *pbVar3;\n  bfd_target *pbVar4;\n  \n  if ((entry->header).type != lang_input_statement_enum) {\n    info_assert("../../ld/plugin.c",0x49f);\n  }\n  pbVar4 = plugin_object_p(entry->the_bfd);\n  if (pbVar4 != (bfd_target *)0x0) {\n    pbVar2 = entry->the_bfd;\n    pbVar3 = pbVar2->plugin_dummy_bfd;\n    if (pbVar2->my_archive == (bfd *)0x0) {\n      bfd_close(pbVar2);\n    }\n    puVar1 = &(entry->flags).field_0x1;\n    *puVar1 = *puVar1 | 0x20;\n    entry->the_bfd = pbVar3;\n  }\n  return;\n}" primitive_type (function_declarator "plugin_maybe_claim(lang_input_statement_type *entry)" identifier (parameter_list "(lang_input_statement_type *entry)" ( (parameter_declaration "lang_input_statement_type *entry" type_identifier (pointer_declarator "*entry" * identifier)) ))) (compound_statement "{\n  undefined1 *puVar1;\n  bfd *pbVar2;\n  bfd *pbVar3;\n  bfd_target *pbVar4;\n  \n  if ((entry->header).type != lang_input_statement_enum) {\n    info_assert("../../ld/plugin.c",0x49f);\n  }\n  pbVar4 = plugin_object_p(entry->the_bfd);\n  if (pbVar4 != (bfd_target *)0x0) {\n    pbVar2 = entry->the_bfd;\n    pbVar3 = pbVar2->plugin_dummy_bfd;\n    if (pbVar2->my_archive == (bfd *)0x0) {\n      bfd_close(pbVar2);\n    }\n    puVar1 = &(entry->flags).field_0x1;\n    *puVar1 = *puVar1 | 0x20;\n    entry->the_bfd = pbVar3;\n  }\n  return;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "bfd *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "bfd *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "bfd_target *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (if_statement "if ((entry->header).type != lang_input_statement_enum) {\n    info_assert("../../ld/plugin.c",0x49f);\n  }" if (parenthesized_expression "((entry->header).type != lang_input_statement_enum)" ( (binary_expression "(entry->header).type != lang_input_statement_enum" (field_expression "(entry->header).type" (parenthesized_expression "(entry->header)" ( (field_expression "entry->header" identifier -> field_identifier) )) . field_identifier) != identifier) )) (compound_statement "{\n    info_assert("../../ld/plugin.c",0x49f);\n  }" { (expression_statement "info_assert("../../ld/plugin.c",0x49f);" (call_expression "info_assert("../../ld/plugin.c",0x49f)" identifier (argument_list "("../../ld/plugin.c",0x49f)" ( (string_literal ""../../ld/plugin.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "pbVar4 = plugin_object_p(entry->the_bfd);" (assignment_expression "pbVar4 = plugin_object_p(entry->the_bfd)" identifier = (call_expression "plugin_object_p(entry->the_bfd)" identifier (argument_list "(entry->the_bfd)" ( (field_expression "entry->the_bfd" identifier -> field_identifier) )))) ;) (if_statement "if (pbVar4 != (bfd_target *)0x0) {\n    pbVar2 = entry->the_bfd;\n    pbVar3 = pbVar2->plugin_dummy_bfd;\n    if (pbVar2->my_archive == (bfd *)0x0) {\n      bfd_close(pbVar2);\n    }\n    puVar1 = &(entry->flags).field_0x1;\n    *puVar1 = *puVar1 | 0x20;\n    entry->the_bfd = pbVar3;\n  }" if (parenthesized_expression "(pbVar4 != (bfd_target *)0x0)" ( (binary_expression "pbVar4 != (bfd_target *)0x0" identifier != (cast_expression "(bfd_target *)0x0" ( (type_descriptor "bfd_target *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pbVar2 = entry->the_bfd;\n    pbVar3 = pbVar2->plugin_dummy_bfd;\n    if (pbVar2->my_archive == (bfd *)0x0) {\n      bfd_close(pbVar2);\n    }\n    puVar1 = &(entry->flags).field_0x1;\n    *puVar1 = *puVar1 | 0x20;\n    entry->the_bfd = pbVar3;\n  }" { (expression_statement "pbVar2 = entry->the_bfd;" (assignment_expression "pbVar2 = entry->the_bfd" identifier = (field_expression "entry->the_bfd" identifier -> field_identifier)) ;) (expression_statement "pbVar3 = pbVar2->plugin_dummy_bfd;" (assignment_expression "pbVar3 = pbVar2->plugin_dummy_bfd" identifier = (field_expression "pbVar2->plugin_dummy_bfd" identifier -> field_identifier)) ;) (if_statement "if (pbVar2->my_archive == (bfd *)0x0) {\n      bfd_close(pbVar2);\n    }" if (parenthesized_expression "(pbVar2->my_archive == (bfd *)0x0)" ( (binary_expression "pbVar2->my_archive == (bfd *)0x0" (field_expression "pbVar2->my_archive" identifier -> field_identifier) == (cast_expression "(bfd *)0x0" ( (type_descriptor "bfd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      bfd_close(pbVar2);\n    }" { (expression_statement "bfd_close(pbVar2);" (call_expression "bfd_close(pbVar2)" identifier (argument_list "(pbVar2)" ( identifier ))) ;) })) (expression_statement "puVar1 = &(entry->flags).field_0x1;" (assignment_expression "puVar1 = &(entry->flags).field_0x1" identifier = (pointer_expression "&(entry->flags).field_0x1" & (field_expression "(entry->flags).field_0x1" (parenthesized_expression "(entry->flags)" ( (field_expression "entry->flags" identifier -> field_identifier) )) . field_identifier))) ;) (expression_statement "*puVar1 = *puVar1 | 0x20;" (assignment_expression "*puVar1 = *puVar1 | 0x20" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 0x20" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (expression_statement "entry->the_bfd = pbVar3;" (assignment_expression "entry->the_bfd = pbVar3" (field_expression "entry->the_bfd" identifier -> field_identifier) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00036600(int param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }\n  iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));\n  if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00036600(int param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }\n  iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));\n  if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00036600(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }\n  iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));\n  if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 4) != 2)" ( (binary_expression "*(int *)(param_1 + 4) != 2" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }" { (expression_statement "FUN_00032bf0("../../ld/plugin.c",0x49f);" (call_expression "FUN_00032bf0("../../ld/plugin.c",0x49f)" identifier (argument_list "("../../ld/plugin.c",0x49f)" ( (string_literal ""../../ld/plugin.c"" " string_content ") , number_literal ))) ;) })) (expression_statement "iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));" (assignment_expression "iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10))" identifier = (call_expression "FUN_00035c50(*(undefined4 *)(param_1 + 0x10))" identifier (argument_list "(*(undefined4 *)(param_1 + 0x10))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) )))) ;) (if_statement "if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = *(undefined4 *)(iVar2 + 0x30);" (assignment_expression "uVar1 = *(undefined4 *)(iVar2 + 0x30)" identifier = (pointer_expression "*(undefined4 *)(iVar2 + 0x30)" * (cast_expression "(undefined4 *)(iVar2 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x30)" ( (binary_expression "iVar2 + 0x30" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }" if (parenthesized_expression "(*(int *)(iVar2 + 0x8c) == 0)" ( (binary_expression "*(int *)(iVar2 + 0x8c) == 0" (pointer_expression "*(int *)(iVar2 + 0x8c)" * (cast_expression "(int *)(iVar2 + 0x8c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x8c)" ( (binary_expression "iVar2 + 0x8c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      bfd_close(iVar2);\n    }" { (expression_statement "bfd_close(iVar2);" (call_expression "bfd_close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) })) (expression_statement "*(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;" (assignment_expression "*(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20" (pointer_expression "*(byte *)(param_1 + 0x25)" * (cast_expression "(byte *)(param_1 + 0x25)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x25)" ( (binary_expression "param_1 + 0x25" identifier + number_literal) )))) = (binary_expression "*(byte *)(param_1 + 0x25) | 0x20" (pointer_expression "*(byte *)(param_1 + 0x25)" * (cast_expression "(byte *)(param_1 + 0x25)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x25)" ( (binary_expression "param_1 + 0x25" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10) = uVar1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = uVar1" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00036600(int param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }\n  iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));\n  if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00036600(int param_1)" (identifier "FUN_00036600") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }\n  iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));\n  if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (*(int *)(param_1 + 4) != 2) {\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 4) != 2)" (( "(") (binary_expression "*(int *)(param_1 + 4) != 2" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n    FUN_00032bf0("../../ld/plugin.c",0x49f);\n  }" ({ "{") (expression_statement "FUN_00032bf0("../../ld/plugin.c",0x49f);" (call_expression "FUN_00032bf0("../../ld/plugin.c",0x49f)" (identifier "FUN_00032bf0") (argument_list "("../../ld/plugin.c",0x49f)" (( "(") (string_literal ""../../ld/plugin.c"" (" """) (string_content "../../ld/plugin.c") (" """)) (, ",") (number_literal "0x49f") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));" (assignment_expression "iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10))" (identifier "iVar2") (= "=") (call_expression "FUN_00035c50(*(undefined4 *)(param_1 + 0x10))" (identifier "FUN_00035c50") (argument_list "(*(undefined4 *)(param_1 + 0x10))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x10);\n    uVar1 = *(undefined4 *)(iVar2 + 0x30);\n    if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }\n    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;\n    *(undefined4 *)(param_1 + 0x10) = uVar1;\n  }" ({ "{") (expression_statement "iVar2 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x10)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "uVar1 = *(undefined4 *)(iVar2 + 0x30);" (assignment_expression "uVar1 = *(undefined4 *)(iVar2 + 0x30)" (identifier "uVar1") (= "=") (pointer_expression "*(undefined4 *)(iVar2 + 0x30)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x30)" (( "(") (binary_expression "iVar2 + 0x30" (identifier "iVar2") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (if_statement "if (*(int *)(iVar2 + 0x8c) == 0) {\n      bfd_close(iVar2);\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar2 + 0x8c) == 0)" (( "(") (binary_expression "*(int *)(iVar2 + 0x8c) == 0" (pointer_expression "*(int *)(iVar2 + 0x8c)" (* "*") (cast_expression "(int *)(iVar2 + 0x8c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x8c)" (( "(") (binary_expression "iVar2 + 0x8c" (identifier "iVar2") (+ "+") (number_literal "0x8c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      bfd_close(iVar2);\n    }" ({ "{") (expression_statement "bfd_close(iVar2);" (call_expression "bfd_close(iVar2)" (identifier "bfd_close") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (} "}"))) (expression_statement "*(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;" (assignment_expression "*(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20" (pointer_expression "*(byte *)(param_1 + 0x25)" (* "*") (cast_expression "(byte *)(param_1 + 0x25)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x25)" (( "(") (binary_expression "param_1 + 0x25" (identifier "param_1") (+ "+") (number_literal "0x25")) () ")")))) (= "=") (binary_expression "*(byte *)(param_1 + 0x25) | 0x20" (pointer_expression "*(byte *)(param_1 + 0x25)" (* "*") (cast_expression "(byte *)(param_1 + 0x25)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x25)" (( "(") (binary_expression "param_1 + 0x25" (identifier "param_1") (+ "+") (number_literal "0x25")) () ")")))) (| "|") (number_literal "0x20"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10) = uVar1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = uVar1" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "uVar1")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *entry)

{
  type_2 *puVar1;
  type_3 *pbVar2;
  type_3 *pbVar3;
  type_4 *var_4;
  
  if ((entry->header).type != var_1) {
    var_2("../../ld/plugin.c",0x49f);
  }
  var_4 = var_3(entry->the_bfd);
  if (var_4 != (type_4 *)0x0) {
    pbVar2 = entry->the_bfd;
    pbVar3 = pbVar2->plugin_dummy_bfd;
    if (pbVar2->my_archive == (type_3 *)0x0) {
      var_5(pbVar2);
    }
    puVar1 = &(entry->flags).field_0x1;
    *puVar1 = *puVar1 | 0x20;
    entry->the_bfd = pbVar3;
  }
  return;
}


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

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

void MASKED(int param_1)

{
  undefined4 uVar1;
  int iVar2;
  
  if (*(int *)(param_1 + 4) != 2) {
    FUN_00032bf0("../../ld/plugin.c",0x49f);
  }
  iVar2 = FUN_00035c50(*(undefined4 *)(param_1 + 0x10));
  if (iVar2 != 0) {
    iVar2 = *(int *)(param_1 + 0x10);
    uVar1 = *(undefined4 *)(iVar2 + 0x30);
    if (*(int *)(iVar2 + 0x8c) == 0) {
      bfd_close(iVar2);
    }
    *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 0x20;
    *(undefined4 *)(param_1 + 0x10) = uVar1;
  }
  return;
}

