Function at 0x40d337
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], esp
push 0
push 0
push 0
push 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x40d388
push 6
call fcn.0040e01e
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40d638
call fcn.0040d646
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40d3ce
mov dword [ebp - 0x10], esp
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x40d3c9
push 6
call fcn.0040e01e
add esp, 4
jmp 0x40d638
mov ebx, dword [0x420cb7]
call fcn.00404d56
push ebx
push ecx
mov eax, dword [ebp - 8]
dec eax
jns 0x40d3ee
push 4
call fcn.0040e01e
add esp, 4
pop ecx
pop ebx
cmp eax, ecx
jl 0x40d401
push 1
call fcn.0040e01e
add esp, 4
shl eax, 2
add ebx, eax
mov ebx, dword [ebx]
add ebx, 0xc
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebx], 1
mov ebx, dword [0x420cb7]
call fcn.00404d56
push ebx
push ecx
mov eax, dword [ebp - 8]
dec eax
jns 0x40d437
push 4
call fcn.0040e01e
add esp, 4
pop ecx
pop ebx
cmp eax, ecx
jl 0x40d44a
push 1
call fcn.0040e01e
add esp, 4
shl eax, 2
add ebx, eax
mov ebx, dword [ebx]
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
mov dword [ebx], eax
mov ebx, dword [0x420cb7]
call fcn.00404d56
push ebx
push ecx
mov eax, dword [ebp - 8]
dec eax
jns 0x40d47c
push 4
call fcn.0040e01e
add esp, 4
pop ecx
pop ebx
cmp eax, ecx
jl 0x40d48f
push 1
call fcn.0040e01e
add esp, 4
shl eax, 2
add ebx, eax
mov ebx, dword [ebx]
add ebx, 8
mov dword [ebp - 0x10], ebx
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x10]
mov dword [ebx], eax
mov ebx, dword [0x420cb7]
call fcn.00404d56
push ebx
push ecx
mov eax, dword [ebp - 8]
dec eax
jns 0x40d4c4
push 4
call fcn.0040e01e
add esp, 4
pop ecx
pop ebx
cmp eax, ecx
jl 0x40d4d7
push 1
call fcn.0040e01e
add esp, 4
shl eax, 2
add ebx, eax
mov ebx, dword [ebx]
add ebx, 4
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], 1
mov eax, dword [ebp + 8]
cmp eax, 0
jge 0x40d500
push 0xa
call fcn.0040e01e
add esp, 4
mov dword [ebp - 0x14], eax
lea ebx, [ebp - 0x18]
call fcn.00404d56
push ecx
shl ecx, 2
add ecx, 8
push ecx
call fcn.0040e018
add esp, 4
mov edi, eax
mov dword [edi], 1
add edi, 4
pop ecx
push eax
push ecx
lea esi, [ebp - 0x14]
lodsd eax, dword [esi]
stosd dword es:[edi], eax
mov ebx, dword [ebp - 0x10]
mov ebx, dword [ebx]
call fcn.00404d56
pop edx
test edx, edx
je 0x40d547
mov ecx, edx
xor eax, eax
rep stosd dword es:[edi], eax
mov ebx, dword [ebp - 0x10]
push dword [ebx]
call fcn.0040e012
add esp, 4
pop eax
mov ebx, dword [ebp - 0x10]
mov dword [ebx], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
push eax
lea eax, [ebp - 0xc]
mov ebx, eax
pop eax
inc ecx
push ecx
push ebx
mov dword [ebx], ecx
push eax
cmp ecx, eax
jg 0x40d635
mov ebx, dword [0x420cb7]
call fcn.00404d56
push ebx
push ecx
mov eax, dword [ebp - 8]
dec eax
jns 0x40d594
push 4
call fcn.0040e01e
add esp, 4
pop ecx
pop ebx
cmp eax, ecx
jl 0x40d5a7
push 1
call fcn.0040e01e
add esp, 4
shl eax, 2
add ebx, eax
mov ebx, dword [ebx]
mov ebx, dword [ebx + 4]
call fcn.00404d56
push ebx
push ecx
mov eax, dword [ebp - 0xc]
dec eax
jns 0x40d5cb
push 4
call fcn.0040e01e
add esp, 4
pop ecx
pop ebx
cmp eax, ecx
jl 0x40d5de
push 1
call fcn.0040e01e
add esp, 4
shl eax, 2
add ebx, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], esp
mov eax, 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push 0
push dword [ebp - 8]
push 0x40d81e
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
nop
nop
nop
nop
cmp dword [ebp - 0x14], esp
je 0x40d628
push 6
call fcn.0040e01e
add esp, 4
mov ebx, dword [ebp - 0x10]
mov dword [ebx], eax
pop eax
pop ebx
pop ecx
jmp 0x40d566
add esp, 0xc
mov eax, dword [ebp - 8]
jmp 0x40d640
mov esp, ebp
pop ebp
ret 8