
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* __gxx_exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception*) */

void __gxx_exception_cleanup(uint param_1,int param_2)

{
  int *piVar1;
  
  if (param_1 < 2) {
    LOCK();
    piVar1 = (int *)(param_2 + -0x40);
    *piVar1 = *piVar1 + -1;
    UNLOCK();
    if (*piVar1 == 0) {
      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {
        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);
      }
      __cxa_free_exception(param_2 + 0x20);
    }
    return;
  }
                    /* WARNING: Subroutine does not return */
  __cxxabiv1::__terminate(*(_func_void **)(param_2 + -0x24));
}



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

void FUN_001fb7e0(uint param_1,int param_2)

{
  int *piVar1;
  
  if (param_1 < 2) {
    LOCK();
    piVar1 = (int *)(param_2 + -0x40);
    *piVar1 = *piVar1 + -1;
    UNLOCK();
    if (*piVar1 == 0) {
      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {
        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);
      }
      FUN_001fcec0(param_2 + 0x20);
    }
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_001fb960(*(undefined4 *)(param_2 + -0x24));
}


PUSH ESI
PUSH EBX
CALL 0x00036db0
ADD EBX,0x1ae819
SUB ESP,0x4
CMP dword ptr [ESP + 0x10],0x1
MOV EAX,dword ptr [ESP + 0x14]
JA 0x001fb827
SUB.LOCK dword ptr [EAX + -0x40],0x1
JNZ 0x001fb821
MOV EDX,dword ptr [EAX + -0x2c]
LEA ESI,[EAX + 0x20]
TEST EDX,EDX
JZ 0x001fb815
SUB ESP,0xc
PUSH ESI
CALL EDX
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x001fcec0
ADD ESP,0x10
ADD ESP,0x4
POP EBX
POP ESI
RET
SUB ESP,0xc
PUSH dword ptr [EAX + -0x24]
CALL 0x001fb960
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_001fb7e0(uint param_1,int param_2)\n\n{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_001fb960(*(undefined4 *)(param_2 + -0x24));\n}\n\n" comment (function_definition "void FUN_001fb7e0(uint param_1,int param_2)\n\n{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_001fb960(*(undefined4 *)(param_2 + -0x24));\n}" primitive_type (function_declarator "FUN_001fb7e0(uint param_1,int param_2)" identifier (parameter_list "(uint param_1,int param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_001fb960(*(undefined4 *)(param_2 + -0x24));\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (if_statement "if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }" if (parenthesized_expression "(param_1 < 2)" ( (binary_expression "param_1 < 2" identifier < number_literal) )) (compound_statement "{\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(param_2 + -0x40);" (assignment_expression "piVar1 = (int *)(param_2 + -0x40)" identifier = (cast_expression "(int *)(param_2 + -0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + -0x40)" ( (binary_expression "param_2 + -0x40" identifier + number_literal) )))) ;) (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 "()" ( ))) ;) (if_statement "if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }" if (parenthesized_expression "(*piVar1 == 0)" ( (binary_expression "*piVar1 == 0" (pointer_expression "*piVar1" * identifier) == number_literal) )) (compound_statement "{\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }" { (if_statement "if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }" if (parenthesized_expression "(*(code **)(param_2 + -0x2c) != (code *)0x0)" ( (binary_expression "*(code **)(param_2 + -0x2c) != (code *)0x0" (pointer_expression "*(code **)(param_2 + -0x2c)" * (cast_expression "(code **)(param_2 + -0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + -0x2c)" ( (binary_expression "param_2 + -0x2c" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }" { (expression_statement "(**(code **)(param_2 + -0x2c))(param_2 + 0x20);" (call_expression "(**(code **)(param_2 + -0x2c))(param_2 + 0x20)" (parenthesized_expression "(**(code **)(param_2 + -0x2c))" ( (pointer_expression "**(code **)(param_2 + -0x2c)" * (pointer_expression "*(code **)(param_2 + -0x2c)" * (cast_expression "(code **)(param_2 + -0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + -0x2c)" ( (binary_expression "param_2 + -0x2c" identifier + number_literal) ))))) )) (argument_list "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) ))) ;) })) (expression_statement "FUN_001fcec0(param_2 + 0x20);" (call_expression "FUN_001fcec0(param_2 + 0x20)" identifier (argument_list "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) ))) ;) })) (return_statement "return;" return ;) })) comment (expression_statement "FUN_001fb960(*(undefined4 *)(param_2 + -0x24));" (call_expression "FUN_001fb960(*(undefined4 *)(param_2 + -0x24))" identifier (argument_list "(*(undefined4 *)(param_2 + -0x24))" ( (pointer_expression "*(undefined4 *)(param_2 + -0x24)" * (cast_expression "(undefined4 *)(param_2 + -0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + -0x24)" ( (binary_expression "param_2 + -0x24" identifier + number_literal) )))) ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* __gxx_exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception*) */\n\nvoid __gxx_exception_cleanup(uint param_1,int param_2)\n\n{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      __cxa_free_exception(param_2 + 0x20);\n    }\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __cxxabiv1::__terminate(*(_func_void **)(param_2 + -0x24));\n}\n\n" comment comment (function_definition "void __gxx_exception_cleanup(uint param_1,int param_2)\n\n{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      __cxa_free_exception(param_2 + 0x20);\n    }\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __cxxabiv1::__terminate(*(_func_void **)(param_2 + -0x24));\n}" primitive_type (function_declarator "__gxx_exception_cleanup(uint param_1,int param_2)" identifier (parameter_list "(uint param_1,int param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      __cxa_free_exception(param_2 + 0x20);\n    }\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __cxxabiv1::__terminate(*(_func_void **)(param_2 + -0x24));\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (if_statement "if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      __cxa_free_exception(param_2 + 0x20);\n    }\n    return;\n  }" if (parenthesized_expression "(param_1 < 2)" ( (binary_expression "param_1 < 2" identifier < number_literal) )) (compound_statement "{\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      __cxa_free_exception(param_2 + 0x20);\n    }\n    return;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(param_2 + -0x40);" (assignment_expression "piVar1 = (int *)(param_2 + -0x40)" identifier = (cast_expression "(int *)(param_2 + -0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + -0x40)" ( (binary_expression "param_2 + -0x40" identifier + number_literal) )))) ;) (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 "()" ( ))) ;) (if_statement "if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      __cxa_free_exception(param_2 + 0x20);\n    }" if (parenthesized_expression "(*piVar1 == 0)" ( (binary_expression "*piVar1 == 0" (pointer_expression "*piVar1" * identifier) == number_literal) )) (compound_statement "{\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      __cxa_free_exception(param_2 + 0x20);\n    }" { (if_statement "if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }" if (parenthesized_expression "(*(code **)(param_2 + -0x2c) != (code *)0x0)" ( (binary_expression "*(code **)(param_2 + -0x2c) != (code *)0x0" (pointer_expression "*(code **)(param_2 + -0x2c)" * (cast_expression "(code **)(param_2 + -0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + -0x2c)" ( (binary_expression "param_2 + -0x2c" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }" { (expression_statement "(**(code **)(param_2 + -0x2c))(param_2 + 0x20);" (call_expression "(**(code **)(param_2 + -0x2c))(param_2 + 0x20)" (parenthesized_expression "(**(code **)(param_2 + -0x2c))" ( (pointer_expression "**(code **)(param_2 + -0x2c)" * (pointer_expression "*(code **)(param_2 + -0x2c)" * (cast_expression "(code **)(param_2 + -0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + -0x2c)" ( (binary_expression "param_2 + -0x2c" identifier + number_literal) ))))) )) (argument_list "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) ))) ;) })) (expression_statement "__cxa_free_exception(param_2 + 0x20);" (call_expression "__cxa_free_exception(param_2 + 0x20)" identifier (argument_list "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) ))) ;) })) (return_statement "return;" return ;) })) comment (labeled_statement "__cxxabiv1::__terminate(*(_func_void **)(param_2 + -0x24));" statement_identifier : (ERROR ":" :) (expression_statement "__terminate(*(_func_void **)(param_2 + -0x24));" (call_expression "__terminate(*(_func_void **)(param_2 + -0x24))" identifier (argument_list "(*(_func_void **)(param_2 + -0x24))" ( (pointer_expression "*(_func_void **)(param_2 + -0x24)" * (cast_expression "(_func_void **)(param_2 + -0x24)" ( (type_descriptor "_func_void **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + -0x24)" ( (binary_expression "param_2 + -0x24" identifier + number_literal) )))) ))) ;)) })))
(translation_unit "void FUN_001fb7e0(uint param_1,int param_2)\n\n{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }\n                    \n  FUN_001fb960(*(undefined4 *)(param_2 + -0x24));\n}\n\n" (function_definition "void FUN_001fb7e0(uint param_1,int param_2)\n\n{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }\n                    \n  FUN_001fb960(*(undefined4 *)(param_2 + -0x24));\n}" primitive_type (function_declarator "FUN_001fb7e0(uint param_1,int param_2)" identifier (parameter_list "(uint param_1,int param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }\n                    \n  FUN_001fb960(*(undefined4 *)(param_2 + -0x24));\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (if_statement "if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }" if (parenthesized_expression "(param_1 < 2)" ( (binary_expression "param_1 < 2" identifier < number_literal) )) (compound_statement "{\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(param_2 + -0x40);" (assignment_expression "piVar1 = (int *)(param_2 + -0x40)" identifier = (cast_expression "(int *)(param_2 + -0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + -0x40)" ( (binary_expression "param_2 + -0x40" identifier + number_literal) )))) ;) (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 "()" ( ))) ;) (if_statement "if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }" if (parenthesized_expression "(*piVar1 == 0)" ( (binary_expression "*piVar1 == 0" (pointer_expression "*piVar1" * identifier) == number_literal) )) (compound_statement "{\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }" { (if_statement "if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }" if (parenthesized_expression "(*(code **)(param_2 + -0x2c) != (code *)0x0)" ( (binary_expression "*(code **)(param_2 + -0x2c) != (code *)0x0" (pointer_expression "*(code **)(param_2 + -0x2c)" * (cast_expression "(code **)(param_2 + -0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + -0x2c)" ( (binary_expression "param_2 + -0x2c" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }" { (expression_statement "(**(code **)(param_2 + -0x2c))(param_2 + 0x20);" (call_expression "(**(code **)(param_2 + -0x2c))(param_2 + 0x20)" (parenthesized_expression "(**(code **)(param_2 + -0x2c))" ( (pointer_expression "**(code **)(param_2 + -0x2c)" * (pointer_expression "*(code **)(param_2 + -0x2c)" * (cast_expression "(code **)(param_2 + -0x2c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + -0x2c)" ( (binary_expression "param_2 + -0x2c" identifier + number_literal) ))))) )) (argument_list "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) ))) ;) })) (expression_statement "FUN_001fcec0(param_2 + 0x20);" (call_expression "FUN_001fcec0(param_2 + 0x20)" identifier (argument_list "(param_2 + 0x20)" ( (binary_expression "param_2 + 0x20" identifier + number_literal) ))) ;) })) (return_statement "return;" return ;) })) (expression_statement "FUN_001fb960(*(undefined4 *)(param_2 + -0x24));" (call_expression "FUN_001fb960(*(undefined4 *)(param_2 + -0x24))" identifier (argument_list "(*(undefined4 *)(param_2 + -0x24))" ( (pointer_expression "*(undefined4 *)(param_2 + -0x24)" * (cast_expression "(undefined4 *)(param_2 + -0x24)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + -0x24)" ( (binary_expression "param_2 + -0x24" identifier + number_literal) )))) ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( (binary_expression IDENT + LIT) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) })) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })))
(function_definition "void FUN_001fb7e0(uint param_1,int param_2)\n\n{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }\n                    \n  FUN_001fb960(*(undefined4 *)(param_2 + -0x24));\n}" (primitive_type "void") (function_declarator "FUN_001fb7e0(uint param_1,int param_2)" (identifier "FUN_001fb7e0") (parameter_list "(uint param_1,int param_2)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int *piVar1;\n  \n  if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }\n                    \n  FUN_001fb960(*(undefined4 *)(param_2 + -0x24));\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (if_statement "if (param_1 < 2) {\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }" (if "if") (parenthesized_expression "(param_1 < 2)" (( "(") (binary_expression "param_1 < 2" (identifier "param_1") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n    LOCK();\n    piVar1 = (int *)(param_2 + -0x40);\n    *piVar1 = *piVar1 + -1;\n    UNLOCK();\n    if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }\n    return;\n  }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar1 = (int *)(param_2 + -0x40);" (assignment_expression "piVar1 = (int *)(param_2 + -0x40)" (identifier "piVar1") (= "=") (cast_expression "(int *)(param_2 + -0x40)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + -0x40)" (( "(") (binary_expression "param_2 + -0x40" (identifier "param_2") (+ "+") (number_literal "-0x40")) () ")")))) (; ";")) (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 "()" (( "(") () ")"))) (; ";")) (if_statement "if (*piVar1 == 0) {\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }" (if "if") (parenthesized_expression "(*piVar1 == 0)" (( "(") (binary_expression "*piVar1 == 0" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }\n      FUN_001fcec0(param_2 + 0x20);\n    }" ({ "{") (if_statement "if (*(code **)(param_2 + -0x2c) != (code *)0x0) {\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }" (if "if") (parenthesized_expression "(*(code **)(param_2 + -0x2c) != (code *)0x0)" (( "(") (binary_expression "*(code **)(param_2 + -0x2c) != (code *)0x0" (pointer_expression "*(code **)(param_2 + -0x2c)" (* "*") (cast_expression "(code **)(param_2 + -0x2c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + -0x2c)" (( "(") (binary_expression "param_2 + -0x2c" (identifier "param_2") (+ "+") (number_literal "-0x2c")) () ")")))) (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);\n      }" ({ "{") (expression_statement "(**(code **)(param_2 + -0x2c))(param_2 + 0x20);" (call_expression "(**(code **)(param_2 + -0x2c))(param_2 + 0x20)" (parenthesized_expression "(**(code **)(param_2 + -0x2c))" (( "(") (pointer_expression "**(code **)(param_2 + -0x2c)" (* "*") (pointer_expression "*(code **)(param_2 + -0x2c)" (* "*") (cast_expression "(code **)(param_2 + -0x2c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + -0x2c)" (( "(") (binary_expression "param_2 + -0x2c" (identifier "param_2") (+ "+") (number_literal "-0x2c")) () ")"))))) () ")")) (argument_list "(param_2 + 0x20)" (( "(") (binary_expression "param_2 + 0x20" (identifier "param_2") (+ "+") (number_literal "0x20")) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_001fcec0(param_2 + 0x20);" (call_expression "FUN_001fcec0(param_2 + 0x20)" (identifier "FUN_001fcec0") (argument_list "(param_2 + 0x20)" (( "(") (binary_expression "param_2 + 0x20" (identifier "param_2") (+ "+") (number_literal "0x20")) () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_001fb960(*(undefined4 *)(param_2 + -0x24));" (call_expression "FUN_001fb960(*(undefined4 *)(param_2 + -0x24))" (identifier "FUN_001fb960") (argument_list "(*(undefined4 *)(param_2 + -0x24))" (( "(") (pointer_expression "*(undefined4 *)(param_2 + -0x24)" (* "*") (cast_expression "(undefined4 *)(param_2 + -0x24)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + -0x24)" (( "(") (binary_expression "param_2 + -0x24" (identifier "param_2") (+ "+") (number_literal "-0x24")) () ")")))) () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* __gxx_exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception*) */

void function_1(type_1 var_1,int var_3)

{
  int *piVar1;
  
  if (var_1 < 2) {
    var_2();
    piVar1 = (int *)(var_3 + -0x40);
    *piVar1 = *piVar1 + -1;
    var_4();
    if (*piVar1 == 0) {
      if (*(type_2 **)(var_3 + -0x2c) != (type_2 *)0x0) {
        (**(type_2 **)(var_3 + -0x2c))(var_3 + 0x20);
      }
      var_5(var_3 + 0x20);
    }
    return;
  }
                    /* WARNING: Subroutine does not return */
  __cxxabiv1::var_6(*(type_3 **)(var_3 + -0x24));
}


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

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

void MASKED(uint param_1,int param_2)

{
  int *piVar1;
  
  if (param_1 < 2) {
    LOCK();
    piVar1 = (int *)(param_2 + -0x40);
    *piVar1 = *piVar1 + -1;
    UNLOCK();
    if (*piVar1 == 0) {
      if (*(code **)(param_2 + -0x2c) != (code *)0x0) {
        (**(code **)(param_2 + -0x2c))(param_2 + 0x20);
      }
      FUN_001fcec0(param_2 + 0x20);
    }
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_001fb960(*(undefined4 *)(param_2 + -0x24));
}

