Function at 0x402be5
Capabilities:
Create thread
Terminate thread

Disassembly:
mov eax, 0x41d9a8
call fcn.004198ec
sub esp, 0x78
push ebx
push esi
push edi
lea eax, [ebp - 0x84]
push eax
mov edi, ecx
call fcn.00401108
and dword [ebp - 4], 0
lea esi, [ebp - 0x4c]
call fcn.00405d11
mov byte [ebp - 4], 1
push 1
push 0x200000
lea esi, [ebp - 0x3c]
mov byte [ebp - 0x11], 0
call fcn.00405d65
mov byte [ebp - 4], 2
cmp dword [edi + 0x588], 0
je 0x402fb5
lea eax, [edi + 0x57a4]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x402c4c
push eax
call fcn.00405cd1
jmp 0x402c4e
xor al, al
test al, al
je 0x402fb5
call fcn.00403925
sub eax, dword [edi + 0x5810]
mov dword [ebp - 0x24], eax
cmp eax, 0xe10
jb 0x402d55
call fcn.00403925
mov ebx, dword [edi + 0x58c]
mov dword [edi + 0x5810], eax
mov eax, dword [ebp - 0x38]
push 0x14
mov dword [ebp - 0x1c], eax
pop edx
lea ecx, [ebp - 0x60]
mov byte [ecx], 0
inc ecx
dec edx
jne 0x402c8c
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x24]
push eax
push edx
lea eax, [ebp - 0x60]
push eax
push 0x401dc3
push 0x10000
push edx
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ecx
mov byte [ebp - 0x50], dl
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
je 0x402d01
mov esi, ebx
imul esi, esi, 0x14
push dword [esi + edi + 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x402ce6
cmp eax, 0xffffffff
jne 0x402cf8
inc dword [esi + edi + 0x318]
push 0
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x50], 0
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x1c], eax
je 0x402e03
mov dword [edi + 0x58c], ebx
test eax, eax
jle 0x402e10
call fcn.00403925
cmp dword [ebp - 0x3c], 0
mov dword [edi + 0x5810], eax
je 0x402d41
cmp dword [ebp - 0x1c], 1
jle 0x402d41
push dword [ebp - 0x1c]
push dword [ebp - 0x3c]
call fcn.00401923
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x1c]
mov esi, edi
call fcn.00401a84
and dword [edi + 0x5954], 0
xor esi, esi
xor ebx, ebx
mov edx, 0x118
cmp dword [edi + 0x2bfc], esi
jle 0x402d92
lea eax, [edi + 0xa08]
cmp dword [eax - 0x108], 0xff00bb00
jne 0x402d87
mov ecx, dword [eax]
cmp ecx, esi
jle 0x402d87
cmp ecx, 0x10
jl 0x402e27
inc ebx
add eax, edx
cmp ebx, dword [edi + 0x2bfc]
jl 0x402d6c
xor ebx, ebx
cmp dword [edi + 0x4f00], esi
jle 0x402dc8
lea eax, [edi + 0x2d0c]
cmp dword [eax - 0x108], 0xff00bb00
jne 0x402dbd
mov ecx, dword [eax]
cmp ecx, esi
jle 0x402dbd
cmp ecx, 0x10
jl 0x402f2f
inc ebx
add eax, edx
cmp ebx, dword [edi + 0x4f00]
jl 0x402da2
cmp byte [edi + 0x581c], 0
je 0x402fa8
mov ecx, dword [edi + 0x5814]
cmp ecx, esi
je 0x402fa8
cmp dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ecx
mov ecx, dword [edi + 0x5818]
mov dword [ebp - 0x20], ecx
mov dword [edi + 0x5814], esi
mov dword [edi + 0x5818], esi
jmp 0x402ea8
lea eax, [ebx + 1]
xor edx, edx
div dword [edi + 0x588]
mov ebx, edx
cmp ebx, dword [edi + 0x58c]
jne 0x402c80
inc dword [edi + 0x5954]
jmp 0x402d55
imul ebx, ebx, 0x118
lea esi, [ebx + edi]
dec dword [esi + 0xa08]
lea ecx, [esi + 0x908]
mov eax, dword [ecx]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x90c]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0xa08]
shl eax, 4
push eax
lea eax, [esi + 0x918]
push eax
push ecx
call fcn.00412d60
mov ecx, dword [esi + 0xa08]
shl ecx, 4
add ecx, ebx
xor eax, eax
mov dword [ecx + edi + 0x908], eax
mov ecx, dword [esi + 0xa08]
shl ecx, 4
add ecx, ebx
mov dword [ecx + edi + 0x90c], eax
mov ecx, dword [esi + 0xa08]
add ecx, 0x91
shl ecx, 4
add ecx, ebx
mov dword [ecx + edi], eax
mov byte [esi + 0x914], 1
add esp, 0xc
cmp dword [ebp - 0x18], eax
je 0x402eb2
push dword [ebp - 0x18]
call fcn.00405cf1
mov byte [ebp - 4], 1
lea esi, [ebp - 0x3c]
call fcn.00405f2c
xor ebx, ebx
cmp dword [ebp - 0x1c], ebx
je 0x402fc6
mov edi, dword [ebp - 0x20]
cmp edi, ebx
jbe 0x402fc6
jle 0x402ee0
push ebx
push edi
lea esi, [ebp - 0x4c]
call fcn.00405f9d
push ebx
push dword [ebp - 0x1c]
mov eax, edi
lea ecx, [ebp - 0x4c]
call fcn.004060be
lea eax, [ebp - 0x4c]
lea ebx, [ebp - 0x84]
call fcn.004013ef
lea eax, [ebp - 0x28]
push eax
lea edi, [ebp - 0x2c]
mov esi, ebx
mov dword [ebp - 0x28], 0x5b61360
call fcn.004015ac
push 0x4218b0
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x402f27
mov byte [ebp - 0x11], 1
mov bl, byte [ebp - 0x11]
jmp 0x402fc8
imul ebx, ebx, 0x118
lea esi, [ebx + edi]
dec dword [esi + 0x2d0c]
lea ecx, [esi + 0x2c0c]
mov eax, dword [ecx]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x2c10]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x2d0c]
shl eax, 4
push eax
lea eax, [esi + 0x2c1c]
push eax
push ecx
call fcn.00412d60
mov ecx, dword [esi + 0x2d0c]
shl ecx, 4
add ecx, ebx
xor eax, eax
mov dword [ecx + edi + 0x2c0c], eax
mov ecx, dword [esi + 0x2d0c]
add ecx, 0x2c1
shl ecx, 4
add ecx, ebx
mov dword [ecx + edi], eax
mov ecx, dword [esi + 0x2d0c]
shl ecx, 4
add ecx, ebx
mov dword [ecx + edi + 0x2c14], eax
jmp 0x402ea2
cmp dword [ebp - 0x18], esi
je 0x402fb5
push dword [ebp - 0x18]
call fcn.00405cf1
mov byte [ebp - 4], 1
lea esi, [ebp - 0x3c]
call fcn.00405f2c
jmp 0x402f27
xor bl, bl
mov byte [ebp - 4], 0
lea esi, [ebp - 0x4c]
call fcn.00405f2c
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x84]
push eax
call fcn.0040114f
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, bl
mov dword fs:[0], ecx
pop ebx
leave
ret