Function at 0x404a90
Capabilities:
Create process on windows

Disassembly:
push 0xffffffffffffffff
push 0x42b857
mov eax, dword fs:[0]
push eax
sub esp, 0x274
mov eax, dword [0x437dd4]
xor eax, esp
mov dword [esp + 0x270], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x437dd4]
xor eax, esp
push eax
lea eax, [esp + 0x288]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x238]
lea esi, [edi + 0x238]
sub eax, 0x10
push eax
call fcn.00402640
add eax, 0x10
add esp, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x290], 0
call fcn.0040a0a7
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404b11
push 0x80004005
call fcn.00401f40
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov ebx, 1
mov byte [esp + 0x290], bl
mov eax, dword [esi]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jle 0x404be8
push 0x5c
push eax
call fcn.0041a03f
add esp, 8
test eax, eax
je 0x404be8
sub eax, dword [esi]
sar eax, 1
mov ebp, eax
js 0x404be8
lea ecx, [ebp + 1]
push ecx
lea edx, [esp + 0x18]
push edx
mov ecx, esi
call fcn.00408dd0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x294], 2
call fcn.00402e90
mov byte [esp + 0x290], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404ba2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebp
lea ecx, [esp + 0x34]
push ecx
mov ecx, esi
call fcn.00408e80
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x294], 3
call fcn.00402e90
mov byte [esp + 0x290], bl
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404be8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x104
lea ecx, [esp + 0x80]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call fcn.0040a0a7
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x404c17
push 0x80004005
call fcn.00401f40
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push ebx
push 0x431294
lea ecx, [esp + 0x1c]
mov byte [esp + 0x298], 4
call fcn.00402580
lea eax, [esp + 0x7c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404c45
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x80]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00402580
push 9
push 0x431298
lea ecx, [esp + 0x1c]
call fcn.00402580
xor esi, esi
cmp dword [edi + 0x25c], esi
jle 0x404cd6
push 2
push 0x4312ac
lea ecx, [esp + 0x1c]
call fcn.00402580
test esi, esi
jl 0x404d40
cmp esi, dword [edi + 0x25c]
jge 0x404d40
mov edx, dword [edi + 0x258]
lea eax, [edx + esi*4]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00402580
push ebx
push 0x431294
lea ecx, [esp + 0x1c]
call fcn.00402580
add esi, ebx
cmp esi, dword [edi + 0x25c]
jl 0x404c80
xor eax, eax
push 0x40
push eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x2c], 0
call fcn.0041adf0
mov esi, dword [esp + 0x20]
mov eax, dword [edi + 0x23c]
mov ebp, dword [esp + 0x28]
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x3c]
push edx
push 0
push 0
push 0x400
push esi
push 0
push ebx
push eax
mov eax, dword [esp + 0x3c]
push ebp
push eax
mov dword [esp + 0x64], 0x44
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithLogonW]
test eax, eax
jne 0x404d45
push edi
call fcn.004049c0
call fcn.0040a3c0
mov ecx, dword [esp + 0x20]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x34]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
mov edx, dword [esp + 0x24]
push edx
call edi
mov edi, dword [esp + 0x34]
lea eax, [esi - 0x10]
mov byte [esp + 0x290], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404d9d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0x290], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404dc1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x290], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404dec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x288]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x270]
xor ecx, esp
call fcn.004196ca
add esp, 0x280
ret