Function at 0x40f9a0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cbbd0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x667d00]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x38], edi
cmp dword [edi + 8], 0
je 0x40fa4e
cmp byte [edi + 1], 0
je 0x40fa4e
lea esi, [edi + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [edi + 4]
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor esi, esi
nop word [eax + eax]
cmp esi, 0x14
jl 0x40fa0b
cmp byte [edi + 3], 0
je 0x40fa20
mov al, byte [edi + 2]
test al, al
jne 0x40fa4e
push 0x1f4
inc esi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40fa00
mov al, byte [edi + 2]
test al, al
jne 0x40fa4e
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
push eax
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push dword [ebp - 0x2c]
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [edi + 8], 0
mov eax, dword [edi + 8]
test eax, eax
je 0x40fa5c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [edi + 0x2c]
mov dword [edi + 8], 0
push esi
mov dword [ebp - 0x40], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0xf8]
mov ecx, dword [edi + 0xfc]
mov dword [ebp - 4], 0
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x3c], ecx
cmp eax, ecx
je 0x40fbbb
cmp dword [eax + 0x14], 0x10
mov edx, eax
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], eax
jb 0x40fab5
mov edx, dword [eax]
mov dword [ebp - 0x2c], edx
cmp ecx, 0x10
jae 0x40facb
movups xmm0, xmmword [edx]
mov dword [ebp - 0x18], ecx
mov edi, 0xf
movups xmmword [ebp - 0x28], xmm0
jmp 0x40fb3f
mov edi, ecx
mov eax, bind
or edi, 0xf
cmp edi, 0x7fffffff
cmova edi, eax
lea ecx, [edi + 1]
cmp ecx, 0x1000
jb 0x40fb12
lea eax, [ecx + 0x23]
cmp eax, ecx
mov ecx, 0xffffffff
cmovbe eax, ecx
push eax
call fcn.0059ce1e
add esp, 4
test eax, eax
je 0x40fbdd
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov dword [ecx - 4], eax
jmp 0x40fb25
test ecx, ecx
je 0x40fb23
push ecx
call fcn.0059ce1e
add esp, 4
mov ecx, eax
jmp 0x40fb25
xor ecx, ecx
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x28], ecx
push eax
push dword [ebp - 0x2c]
push ecx
call fcn.005a1bc0
mov eax, dword [ebp - 0x30]
add esp, 0xc
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edi
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x28]
cmp edi, 0x10
mov byte [ebp - 4], 1
push 0
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.00411b50
test eax, eax
jne 0x40fb66
push 0x5d5904
jmp 0x40fb6b
push str.Exit
push 2
call fcn.0043f35d
mov edx, dword [ebp - 0x14]
add esp, 8
mov byte [ebp - 4], 0
cmp edx, 0x10
jb 0x40fba9
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40fb9f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fbdd
push edx
push ecx
call fcn.0059ce4e
add esp, 8
mov eax, dword [ebp - 0x34]
add eax, 0x18
mov dword [ebp - 0x34], eax
cmp eax, dword [ebp - 0x3c]
jne 0x40fa91
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059d38a
mov esp, ebp
pop ebp
ret
call fcn.005a5c79
int3