Function at 0x409030
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 0x429f1f
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.00403160
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 0x4090d8
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 0x4090fe
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.00419ba5
add esp, 8
cmp eax, ebx
jl 0x4094bf
cmp eax, dword [ebp - 8]
jg 0x4094bf
xor edx, edx
mov dword [ebp - 0xc], eax
push 4
mov word [ebp + eax*2], dx
call fcn.00419bdf
add esp, 4
cmp eax, ebx
je 0x409148
lea ecx, [esp + 0x2c]
mov dword [eax], ecx
jmp 0x40914a
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.00408bb0
add esp, 8
test eax, eax
jne 0x4091f1
mov esi, str._esys
call fcn.00401aa0
mov byte [esp + 0xb8], 2
mov esi, dword [esp + 0x38]
cmp esi, ebx
je 0x4091d6
mov eax, dword [esp + 0x3c]
mov edi, eax
cmp esi, eax
je 0x4091c9
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 0x4091be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x4091a0
mov esi, dword [esp + 0x38]
push esi
call fcn.00418de9
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.00418de9
jmp 0x40955d
mov dword [esp + 0x4c], ebx
jmp 0x409204
mov edi, dword [esp + 0x18]
mov esi, dword [edi - 0x10]
cmp dword [edi - 0xc], ebx
lea eax, [edi - 0x10]
je 0x409250
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x40922a
cmp dword [edi - 8], ebx
jl 0x4094bf
xor edx, edx
mov dword [edi - 0xc], ebx
mov word [edi], dx
jmp 0x409250
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409240
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.00408db0
add esp, 4
test eax, eax
jne 0x409274
mov esi, str._ename
call fcn.00401aa0
jmp 0x4094ab
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 0x436f60
lea edi, [esp + 0x50]
call fcn.004016c0
mov edi, dword [esp + 0x50]
mov eax, dword [edi - 8]
add esp, 0xc
push eax
push edi
call fcn.00419ba5
add esp, 8
cmp eax, ebx
jl 0x4094bf
cmp eax, dword [edi - 8]
jg 0x4094bf
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 0x409487
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.0041a630
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 0x409335
mov dword [esp + 0x24], ebx
jmp 0x40933f
cmp dword [esp + 0x24], ebx
jne 0x4093c7
mov esi, str._in0
call fcn.00401aa0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
call fcn.00408ef0
test eax, eax
jne 0x409378
lea ebx, [ebx]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x1c]
call fcn.00408ef0
test eax, eax
je 0x409360
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40947d
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 0x42d28c
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 0x4093f3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x1c], ebx
jmp 0x4093f3
mov esi, str._in1
call fcn.00401aa0
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 0x42d28c
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov esi, eax
cmp esi, ebx
je 0x40947d
cmp dword [esp + 0x5c], ebx
je 0x40947d
mov eax, dword [esp + 0x20]
cmp dword [eax - 4], 1
jle 0x40941d
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 0x437014
push ebx
push ecx
push edx
push eax
call fcn.004108d0
add esp, 0x18
mov dword [esp + 0x48], eax
cmp eax, ebx
jne 0x4094c9
mov esi, 0x43709c
call fcn.00401aa0
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 0x40949f
mov esi, 0x437098
call fcn.00401aa0
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 0x4094ab
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 0x409200
jmp 0x4094f7
push 0x80070057
call fcn.00401760
mov esi, 0x4370a0
call fcn.00401aa0
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 0x4094f7
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 0x409543
mov eax, dword [esp + 0x3c]
mov edi, eax
cmp esi, eax
je 0x40953a
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 0x40952f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esi, 4
cmp esi, edi
jne 0x409511
mov esi, dword [esp + 0x38]
push esi
call fcn.00418de9
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.00418de9
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 0x409582
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 0x4095a6
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 0x4095c9
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 0x4095f4
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