Function at 0x409190
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 0x42a11f
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43b14c]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
lea eax, [esp + 0x20]
push eax
call fcn.004030b0
xor ebx, ebx
mov dword [esp + 0xb8], ebx
mov edx, dword [0x44130c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
mov byte [esp + 0xb8], 1
mov edx, dword [0x44130c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
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 0x409238
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 0x40925e
mov ecx, 0x104
lea eax, [esp + 0x28]
call fcn.004015f0
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.00419e5c
add esp, 8
cmp eax, ebx
jl 0x4096d1
cmp eax, dword [ebp - 8]
jg 0x4096d1
xor edx, edx
mov dword [ebp - 0xc], eax
push 4
mov word [ebp + eax*2], dx
call fcn.00419e96
add esp, 4
cmp eax, ebx
je 0x4092a8
lea ecx, [esp + 0x2c]
mov dword [eax], ecx
jmp 0x4092aa
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.00408d10
add esp, 8
test eax, eax
jne 0x409371
push 0x42cf84
push 0x4420d8
lea edx, [eax + 1]
call fcn.00403d60
push str._esys
push 0x4420d8
mov edx, 5
call fcn.00403d60
mov byte [esp + 0xb8], 2
mov esi, dword [esp + 0x38]
cmp esi, ebx
je 0x409356
mov eax, dword [esp + 0x3c]
mov edi, eax
cmp esi, eax
je 0x409349
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 0x40933e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x409320
mov esi, dword [esp + 0x38]
push esi
call fcn.00419049
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.00419049
jmp 0x40977e
mov dword [esp + 0x4c], ebx
jmp 0x409384
mov edi, dword [esp + 0x18]
mov esi, dword [edi - 0x10]
cmp dword [edi - 0xc], ebx
lea eax, [edi - 0x10]
je 0x4093d0
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x4093aa
cmp dword [edi - 8], ebx
jl 0x4096d1
xor edx, edx
mov dword [edi - 0xc], ebx
mov word [edi], dx
jmp 0x4093d0
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4093c0
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.00408f10
add esp, 4
test eax, eax
jne 0x409410
push 0x42cf84
push 0x4420d8
lea edx, [eax + 1]
call fcn.00403d60
push str._ename
push 0x4420d8
mov edx, 6
call fcn.00403d60
jmp 0x4096bd
mov edx, dword [0x44130c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44130c
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 0x437050
lea edi, [esp + 0x50]
call fcn.004016f0
mov esi, dword [esp + 0x50]
mov eax, dword [esi - 8]
add esp, 0xc
push eax
push esi
call fcn.00419e5c
add esp, 8
cmp eax, ebx
jl 0x4096d1
cmp eax, dword [esi - 8]
jg 0x4096d1
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 0x409699
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.0041a890
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 0x4094d1
mov dword [esp + 0x24], ebx
jmp 0x4094db
cmp dword [esp + 0x24], ebx
jne 0x40957b
push 0x42cf84
push 0x4420d8
mov edx, 1
call fcn.00403d60
push str._in0
push 0x4420d8
mov edx, 4
call fcn.00403d60
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
call fcn.00409050
test eax, eax
jne 0x40952c
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x1c]
call fcn.00409050
test eax, eax
je 0x409514
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x409671
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 0x42d37c
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 0x4095c5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x1c], ebx
jmp 0x4095c5
push 0x42cf84
push 0x4420d8
mov edx, 1
call fcn.00403d60
push str._in1
push 0x4420d8
mov edx, 4
call fcn.00403d60
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 0x42d37c
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
cmp edi, ebx
je 0x409671
cmp dword [esp + 0x5c], ebx
je 0x409671
mov eax, dword [esp + 0x20]
cmp dword [eax - 4], 1
jle 0x4095f3
mov edx, dword [eax - 0xc]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.00401640
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xc4]
mov edx, dword [esp + 0xc0]
push eax
mov eax, dword [esp + 0x60]
push 0x437104
push ebx
push ecx
push edx
push eax
call fcn.00410b10
add esp, 0x18
push 0x42cf84
mov dword [esp + 0x4c], eax
mov edx, 1
push 0x4420d8
cmp eax, ebx
jne 0x4096db
call fcn.00403d60
push 0x43718c
push 0x4420d8
mov edx, 3
call fcn.00403d60
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 0x4096b1
push 0x42cf84
push 0x4420d8
mov edx, 1
call fcn.00403d60
push 0x437188
push 0x4420d8
mov edx, 3
call fcn.00403d60
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 0x4096bd
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 0x409380
jmp 0x409718
push 0x80070057
call fcn.00401790
call fcn.00403d60
push 0x437190
push 0x4420d8
mov edx, 2
call fcn.00403d60
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 0x409718
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 0x409764
mov eax, dword [esp + 0x3c]
mov edi, eax
cmp esi, eax
je 0x40975b
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 0x409750
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x409732
mov esi, dword [esp + 0x38]
push esi
call fcn.00419049
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.00419049
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 0x4097a3
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 0x4097c7
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 0x4097ea
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 0x409815
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