
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void MagicComponentTerminus(void)

{
  if (magic_list_semaphore == (SemaphoreInfo *)0x0) {
    ActivateSemaphoreInfo(&magic_list_semaphore);
  }
  LockSemaphoreInfo(magic_list_semaphore);
  if (magic_list != (LinkedListInfo *)0x0) {
    magic_list = DestroyLinkedList(magic_list,DestroyMagicElement);
  }
  UnlockSemaphoreInfo(magic_list_semaphore);
  RelinquishSemaphoreInfo(&magic_list_semaphore);
  if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {
    ActivateSemaphoreInfo(&magic_cache_semaphore);
  }
  LockSemaphoreInfo(magic_cache_semaphore);
  if (magic_cache != (LinkedListInfo *)0x0) {
    magic_cache = DestroyLinkedList(magic_cache,(_func_void_ptr_void_ptr *)0x0);
  }
  UnlockSemaphoreInfo(magic_cache_semaphore);
  RelinquishSemaphoreInfo(&magic_cache_semaphore);
  return;
}



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

void FUN_00109130(void)

{
  if (DAT_004227cc == 0) {
    ActivateSemaphoreInfo(&DAT_004227cc);
  }
  LockSemaphoreInfo(DAT_004227cc);
  if (DAT_004227d4 != 0) {
    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);
  }
  UnlockSemaphoreInfo(DAT_004227cc);
  RelinquishSemaphoreInfo(&DAT_004227cc);
  if (DAT_004227d0 == 0) {
    ActivateSemaphoreInfo(&DAT_004227d0);
  }
  LockSemaphoreInfo(DAT_004227d0);
  if (DAT_004227d8 != 0) {
    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);
  }
  UnlockSemaphoreInfo(DAT_004227d0);
  RelinquishSemaphoreInfo(&DAT_004227d0);
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00039d70
ADD EBX,0x314ec9
SUB ESP,0x4
MOV EAX,dword ptr [EBX + 0x47cc]
LEA ESI,[EBX + 0x47cc]
TEST EAX,EAX
JZ 0x001091f8
SUB ESP,0xc
PUSH EAX
CALL 0x00031050
MOV EAX,dword ptr [EBX + 0x47d4]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00109183
LEA EDX,[EBX + 0xffcea5c0]
SUB ESP,0x8
PUSH EDX
PUSH EAX
CALL 0x00032210
ADD ESP,0x10
MOV dword ptr [EBX + 0x47d4],EAX
SUB ESP,0xc
PUSH dword ptr [EBX + 0x47cc]
CALL 0x00031da0
MOV dword ptr [ESP],ESI
LEA ESI,[EBX + 0x47d0]
CALL 0x00030760
MOV EAX,dword ptr [EBX + 0x47d0]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00109210
SUB ESP,0xc
PUSH EAX
CALL 0x00031050
MOV EAX,dword ptr [EBX + 0x47d8]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x001091d6
SUB ESP,0x8
PUSH 0x0
PUSH EAX
CALL 0x00032210
ADD ESP,0x10
MOV dword ptr [EBX + 0x47d8],EAX
SUB ESP,0xc
PUSH dword ptr [EBX + 0x47d0]
CALL 0x00031da0
MOV dword ptr [ESP],ESI
CALL 0x00030760
ADD ESP,0x14
POP EBX
POP ESI
RET
SUB ESP,0xc
PUSH ESI
CALL 0x00031830
MOV EAX,dword ptr [EBX + 0x47cc]
ADD ESP,0x10
JMP 0x00109154
SUB ESP,0xc
PUSH ESI
CALL 0x00031830
MOV EAX,dword ptr [EBX + 0x47d0]
ADD ESP,0x10
JMP 0x001091ac
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00109130(void)\n\n{\n  if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }\n  LockSemaphoreInfo(DAT_004227cc);\n  if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }\n  UnlockSemaphoreInfo(DAT_004227cc);\n  RelinquishSemaphoreInfo(&DAT_004227cc);\n  if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }\n  LockSemaphoreInfo(DAT_004227d0);\n  if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }\n  UnlockSemaphoreInfo(DAT_004227d0);\n  RelinquishSemaphoreInfo(&DAT_004227d0);\n  return;\n}\n\n" comment (function_definition "void FUN_00109130(void)\n\n{\n  if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }\n  LockSemaphoreInfo(DAT_004227cc);\n  if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }\n  UnlockSemaphoreInfo(DAT_004227cc);\n  RelinquishSemaphoreInfo(&DAT_004227cc);\n  if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }\n  LockSemaphoreInfo(DAT_004227d0);\n  if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }\n  UnlockSemaphoreInfo(DAT_004227d0);\n  RelinquishSemaphoreInfo(&DAT_004227d0);\n  return;\n}" primitive_type (function_declarator "FUN_00109130(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }\n  LockSemaphoreInfo(DAT_004227cc);\n  if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }\n  UnlockSemaphoreInfo(DAT_004227cc);\n  RelinquishSemaphoreInfo(&DAT_004227cc);\n  if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }\n  LockSemaphoreInfo(DAT_004227d0);\n  if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }\n  UnlockSemaphoreInfo(DAT_004227d0);\n  RelinquishSemaphoreInfo(&DAT_004227d0);\n  return;\n}" { (if_statement "if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }" if (parenthesized_expression "(DAT_004227cc == 0)" ( (binary_expression "DAT_004227cc == 0" identifier == number_literal) )) (compound_statement "{\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }" { (expression_statement "ActivateSemaphoreInfo(&DAT_004227cc);" (call_expression "ActivateSemaphoreInfo(&DAT_004227cc)" identifier (argument_list "(&DAT_004227cc)" ( (pointer_expression "&DAT_004227cc" & identifier) ))) ;) })) (expression_statement "LockSemaphoreInfo(DAT_004227cc);" (call_expression "LockSemaphoreInfo(DAT_004227cc)" identifier (argument_list "(DAT_004227cc)" ( identifier ))) ;) (if_statement "if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }" if (parenthesized_expression "(DAT_004227d4 != 0)" ( (binary_expression "DAT_004227d4 != 0" identifier != number_literal) )) (compound_statement "{\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }" { (expression_statement "DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);" (assignment_expression "DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0)" identifier = (call_expression "DestroyLinkedList(DAT_004227d4,FUN_001085c0)" identifier (argument_list "(DAT_004227d4,FUN_001085c0)" ( identifier , identifier )))) ;) })) (expression_statement "UnlockSemaphoreInfo(DAT_004227cc);" (call_expression "UnlockSemaphoreInfo(DAT_004227cc)" identifier (argument_list "(DAT_004227cc)" ( identifier ))) ;) (expression_statement "RelinquishSemaphoreInfo(&DAT_004227cc);" (call_expression "RelinquishSemaphoreInfo(&DAT_004227cc)" identifier (argument_list "(&DAT_004227cc)" ( (pointer_expression "&DAT_004227cc" & identifier) ))) ;) (if_statement "if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }" if (parenthesized_expression "(DAT_004227d0 == 0)" ( (binary_expression "DAT_004227d0 == 0" identifier == number_literal) )) (compound_statement "{\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }" { (expression_statement "ActivateSemaphoreInfo(&DAT_004227d0);" (call_expression "ActivateSemaphoreInfo(&DAT_004227d0)" identifier (argument_list "(&DAT_004227d0)" ( (pointer_expression "&DAT_004227d0" & identifier) ))) ;) })) (expression_statement "LockSemaphoreInfo(DAT_004227d0);" (call_expression "LockSemaphoreInfo(DAT_004227d0)" identifier (argument_list "(DAT_004227d0)" ( identifier ))) ;) (if_statement "if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }" if (parenthesized_expression "(DAT_004227d8 != 0)" ( (binary_expression "DAT_004227d8 != 0" identifier != number_literal) )) (compound_statement "{\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }" { (expression_statement "DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);" (assignment_expression "DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0)" identifier = (call_expression "DestroyLinkedList(DAT_004227d8,0)" identifier (argument_list "(DAT_004227d8,0)" ( identifier , number_literal )))) ;) })) (expression_statement "UnlockSemaphoreInfo(DAT_004227d0);" (call_expression "UnlockSemaphoreInfo(DAT_004227d0)" identifier (argument_list "(DAT_004227d0)" ( identifier ))) ;) (expression_statement "RelinquishSemaphoreInfo(&DAT_004227d0);" (call_expression "RelinquishSemaphoreInfo(&DAT_004227d0)" identifier (argument_list "(&DAT_004227d0)" ( (pointer_expression "&DAT_004227d0" & identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention -- yet parameter storage is locked */\n\nvoid MagicComponentTerminus(void)\n\n{\n  if (magic_list_semaphore == (SemaphoreInfo *)0x0) {\n    ActivateSemaphoreInfo(&magic_list_semaphore);\n  }\n  LockSemaphoreInfo(magic_list_semaphore);\n  if (magic_list != (LinkedListInfo *)0x0) {\n    magic_list = DestroyLinkedList(magic_list,DestroyMagicElement);\n  }\n  UnlockSemaphoreInfo(magic_list_semaphore);\n  RelinquishSemaphoreInfo(&magic_list_semaphore);\n  if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n    ActivateSemaphoreInfo(&magic_cache_semaphore);\n  }\n  LockSemaphoreInfo(magic_cache_semaphore);\n  if (magic_cache != (LinkedListInfo *)0x0) {\n    magic_cache = DestroyLinkedList(magic_cache,(_func_void_ptr_void_ptr *)0x0);\n  }\n  UnlockSemaphoreInfo(magic_cache_semaphore);\n  RelinquishSemaphoreInfo(&magic_cache_semaphore);\n  return;\n}\n\n" comment comment (function_definition "void MagicComponentTerminus(void)\n\n{\n  if (magic_list_semaphore == (SemaphoreInfo *)0x0) {\n    ActivateSemaphoreInfo(&magic_list_semaphore);\n  }\n  LockSemaphoreInfo(magic_list_semaphore);\n  if (magic_list != (LinkedListInfo *)0x0) {\n    magic_list = DestroyLinkedList(magic_list,DestroyMagicElement);\n  }\n  UnlockSemaphoreInfo(magic_list_semaphore);\n  RelinquishSemaphoreInfo(&magic_list_semaphore);\n  if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n    ActivateSemaphoreInfo(&magic_cache_semaphore);\n  }\n  LockSemaphoreInfo(magic_cache_semaphore);\n  if (magic_cache != (LinkedListInfo *)0x0) {\n    magic_cache = DestroyLinkedList(magic_cache,(_func_void_ptr_void_ptr *)0x0);\n  }\n  UnlockSemaphoreInfo(magic_cache_semaphore);\n  RelinquishSemaphoreInfo(&magic_cache_semaphore);\n  return;\n}" primitive_type (function_declarator "MagicComponentTerminus(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  if (magic_list_semaphore == (SemaphoreInfo *)0x0) {\n    ActivateSemaphoreInfo(&magic_list_semaphore);\n  }\n  LockSemaphoreInfo(magic_list_semaphore);\n  if (magic_list != (LinkedListInfo *)0x0) {\n    magic_list = DestroyLinkedList(magic_list,DestroyMagicElement);\n  }\n  UnlockSemaphoreInfo(magic_list_semaphore);\n  RelinquishSemaphoreInfo(&magic_list_semaphore);\n  if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n    ActivateSemaphoreInfo(&magic_cache_semaphore);\n  }\n  LockSemaphoreInfo(magic_cache_semaphore);\n  if (magic_cache != (LinkedListInfo *)0x0) {\n    magic_cache = DestroyLinkedList(magic_cache,(_func_void_ptr_void_ptr *)0x0);\n  }\n  UnlockSemaphoreInfo(magic_cache_semaphore);\n  RelinquishSemaphoreInfo(&magic_cache_semaphore);\n  return;\n}" { (if_statement "if (magic_list_semaphore == (SemaphoreInfo *)0x0) {\n    ActivateSemaphoreInfo(&magic_list_semaphore);\n  }" if (parenthesized_expression "(magic_list_semaphore == (SemaphoreInfo *)0x0)" ( (binary_expression "magic_list_semaphore == (SemaphoreInfo *)0x0" identifier == (cast_expression "(SemaphoreInfo *)0x0" ( (type_descriptor "SemaphoreInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ActivateSemaphoreInfo(&magic_list_semaphore);\n  }" { (expression_statement "ActivateSemaphoreInfo(&magic_list_semaphore);" (call_expression "ActivateSemaphoreInfo(&magic_list_semaphore)" identifier (argument_list "(&magic_list_semaphore)" ( (pointer_expression "&magic_list_semaphore" & identifier) ))) ;) })) (expression_statement "LockSemaphoreInfo(magic_list_semaphore);" (call_expression "LockSemaphoreInfo(magic_list_semaphore)" identifier (argument_list "(magic_list_semaphore)" ( identifier ))) ;) (if_statement "if (magic_list != (LinkedListInfo *)0x0) {\n    magic_list = DestroyLinkedList(magic_list,DestroyMagicElement);\n  }" if (parenthesized_expression "(magic_list != (LinkedListInfo *)0x0)" ( (binary_expression "magic_list != (LinkedListInfo *)0x0" identifier != (cast_expression "(LinkedListInfo *)0x0" ( (type_descriptor "LinkedListInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    magic_list = DestroyLinkedList(magic_list,DestroyMagicElement);\n  }" { (expression_statement "magic_list = DestroyLinkedList(magic_list,DestroyMagicElement);" (assignment_expression "magic_list = DestroyLinkedList(magic_list,DestroyMagicElement)" identifier = (call_expression "DestroyLinkedList(magic_list,DestroyMagicElement)" identifier (argument_list "(magic_list,DestroyMagicElement)" ( identifier , identifier )))) ;) })) (expression_statement "UnlockSemaphoreInfo(magic_list_semaphore);" (call_expression "UnlockSemaphoreInfo(magic_list_semaphore)" identifier (argument_list "(magic_list_semaphore)" ( identifier ))) ;) (expression_statement "RelinquishSemaphoreInfo(&magic_list_semaphore);" (call_expression "RelinquishSemaphoreInfo(&magic_list_semaphore)" identifier (argument_list "(&magic_list_semaphore)" ( (pointer_expression "&magic_list_semaphore" & identifier) ))) ;) (if_statement "if (magic_cache_semaphore == (SemaphoreInfo *)0x0) {\n    ActivateSemaphoreInfo(&magic_cache_semaphore);\n  }" if (parenthesized_expression "(magic_cache_semaphore == (SemaphoreInfo *)0x0)" ( (binary_expression "magic_cache_semaphore == (SemaphoreInfo *)0x0" identifier == (cast_expression "(SemaphoreInfo *)0x0" ( (type_descriptor "SemaphoreInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ActivateSemaphoreInfo(&magic_cache_semaphore);\n  }" { (expression_statement "ActivateSemaphoreInfo(&magic_cache_semaphore);" (call_expression "ActivateSemaphoreInfo(&magic_cache_semaphore)" identifier (argument_list "(&magic_cache_semaphore)" ( (pointer_expression "&magic_cache_semaphore" & identifier) ))) ;) })) (expression_statement "LockSemaphoreInfo(magic_cache_semaphore);" (call_expression "LockSemaphoreInfo(magic_cache_semaphore)" identifier (argument_list "(magic_cache_semaphore)" ( identifier ))) ;) (if_statement "if (magic_cache != (LinkedListInfo *)0x0) {\n    magic_cache = DestroyLinkedList(magic_cache,(_func_void_ptr_void_ptr *)0x0);\n  }" if (parenthesized_expression "(magic_cache != (LinkedListInfo *)0x0)" ( (binary_expression "magic_cache != (LinkedListInfo *)0x0" identifier != (cast_expression "(LinkedListInfo *)0x0" ( (type_descriptor "LinkedListInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    magic_cache = DestroyLinkedList(magic_cache,(_func_void_ptr_void_ptr *)0x0);\n  }" { (expression_statement "magic_cache = DestroyLinkedList(magic_cache,(_func_void_ptr_void_ptr *)0x0);" (assignment_expression "magic_cache = DestroyLinkedList(magic_cache,(_func_void_ptr_void_ptr *)0x0)" identifier = (call_expression "DestroyLinkedList(magic_cache,(_func_void_ptr_void_ptr *)0x0)" identifier (argument_list "(magic_cache,(_func_void_ptr_void_ptr *)0x0)" ( identifier , (cast_expression "(_func_void_ptr_void_ptr *)0x0" ( (type_descriptor "_func_void_ptr_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) })) (expression_statement "UnlockSemaphoreInfo(magic_cache_semaphore);" (call_expression "UnlockSemaphoreInfo(magic_cache_semaphore)" identifier (argument_list "(magic_cache_semaphore)" ( identifier ))) ;) (expression_statement "RelinquishSemaphoreInfo(&magic_cache_semaphore);" (call_expression "RelinquishSemaphoreInfo(&magic_cache_semaphore)" identifier (argument_list "(&magic_cache_semaphore)" ( (pointer_expression "&magic_cache_semaphore" & identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00109130(void)\n\n{\n  if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }\n  LockSemaphoreInfo(DAT_004227cc);\n  if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }\n  UnlockSemaphoreInfo(DAT_004227cc);\n  RelinquishSemaphoreInfo(&DAT_004227cc);\n  if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }\n  LockSemaphoreInfo(DAT_004227d0);\n  if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }\n  UnlockSemaphoreInfo(DAT_004227d0);\n  RelinquishSemaphoreInfo(&DAT_004227d0);\n  return;\n}\n\n" (function_definition "void FUN_00109130(void)\n\n{\n  if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }\n  LockSemaphoreInfo(DAT_004227cc);\n  if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }\n  UnlockSemaphoreInfo(DAT_004227cc);\n  RelinquishSemaphoreInfo(&DAT_004227cc);\n  if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }\n  LockSemaphoreInfo(DAT_004227d0);\n  if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }\n  UnlockSemaphoreInfo(DAT_004227d0);\n  RelinquishSemaphoreInfo(&DAT_004227d0);\n  return;\n}" primitive_type (function_declarator "FUN_00109130(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }\n  LockSemaphoreInfo(DAT_004227cc);\n  if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }\n  UnlockSemaphoreInfo(DAT_004227cc);\n  RelinquishSemaphoreInfo(&DAT_004227cc);\n  if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }\n  LockSemaphoreInfo(DAT_004227d0);\n  if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }\n  UnlockSemaphoreInfo(DAT_004227d0);\n  RelinquishSemaphoreInfo(&DAT_004227d0);\n  return;\n}" { (if_statement "if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }" if (parenthesized_expression "(DAT_004227cc == 0)" ( (binary_expression "DAT_004227cc == 0" identifier == number_literal) )) (compound_statement "{\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }" { (expression_statement "ActivateSemaphoreInfo(&DAT_004227cc);" (call_expression "ActivateSemaphoreInfo(&DAT_004227cc)" identifier (argument_list "(&DAT_004227cc)" ( (pointer_expression "&DAT_004227cc" & identifier) ))) ;) })) (expression_statement "LockSemaphoreInfo(DAT_004227cc);" (call_expression "LockSemaphoreInfo(DAT_004227cc)" identifier (argument_list "(DAT_004227cc)" ( identifier ))) ;) (if_statement "if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }" if (parenthesized_expression "(DAT_004227d4 != 0)" ( (binary_expression "DAT_004227d4 != 0" identifier != number_literal) )) (compound_statement "{\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }" { (expression_statement "DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);" (assignment_expression "DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0)" identifier = (call_expression "DestroyLinkedList(DAT_004227d4,FUN_001085c0)" identifier (argument_list "(DAT_004227d4,FUN_001085c0)" ( identifier , identifier )))) ;) })) (expression_statement "UnlockSemaphoreInfo(DAT_004227cc);" (call_expression "UnlockSemaphoreInfo(DAT_004227cc)" identifier (argument_list "(DAT_004227cc)" ( identifier ))) ;) (expression_statement "RelinquishSemaphoreInfo(&DAT_004227cc);" (call_expression "RelinquishSemaphoreInfo(&DAT_004227cc)" identifier (argument_list "(&DAT_004227cc)" ( (pointer_expression "&DAT_004227cc" & identifier) ))) ;) (if_statement "if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }" if (parenthesized_expression "(DAT_004227d0 == 0)" ( (binary_expression "DAT_004227d0 == 0" identifier == number_literal) )) (compound_statement "{\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }" { (expression_statement "ActivateSemaphoreInfo(&DAT_004227d0);" (call_expression "ActivateSemaphoreInfo(&DAT_004227d0)" identifier (argument_list "(&DAT_004227d0)" ( (pointer_expression "&DAT_004227d0" & identifier) ))) ;) })) (expression_statement "LockSemaphoreInfo(DAT_004227d0);" (call_expression "LockSemaphoreInfo(DAT_004227d0)" identifier (argument_list "(DAT_004227d0)" ( identifier ))) ;) (if_statement "if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }" if (parenthesized_expression "(DAT_004227d8 != 0)" ( (binary_expression "DAT_004227d8 != 0" identifier != number_literal) )) (compound_statement "{\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }" { (expression_statement "DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);" (assignment_expression "DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0)" identifier = (call_expression "DestroyLinkedList(DAT_004227d8,0)" identifier (argument_list "(DAT_004227d8,0)" ( identifier , number_literal )))) ;) })) (expression_statement "UnlockSemaphoreInfo(DAT_004227d0);" (call_expression "UnlockSemaphoreInfo(DAT_004227d0)" identifier (argument_list "(DAT_004227d0)" ( identifier ))) ;) (expression_statement "RelinquishSemaphoreInfo(&DAT_004227d0);" (call_expression "RelinquishSemaphoreInfo(&DAT_004227d0)" identifier (argument_list "(&DAT_004227d0)" ( (pointer_expression "&DAT_004227d0" & identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00109130(void)\n\n{\n  if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }\n  LockSemaphoreInfo(DAT_004227cc);\n  if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }\n  UnlockSemaphoreInfo(DAT_004227cc);\n  RelinquishSemaphoreInfo(&DAT_004227cc);\n  if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }\n  LockSemaphoreInfo(DAT_004227d0);\n  if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }\n  UnlockSemaphoreInfo(DAT_004227d0);\n  RelinquishSemaphoreInfo(&DAT_004227d0);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00109130(void)" (identifier "FUN_00109130") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }\n  LockSemaphoreInfo(DAT_004227cc);\n  if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }\n  UnlockSemaphoreInfo(DAT_004227cc);\n  RelinquishSemaphoreInfo(&DAT_004227cc);\n  if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }\n  LockSemaphoreInfo(DAT_004227d0);\n  if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }\n  UnlockSemaphoreInfo(DAT_004227d0);\n  RelinquishSemaphoreInfo(&DAT_004227d0);\n  return;\n}" ({ "{") (if_statement "if (DAT_004227cc == 0) {\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }" (if "if") (parenthesized_expression "(DAT_004227cc == 0)" (( "(") (binary_expression "DAT_004227cc == 0" (identifier "DAT_004227cc") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    ActivateSemaphoreInfo(&DAT_004227cc);\n  }" ({ "{") (expression_statement "ActivateSemaphoreInfo(&DAT_004227cc);" (call_expression "ActivateSemaphoreInfo(&DAT_004227cc)" (identifier "ActivateSemaphoreInfo") (argument_list "(&DAT_004227cc)" (( "(") (pointer_expression "&DAT_004227cc" (& "&") (identifier "DAT_004227cc")) () ")"))) (; ";")) (} "}"))) (expression_statement "LockSemaphoreInfo(DAT_004227cc);" (call_expression "LockSemaphoreInfo(DAT_004227cc)" (identifier "LockSemaphoreInfo") (argument_list "(DAT_004227cc)" (( "(") (identifier "DAT_004227cc") () ")"))) (; ";")) (if_statement "if (DAT_004227d4 != 0) {\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }" (if "if") (parenthesized_expression "(DAT_004227d4 != 0)" (( "(") (binary_expression "DAT_004227d4 != 0" (identifier "DAT_004227d4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);\n  }" ({ "{") (expression_statement "DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);" (assignment_expression "DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0)" (identifier "DAT_004227d4") (= "=") (call_expression "DestroyLinkedList(DAT_004227d4,FUN_001085c0)" (identifier "DestroyLinkedList") (argument_list "(DAT_004227d4,FUN_001085c0)" (( "(") (identifier "DAT_004227d4") (, ",") (identifier "FUN_001085c0") () ")")))) (; ";")) (} "}"))) (expression_statement "UnlockSemaphoreInfo(DAT_004227cc);" (call_expression "UnlockSemaphoreInfo(DAT_004227cc)" (identifier "UnlockSemaphoreInfo") (argument_list "(DAT_004227cc)" (( "(") (identifier "DAT_004227cc") () ")"))) (; ";")) (expression_statement "RelinquishSemaphoreInfo(&DAT_004227cc);" (call_expression "RelinquishSemaphoreInfo(&DAT_004227cc)" (identifier "RelinquishSemaphoreInfo") (argument_list "(&DAT_004227cc)" (( "(") (pointer_expression "&DAT_004227cc" (& "&") (identifier "DAT_004227cc")) () ")"))) (; ";")) (if_statement "if (DAT_004227d0 == 0) {\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }" (if "if") (parenthesized_expression "(DAT_004227d0 == 0)" (( "(") (binary_expression "DAT_004227d0 == 0" (identifier "DAT_004227d0") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    ActivateSemaphoreInfo(&DAT_004227d0);\n  }" ({ "{") (expression_statement "ActivateSemaphoreInfo(&DAT_004227d0);" (call_expression "ActivateSemaphoreInfo(&DAT_004227d0)" (identifier "ActivateSemaphoreInfo") (argument_list "(&DAT_004227d0)" (( "(") (pointer_expression "&DAT_004227d0" (& "&") (identifier "DAT_004227d0")) () ")"))) (; ";")) (} "}"))) (expression_statement "LockSemaphoreInfo(DAT_004227d0);" (call_expression "LockSemaphoreInfo(DAT_004227d0)" (identifier "LockSemaphoreInfo") (argument_list "(DAT_004227d0)" (( "(") (identifier "DAT_004227d0") () ")"))) (; ";")) (if_statement "if (DAT_004227d8 != 0) {\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }" (if "if") (parenthesized_expression "(DAT_004227d8 != 0)" (( "(") (binary_expression "DAT_004227d8 != 0" (identifier "DAT_004227d8") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);\n  }" ({ "{") (expression_statement "DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);" (assignment_expression "DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0)" (identifier "DAT_004227d8") (= "=") (call_expression "DestroyLinkedList(DAT_004227d8,0)" (identifier "DestroyLinkedList") (argument_list "(DAT_004227d8,0)" (( "(") (identifier "DAT_004227d8") (, ",") (number_literal "0") () ")")))) (; ";")) (} "}"))) (expression_statement "UnlockSemaphoreInfo(DAT_004227d0);" (call_expression "UnlockSemaphoreInfo(DAT_004227d0)" (identifier "UnlockSemaphoreInfo") (argument_list "(DAT_004227d0)" (( "(") (identifier "DAT_004227d0") () ")"))) (; ";")) (expression_statement "RelinquishSemaphoreInfo(&DAT_004227d0);" (call_expression "RelinquishSemaphoreInfo(&DAT_004227d0)" (identifier "RelinquishSemaphoreInfo") (argument_list "(&DAT_004227d0)" (( "(") (pointer_expression "&DAT_004227d0" (& "&") (identifier "DAT_004227d0")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void function_1(void)

{
  if (var_1 == (type_1 *)0x0) {
    var_2(&var_1);
  }
  var_3(var_1);
  if (var_4 != (type_2 *)0x0) {
    var_4 = var_5(var_4,DestroyMagicElement);
  }
  var_6(var_1);
  var_7(&var_1);
  if (var_8 == (type_1 *)0x0) {
    var_2(&var_8);
  }
  var_3(var_8);
  if (var_9 != (type_2 *)0x0) {
    var_9 = var_5(var_9,(type_3 *)0x0);
  }
  var_6(var_8);
  var_7(&var_8);
  return;
}


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

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

void MASKED(void)

{
  if (DAT_004227cc == 0) {
    ActivateSemaphoreInfo(&DAT_004227cc);
  }
  LockSemaphoreInfo(DAT_004227cc);
  if (DAT_004227d4 != 0) {
    DAT_004227d4 = DestroyLinkedList(DAT_004227d4,FUN_001085c0);
  }
  UnlockSemaphoreInfo(DAT_004227cc);
  RelinquishSemaphoreInfo(&DAT_004227cc);
  if (DAT_004227d0 == 0) {
    ActivateSemaphoreInfo(&DAT_004227d0);
  }
  LockSemaphoreInfo(DAT_004227d0);
  if (DAT_004227d8 != 0) {
    DAT_004227d8 = DestroyLinkedList(DAT_004227d8,0);
  }
  UnlockSemaphoreInfo(DAT_004227d0);
  RelinquishSemaphoreInfo(&DAT_004227d0);
  return;
}

