
/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */
/* std::wstring::_Rep::_M_refcopy() */

_Rep * __thiscall std::wstring::_Rep::_M_refcopy(_Rep *this)

{
  if (this != (_Rep *)PTR__S_empty_rep_storage_0038ed58) {
    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {
      *(int *)(this + 8) = *(int *)(this + 8) + 1;
    }
    else {
      LOCK();
      *(int *)(this + 8) = *(int *)(this + 8) + 1;
      UNLOCK();
    }
  }
  return this + 0xc;
}



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

undefined * FUN_0026ace0(undefined *param_1)

{
  if (param_1 != PTR_DAT_0038ed58) {
    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {
      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;
    }
    else {
      LOCK();
      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;
      UNLOCK();
    }
  }
  return param_1 + 0xc;
}


CALL 0x00035975
ADD EDX,0x12431b
MOV EAX,dword ptr [ESP + 0x4]
CMP EAX,dword ptr [EDX + 0xfffffd58]
JNZ 0x0026ad00
ADD EAX,0xc
RET
MOV EDX,dword ptr [EDX + 0xffffff24]
TEST EDX,EDX
JZ 0x0026ad18
ADD.LOCK dword ptr [EAX + 0x8],0x1
JMP 0x0026acf7
ADD dword ptr [EAX + 0x8],0x1
JMP 0x0026acf7
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n\nundefined * FUN_0026ace0(undefined *param_1)\n\n{\n  if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }\n  return param_1 + 0xc;\n}\n\n" comment (function_definition "undefined * FUN_0026ace0(undefined *param_1)\n\n{\n  if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }\n  return param_1 + 0xc;\n}" type_identifier (pointer_declarator "* FUN_0026ace0(undefined *param_1)" * (function_declarator "FUN_0026ace0(undefined *param_1)" identifier (parameter_list "(undefined *param_1)" ( (parameter_declaration "undefined *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }\n  return param_1 + 0xc;\n}" { (if_statement "if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }" if (parenthesized_expression "(param_1 != PTR_DAT_0038ed58)" ( (binary_expression "param_1 != PTR_DAT_0038ed58" identifier != identifier) )) (compound_statement "{\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }" { (if_statement "if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }" { (expression_statement "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;" (assignment_expression "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;" (assignment_expression "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) })) (return_statement "return param_1 + 0xc;" return (binary_expression "param_1 + 0xc" identifier + number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n/* std::wstring::_Rep::_M_refcopy() */\n\n_Rep * __thiscall std::wstring::_Rep::_M_refcopy(_Rep *this)\n\n{\n  if (this != (_Rep *)PTR__S_empty_rep_storage_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n      UNLOCK();\n    }\n  }\n  return this + 0xc;\n}\n\n" comment comment (ERROR "_Rep * __thiscall std::wstring::_Rep::_M_refcopy(_Rep *this)" (binary_expression "_Rep * __thiscall std::wstring::_Rep::_M_refcopy(_Rep *this" (binary_expression "_Rep * __thiscall" identifier * identifier) (ERROR "std::wstring::_Rep::_M_refcopy(_Rep" identifier : : identifier : : identifier : : identifier ( identifier) * identifier) )) (compound_statement "{\n  if (this != (_Rep *)PTR__S_empty_rep_storage_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n      UNLOCK();\n    }\n  }\n  return this + 0xc;\n}" { (if_statement "if (this != (_Rep *)PTR__S_empty_rep_storage_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n      UNLOCK();\n    }\n  }" if (parenthesized_expression "(this != (_Rep *)PTR__S_empty_rep_storage_0038ed58)" ( (binary_expression "this != (_Rep *)PTR__S_empty_rep_storage_0038ed58" identifier != (cast_expression "(_Rep *)PTR__S_empty_rep_storage_0038ed58" ( (type_descriptor "_Rep *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n      UNLOCK();\n    }\n  }" { (if_statement "if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n    }" { (expression_statement "*(int *)(this + 8) = *(int *)(this + 8) + 1;" (assignment_expression "*(int *)(this + 8) = *(int *)(this + 8) + 1" (pointer_expression "*(int *)(this + 8)" * (cast_expression "(int *)(this + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (binary_expression "*(int *)(this + 8) + 1" (pointer_expression "*(int *)(this + 8)" * (cast_expression "(int *)(this + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      *(int *)(this + 8) = *(int *)(this + 8) + 1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(int *)(this + 8) = *(int *)(this + 8) + 1;" (assignment_expression "*(int *)(this + 8) = *(int *)(this + 8) + 1" (pointer_expression "*(int *)(this + 8)" * (cast_expression "(int *)(this + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (binary_expression "*(int *)(this + 8) + 1" (pointer_expression "*(int *)(this + 8)" * (cast_expression "(int *)(this + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) })) (return_statement "return this + 0xc;" return (binary_expression "this + 0xc" identifier + number_literal) ;) }))
(translation_unit "undefined * FUN_0026ace0(undefined *param_1)\n\n{\n  if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }\n  return param_1 + 0xc;\n}\n\n" (function_definition "undefined * FUN_0026ace0(undefined *param_1)\n\n{\n  if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }\n  return param_1 + 0xc;\n}" type_identifier (pointer_declarator "* FUN_0026ace0(undefined *param_1)" * (function_declarator "FUN_0026ace0(undefined *param_1)" identifier (parameter_list "(undefined *param_1)" ( (parameter_declaration "undefined *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }\n  return param_1 + 0xc;\n}" { (if_statement "if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }" if (parenthesized_expression "(param_1 != PTR_DAT_0038ed58)" ( (binary_expression "param_1 != PTR_DAT_0038ed58" identifier != identifier) )) (compound_statement "{\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }" { (if_statement "if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }" if (parenthesized_expression "(PTR___pthread_key_create_0038ef24 == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_0038ef24 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }" { (expression_statement "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;" (assignment_expression "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) + number_literal)) ;) }) (else_clause "else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }" else (compound_statement "{\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;" (assignment_expression "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) })) (return_statement "return param_1 + 0xc;" return (binary_expression "param_1 + 0xc" identifier + number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (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)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (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 (call_expression IDENT (argument_list ( ))) ;) }))) })) (return_statement return (binary_expression IDENT + LIT) ;) })))
(function_definition "undefined * FUN_0026ace0(undefined *param_1)\n\n{\n  if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }\n  return param_1 + 0xc;\n}" (type_identifier "undefined") (pointer_declarator "* FUN_0026ace0(undefined *param_1)" (* "*") (function_declarator "FUN_0026ace0(undefined *param_1)" (identifier "FUN_0026ace0") (parameter_list "(undefined *param_1)" (( "(") (parameter_declaration "undefined *param_1" (type_identifier "undefined") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")")))) (compound_statement "{\n  if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }\n  return param_1 + 0xc;\n}" ({ "{") (if_statement "if (param_1 != PTR_DAT_0038ed58) {\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }" (if "if") (parenthesized_expression "(param_1 != PTR_DAT_0038ed58)" (( "(") (binary_expression "param_1 != PTR_DAT_0038ed58" (identifier "param_1") (!= "!=") (identifier "PTR_DAT_0038ed58")) () ")")) (compound_statement "{\n    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }\n  }" ({ "{") (if_statement "if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }\n    else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_0038ef24 == (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_0038ef24 == (undefined *)0x0" (identifier "PTR___pthread_key_create_0038ef24") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n    }" ({ "{") (expression_statement "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;" (assignment_expression "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }" (else "else") (compound_statement "{\n      LOCK();\n      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;\n      UNLOCK();\n    }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;" (assignment_expression "*(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 8) + 1" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (} "}"))) (return_statement "return param_1 + 0xc;" (return "return") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */
/* std::wstring::_Rep::_M_refcopy() */

type_1 * __thiscall std::wstring::type_1::_M_refcopy(type_1 *var_1)

{
  if (var_1 != (type_1 *)PTR__S_empty_rep_storage_0038ed58) {
    if (var_2 == (type_2 *)0x0) {
      *(int *)(var_1 + 8) = *(int *)(var_1 + 8) + 1;
    }
    else {
      var_3();
      *(int *)(var_1 + 8) = *(int *)(var_1 + 8) + 1;
      var_4();
    }
  }
  return var_1 + 0xc;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (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 (assignment_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: (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))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_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: (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)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))))) (return_statement (binary_expression left: (identifier) right: (number_literal))))))

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

undefined * MASKED(undefined *param_1)

{
  if (param_1 != PTR_DAT_0038ed58) {
    if (PTR___pthread_key_create_0038ef24 == (undefined *)0x0) {
      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;
    }
    else {
      LOCK();
      *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 1;
      UNLOCK();
    }
  }
  return param_1 + 0xc;
}

