Function at 0x40f950
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cb5e0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x664340]
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 0x40f9fe
cmp byte [edi + 1], 0
je 0x40f9fe
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 0x40f9bb
cmp byte [edi + 3], 0
je 0x40f9d0
mov al, byte [edi + 2]
test al, al
jne 0x40f9fe
push 0x1f4
inc esi
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40f9b0
mov al, byte [edi + 2]
test al, al
jne 0x40f9fe
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 0x40fa0c
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 0x40fb6b
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 0x40fa65
mov edx, dword [eax]
mov dword [ebp - 0x2c], edx
cmp ecx, 0x10
jae 0x40fa7b
movups xmm0, xmmword [edx]
mov dword [ebp - 0x18], ecx
mov edi, 0xf
movups xmmword [ebp - 0x28], xmm0
jmp 0x40faef
mov edi, ecx
mov eax, SysReAllocString
or edi, 0xf
cmp edi, 0x7fffffff
cmova edi, eax
lea ecx, [edi + 1]
cmp ecx, 0x1000
jb 0x40fac2
lea eax, [ecx + 0x23]
cmp eax, ecx
mov ecx, 0xffffffff
cmovbe eax, ecx
push eax
call fcn.0044a2e5
add esp, 4
test eax, eax
je 0x40fb8d
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov dword [ecx - 4], eax
jmp 0x40fad5
test ecx, ecx
je 0x40fad3
push ecx
call fcn.0044a2e5
add esp, 4
mov ecx, eax
jmp 0x40fad5
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.0046c480
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.004119a0
test eax, eax
jne 0x40fb16
push 0x5d58dc
jmp 0x40fb1b
push str.Exit
push 2
call fcn.00451405
mov edx, dword [ebp - 0x14]
add esp, 8
mov byte [ebp - 4], 0
cmp edx, 0x10
jb 0x40fb59
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40fb4f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fb8d
push edx
push ecx
call fcn.0044a315
add esp, 8
mov eax, dword [ebp - 0x34]
add eax, 0x18
mov dword [ebp - 0x34], eax
cmp eax, dword [ebp - 0x3c]
jne 0x40fa41
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.0044a851
mov esp, ebp
pop ebp
ret
call fcn.00470179
int3