Function at 0x409430
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x490e75
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x4b0300]
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 - 0x34], ebx
lea esi, [ebx + 0x18]
push esi
mov dword [ebp - 0x3c], 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 0x4094c0
mov ecx, dword [ebx + 0x34]
lea eax, [ebp - 0x19]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x30]
mov byte [ebp - 0x19], 0
push eax
sub esp, 8
mov dword [ebp - 0x18], 1
xorps xmm0, xmm0
mov dword [ebp - 0x28], 0
movq qword [ebp - 0x30], xmm0
call fcn.00406e50
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov esi, dword [ebx + 0xd4]
mov byte [ebp - 0x38], 0
test esi, esi
je 0x40955c
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, 0x4b3138
lock xadd dword [ecx], eax
mov ecx, dword [esi + 4]
test eax, eax
push 0
setne al
push ecx
test al, al
je 0x409522
call dword [sym.imp.KERNEL32.DLL_TerminateThread]
jmp 0x409538
push method.std::basic_streambuf_char__struct_std::char_traits_char__.virtual_56
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 0x409552
push dword [esi + 4]
call edi
push 0xc
push esi
call fcn.004694c5
add esp, 8
mov dword [ebx + 0xd4], 0
xorps xmm0, xmm0
xor edx, edx
movlpd qword [ebp - 0x24], xmm0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], edx
mov ecx, 4
mov byte [ebp - 4], 1
lea edi, [ebx + 0x3c]
mov dword [ebp - 0x14], ecx
nop
mov eax, dword [edi]
mov esi, dword [eax]
cmp esi, eax
je 0x4095c6
mov eax, esi
mov esi, dword [esi]
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x4095b3
test edx, edx
je 0x40959c
mov dword [edx + 0x14], ecx
jmp 0x40959f
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.00410860
mov edx, dword [ebp - 0x20]
cmp esi, dword [edi]
jne 0x409588
mov ecx, dword [ebp - 0x14]
add edi, 0x1c
sub ecx, 1
mov dword [ebp - 0x14], ecx
jne 0x409580
mov edi, dword [ebp - 0x34]
mov esi, dword [edi + 0xcc]
test esi, esi
je 0x4095f5
nop
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 0x4095e0
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
mov edi, dword [edi + 0x14]
test ecx, ecx
je 0x409648
add edi, 0x18
mov esi, ecx
mov eax, ecx
mov eax, dword [eax + 0x14]
xor ebx, ebx
test eax, eax
mov dword [ebp - 0x24], eax
cmove edx, ebx
mov dword [ebp - 0x20], edx
mov dword [esi + 0x14], ebx
lock dec dword [edi]
mov eax, dword [ecx + 0x18]
lea edx, [ebp - 0x30]
push ebx
push edx
push ecx
xorps xmm0, xmm0
mov dword [ebp - 0x28], ebx
push ebx
movq qword [ebp - 0x30], xmm0
call eax
mov ecx, dword [ebp - 0x24]
add esp, 0x10
mov esi, ecx
mov eax, esi
test esi, esi
je 0x409646
mov edx, dword [ebp - 0x20]
jmp 0x409606
jmp 0x409648
mov byte [ebp - 4], 2
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.00469231
mov esp, ebp
pop ebp
ret