Function at 0x401990
Capabilities:
Create a process with modified i/o handles and window
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4158d4
mov eax, dword fs:[0]
push eax
sub esp, 0x4dc
mov eax, dword [0x41f04c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x4e4], esi
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x4e8], eax
mov eax, dword [ebp + 0xc]
movlpd qword [ebp - 0x428], xmm0
push 0x40
mov dword [ebp - 0x4c8], eax
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0
call fcn.00408ce6
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x428], eax
lea eax, [ebp - 0x4e0]
mov dword [ebp - 4], 0
mov ecx, dword [esi + 0xc]
push eax
call fcn.00406220
mov esi, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4c4]
push 4
xor eax, eax
mov dword [ebp - 0x4b4], 0
push str.dp
mov dword [ebp - 0x4b0], 7
mov word [ebp - 0x4c4], ax
call fcn.004032f0
lea eax, [ebp - 0x4c4]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x428]
call fcn.004023a0
cmp eax, esi
je 0x401a90
cmp dword [esi + 0x14], 8
mov ecx, dword [esi + 0x10]
jb 0x401a87
mov esi, dword [esi]
push ecx
push esi
mov ecx, eax
call fcn.004032f0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x4b0]
cmp edx, 8
jb 0x401ad4
mov ecx, dword [ebp - 0x4c4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401aca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402379
push edx
push ecx
call fcn.00408cd8
add esp, 8
xor eax, eax
mov dword [ebp - 0x4b4], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x4cc]
mov dword [ebp - 0x4b0], 7
mov word [ebp - 0x4c4], ax
cmp edx, 8
jb 0x401b34
mov ecx, dword [ebp - 0x4e0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401b2a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402379
push edx
push ecx
call fcn.00408cd8
add esp, 8
mov ecx, dword [ebp - 0x4e4]
lea eax, [ebp - 0x4e0]
push eax
mov ecx, dword [ecx + 0xc]
call fcn.00406140
mov esi, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4c4]
push 5
xor eax, eax
mov dword [ebp - 0x4b4], 0
push str.key
mov dword [ebp - 0x4b0], 7
mov word [ebp - 0x4c4], ax
call fcn.004032f0
lea eax, [ebp - 0x4c4]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x428]
call fcn.004023a0
cmp eax, esi
je 0x401bac
cmp dword [esi + 0x14], 8
mov ecx, dword [esi + 0x10]
jb 0x401ba3
mov esi, dword [esi]
push ecx
push esi
mov ecx, eax
call fcn.004032f0
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x4b0]
cmp edx, 8
jb 0x401bf0
mov ecx, dword [ebp - 0x4c4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401be6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40237e
push edx
push ecx
call fcn.00408cd8
add esp, 8
xor eax, eax
mov dword [ebp - 0x4b4], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x4cc]
mov dword [ebp - 0x4b0], 7
mov word [ebp - 0x4c4], ax
cmp edx, 8
jb 0x401c50
mov ecx, dword [ebp - 0x4e0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401c46
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40237e
push edx
push ecx
call fcn.00408cd8
add esp, 8
lea eax, [ebp - 0x4e0]
push eax
mov eax, dword [ebp - 0x4e4]
mov ecx, dword [eax + 0xc]
call fcn.00406540
mov esi, eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x4c4]
push 8
xor eax, eax
mov dword [ebp - 0x4b4], 0
push str.source
mov dword [ebp - 0x4b0], 7
mov word [ebp - 0x4c4], ax
call fcn.004032f0
lea eax, [ebp - 0x4c4]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x428]
call fcn.004023a0
cmp eax, esi
je 0x401cc8
cmp dword [esi + 0x14], 8
mov ecx, dword [esi + 0x10]
jb 0x401cbf
mov esi, dword [esi]
push ecx
push esi
mov ecx, eax
call fcn.004032f0
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x4b0]
cmp edx, 8
jb 0x401d0c
mov ecx, dword [ebp - 0x4c4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401d02
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402383
push edx
push ecx
call fcn.00408cd8
add esp, 8
xor eax, eax
mov dword [ebp - 0x4b4], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x4cc]
mov dword [ebp - 0x4b0], 7
mov word [ebp - 0x4c4], ax
cmp edx, 8
jb 0x401d6c
mov ecx, dword [ebp - 0x4e0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401d62
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402383
push edx
push ecx
call fcn.00408cd8
add esp, 8
lea eax, [ebp - 0x4e0]
push eax
mov eax, dword [ebp - 0x4e4]
mov ecx, dword [eax + 0xc]
call fcn.00406460
mov esi, eax
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x4c4]
push 8
xor eax, eax
mov dword [ebp - 0x4b4], 0
push str.medium
mov dword [ebp - 0x4b0], 7
mov word [ebp - 0x4c4], ax
call fcn.004032f0
lea eax, [ebp - 0x4c4]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x428]
call fcn.004023a0
cmp eax, esi
je 0x401de4
cmp dword [esi + 0x14], 8
mov ecx, dword [esi + 0x10]
jb 0x401ddb
mov esi, dword [esi]
push ecx
push esi
mov ecx, eax
call fcn.004032f0
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x4b0]
cmp edx, 8
jb 0x401e28
mov ecx, dword [ebp - 0x4c4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401e1e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402388
push edx
push ecx
call fcn.00408cd8
add esp, 8
xor eax, eax
mov dword [ebp - 0x4b4], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0x4cc]
mov dword [ebp - 0x4b0], 7
mov word [ebp - 0x4c4], ax
cmp edx, 8
jb 0x401e88
mov ecx, dword [ebp - 0x4e0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401e7e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402388
push edx
push ecx
call fcn.00408cd8
add esp, 8
push 7
xor eax, eax
mov dword [ebp - 0x4b4], 0
push str.query
lea ecx, [ebp - 0x4c4]
mov dword [ebp - 0x4b0], 7
mov word [ebp - 0x4c4], ax
call fcn.004032f0
lea eax, [ebp - 0x4c4]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x428]
call fcn.004023a0
cmp eax, edi
je 0x401ee5
cmp dword [edi + 0x14], 8
mov ecx, dword [edi + 0x10]
jb 0x401edc
mov edi, dword [edi]
push ecx
push edi
mov ecx, eax
call fcn.004032f0
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x4b0]
cmp edx, 8
jb 0x401f29
mov ecx, dword [ebp - 0x4c4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401f1f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40238d
push edx
push ecx
call fcn.00408cd8
add esp, 8
mov edx, dword [ebp - 0x4e8]
lea eax, [ebp - 0x428]
push eax
lea ecx, [ebp - 0x458]
call fcn.00401090
add esp, 4
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x4c8]
cmp dword [eax + 0x14], 8
jb 0x401f56
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x420]
push 0x208
push eax
call fcn.0040c78b
add esp, 0xc
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
xor eax, eax
mov dword [ebp - 0x4b4], 0
lea ecx, [ebp - 0x420]
mov dword [ebp - 0x4b0], 7
mov word [ebp - 0x4c4], ax
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401fa0
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x4c4]
call fcn.004032f0
mov byte [ebp - 4], 0xb
mov esi, dword [ebp - 0x4b0]
mov eax, esi
mov edx, dword [ebp - 0x4b4]
sub eax, edx
cmp eax, 1
jb 0x40200b
cmp esi, 8
lea eax, [ebp - 0x4c4]
lea ecx, [edx + 1]
mov esi, 0x20
cmovae eax, dword [ebp - 0x4c4]
mov dword [ebp - 0x4b4], ecx
mov word [eax + edx*2], si
xor edx, edx
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x4c4]
jmp 0x402025
push 1
push 0x41bf48
push dword [ebp - 0x4c8]
lea ecx, [ebp - 0x4c4]
push 1
call fcn.00402e70
mov dword [ebp - 0x4d0], 0
xor ecx, ecx
mov dword [ebp - 0x4cc], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x4e0], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x4d0], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x458]
cmp dword [ebp - 0x444], 8
mov edx, dword [ebp - 0x4d0]
cmovae ecx, dword [ebp - 0x458]
mov eax, dword [ebp - 0x4cc]
mov edi, dword [ebp - 0x448]
sub eax, edx
mov dword [ebp - 0x4c8], edx
cmp edi, eax
ja 0x4020dd
cmp dword [ebp - 0x4cc], 8
lea eax, [edx + edi]
mov dword [ebp - 0x4d0], eax
lea esi, [ebp - 0x4e0]
cmovae esi, dword [ebp - 0x4e0]
lea eax, [edi + edi]
push eax
push ecx
lea eax, [esi + edx*2]
push eax
call fcn.0040a760
mov eax, dword [ebp - 0x4c8]
add esp, 0xc
add eax, edi
xor ecx, ecx
mov word [esi + eax*2], cx
lea eax, [ebp - 0x4e0]
jmp 0x4020f1
push edi
push ecx
push dword [ebp - 0x4c8]
lea ecx, [ebp - 0x4e0]
push edi
call fcn.00402e70
movups xmm0, xmmword [eax]
xor ecx, ecx
movups xmmword [ebp - 0x440], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x430], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov edx, dword [ebp - 0x4cc]
cmp edx, 8
jb 0x40215b
mov ecx, dword [ebp - 0x4e0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402151
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402392
push edx
push ecx
call fcn.00408cd8
add esp, 8
mov edx, dword [ebp - 0x4b0]
xor eax, eax
mov dword [ebp - 0x4d0], 0
mov dword [ebp - 0x4cc], 7
mov word [ebp - 0x4e0], ax
cmp edx, 8
jb 0x4021b8
mov ecx, dword [ebp - 0x4c4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4021ae
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402392
push edx
push ecx
call fcn.00408cd8
add esp, 8
cmp dword [ebp - 0x42c], 8
lea ecx, [ebp - 0x4ac]
push ecx
lea ecx, [ebp - 0x49c]
mov dword [ebp - 0x49c], 0x44
push ecx
push 0
push 0
push 0x1000000
push 0
push 0
lea eax, [ebp - 0x440]
mov dword [ebp - 0x498], 0
cmovae eax, dword [ebp - 0x440]
xorps xmm0, xmm0
push 0
push eax
push 0
mov dword [ebp - 0x494], 0
mov dword [ebp - 0x490], 0
mov dword [ebp - 0x48c], 0
mov dword [ebp - 0x488], 0
mov dword [ebp - 0x484], 0
mov dword [ebp - 0x480], 0
mov dword [ebp - 0x47c], 0
mov dword [ebp - 0x478], 0
mov dword [ebp - 0x474], 0
mov dword [ebp - 0x470], 1
mov dword [ebp - 0x46c], 1
movups xmmword [ebp - 0x468], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x402298
push dword [ebp - 0x4a8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x4ac]
call esi
mov edx, dword [ebp - 0x42c]
cmp edx, 8
jb 0x4022d8
mov ecx, dword [ebp - 0x440]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4022ce
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402397
push edx
push ecx
call fcn.00408cd8
add esp, 8
mov edx, dword [ebp - 0x444]
xor eax, eax
mov dword [ebp - 0x430], 0
mov dword [ebp - 0x42c], 7
mov word [ebp - 0x440], ax
cmp edx, 8
jb 0x402331
mov ecx, dword [ebp - 0x458]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402327
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402397
push edx
push ecx
call fcn.00408cd8
add esp, 8
xor eax, eax
mov dword [ebp - 0x448], 0
mov word [ebp - 0x458], ax
lea eax, [ebp - 0x428]
push eax
mov ecx, eax
mov dword [ebp - 0x444], 7
call fcn.00402950
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.00408cc7
mov esp, ebp
pop ebp
ret 0xc
call fcn.0040c73a
call fcn.0040c73a
call fcn.0040c73a
call fcn.0040c73a
call fcn.0040c73a
call fcn.0040c73a
call fcn.0040c73a
int3