Function at 0x40f920
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cb740
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x667ce0]
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 0x40f9ce
cmp byte [edi + 1], 0
je 0x40f9ce
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 0x40f98b
cmp byte [edi + 3], 0
je 0x40f9a0
mov al, byte [edi + 2]
test al, al
jne 0x40f9ce
push 0x1f4
inc esi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40f980
mov al, byte [edi + 2]
test al, al
jne 0x40f9ce
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 0x40f9dc
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 0x40fb3b
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 0x40fa35
mov edx, dword [eax]
mov dword [ebp - 0x2c], edx
cmp ecx, 0x10
jae 0x40fa4b
movups xmm0, xmmword [edx]
mov dword [ebp - 0x18], ecx
mov edi, 0xf
movups xmmword [ebp - 0x28], xmm0
jmp 0x40fabf
mov edi, ecx
mov eax, bind
or edi, 0xf
cmp edi, 0x7fffffff
cmova edi, eax
lea ecx, [edi + 1]
cmp ecx, 0x1000
jb 0x40fa92
lea eax, [ecx + 0x23]
cmp eax, ecx
mov ecx, 0xffffffff
cmovbe eax, ecx
push eax
call fcn.0059c99d
add esp, 4
test eax, eax
je 0x40fb5d
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov dword [ecx - 4], eax
jmp 0x40faa5
test ecx, ecx
je 0x40faa3
push ecx
call fcn.0059c99d
add esp, 4
mov ecx, eax
jmp 0x40faa5
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.005a1740
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.00411850
test eax, eax
jne 0x40fae6
push 0x5d58f4
jmp 0x40faeb
push str.Exit
push 2
call fcn.0043efad
mov edx, dword [ebp - 0x14]
add esp, 8
mov byte [ebp - 4], 0
cmp edx, 0x10
jb 0x40fb29
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40fb1f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fb5d
push edx
push ecx
call fcn.0059c9cd
add esp, 8
mov eax, dword [ebp - 0x34]
add eax, 0x18
mov dword [ebp - 0x34], eax
cmp eax, dword [ebp - 0x3c]
jne 0x40fa11
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.0059cf09
mov esp, ebp
pop ebp
ret
call fcn.005a57f9
int3