Function at 0x41e170
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x440588
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x45d070]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [0x460440], 0
je 0x41e3b8
push sym.Gamebox.exe_class_COThreadPool__public:_static_class_COThreadPool____cdecl_oopa::CSingleton_class_COThreadPool_::GetInstance_void_::_2::inst
mov dword [ebp - 0x24], sym.Gamebox.exe_class_COThreadPool__public:_static_class_COThreadPool____cdecl_oopa::CSingleton_class_COThreadPool_::GetInstance_void_::_2::inst
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
mov dword [ebp - 4], 0
cmp dword [0x460448], ebx
jle 0x41e28e
lea esp, [esp]
push dword [0x46043c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 1
push 0x46044c
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 0xffffffffffffffff
push 0
push 0
push dword [0x460440]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
push 0x3e8
push dword [0x46043c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x41e28e
mov edx, dword [0x460450]
test edx, edx
je 0x41e28e
mov edi, dword [0x460444]
mov ecx, edi
mov eax, dword [edi + 4]
cmp byte [eax + 0xd], 0
jne 0x41e255
mov edi, edi
cmp dword [eax + 0x10], edx
jae 0x41e23a
mov eax, dword [eax + 8]
jmp 0x41e23e
mov ecx, eax
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
je 0x41e230
cmp ecx, edi
je 0x41e255
cmp edx, dword [ecx + 0x10]
jb 0x41e255
mov dword [ebp - 0x14], ecx
lea esi, [ebp - 0x14]
jmp 0x41e25b
mov dword [ebp - 0x18], edi
lea esi, [ebp - 0x18]
mov esi, dword [esi]
cmp esi, edi
je 0x41e27f
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
lea eax, [ebp - 0x28]
push eax
mov ecx, 0x460444
call fcn.00403d40
mov edi, dword [0x460444]
inc ebx
cmp ebx, dword [0x460448]
jl 0x41e1d0
jmp 0x41e294
mov edi, dword [0x460444]
mov esi, dword [edi]
cmp esi, edi
je 0x41e30f
mov ebx, dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edi, dword [esi + 0x14]
lea eax, [ebp - 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 0x18], 0x103
jne 0x41e2bc
push 0
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [esi + 0xd], 0
jne 0x41e307
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
jne 0x41e2ec
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
jne 0x41e307
lea esp, [esp]
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
je 0x41e2e0
jmp 0x41e307
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x41e305
cmp esi, dword [eax + 8]
jne 0x41e305
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x41e2f5
mov esi, eax
cmp esi, dword [0x460444]
jne 0x41e2a0
mov ebx, dword [sym.imp.KERNEL32.dll_GetQueuedCompletionStatus]
push 0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [0x460440]
call ebx
test eax, eax
je 0x41e383
mov edi, dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x41e369
mov eax, dword [esi + 8]
test eax, eax
je 0x41e363
test al, 1
jne 0x41e35c
and eax, 0xfffffffe
lea ecx, [esi + 0x10]
mov eax, dword [eax]
test eax, eax
je 0x41e35c
push 2
push ecx
push ecx
call eax
add esp, 0xc
mov dword [esi + 8], 0
push esi
call edi
add esp, 4
push 0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [0x460440]
call ebx
test eax, eax
jne 0x41e335
push dword [0x460440]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
push dword [0x46043c]
mov dword [0x460440], 0
call ebx
push sym.Gamebox.exe_class_COThreadPool__public:_static_class_COThreadPool____cdecl_oopa::CSingleton_class_COThreadPool_::GetInstance_void_::_2::inst
mov dword [0x46043c], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret