
/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */
/* std::locale::locale(std::locale const&) */

void __thiscall std::locale::locale(locale *this,locale *param_1)

{
  int *piVar1;
  
  piVar1 = *(int **)param_1;
  *(int **)this = piVar1;
  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {
    LOCK();
    *piVar1 = *piVar1 + 1;
    UNLOCK();
    return;
  }
  *piVar1 = *piVar1 + 1;
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

void FUN_0024a1b0(undefined4 *param_1,undefined4 *param_2)

{
  int *piVar1;
  
  piVar1 = (int *)*param_2;
  *param_1 = piVar1;
  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {
    LOCK();
    *piVar1 = *piVar1 + 1;
    UNLOCK();
    return;
  }
  *piVar1 = *piVar1 + 1;
  return;
}


CALL 0x0003a345
ADD EDX,0x1c9e4b
MOV EAX,dword ptr [ESP + 0x8]
MOV ECX,dword ptr [ESP + 0x4]
MOV EAX,dword ptr [EAX]
MOV dword ptr [ECX],EAX
MOV EDX,dword ptr [EDX + 0xfffffff8]
TEST EDX,EDX
JZ 0x0024a1e0
ADD.LOCK dword ptr [EAX],0x1
RET
ADD dword ptr [EAX],0x1
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n\nvoid FUN_0024a1b0(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)*param_2;\n  *param_1 = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}\n\n" comment (function_definition "void FUN_0024a1b0(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)*param_2;\n  *param_1 = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}" primitive_type (function_declarator "FUN_0024a1b0(undefined4 *param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 *param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  \n  piVar1 = (int *)*param_2;\n  *param_1 = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (expression_statement "piVar1 = (int *)*param_2;" (assignment_expression "piVar1 = (int *)*param_2" identifier = (cast_expression "(int *)*param_2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "*param_1 = piVar1;" (assignment_expression "*param_1 = piVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }" if (parenthesized_expression "(PTR___pthread_key_create_00413ff8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_00413ff8 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n/* std::locale::locale(std::locale const&) */\n\nvoid __thiscall std::locale::locale(locale *this,locale *param_1)\n\n{\n  int *piVar1;\n  \n  piVar1 = *(int **)param_1;\n  *(int **)this = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}\n\n" comment comment (function_definition "void __thiscall std::locale::locale(locale *this,locale *param_1)\n\n{\n  int *piVar1;\n  \n  piVar1 = *(int **)param_1;\n  *(int **)this = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::locale::" identifier : : identifier : :) (function_declarator "locale(locale *this,locale *param_1)" identifier (parameter_list "(locale *this,locale *param_1)" ( (parameter_declaration "locale *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "locale *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  \n  piVar1 = *(int **)param_1;\n  *(int **)this = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (expression_statement "piVar1 = *(int **)param_1;" (assignment_expression "piVar1 = *(int **)param_1" identifier = (pointer_expression "*(int **)param_1" * (cast_expression "(int **)param_1" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "*(int **)this = piVar1;" (assignment_expression "*(int **)this = piVar1" (pointer_expression "*(int **)this" * (cast_expression "(int **)this" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (if_statement "if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }" if (parenthesized_expression "(PTR___pthread_key_create_00413ff8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_00413ff8 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0024a1b0(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)*param_2;\n  *param_1 = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}\n\n" (function_definition "void FUN_0024a1b0(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)*param_2;\n  *param_1 = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}" primitive_type (function_declarator "FUN_0024a1b0(undefined4 *param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 *param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  \n  piVar1 = (int *)*param_2;\n  *param_1 = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (expression_statement "piVar1 = (int *)*param_2;" (assignment_expression "piVar1 = (int *)*param_2" identifier = (cast_expression "(int *)*param_2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "*param_1 = piVar1;" (assignment_expression "*param_1 = piVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }" if (parenthesized_expression "(PTR___pthread_key_create_00413ff8 != (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_00413ff8 != (undefined *)0x0" identifier != (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = 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 ( ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (return_statement return ;) })))
(function_definition "void FUN_0024a1b0(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)*param_2;\n  *param_1 = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0024a1b0(undefined4 *param_1,undefined4 *param_2)" (identifier "FUN_0024a1b0") (parameter_list "(undefined4 *param_1,undefined4 *param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int *piVar1;\n  \n  piVar1 = (int *)*param_2;\n  *param_1 = piVar1;\n  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }\n  *piVar1 = *piVar1 + 1;\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (expression_statement "piVar1 = (int *)*param_2;" (assignment_expression "piVar1 = (int *)*param_2" (identifier "piVar1") (= "=") (cast_expression "(int *)*param_2" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "*param_1 = piVar1;" (assignment_expression "*param_1 = piVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "piVar1")) (; ";")) (if_statement "if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_00413ff8 != (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_00413ff8 != (undefined *)0x0" (identifier "PTR___pthread_key_create_00413ff8") (!= "!=") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    LOCK();\n    *piVar1 = *piVar1 + 1;\n    UNLOCK();\n    return;\n  }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "*piVar1 = *piVar1 + 1;" (assignment_expression "*piVar1 = *piVar1 + 1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (binary_expression "*piVar1 + 1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "1"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */
/* std::locale::locale(std::locale const&) */

void __thiscall std::function_1::function_1(function_1 *this,function_1 *param_1)

{
  int *piVar1;
  
  piVar1 = *(int **)param_1;
  *(int **)this = piVar1;
  if (var_1 != (type_1 *)0x0) {
    var_2();
    *piVar1 = *piVar1 + 1;
    var_3();
    return;
  }
  *piVar1 = *piVar1 + 1;
  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))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) 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))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (return_statement))))

/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

void MASKED(undefined4 *param_1,undefined4 *param_2)

{
  int *piVar1;
  
  piVar1 = (int *)*param_2;
  *param_1 = piVar1;
  if (PTR___pthread_key_create_00413ff8 != (undefined *)0x0) {
    LOCK();
    *piVar1 = *piVar1 + 1;
    UNLOCK();
    return;
  }
  *piVar1 = *piVar1 + 1;
  return;
}

