Function at 0x40a290
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f2f5
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x43f00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x28], ebx
lea esi, [ebx + 0x18]
push esi
mov dword [ebp - 0x30], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
cmp dword [ebx + 0xd4], 0
mov byte [ebx + 0xfc], 1
mov byte [ebx + 0xd0], 1
je 0x40a2f3
lea ecx, [ebx + 0x30]
call fcn.00409da0
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebx + 0xd4]
mov byte [ebp - 0x2c], 0
test esi, esi
je 0x40a386
mov eax, dword [esi + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 4]
push 0xffffffffffffffff
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push dword [esi + 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
xor eax, eax
mov ecx, 0x4412f4
lock xadd dword [ecx], eax
mov ecx, dword [esi + 4]
push 0
push ecx
test eax, eax
je 0x40a34c
call dword [sym.imp.KERNEL32.dll_TerminateThread]
jmp 0x40a362
push method.boost::asio::detail::win_iocp_socket_service_class_boost::asio::ip::tcp_.virtual_8
call dword [sym.imp.KERNEL32.dll_QueueUserAPC]
push 0xffffffffffffffff
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [ebx + 0xd4]
test esi, esi
je 0x40a37c
push dword [esi + 4]
call edi
push 0xc
push esi
call fcn.0042d0f1
add esp, 8
mov dword [ebx + 0xd4], 0
xor ecx, ecx
xorps xmm0, xmm0
movlpd qword [ebp - 0x24], xmm0
xor edx, edx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], edx
lea edi, [ebx + 0x3c]
mov byte [ebp - 4], 1
lea ebx, [ecx + 4]
mov eax, dword [edi]
mov esi, dword [eax]
cmp esi, eax
je 0x40a3ee
nop word [eax + eax]
mov eax, esi
mov esi, dword [esi]
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x40a3db
test edx, edx
je 0x40a3c4
mov dword [edx + 0x14], ecx
jmp 0x40a3c7
mov dword [ebp - 0x24], ecx
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x20], ecx
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
push eax
lea ecx, [edi - 4]
call fcn.00412840
mov edx, dword [ebp - 0x20]
cmp esi, dword [edi]
jne 0x40a3b0
mov ecx, dword [ebp - 0x24]
add edi, 0x1c
sub ebx, 1
jne 0x40a3a2
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebx + 0xcc]
test esi, esi
je 0x40a41b
mov eax, dword [esi]
lea ecx, [ebp - 0x24]
push ecx
mov ecx, esi
call dword [eax + 0x14]
mov esi, dword [esi + 4]
test esi, esi
jne 0x40a403
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
mov edi, dword [ebx + 0x14]
mov esi, ecx
test esi, esi
je 0x40a47a
add edi, 0x18
mov eax, esi
nop dword [eax]
test eax, eax
je 0x40a447
mov eax, dword [ecx + 0x14]
xor ebx, ebx
test eax, eax
mov dword [ebp - 0x24], eax
cmove edx, ebx
mov dword [ebp - 0x20], edx
mov dword [ecx + 0x14], ebx
lock dec dword [edi]
push 0
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x14], 0
push eax
mov eax, dword [esi + 0x18]
xorps xmm0, xmm0
push esi
push 0
movq qword [ebp - 0x1c], xmm0
call eax
mov ecx, dword [ebp - 0x24]
add esp, 0x10
mov esi, ecx
mov eax, ecx
test ecx, ecx
je 0x40a47a
mov edx, dword [ebp - 0x20]
jmp 0x40a430
lea ecx, [ebp - 0x24]
call fcn.00411530
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042c87e
mov esp, ebp
pop ebp
ret