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

Disassembly:
push 0xffffffffffffffff
push 0x43fcf2
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x454654]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
lea eax, [esp + 0x18]
push eax
call fcn.00403530
xor ebx, ebx
mov dword [esp + 0xb8], ebx
mov edx, dword [0x45a98c]
mov eax, dword [edx + 0xc]
mov ecx, 0x45a98c
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x24], edi
mov byte [esp + 0xb8], 1
mov edx, dword [0x45a98c]
mov eax, dword [edx + 0xc]
mov ecx, 0x45a98c
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x30], ebp
push str.Wow64DisableWow64FsRedirection
mov byte [esp + 0xbc], 2
push str.kernel32.dll
mov dword [esp + 0x30], 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 0x409e88
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 0x409eae
mov ecx, 0x104
lea eax, [esp + 0x30]
call fcn.004017c0
mov ebp, dword [esp + 0x30]
push 0x104
push ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov eax, dword [ebp - 8]
push eax
push ebp
call fcn.004283f2
add esp, 8
cmp eax, ebx
jl 0x40a454
cmp eax, dword [ebp - 8]
jg 0x40a454
xor edx, edx
mov dword [ebp - 0xc], eax
push 4
mov word [ebp + eax*2], dx
call fcn.0042842c
add esp, 4
cmp eax, ebx
je 0x409ef8
lea ecx, [esp + 0x34]
mov dword [eax], ecx
jmp 0x409efa
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0xc0], 4
call fcn.004098f0
add esp, 8
test eax, eax
jne 0x409f95
push 0x443bf0
push 0x45bac8
lea edx, [eax + 1]
call fcn.00404040
push str._esys
push 0x45bac8
mov edx, 5
call fcn.00404040
mov byte [esp + 0xb8], 2
mov eax, dword [esp + 0x40]
cmp eax, ebx
je 0x409f7a
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x44]
push ecx
push edx
call fcn.00411150
mov eax, dword [esp + 0x48]
push eax
call fcn.00427613
add esp, 0xc
mov ecx, dword [esp + 0x34]
push ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
call fcn.00427613
jmp 0x40a410
mov dword [esp + 0x4c], ebx
jmp 0x409fa4
mov edi, dword [esp + 0x24]
mov esi, dword [edi - 0x10]
cmp dword [edi - 0xc], ebx
lea eax, [edi - 0x10]
je 0x409ff0
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x409fca
cmp dword [edi - 8], ebx
jl 0x40a454
xor edx, edx
mov dword [edi - 0xc], ebx
mov word [edi], dx
jmp 0x409ff0
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409fe0
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 + 0x24], eax
lea ecx, [esp + 0x34]
push ecx
lea eax, [esp + 0x28]
call fcn.00409b50
add esp, 4
test eax, eax
jne 0x40a030
push 0x443bf0
push 0x45bac8
lea edx, [eax + 1]
call fcn.00404040
push str._ename
push 0x45bac8
mov edx, 6
call fcn.00404040
jmp 0x40a36c
mov edx, dword [0x45a98c]
mov eax, dword [edx + 0xc]
mov ecx, 0x45a98c
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0xb8], 5
mov ecx, dword [esp + 0x24]
push ecx
push ebp
push 0x44dc28
lea edi, [esp + 0x28]
call fcn.004018c0
mov esi, dword [esp + 0x28]
mov eax, dword [esi - 8]
add esp, 0xc
push eax
push esi
call fcn.004283f2
add esp, 8
cmp eax, ebx
jl 0x40a454
cmp eax, dword [esi - 8]
jg 0x40a454
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
jne 0x40a0d4
lea eax, [esi - 0x10]
mov byte [esp + 0xb8], 4
mov edi, dword [eax]
cmp dword [eax + 4], ebx
je 0x40a350
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x40a32e
cmp dword [esi - 8], ebx
jl 0x40a454
xor eax, eax
mov dword [esi - 0xc], ebx
mov word [esi], ax
jmp 0x40a350
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.00429470
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x68], 0x44
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
jne 0x40a125
mov dword [esp + 0x2c], ebx
jmp 0x40a12f
cmp dword [esp + 0x2c], ebx
jne 0x40a1d3
push 0x443bf0
push 0x45bac8
mov edx, 1
call fcn.00404040
push str._in0
push 0x45bac8
mov edx, 4
call fcn.00404040
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], ebx
call fcn.00409ca0
test eax, eax
jne 0x40a184
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, edi
push 0x1f4
call edi
lea ecx, [esp + 0x20]
call fcn.00409ca0
test eax, eax
je 0x40a170
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40a2d9
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 0x443f74
push esi
push eax
mov dword [esp + 0x98], str.WinSta0Default
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, eax
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40a21d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x20], ebx
jmp 0x40a21d
push 0x443bf0
push 0x45bac8
mov edx, 1
call fcn.00404040
push str._in1
push 0x45bac8
mov edx, 4
call fcn.00404040
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 0x443f74
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
cmp edi, ebx
je 0x40a2d9
cmp dword [esp + 0x5c], ebx
je 0x40a2d9
mov eax, dword [esp + 0x18]
cmp dword [eax - 4], 1
jle 0x40a24b
mov edx, dword [eax - 0xc]
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.00401810
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0xc4]
mov edx, dword [esp + 0xc0]
push eax
mov eax, dword [esp + 0x60]
push 0x44dcdc
push ebx
push ecx
push edx
push eax
call fcn.0041b630
add esp, 0x18
push 0x443bf0
mov dword [esp + 0x2c], eax
mov edx, 1
push 0x45bac8
cmp eax, ebx
jne 0x40a380
call fcn.00404040
push 0x44dd64
push 0x45bac8
mov edx, 3
call fcn.00404040
mov ecx, dword [esp + 0x54]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
lea esi, [esp + 0x1c]
mov byte [esp + 0xb8], 4
call fcn.004015c0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40a360
push 0x443bf0
push 0x45bac8
mov edx, 1
call fcn.00404040
push 0x44dd60
push 0x45bac8
mov edx, 3
call fcn.00404040
lea eax, [esi - 0x10]
mov byte [esp + 0xb8], 4
mov edi, dword [eax]
cmp dword [eax + 4], ebx
je 0x40a350
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x40a32e
cmp dword [esi - 8], ebx
jl 0x40a454
xor ecx, ecx
mov dword [esi - 0xc], ebx
mov word [esi], cx
jmp 0x40a350
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a344
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
lea esi, [eax + 0x10]
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a36c
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 0x409fa0
jmp 0x40a3ca
call fcn.00404040
push 0x44dd68
push 0x45bac8
mov edx, 2
call fcn.00404040
lea esi, [esp + 0x1c]
mov byte [esp + 0xb8], 4
call fcn.004015c0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a3ca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xb8], 2
mov eax, dword [esp + 0x40]
cmp eax, ebx
je 0x40a3f6
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x44]
push ecx
push edx
call fcn.00411150
mov eax, dword [esp + 0x48]
push eax
call fcn.00427613
add esp, 0xc
mov ecx, dword [esp + 0x34]
push ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
call fcn.00427613
mov edi, dword [esp + 0x28]
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 0x40a435
mov edx, dword [esp + 0x50]
push edx
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0xb8], 1
mov esi, dword [eax]
cmp dword [eax + 4], ebx
je 0x40a48b
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x40a469
cmp dword [ebp - 8], ebx
jge 0x40a45e
push 0x80070057
call fcn.00401960
xor eax, eax
mov dword [ebp - 0xc], ebx
mov word [ebp], ax
jmp 0x40a48b
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a47f
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
lea ebp, [eax + 0x10]
lea eax, [ebp - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a4a7
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
mov esi, dword [eax]
cmp dword [eax + 4], ebx
je 0x40a4fb
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x40a4d9
cmp dword [edi - 8], ebx
jge 0x40a4cf
push 0x80070057
call fcn.00401960
xor ecx, ecx
mov dword [edi - 0xc], ebx
mov word [edi], cx
jmp 0x40a4fb
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a4ef
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
lea edi, [eax + 0x10]
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a517
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 + 0x18]
mov esi, dword [eax - 0x10]
cmp dword [eax - 0xc], ebx
lea edx, [eax - 0x10]
je 0x40a580
cmp dword [edx + 0xc], ebx
lea ecx, [edx + 0xc]
jge 0x40a55a
cmp dword [eax - 8], ebx
jge 0x40a548
push 0x80070057
call fcn.00401960
mov dword [eax - 0xc], ebx
mov edx, dword [esp + 0x18]
xor ecx, ecx
mov word [edx], cx
mov eax, dword [esp + 0x18]
jmp 0x40a580
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40a570
mov ecx, dword [edx]
mov eax, dword [ecx]
push edx
mov edx, dword [eax + 4]
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
mov ecx, esi
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a59c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0xb0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa8
ret