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

void __register_frame_info_table_bases
               (undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)

{
  undefined *puVar1;
  undefined4 uVar2;
  
  *param_2 = 0xffffffff;
  param_2[1] = param_3;
  param_2[4] = 0x7fa;
  param_2[2] = param_4;
  puVar1 = PTR___pthread_key_create_0038ef24;
  param_2[3] = param_1;
  if (puVar1 != (undefined *)0x0) {
    pthread_mutex_lock((pthread_mutex_t *)object_mutex);
  }
  uVar2 = unseen_objects;
  unseen_objects = param_2;
  param_2[5] = uVar2;
  if (any_objects_registered == 0) {
    any_objects_registered = 1;
  }
  if (puVar1 != (undefined *)0x0) {
    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);
  }
  return;
}



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

void FUN_0027f6b0(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)

{
  undefined *puVar1;
  undefined4 uVar2;
  
  *param_2 = 0xffffffff;
  param_2[1] = param_3;
  param_2[4] = 0x7fa;
  param_2[2] = param_4;
  puVar1 = PTR___pthread_key_create_0038ef24;
  param_2[3] = param_1;
  if (puVar1 != (undefined *)0x0) {
    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);
  }
  uVar2 = DAT_00398140;
  DAT_00398140 = param_2;
  param_2[5] = uVar2;
  if (DAT_00398138 == 0) {
    DAT_00398138 = 1;
  }
  if (puVar1 != (undefined *)0x0) {
    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);
  }
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x14]
CALL 0x00035840
ADD EBX,0x10f944
MOV EAX,dword ptr [ESP + 0x18]
MOV dword ptr [ESI],0xffffffff
MOV dword ptr [ESI + 0x4],EAX
MOV EAX,dword ptr [ESP + 0x1c]
MOV dword ptr [ESI + 0x10],0x7fa
MOV dword ptr [ESI + 0x8],EAX
MOV EAX,dword ptr [ESP + 0x10]
MOV EDI,dword ptr [EBX + 0xffffff24]
MOV dword ptr [ESI + 0xc],EAX
TEST EDI,EDI
JZ 0x0027f700
SUB ESP,0xc
LEA EAX,[EBX + 0x9120]
PUSH EAX
CALL 0x000297c0
ADD ESP,0x10
MOV EAX,dword ptr [EBX + 0x9140]
MOV dword ptr [EBX + 0x9140],ESI
MOV dword ptr [ESI + 0x14],EAX
MOV EAX,dword ptr [EBX + 0x9138]
TEST EAX,EAX
JZ 0x0027f738
TEST EDI,EDI
JZ 0x0027f72f
SUB ESP,0xc
LEA EAX,[EBX + 0x9120]
PUSH EAX
CALL 0x00029500
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
MOV dword ptr [EBX + 0x9138],0x1
JMP 0x0027f719
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0027f6b0(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  uVar2 = DAT_00398140;\n  DAT_00398140 = param_2;\n  param_2[5] = uVar2;\n  if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_0027f6b0(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  uVar2 = DAT_00398140;\n  DAT_00398140 = param_2;\n  param_2[5] = uVar2;\n  if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0027f6b0(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  uVar2 = DAT_00398140;\n  DAT_00398140 = param_2;\n  param_2[5] = uVar2;\n  if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "*param_2 = 0xffffffff;" (assignment_expression "*param_2 = 0xffffffff" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "param_2[1] = param_3;" (assignment_expression "param_2[1] = param_3" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[4] = 0x7fa;" (assignment_expression "param_2[4] = 0x7fa" (subscript_expression "param_2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[2] = param_4;" (assignment_expression "param_2[2] = param_4" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar1 = PTR___pthread_key_create_0038ef24" identifier = identifier) ;) (expression_statement "param_2[3] = param_1;" (assignment_expression "param_2[3] = param_1" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" { (expression_statement "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120)" identifier (argument_list "((pthread_mutex_t *)&DAT_00398120)" ( (cast_expression "(pthread_mutex_t *)&DAT_00398120" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00398120" & identifier)) ))) ;) })) (expression_statement "uVar2 = DAT_00398140;" (assignment_expression "uVar2 = DAT_00398140" identifier = identifier) ;) (expression_statement "DAT_00398140 = param_2;" (assignment_expression "DAT_00398140 = param_2" identifier = identifier) ;) (expression_statement "param_2[5] = uVar2;" (assignment_expression "param_2[5] = uVar2" (subscript_expression "param_2[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }" if (parenthesized_expression "(DAT_00398138 == 0)" ( (binary_expression "DAT_00398138 == 0" identifier == number_literal) )) (compound_statement "{\n    DAT_00398138 = 1;\n  }" { (expression_statement "DAT_00398138 = 1;" (assignment_expression "DAT_00398138 = 1" identifier = number_literal) ;) })) (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" { (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120)" identifier (argument_list "((pthread_mutex_t *)&DAT_00398120)" ( (cast_expression "(pthread_mutex_t *)&DAT_00398120" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00398120" & identifier)) ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __register_frame_info_table_bases\n               (undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)object_mutex);\n  }\n  uVar2 = unseen_objects;\n  unseen_objects = param_2;\n  param_2[5] = uVar2;\n  if (any_objects_registered == 0) {\n    any_objects_registered = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }\n  return;\n}\n\n" comment (function_definition "void __register_frame_info_table_bases\n               (undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)object_mutex);\n  }\n  uVar2 = unseen_objects;\n  unseen_objects = param_2;\n  param_2[5] = uVar2;\n  if (any_objects_registered == 0) {\n    any_objects_registered = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }\n  return;\n}" primitive_type (function_declarator "__register_frame_info_table_bases\n               (undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)object_mutex);\n  }\n  uVar2 = unseen_objects;\n  unseen_objects = param_2;\n  param_2[5] = uVar2;\n  if (any_objects_registered == 0) {\n    any_objects_registered = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "*param_2 = 0xffffffff;" (assignment_expression "*param_2 = 0xffffffff" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "param_2[1] = param_3;" (assignment_expression "param_2[1] = param_3" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[4] = 0x7fa;" (assignment_expression "param_2[4] = 0x7fa" (subscript_expression "param_2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[2] = param_4;" (assignment_expression "param_2[2] = param_4" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar1 = PTR___pthread_key_create_0038ef24" identifier = identifier) ;) (expression_statement "param_2[3] = param_1;" (assignment_expression "param_2[3] = param_1" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)object_mutex);\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_lock((pthread_mutex_t *)object_mutex);\n  }" { (expression_statement "pthread_mutex_lock((pthread_mutex_t *)object_mutex);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)object_mutex)" identifier (argument_list "((pthread_mutex_t *)object_mutex)" ( (cast_expression "(pthread_mutex_t *)object_mutex" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) })) (expression_statement "uVar2 = unseen_objects;" (assignment_expression "uVar2 = unseen_objects" identifier = identifier) ;) (expression_statement "unseen_objects = param_2;" (assignment_expression "unseen_objects = param_2" identifier = identifier) ;) (expression_statement "param_2[5] = uVar2;" (assignment_expression "param_2[5] = uVar2" (subscript_expression "param_2[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (any_objects_registered == 0) {\n    any_objects_registered = 1;\n  }" if (parenthesized_expression "(any_objects_registered == 0)" ( (binary_expression "any_objects_registered == 0" identifier == number_literal) )) (compound_statement "{\n    any_objects_registered = 1;\n  }" { (expression_statement "any_objects_registered = 1;" (assignment_expression "any_objects_registered = 1" identifier = number_literal) ;) })) (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_unlock((pthread_mutex_t *)object_mutex);\n  }" { (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)object_mutex);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)object_mutex)" identifier (argument_list "((pthread_mutex_t *)object_mutex)" ( (cast_expression "(pthread_mutex_t *)object_mutex" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0027f6b0(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  uVar2 = DAT_00398140;\n  DAT_00398140 = param_2;\n  param_2[5] = uVar2;\n  if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return;\n}\n\n" (function_definition "void FUN_0027f6b0(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  uVar2 = DAT_00398140;\n  DAT_00398140 = param_2;\n  param_2[5] = uVar2;\n  if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0027f6b0(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  uVar2 = DAT_00398140;\n  DAT_00398140 = param_2;\n  param_2[5] = uVar2;\n  if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "*param_2 = 0xffffffff;" (assignment_expression "*param_2 = 0xffffffff" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "param_2[1] = param_3;" (assignment_expression "param_2[1] = param_3" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[4] = 0x7fa;" (assignment_expression "param_2[4] = 0x7fa" (subscript_expression "param_2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[2] = param_4;" (assignment_expression "param_2[2] = param_4" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar1 = PTR___pthread_key_create_0038ef24" identifier = identifier) ;) (expression_statement "param_2[3] = param_1;" (assignment_expression "param_2[3] = param_1" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" { (expression_statement "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120)" identifier (argument_list "((pthread_mutex_t *)&DAT_00398120)" ( (cast_expression "(pthread_mutex_t *)&DAT_00398120" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00398120" & identifier)) ))) ;) })) (expression_statement "uVar2 = DAT_00398140;" (assignment_expression "uVar2 = DAT_00398140" identifier = identifier) ;) (expression_statement "DAT_00398140 = param_2;" (assignment_expression "DAT_00398140 = param_2" identifier = identifier) ;) (expression_statement "param_2[5] = uVar2;" (assignment_expression "param_2[5] = uVar2" (subscript_expression "param_2[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }" if (parenthesized_expression "(DAT_00398138 == 0)" ( (binary_expression "DAT_00398138 == 0" identifier == number_literal) )) (compound_statement "{\n    DAT_00398138 = 1;\n  }" { (expression_statement "DAT_00398138 = 1;" (assignment_expression "DAT_00398138 = 1" identifier = number_literal) ;) })) (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" if (parenthesized_expression "(puVar1 != (undefined *)0x0)" ( (binary_expression "puVar1 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" { (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120)" identifier (argument_list "((pthread_mutex_t *)&DAT_00398120)" ( (cast_expression "(pthread_mutex_t *)&DAT_00398120" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00398120" & identifier)) ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT)) ))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT)) ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_0027f6b0(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  uVar2 = DAT_00398140;\n  DAT_00398140 = param_2;\n  param_2[5] = uVar2;\n  if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0027f6b0(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)" (identifier "FUN_0027f6b0") (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 uVar2;\n  \n  *param_2 = 0xffffffff;\n  param_2[1] = param_3;\n  param_2[4] = 0x7fa;\n  param_2[2] = param_4;\n  puVar1 = PTR___pthread_key_create_0038ef24;\n  param_2[3] = param_1;\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }\n  uVar2 = DAT_00398140;\n  DAT_00398140 = param_2;\n  param_2[5] = uVar2;\n  if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }\n  if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "*param_2 = 0xffffffff;" (assignment_expression "*param_2 = 0xffffffff" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "param_2[1] = param_3;" (assignment_expression "param_2[1] = param_3" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "param_2[4] = 0x7fa;" (assignment_expression "param_2[4] = 0x7fa" (subscript_expression "param_2[4]" (identifier "param_2") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0x7fa")) (; ";")) (expression_statement "param_2[2] = param_4;" (assignment_expression "param_2[2] = param_4" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_4")) (; ";")) (expression_statement "puVar1 = PTR___pthread_key_create_0038ef24;" (assignment_expression "puVar1 = PTR___pthread_key_create_0038ef24" (identifier "puVar1") (= "=") (identifier "PTR___pthread_key_create_0038ef24")) (; ";")) (expression_statement "param_2[3] = param_1;" (assignment_expression "param_2[3] = param_1" (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "param_1")) (; ";")) (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" (if "if") (parenthesized_expression "(puVar1 != (undefined *)0x0)" (( "(") (binary_expression "puVar1 != (undefined *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);\n  }" ({ "{") (expression_statement "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120)" (identifier "pthread_mutex_lock") (argument_list "((pthread_mutex_t *)&DAT_00398120)" (( "(") (cast_expression "(pthread_mutex_t *)&DAT_00398120" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_00398120" (& "&") (identifier "DAT_00398120"))) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar2 = DAT_00398140;" (assignment_expression "uVar2 = DAT_00398140" (identifier "uVar2") (= "=") (identifier "DAT_00398140")) (; ";")) (expression_statement "DAT_00398140 = param_2;" (assignment_expression "DAT_00398140 = param_2" (identifier "DAT_00398140") (= "=") (identifier "param_2")) (; ";")) (expression_statement "param_2[5] = uVar2;" (assignment_expression "param_2[5] = uVar2" (subscript_expression "param_2[5]" (identifier "param_2") ([ "[") (number_literal "5") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (if_statement "if (DAT_00398138 == 0) {\n    DAT_00398138 = 1;\n  }" (if "if") (parenthesized_expression "(DAT_00398138 == 0)" (( "(") (binary_expression "DAT_00398138 == 0" (identifier "DAT_00398138") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    DAT_00398138 = 1;\n  }" ({ "{") (expression_statement "DAT_00398138 = 1;" (assignment_expression "DAT_00398138 = 1" (identifier "DAT_00398138") (= "=") (number_literal "1")) (; ";")) (} "}"))) (if_statement "if (puVar1 != (undefined *)0x0) {\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" (if "if") (parenthesized_expression "(puVar1 != (undefined *)0x0)" (( "(") (binary_expression "puVar1 != (undefined *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);\n  }" ({ "{") (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120)" (identifier "pthread_mutex_unlock") (argument_list "((pthread_mutex_t *)&DAT_00398120)" (( "(") (cast_expression "(pthread_mutex_t *)&DAT_00398120" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_00398120" (& "&") (identifier "DAT_00398120"))) () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1
               (type_1 param_1,type_1 *param_2,type_1 param_3,type_1 param_4)

{
  type_2 *var_1;
  type_1 uVar2;
  
  *param_2 = 0xffffffff;
  param_2[1] = param_3;
  param_2[4] = 0x7fa;
  param_2[2] = param_4;
  var_1 = PTR___pthread_key_create_0038ef24;
  param_2[3] = param_1;
  if (var_1 != (type_2 *)0x0) {
    var_2((type_3 *)object_mutex);
  }
  uVar2 = unseen_objects;
  unseen_objects = param_2;
  param_2[5] = uVar2;
  if (var_3 == 0) {
    var_3 = 1;
  }
  if (var_1 != (type_2 *)0x0) {
    var_4((type_3 *)object_mutex);
  }
  return;
}


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

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

void MASKED(undefined4 param_1,undefined4 *param_2,undefined4 param_3,undefined4 param_4)

{
  undefined *puVar1;
  undefined4 uVar2;
  
  *param_2 = 0xffffffff;
  param_2[1] = param_3;
  param_2[4] = 0x7fa;
  param_2[2] = param_4;
  puVar1 = PTR___pthread_key_create_0038ef24;
  param_2[3] = param_1;
  if (puVar1 != (undefined *)0x0) {
    pthread_mutex_lock((pthread_mutex_t *)&DAT_00398120);
  }
  uVar2 = DAT_00398140;
  DAT_00398140 = param_2;
  param_2[5] = uVar2;
  if (DAT_00398138 == 0) {
    DAT_00398138 = 1;
  }
  if (puVar1 != (undefined *)0x0) {
    pthread_mutex_unlock((pthread_mutex_t *)&DAT_00398120);
  }
  return;
}

