Function at 0x40ed34
Capabilities:
Create thread
Terminate thread

Disassembly:
mov eax, 0x414499
call fcn.004104dc
sub esp, 0x38
push ebx
push esi
push edi
push 0x200000
lea esi, [ebp - 0x2c]
mov edi, ecx
call fcn.0040a561
xor esi, esi
mov dword [ebp - 4], esi
mov eax, dword [ebp + 0x10]
mov dword [eax], esi
mov eax, dword [ebp + 0x14]
mov dword [eax], esi
cmp dword [edi + 0x588], esi
jne 0x40ed8b
xor bl, bl
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x2c]
call fcn.0040a40a
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, bl
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10
lea eax, [edi + 0x57a4]
mov dword [ebp - 0x14], eax
cmp eax, esi
je 0x40eda0
push eax
call fcn.0040aab4
jmp 0x40eda2
xor al, al
test al, al
je 0x40ed6a
call fcn.0040c55b
sub eax, dword [edi + 0x5810]
mov dword [ebp - 0x1c], eax
cmp eax, 0x708
jb 0x40ee9d
call fcn.0040c55b
mov ebx, dword [edi + 0x58c]
mov dword [edi + 0x5810], eax
mov eax, dword [ebp - 0x28]
push 0x14
mov dword [ebp - 0x18], eax
pop edx
lea ecx, [ebp - 0x40]
mov byte [ecx], 0
inc ecx
dec edx
jne 0x40eddc
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x1c]
push eax
push esi
lea eax, [ebp - 0x40]
push eax
push 0x40e9a4
push 0x10000
push esi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ecx
mov byte [ebp - 0x30], dl
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x40ee53
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 0x40ee36
cmp eax, 0xffffffff
jne 0x40ee48
inc dword [esi + edi + 0x318]
push 0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
cmp byte [ebp - 0x30], 0
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
je 0x40ef6a
mov dword [edi + 0x58c], ebx
cmp eax, esi
jle 0x40ef84
call fcn.0040c55b
push dword [ebp - 0x18]
mov dword [edi + 0x5810], eax
push dword [ebp - 0x2c]
call fcn.0040f23e
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x18]
mov esi, edi
call fcn.0040ea06
and dword [edi + 0x5954], 0
xor esi, esi
xor ebx, ebx
mov edx, 0x118
cmp dword [edi + 0x2bfc], esi
jle 0x40eed7
lea eax, [edi + 0xa08]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax - 0x108]
jne 0x40eecc
mov ecx, dword [eax]
cmp ecx, esi
jle 0x40eecc
cmp ecx, 0x10
jl 0x40ef9b
inc ebx
add eax, edx
cmp ebx, dword [edi + 0x2bfc]
jl 0x40eeb2
xor ebx, ebx
cmp dword [edi + 0x4f00], esi
jle 0x40ef0c
lea eax, [edi + 0x2d0c]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax - 0x108]
jne 0x40ef01
mov ecx, dword [eax]
cmp ecx, esi
jle 0x40ef01
cmp ecx, 0x10
jl 0x40f03c
inc ebx
add eax, edx
cmp ebx, dword [edi + 0x4f00]
jl 0x40eee7
cmp dword [ebp + 8], 0xff00aaee
jne 0x40ef1e
cmp byte [edi + 0x581c], 0
je 0x40ef38
cmp dword [ebp + 8], 0xff00bb00
jne 0x40f0c7
cmp byte [edi + 0x581c], 0
je 0x40f0c7
mov ecx, dword [edi + 0x5814]
cmp ecx, esi
je 0x40f0c7
mov edx, dword [ebp + 0x10]
cmp dword [ebp - 0x14], esi
mov dword [edx], ecx
mov ecx, dword [edi + 0x5818]
mov edx, dword [ebp + 0x14]
mov dword [edx], ecx
mov dword [edi + 0x5814], esi
mov dword [edi + 0x5818], esi
jmp 0x40f02b
mov eax, dword [edi + 0x588]
cmp eax, esi
jle 0x40ef78
mov ecx, eax
jmp 0x40ef7b
xor ecx, ecx
inc ecx
lea eax, [ebx + 1]
xor edx, edx
div ecx
mov ebx, edx
cmp ebx, dword [edi + 0x58c]
jne 0x40edd0
inc dword [edi + 0x5954]
jmp 0x40ee9d
mov edx, dword [ebp + 0x10]
imul ebx, ebx, 0x118
lea esi, [ebx + edi]
lea ecx, [esi + 0x908]
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [esi + 0x90c]
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [esi + 0x910]
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
dec dword [esi + 0xa08]
mov eax, dword [esi + 0xa08]
shl eax, 4
push eax
lea eax, [esi + 0x918]
push eax
push ecx
call fcn.00401ab0
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 esp, 0xc
add ecx, ebx
mov dword [ecx + edi], eax
mov byte [esi + 0x914], 1
cmp dword [ebp - 0x14], eax
je 0x40f035
push dword [ebp - 0x14]
call fcn.0040aa94
mov bl, 1
jmp 0x40ed6c
mov edx, dword [ebp + 0x10]
imul ebx, ebx, 0x118
lea esi, [ebx + edi]
lea ecx, [esi + 0x2c0c]
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [esi + 0x2c10]
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [esi + 0x2c14]
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
dec dword [esi + 0x2d0c]
mov eax, dword [esi + 0x2d0c]
shl eax, 4
push eax
lea eax, [esi + 0x2c1c]
push eax
push ecx
call fcn.00401ab0
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 esp, 0xc
add ecx, ebx
mov dword [ecx + edi + 0x2c14], eax
jmp 0x40f028
cmp dword [ebp - 0x14], esi
je 0x40ed6a
push dword [ebp - 0x14]
call fcn.0040aa94
jmp 0x40ed6a