Function at 0x409a70
Capabilities:
Check if file exists
Create process on windows
Create process suspended
Get common file path
Set current directory
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x4291af
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43a14c]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
lea eax, [esp + 0x20]
push eax
call fcn.004034c0
xor ebx, ebx
mov dword [esp + 0xb8], ebx
mov edx, dword [0x44030c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44030c
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
mov byte [esp + 0xb8], 1
mov edx, dword [0x44030c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44030c
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x28], ebp
push str.Wow64DisableWow64FsRedirection
mov byte [esp + 0xbc], 2
push str.kernel32.dll
mov dword [esp + 0x50], ebx
mov dword [esp + 0x58], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x409b18
lea ecx, [esp + 0x50]
push ecx
call eax
mov eax, dword [ebp - 8]
mov ecx, 1
sub ecx, dword [ebp - 4]
sub eax, 0x104
or eax, ecx
jge 0x409b3e
mov ecx, 0x104
lea eax, [esp + 0x28]
call fcn.004015c0
mov ebp, dword [esp + 0x28]
push 0x104
push ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov eax, dword [ebp - 8]
push eax
push ebp
call fcn.00418fdc
add esp, 8
cmp eax, ebx
jl 0x409fb1
cmp eax, dword [ebp - 8]
jg 0x409fb1
xor edx, edx
mov dword [ebp - 0xc], eax
push 4
mov word [ebp + eax*2], dx
call fcn.00418ae9
add esp, 4
cmp eax, ebx
je 0x409b88
lea ecx, [esp + 0x2c]
mov dword [eax], ecx
jmp 0x409b8a
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0xc0], 4
call fcn.004095f0
add esp, 8
test eax, eax
jne 0x409c51
push 0x42bf8c
push 0x4410d8
lea edx, [eax + 1]
call fcn.00404420
push str._esys
push 0x4410d8
mov edx, 5
call fcn.00404420
mov byte [esp + 0xb8], 2
mov esi, dword [esp + 0x38]
cmp esi, ebx
je 0x409c36
mov eax, dword [esp + 0x3c]
mov edi, eax
cmp esi, eax
je 0x409c29
lea esp, [esp]
mov eax, dword [esi]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409c1e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x409c00
mov esi, dword [esp + 0x38]
push esi
call fcn.00418149
mov edi, dword [esp + 0x1c]
add esp, 4
mov ecx, dword [esp + 0x2c]
push ecx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
call fcn.00418149
jmp 0x40a05e
mov dword [esp + 0x4c], ebx
jmp 0x409c64
mov edi, dword [esp + 0x18]
mov esi, dword [edi - 0x10]
cmp dword [edi - 0xc], ebx
lea eax, [edi - 0x10]
je 0x409cb0
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x409c8a
cmp dword [edi - 8], ebx
jl 0x409fb1
xor edx, edx
mov dword [edi - 0xc], ebx
mov word [edi], dx
jmp 0x409cb0
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409ca0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x2c]
push ecx
lea eax, [esp + 0x1c]
call fcn.004097f0
add esp, 4
test eax, eax
jne 0x409cf0
push 0x42bf8c
push 0x4410d8
lea edx, [eax + 1]
call fcn.00404420
push str._ename
push 0x4410d8
mov edx, 6
call fcn.00404420
jmp 0x409f9d
mov edx, dword [0x44030c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44030c
call eax
add eax, 0x10
mov dword [esp + 0x44], eax
mov byte [esp + 0xb8], 5
mov ecx, dword [esp + 0x18]
push ecx
push ebp
push 0x430508
lea edi, [esp + 0x50]
call fcn.004016c0
mov esi, dword [esp + 0x50]
mov eax, dword [esi - 8]
add esp, 0xc
push eax
push esi
call fcn.00418fdc
add esp, 8
cmp eax, ebx
jl 0x409fb1
cmp eax, dword [esi - 8]
jg 0x409fb1
xor edx, edx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], dx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409f79
push ebp
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
push 0x44
lea ecx, [esp + 0x68]
push ebx
push ecx
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
call fcn.00419910
add esp, 0xc
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x68], 0x44
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
jne 0x409db1
mov dword [esp + 0x24], ebx
jmp 0x409dbb
cmp dword [esp + 0x24], ebx
jne 0x409e5b
push 0x42bf8c
push 0x4410d8
mov edx, 1
call fcn.00404420
push str._in0
push 0x4410d8
mov edx, 4
call fcn.00404420
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
call fcn.00409930
test eax, eax
jne 0x409e0c
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x1c]
call fcn.00409930
test eax, eax
je 0x409df4
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x409f51
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x68]
push edx
push ebx
push ebx
push 0x8000004
push ebx
push ebx
push ebx
push 0x42c39c
push esi
push eax
mov dword [esp + 0x98], str.WinSta0Default
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, eax
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x409ea5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x1c], ebx
jmp 0x409ea5
push 0x42bf8c
push 0x4410d8
mov edx, 1
call fcn.00404420
push str._in1
push 0x4410d8
mov edx, 4
call fcn.00404420
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x68]
push ecx
push ebx
push ebx
push 0x8000004
push ebx
push ebx
push ebx
push 0x42c39c
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
cmp edi, ebx
je 0x409f51
cmp dword [esp + 0x5c], ebx
je 0x409f51
mov eax, dword [esp + 0x20]
cmp dword [eax - 4], 1
jle 0x409ed3
mov edx, dword [eax - 0xc]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.00401610
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xc4]
mov edx, dword [esp + 0xc0]
push eax
mov eax, dword [esp + 0x60]
push 0x4305bc
push ebx
push ecx
push edx
push eax
call fcn.0040fc30
add esp, 0x18
push 0x42bf8c
mov dword [esp + 0x4c], eax
mov edx, 1
push 0x4410d8
cmp eax, ebx
jne 0x409fbb
call fcn.00404420
push 0x430644
push 0x4410d8
mov edx, 3
call fcn.00404420
mov ecx, dword [esp + 0x54]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
lea eax, [esi - 0x10]
mov byte [esp + 0xb8], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x409f91
push 0x42bf8c
push 0x4410d8
mov edx, 1
call fcn.00404420
push 0x430640
push 0x4410d8
mov edx, 3
call fcn.00404420
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0xb8], 4
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409f9d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x4c]
inc eax
cmp eax, 3
mov dword [esp + 0x4c], eax
jl 0x409c60
jmp 0x409ff8
push 0x80070057
call fcn.00401760
call fcn.00404420
push 0x430648
push 0x4410d8
mov edx, 2
call fcn.00404420
lea eax, [esi - 0x10]
mov byte [esp + 0xb8], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409ff8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xb8], 2
mov esi, dword [esp + 0x38]
cmp esi, ebx
je 0x40a044
mov eax, dword [esp + 0x3c]
mov edi, eax
cmp esi, eax
je 0x40a03b
mov eax, dword [esi]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a030
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x40a012
mov esi, dword [esp + 0x38]
push esi
call fcn.00418149
add esp, 4
mov ecx, dword [esp + 0x2c]
push ecx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
call fcn.00418149
mov edi, dword [esp + 0x1c]
add esp, 4
push str.Wow64RevertWow64FsRedirection
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40a083
mov edx, dword [esp + 0x50]
push edx
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0xb8], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a0a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0xb8], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a0ca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xb8], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a0f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0xb0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa8
ret