
/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

void S_SET_WEAKREFR(symbolS *s)

{
  undefined1 *puVar1;
  byte bVar2;
  
  bVar2 = *(byte *)&s->sy_flags;
  if ((bVar2 & 1) != 0) {
    if ((segT)s->bsym == reg_section) {
      s = (s->sy_value).X_op_symbol;
      bVar2 = *(byte *)&s->sy_flags;
    }
    else {
      s = local_symbol_convert((local_symbol *)s);
      bVar2 = *(byte *)&s->sy_flags;
    }
  }
  puVar1 = &(s->sy_flags).field_0x1;
  *puVar1 = *puVar1 | 2;
  if ((bVar2 & 0x20) == 0) {
    return;
  }
  symbol_mark_used((s->sy_value).X_add_symbol);
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

void FUN_00039b90(byte *param_1)

{
  byte bVar1;
  
  bVar1 = *param_1;
  if ((bVar1 & 1) != 0) {
    if (*(int *)(param_1 + 4) == DAT_00074e10) {
      param_1 = *(byte **)(param_1 + 0xc);
      bVar1 = *param_1;
    }
    else {
      param_1 = (byte *)FUN_00036fe0();
      bVar1 = *param_1;
    }
  }
  param_1[1] = param_1[1] | 2;
  if ((bVar1 & 0x20) == 0) {
    return;
  }
  FUN_00039b30();
  return;
}


CALL 0x00018a25
ADD ECX,0x3246b
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x10]
MOVZX EDX,byte ptr [EAX]
TEST DL,0x1
JZ 0x00039bbf
LEA EDX,[ECX + 0x8e10]
MOV ECX,dword ptr [EDX]
CMP dword ptr [EAX + 0x4],ECX
JZ 0x00039be0
CALL 0x00036fe0
MOVZX EDX,byte ptr [EAX]
OR byte ptr [EAX + 0x1],0x2
AND EDX,0x20
JNZ 0x00039bd0
ADD ESP,0xc
RET
MOV EAX,dword ptr [EAX + 0x8]
MOV dword ptr [ESP + 0x10],EAX
ADD ESP,0xc
JMP 0x00039b30
MOV EAX,dword ptr [EAX + 0xc]
MOVZX EDX,byte ptr [EAX]
JMP 0x00039bbf
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */\n\nvoid FUN_00039b90(byte *param_1)\n\n{\n  byte bVar1;\n  \n  bVar1 = *param_1;\n  if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }\n  param_1[1] = param_1[1] | 2;\n  if ((bVar1 & 0x20) == 0) {\n    return;\n  }\n  FUN_00039b30();\n  return;\n}\n\n" comment (function_definition "void FUN_00039b90(byte *param_1)\n\n{\n  byte bVar1;\n  \n  bVar1 = *param_1;\n  if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }\n  param_1[1] = param_1[1] | 2;\n  if ((bVar1 & 0x20) == 0) {\n    return;\n  }\n  FUN_00039b30();\n  return;\n}" primitive_type (function_declarator "FUN_00039b90(byte *param_1)" identifier (parameter_list "(byte *param_1)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  \n  bVar1 = *param_1;\n  if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }\n  param_1[1] = param_1[1] | 2;\n  if ((bVar1 & 0x20) == 0) {\n    return;\n  }\n  FUN_00039b30();\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }" if (parenthesized_expression "((bVar1 & 1) != 0)" ( (binary_expression "(bVar1 & 1) != 0" (parenthesized_expression "(bVar1 & 1)" ( (binary_expression "bVar1 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }" { (if_statement "if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 4) == DAT_00074e10)" ( (binary_expression "*(int *)(param_1 + 4) == DAT_00074e10" (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) )))) == identifier) )) (compound_statement "{\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }" { (expression_statement "param_1 = *(byte **)(param_1 + 0xc);" (assignment_expression "param_1 = *(byte **)(param_1 + 0xc)" identifier = (pointer_expression "*(byte **)(param_1 + 0xc)" * (cast_expression "(byte **)(param_1 + 0xc)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }) (else_clause "else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }" else (compound_statement "{\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }" { (expression_statement "param_1 = (byte *)FUN_00036fe0();" (assignment_expression "param_1 = (byte *)FUN_00036fe0()" identifier = (cast_expression "(byte *)FUN_00036fe0()" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00036fe0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }))) })) (expression_statement "param_1[1] = param_1[1] | 2;" (assignment_expression "param_1[1] = param_1[1] | 2" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] | 2" (subscript_expression "param_1[1]" identifier [ number_literal ]) | number_literal)) ;) (if_statement "if ((bVar1 & 0x20) == 0) {\n    return;\n  }" if (parenthesized_expression "((bVar1 & 0x20) == 0)" ( (binary_expression "(bVar1 & 0x20) == 0" (parenthesized_expression "(bVar1 & 0x20)" ( (binary_expression "bVar1 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_00039b30();" (call_expression "FUN_00039b30()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */\n\nvoid S_SET_WEAKREFR(symbolS *s)\n\n{\n  undefined1 *puVar1;\n  byte bVar2;\n  \n  bVar2 = *(byte *)&s->sy_flags;\n  if ((bVar2 & 1) != 0) {\n    if ((segT)s->bsym == reg_section) {\n      s = (s->sy_value).X_op_symbol;\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n    else {\n      s = local_symbol_convert((local_symbol *)s);\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n  }\n  puVar1 = &(s->sy_flags).field_0x1;\n  *puVar1 = *puVar1 | 2;\n  if ((bVar2 & 0x20) == 0) {\n    return;\n  }\n  symbol_mark_used((s->sy_value).X_add_symbol);\n  return;\n}\n\n" comment (function_definition "void S_SET_WEAKREFR(symbolS *s)\n\n{\n  undefined1 *puVar1;\n  byte bVar2;\n  \n  bVar2 = *(byte *)&s->sy_flags;\n  if ((bVar2 & 1) != 0) {\n    if ((segT)s->bsym == reg_section) {\n      s = (s->sy_value).X_op_symbol;\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n    else {\n      s = local_symbol_convert((local_symbol *)s);\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n  }\n  puVar1 = &(s->sy_flags).field_0x1;\n  *puVar1 = *puVar1 | 2;\n  if ((bVar2 & 0x20) == 0) {\n    return;\n  }\n  symbol_mark_used((s->sy_value).X_add_symbol);\n  return;\n}" primitive_type (function_declarator "S_SET_WEAKREFR(symbolS *s)" identifier (parameter_list "(symbolS *s)" ( (parameter_declaration "symbolS *s" type_identifier (pointer_declarator "*s" * identifier)) ))) (compound_statement "{\n  undefined1 *puVar1;\n  byte bVar2;\n  \n  bVar2 = *(byte *)&s->sy_flags;\n  if ((bVar2 & 1) != 0) {\n    if ((segT)s->bsym == reg_section) {\n      s = (s->sy_value).X_op_symbol;\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n    else {\n      s = local_symbol_convert((local_symbol *)s);\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n  }\n  puVar1 = &(s->sy_flags).field_0x1;\n  *puVar1 = *puVar1 | 2;\n  if ((bVar2 & 0x20) == 0) {\n    return;\n  }\n  symbol_mark_used((s->sy_value).X_add_symbol);\n  return;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "byte bVar2;" type_identifier identifier ;) (expression_statement "bVar2 = *(byte *)&s->sy_flags;" (assignment_expression "bVar2 = *(byte *)&s->sy_flags" identifier = (pointer_expression "*(byte *)&s->sy_flags" * (cast_expression "(byte *)&s->sy_flags" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&s->sy_flags" & (field_expression "s->sy_flags" identifier -> field_identifier))))) ;) (if_statement "if ((bVar2 & 1) != 0) {\n    if ((segT)s->bsym == reg_section) {\n      s = (s->sy_value).X_op_symbol;\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n    else {\n      s = local_symbol_convert((local_symbol *)s);\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n  }" if (parenthesized_expression "((bVar2 & 1) != 0)" ( (binary_expression "(bVar2 & 1) != 0" (parenthesized_expression "(bVar2 & 1)" ( (binary_expression "bVar2 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    if ((segT)s->bsym == reg_section) {\n      s = (s->sy_value).X_op_symbol;\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n    else {\n      s = local_symbol_convert((local_symbol *)s);\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n  }" { (if_statement "if ((segT)s->bsym == reg_section) {\n      s = (s->sy_value).X_op_symbol;\n      bVar2 = *(byte *)&s->sy_flags;\n    }\n    else {\n      s = local_symbol_convert((local_symbol *)s);\n      bVar2 = *(byte *)&s->sy_flags;\n    }" if (parenthesized_expression "((segT)s->bsym == reg_section)" ( (binary_expression "(segT)s->bsym == reg_section" (cast_expression "(segT)s->bsym" ( (type_descriptor "segT" type_identifier) ) (field_expression "s->bsym" identifier -> field_identifier)) == identifier) )) (compound_statement "{\n      s = (s->sy_value).X_op_symbol;\n      bVar2 = *(byte *)&s->sy_flags;\n    }" { (expression_statement "s = (s->sy_value).X_op_symbol;" (assignment_expression "s = (s->sy_value).X_op_symbol" identifier = (field_expression "(s->sy_value).X_op_symbol" (parenthesized_expression "(s->sy_value)" ( (field_expression "s->sy_value" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "bVar2 = *(byte *)&s->sy_flags;" (assignment_expression "bVar2 = *(byte *)&s->sy_flags" identifier = (pointer_expression "*(byte *)&s->sy_flags" * (cast_expression "(byte *)&s->sy_flags" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&s->sy_flags" & (field_expression "s->sy_flags" identifier -> field_identifier))))) ;) }) (else_clause "else {\n      s = local_symbol_convert((local_symbol *)s);\n      bVar2 = *(byte *)&s->sy_flags;\n    }" else (compound_statement "{\n      s = local_symbol_convert((local_symbol *)s);\n      bVar2 = *(byte *)&s->sy_flags;\n    }" { (expression_statement "s = local_symbol_convert((local_symbol *)s);" (assignment_expression "s = local_symbol_convert((local_symbol *)s)" identifier = (call_expression "local_symbol_convert((local_symbol *)s)" identifier (argument_list "((local_symbol *)s)" ( (cast_expression "(local_symbol *)s" ( (type_descriptor "local_symbol *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "bVar2 = *(byte *)&s->sy_flags;" (assignment_expression "bVar2 = *(byte *)&s->sy_flags" identifier = (pointer_expression "*(byte *)&s->sy_flags" * (cast_expression "(byte *)&s->sy_flags" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&s->sy_flags" & (field_expression "s->sy_flags" identifier -> field_identifier))))) ;) }))) })) (expression_statement "puVar1 = &(s->sy_flags).field_0x1;" (assignment_expression "puVar1 = &(s->sy_flags).field_0x1" identifier = (pointer_expression "&(s->sy_flags).field_0x1" & (field_expression "(s->sy_flags).field_0x1" (parenthesized_expression "(s->sy_flags)" ( (field_expression "s->sy_flags" identifier -> field_identifier) )) . field_identifier))) ;) (expression_statement "*puVar1 = *puVar1 | 2;" (assignment_expression "*puVar1 = *puVar1 | 2" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 | 2" (pointer_expression "*puVar1" * identifier) | number_literal)) ;) (if_statement "if ((bVar2 & 0x20) == 0) {\n    return;\n  }" if (parenthesized_expression "((bVar2 & 0x20) == 0)" ( (binary_expression "(bVar2 & 0x20) == 0" (parenthesized_expression "(bVar2 & 0x20)" ( (binary_expression "bVar2 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "symbol_mark_used((s->sy_value).X_add_symbol);" (call_expression "symbol_mark_used((s->sy_value).X_add_symbol)" identifier (argument_list "((s->sy_value).X_add_symbol)" ( (field_expression "(s->sy_value).X_add_symbol" (parenthesized_expression "(s->sy_value)" ( (field_expression "s->sy_value" identifier -> field_identifier) )) . field_identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00039b90(byte *param_1)\n\n{\n  byte bVar1;\n  \n  bVar1 = *param_1;\n  if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }\n  param_1[1] = param_1[1] | 2;\n  if ((bVar1 & 0x20) == 0) {\n    return;\n  }\n  FUN_00039b30();\n  return;\n}\n\n" (function_definition "void FUN_00039b90(byte *param_1)\n\n{\n  byte bVar1;\n  \n  bVar1 = *param_1;\n  if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }\n  param_1[1] = param_1[1] | 2;\n  if ((bVar1 & 0x20) == 0) {\n    return;\n  }\n  FUN_00039b30();\n  return;\n}" primitive_type (function_declarator "FUN_00039b90(byte *param_1)" identifier (parameter_list "(byte *param_1)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  \n  bVar1 = *param_1;\n  if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }\n  param_1[1] = param_1[1] | 2;\n  if ((bVar1 & 0x20) == 0) {\n    return;\n  }\n  FUN_00039b30();\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }" if (parenthesized_expression "((bVar1 & 1) != 0)" ( (binary_expression "(bVar1 & 1) != 0" (parenthesized_expression "(bVar1 & 1)" ( (binary_expression "bVar1 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }" { (if_statement "if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 4) == DAT_00074e10)" ( (binary_expression "*(int *)(param_1 + 4) == DAT_00074e10" (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) )))) == identifier) )) (compound_statement "{\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }" { (expression_statement "param_1 = *(byte **)(param_1 + 0xc);" (assignment_expression "param_1 = *(byte **)(param_1 + 0xc)" identifier = (pointer_expression "*(byte **)(param_1 + 0xc)" * (cast_expression "(byte **)(param_1 + 0xc)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }) (else_clause "else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }" else (compound_statement "{\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }" { (expression_statement "param_1 = (byte *)FUN_00036fe0();" (assignment_expression "param_1 = (byte *)FUN_00036fe0()" identifier = (cast_expression "(byte *)FUN_00036fe0()" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00036fe0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }))) })) (expression_statement "param_1[1] = param_1[1] | 2;" (assignment_expression "param_1[1] = param_1[1] | 2" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] | 2" (subscript_expression "param_1[1]" identifier [ number_literal ]) | number_literal)) ;) (if_statement "if ((bVar1 & 0x20) == 0) {\n    return;\n  }" if (parenthesized_expression "((bVar1 & 0x20) == 0)" ( (binary_expression "(bVar1 & 0x20) == 0" (parenthesized_expression "(bVar1 & 0x20)" ( (binary_expression "bVar1 & 0x20" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_00039b30();" (call_expression "FUN_00039b30()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) | LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00039b90(byte *param_1)\n\n{\n  byte bVar1;\n  \n  bVar1 = *param_1;\n  if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }\n  param_1[1] = param_1[1] | 2;\n  if ((bVar1 & 0x20) == 0) {\n    return;\n  }\n  FUN_00039b30();\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00039b90(byte *param_1)" (identifier "FUN_00039b90") (parameter_list "(byte *param_1)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  byte bVar1;\n  \n  bVar1 = *param_1;\n  if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }\n  param_1[1] = param_1[1] | 2;\n  if ((bVar1 & 0x20) == 0) {\n    return;\n  }\n  FUN_00039b30();\n  return;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" (identifier "bVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if ((bVar1 & 1) != 0) {\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }" (if "if") (parenthesized_expression "((bVar1 & 1) != 0)" (( "(") (binary_expression "(bVar1 & 1) != 0" (parenthesized_expression "(bVar1 & 1)" (( "(") (binary_expression "bVar1 & 1" (identifier "bVar1") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }\n  }" ({ "{") (if_statement "if (*(int *)(param_1 + 4) == DAT_00074e10) {\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }\n    else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 4) == DAT_00074e10)" (( "(") (binary_expression "*(int *)(param_1 + 4) == DAT_00074e10" (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")) () ")")))) (== "==") (identifier "DAT_00074e10")) () ")")) (compound_statement "{\n      param_1 = *(byte **)(param_1 + 0xc);\n      bVar1 = *param_1;\n    }" ({ "{") (expression_statement "param_1 = *(byte **)(param_1 + 0xc);" (assignment_expression "param_1 = *(byte **)(param_1 + 0xc)" (identifier "param_1") (= "=") (pointer_expression "*(byte **)(param_1 + 0xc)" (* "*") (cast_expression "(byte **)(param_1 + 0xc)" (( "(") (type_descriptor "byte **" (type_identifier "byte") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" (identifier "bVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}")) (else_clause "else {\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }" (else "else") (compound_statement "{\n      param_1 = (byte *)FUN_00036fe0();\n      bVar1 = *param_1;\n    }" ({ "{") (expression_statement "param_1 = (byte *)FUN_00036fe0();" (assignment_expression "param_1 = (byte *)FUN_00036fe0()" (identifier "param_1") (= "=") (cast_expression "(byte *)FUN_00036fe0()" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00036fe0()" (identifier "FUN_00036fe0") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" (identifier "bVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}")))) (} "}"))) (expression_statement "param_1[1] = param_1[1] | 2;" (assignment_expression "param_1[1] = param_1[1] | 2" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_1[1] | 2" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (| "|") (number_literal "2"))) (; ";")) (if_statement "if ((bVar1 & 0x20) == 0) {\n    return;\n  }" (if "if") (parenthesized_expression "((bVar1 & 0x20) == 0)" (( "(") (binary_expression "(bVar1 & 0x20) == 0" (parenthesized_expression "(bVar1 & 0x20)" (( "(") (binary_expression "bVar1 & 0x20" (identifier "bVar1") (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00039b30();" (call_expression "FUN_00039b30()" (identifier "FUN_00039b30") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

void function_1(type_1 *s)

{
  type_2 *puVar1;
  type_3 var_1;
  
  var_1 = *(type_3 *)&s->sy_flags;
  if ((var_1 & 1) != 0) {
    if ((type_4)s->bsym == var_2) {
      s = (s->sy_value).X_op_symbol;
      var_1 = *(type_3 *)&s->sy_flags;
    }
    else {
      s = var_3((type_5 *)s);
      var_1 = *(type_3 *)&s->sy_flags;
    }
  }
  puVar1 = &(s->sy_flags).field_0x1;
  *puVar1 = *puVar1 | 2;
  if ((var_1 & 0x20) == 0) {
    return;
  }
  var_4((s->sy_value).X_add_symbol);
  return;
}


(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)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (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: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement))))

/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

void MASKED(byte *param_1)

{
  byte bVar1;
  
  bVar1 = *param_1;
  if ((bVar1 & 1) != 0) {
    if (*(int *)(param_1 + 4) == DAT_00074e10) {
      param_1 = *(byte **)(param_1 + 0xc);
      bVar1 = *param_1;
    }
    else {
      param_1 = (byte *)FUN_00036fe0();
      bVar1 = *param_1;
    }
  }
  param_1[1] = param_1[1] | 2;
  if ((bVar1 & 0x20) == 0) {
    return;
  }
  FUN_00039b30();
  return;
}

