Function at 0x405890
Capabilities:
Create process on windows
Create process suspended
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51f23d
mov eax, dword fs:[0]
push eax
sub esp, 0x37c
mov eax, dword [0x5673f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x40
lea eax, [ebp - 0x384]
mov ebx, ecx
push 0
push eax
mov dword [ebp - 0x32c], ebx
mov byte [ebp - 0x321], 1
mov dword [ebp - 0x388], 0x44
call fcn.004fc760
add esp, 0xc
call fcn.004108ca
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405904
push 0x80004005
call fcn.00401a00
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x328], esi
mov dword [ebp - 4], 0
call fcn.004108ca
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405937
push 0x80004005
call fcn.00401a00
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x338], eax
mov byte [ebp - 4], 1
call fcn.004108ca
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405967
push 0x80004005
call fcn.00401a00
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x33c], edi
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call fcn.00403140
push 1
push 0
push 0
push 0x549d08
push 0x208000
push 0x54a041
push str..exe
push 1
lea ecx, [ebp - 0x320]
call fcn.00417cfb
lea ecx, [ebp - 0x118]
push ecx
push 0x104
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
add ebx, 0x330
cmp byte [ebx], 0
lea ecx, [ebp - 0x320]
je 0x4059e0
call fcn.0041742b
mov dword [eax + 0x2c], ebx
jmp 0x4059ee
call fcn.0041742b
lea edx, [ebp - 0x118]
mov dword [eax + 0x2c], edx
lea ecx, [ebp - 0x320]
call fcn.0041851c
cmp eax, 1
jne 0x405b9e
lea eax, [ebp - 0x334]
push eax
lea ecx, [ebp - 0x320]
call fcn.00418669
push eax
lea ecx, [ebp - 0x328]
mov byte [ebp - 4], 4
call fcn.00406560
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x334]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a4a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x334]
push ecx
lea ecx, [ebp - 0x320]
call fcn.00418836
push eax
lea ecx, [ebp - 0x338]
mov byte [ebp - 4], 5
call fcn.00406560
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x334]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405a92
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebp - 0x32c]
mov eax, dword [ebp - 0x338]
add edx, 0x445
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x405aa6
mov esi, dword [ebp - 0x328]
cmp dword [esi - 4], 1
jle 0x405ad1
mov ecx, dword [esi - 0xc]
push ecx
lea ecx, [ebp - 0x328]
call fcn.00401890
mov esi, dword [ebp - 0x328]
mov edx, ebx
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x405ad7
mov ebx, dword [ebp - 0x32c]
push 0
mov ecx, ebx
call fcn.00409d1f
push 0x549690
push esi
call fcn.004fb853
add esp, 8
test eax, eax
je 0x405b10
push eax
call fcn.004fb8d7
add esp, 4
jmp 0x405b98
call fcn.004108ca
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405b2a
push 0x80004005
call fcn.00401a00
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x32c], eax
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea ecx, [ebp - 0x32c]
push 0x549694
push ecx
call fcn.00401ad0
mov esi, dword [ebp - 0x32c]
add esp, 0x10
push 0x10
push 0x548e34
push esi
mov ecx, ebx
call fcn.00409a7b
lea eax, [esi - 0x10]
mov byte [ebp - 0x321], 0
mov byte [ebp - 4], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405b98
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x328]
lea ecx, [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp byte [ebp - 0x321], 0
jne 0x405c4e
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x320]
call fcn.00417b79
add edi, 0xfffffff0
mov byte [ebp - 4], 1
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x405be7
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x338]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405c0d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405c30
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004fa984
mov esp, ebp
pop ebp
ret
mov eax, dword [esi - 0xc]
lea ecx, [eax - 1]
xor edx, edx
test ecx, ecx
js 0x405c70
lea ebx, [eax - 1]
lea ecx, [ecx]
cmp ecx, eax
jg 0x405c70
cmp byte [ecx + esi], 0x5c
je 0x405c7a
inc edx
dec ebx
mov ecx, ebx
jns 0x405c60
push 0x80070057
call fcn.00401a00
mov ecx, eax
sub ecx, edx
xor ebx, ebx
mov dword [ebp - 0x32c], edx
test ecx, ecx
jle 0x405d07
lea ebx, [ebx]
test ebx, ebx
js 0x405c70
cmp ebx, eax
jg 0x405c70
mov dl, byte [ebx + esi]
mov byte [ebp - 0x32d], dl
mov edx, dword [edi - 0xc]
lea esi, [edx + 1]
mov dword [ebp - 0x334], edx
test esi, esi
js 0x405c70
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, esi
or eax, ecx
jge 0x405cda
push esi
lea ecx, [ebp - 0x33c]
call fcn.00401960
mov edi, dword [ebp - 0x33c]
mov edx, dword [ebp - 0x334]
mov al, byte [ebp - 0x32d]
mov byte [edx + edi], al
cmp esi, dword [edi - 8]
jg 0x405c70
mov ecx, dword [ebp - 0x328]
mov dword [edi - 0xc], esi
mov byte [esi + edi], 0
mov eax, dword [ecx - 0xc]
mov edx, eax
sub edx, dword [ebp - 0x32c]
inc ebx
mov esi, ecx
cmp ebx, edx
jl 0x405c90
cmp dword [esi - 4], 1
jle 0x405d22
mov eax, dword [esi - 0xc]
push eax
lea ecx, [ebp - 0x328]
call fcn.00401890
mov esi, dword [ebp - 0x328]
push 0x57ee08
lea ecx, [ebp - 0x388]
push ecx
push edi
push 0
push 4
push 0
push 0
push 0
push esi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov byte [ebp - 4], 2
cmp dword [0x57ee10], 0
lea ecx, [ebp - 0x320]
je 0x405bc2
call fcn.00417b79
add edi, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405d7e
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x338]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405da4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405dc7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [ebp - 0x321]
jmp 0x405c32