Function at 0x401cfe
Capabilities:
Create thread
Terminate thread

Disassembly:
mov eax, 0x415707
call fcn.00411720
sub esp, 0x38
push ebx
push esi
push edi
mov ebx, 0x200000
lea edi, [ebp - 0x2c]
mov esi, ecx
call fcn.00404fec
xor edi, edi
mov dword [ebp - 4], edi
mov eax, dword [ebp + 0x10]
mov dword [eax], edi
mov eax, dword [ebp + 0x14]
mov dword [eax], edi
cmp dword [esi + 0x588], edi
jne 0x401d55
xor bl, bl
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x2c]
call fcn.004050f9
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, bl
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10
lea eax, [esi + 0x57a4]
mov dword [ebp - 0x14], eax
cmp eax, edi
je 0x401d6a
push eax
call fcn.00404f79
jmp 0x401d6c
xor al, al
test al, al
je 0x401d34
call fcn.0040319f
sub eax, dword [esi + 0x5810]
mov dword [ebp - 0x1c], eax
cmp eax, 0x708
jb 0x401e6e
call fcn.0040319f
mov ebx, dword [esi + 0x58c]
mov dword [esi + 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 0x401da6
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x40]
push eax
push 0x401c9c
push 0x10000
push edi
mov dword [ebp - 0x40], esi
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 0x401e1e
mov ecx, ebx
imul ecx, ecx, 0x14
lea edi, [ecx + esi]
push dword [edi + 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x401e02
cmp eax, 0xffffffff
jne 0x401e13
inc dword [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 edi, edi
cmp byte [ebp - 0x30], 0
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
je 0x401f37
cmp eax, edi
mov dword [esi + 0x58c], ebx
jle 0x401f51
call fcn.0040319f
mov dword [esi + 0x5810], eax
cmp dword [ebp - 0x2c], edi
je 0x401e5d
cmp dword [ebp - 0x18], 1
jle 0x401e5d
push dword [ebp - 0x18]
push dword [ebp - 0x2c]
call fcn.004018cc
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x18]
call fcn.00401a33
mov dword [esi + 0x5954], edi
xor ebx, ebx
cmp dword [esi + 0x2bfc], edi
mov edx, 0x118
jle 0x401ea8
lea eax, [esi + 0xa08]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax - 0x108]
jne 0x401e9d
mov ecx, dword [eax]
cmp ecx, edi
jle 0x401e9d
cmp ecx, 0x10
jl 0x401f68
inc ebx
add eax, edx
cmp ebx, dword [esi + 0x2bfc]
jl 0x401e83
xor ebx, ebx
cmp dword [esi + 0x4f00], edi
jle 0x401edd
lea eax, [esi + 0x2d0c]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax - 0x108]
jne 0x401ed2
mov ecx, dword [eax]
cmp ecx, edi
jle 0x401ed2
cmp ecx, 0x10
jl 0x402009
inc ebx
add eax, edx
cmp ebx, dword [esi + 0x4f00]
jl 0x401eb8
cmp dword [ebp + 8], 0xff00aaee
jne 0x401eef
cmp byte [esi + 0x581c], 0
je 0x401f09
cmp dword [ebp + 8], 0xff00bb00
jne 0x402094
cmp byte [esi + 0x581c], 0
je 0x402094
lea eax, [esi + 0x5814]
mov ecx, dword [eax]
cmp ecx, edi
je 0x402094
mov edx, dword [ebp + 0x10]
mov dword [edx], ecx
mov edx, dword [ebp + 0x14]
add esi, 0x5818
mov ecx, dword [esi]
cmp dword [ebp - 0x14], edi
mov dword [edx], ecx
mov dword [eax], edi
mov dword [esi], edi
jmp 0x401ff8
mov eax, dword [esi + 0x588]
inc ebx
cmp eax, edi
jle 0x401f46
mov ecx, eax
jmp 0x401f49
xor ecx, ecx
inc ecx
mov eax, ebx
xor edx, edx
div ecx
mov ebx, edx
cmp ebx, dword [esi + 0x58c]
jne 0x401d9a
inc dword [esi + 0x5954]
jmp 0x401e6e
mov edx, dword [ebp + 0x10]
imul ebx, ebx, 0x118
lea edi, [ebx + esi]
lea ecx, [edi + 0x908]
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [edi + 0x90c]
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [edi + 0x910]
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
dec dword [edi + 0xa08]
mov eax, dword [edi + 0xa08]
shl eax, 4
push eax
lea eax, [edi + 0x918]
push eax
push ecx
call fcn.0040a9c0
mov ecx, dword [edi + 0xa08]
shl ecx, 4
add ecx, ebx
xor eax, eax
mov dword [ecx + esi + 0x908], eax
mov ecx, dword [edi + 0xa08]
shl ecx, 4
add ecx, ebx
mov dword [ecx + esi + 0x90c], eax
mov ecx, dword [edi + 0xa08]
add ecx, 0x91
shl ecx, 4
add esp, 0xc
add ecx, ebx
mov dword [ecx + esi], eax
mov byte [edi + 0x914], 1
cmp dword [ebp - 0x14], eax
je 0x402002
push dword [ebp - 0x14]
call fcn.00404f99
mov bl, 1
jmp 0x401d36
mov edx, dword [ebp + 0x10]
imul ebx, ebx, 0x118
lea edi, [ebx + esi]
lea ecx, [edi + 0x2c0c]
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [edi + 0x2c10]
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [edi + 0x2c14]
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
dec dword [edi + 0x2d0c]
mov eax, dword [edi + 0x2d0c]
shl eax, 4
push eax
lea eax, [edi + 0x2c1c]
push eax
push ecx
call fcn.0040a9c0
mov ecx, dword [edi + 0x2d0c]
shl ecx, 4
add ecx, ebx
xor eax, eax
mov dword [ecx + esi + 0x2c0c], eax
mov ecx, dword [edi + 0x2d0c]
add ecx, 0x2c1
shl ecx, 4
add ecx, ebx
mov dword [ecx + esi], eax
mov ecx, dword [edi + 0x2d0c]
shl ecx, 4
add esp, 0xc
add ecx, ebx
mov dword [ecx + esi + 0x2c14], eax
jmp 0x401ff5
cmp dword [ebp - 0x14], edi
je 0x401d34
push dword [ebp - 0x14]
call fcn.00404f99
jmp 0x401d34