Function at 0x409210
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 0x427b4f
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43914c]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
lea eax, [esp + 0x20]
push eax
call fcn.004033a0
xor ebx, ebx
mov dword [esp + 0xb8], ebx
mov edx, dword [0x43f30c]
mov eax, dword [edx + 0xc]
mov ecx, 0x43f30c
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
mov byte [esp + 0xb8], 1
mov edx, dword [0x43f30c]
mov eax, dword [edx + 0xc]
mov ecx, 0x43f30c
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 0x4092b8
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 0x4092de
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.00417915
add esp, 8
cmp eax, ebx
jl 0x40969f
cmp eax, dword [ebp - 8]
jg 0x40969f
xor edx, edx
mov dword [ebp - 0xc], eax
push 4
mov word [ebp + eax*2], dx
call fcn.0041794f
add esp, 4
cmp eax, ebx
je 0x409328
lea ecx, [esp + 0x2c]
mov dword [eax], ecx
jmp 0x40932a
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.00408d90
add esp, 8
test eax, eax
jne 0x4093d1
mov esi, str._esys
call fcn.00401ad0
mov byte [esp + 0xb8], 2
mov esi, dword [esp + 0x38]
cmp esi, ebx
je 0x4093b6
mov eax, dword [esp + 0x3c]
mov edi, eax
cmp esi, eax
je 0x4093a9
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 0x40939e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x409380
mov esi, dword [esp + 0x38]
push esi
call fcn.00416b59
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.00416b59
jmp 0x40973d
mov dword [esp + 0x4c], ebx
jmp 0x4093e4
mov edi, dword [esp + 0x18]
mov esi, dword [edi - 0x10]
cmp dword [edi - 0xc], ebx
lea eax, [edi - 0x10]
je 0x409430
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x40940a
cmp dword [edi - 8], ebx
jl 0x40969f
xor edx, edx
mov dword [edi - 0xc], ebx
mov word [edi], dx
jmp 0x409430
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409420
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.00408f90
add esp, 4
test eax, eax
jne 0x409454
mov esi, str._ename
call fcn.00401ad0
jmp 0x40968b
mov edx, dword [0x43f30c]
mov eax, dword [edx + 0xc]
mov ecx, 0x43f30c
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 0x42f528
lea edi, [esp + 0x50]
call fcn.004016f0
mov edi, dword [esp + 0x50]
mov eax, dword [edi - 8]
add esp, 0xc
push eax
push edi
call fcn.00417915
add esp, 8
cmp eax, ebx
jl 0x40969f
cmp eax, dword [edi - 8]
jg 0x40969f
xor edx, edx
mov dword [edi - 0xc], eax
push edi
mov word [edi + eax*2], dx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409667
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.00418320
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 0x409515
mov dword [esp + 0x24], ebx
jmp 0x40951f
cmp dword [esp + 0x24], ebx
jne 0x4095a7
mov esi, str._in0
call fcn.00401ad0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
call fcn.004090d0
test eax, eax
jne 0x409558
lea ebx, [ebx]
push 0x1f4
call dword [sym.imp.KERNEL32.DLL_Sleep]
lea ecx, [esp + 0x1c]
call fcn.004090d0
test eax, eax
je 0x409540
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40965d
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 0x42b39c
push edi
push eax
mov dword [esp + 0x98], str.WinSta0Default
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov esi, eax
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x4095d3
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [esp + 0x1c], ebx
jmp 0x4095d3
mov esi, str._in1
call fcn.00401ad0
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 0x42b39c
push edi
call dword [sym.imp.KERNEL32.DLL_CreateProcessW]
mov esi, eax
cmp esi, ebx
je 0x40965d
cmp dword [esp + 0x5c], ebx
je 0x40965d
mov eax, dword [esp + 0x20]
cmp dword [eax - 4], 1
jle 0x4095fd
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 0x42f5dc
push ebx
push ecx
push edx
push eax
call fcn.0040e620
add esp, 0x18
mov dword [esp + 0x48], eax
cmp eax, ebx
jne 0x4096a9
mov esi, 0x42f664
call fcn.00401ad0
mov ecx, dword [esp + 0x54]
push ebx
push ecx
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
lea eax, [edi - 0x10]
mov byte [esp + 0xb8], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40967f
mov esi, 0x42f660
call fcn.00401ad0
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0xb8], 4
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40968b
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 0x4093e0
jmp 0x4096d7
push 0x80070057
call fcn.00401790
mov esi, 0x42f668
call fcn.00401ad0
lea eax, [edi - 0x10]
mov byte [esp + 0xb8], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4096d7
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 0x409723
mov eax, dword [esp + 0x3c]
mov edi, eax
cmp esi, eax
je 0x40971a
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 0x40970f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x4096f1
mov esi, dword [esp + 0x38]
push esi
call fcn.00416b59
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.00416b59
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 0x409762
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 0x409786
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 0x4097a9
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 0x4097d4
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