Function at 0x401340
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x78
push ebx
push ebp
xor ebx, ebx
push edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp eax, ebx
jne 0x401367
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x78
ret
lea ecx, [esp + 0x10]
push ecx
push 0xf01ff
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x401389
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x78
ret
lea edx, [esp + 0xc]
push edx
push 1
push 1
push ebx
push 0x2000000
push eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov eax, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call ebp
cmp dword [esp + 0xc], ebx
jne 0x4013bb
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x78
ret
call fcn.00401270
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x4013dc
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x18]
push 4
push ecx
push 0xc
push edx
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x44]
mov dword [esp + 0x30], ebx
rep stosd dword es:[edi], eax
mov dword [esp + 0x34], eax
mov ecx, 0x11
mov dword [esp + 0x38], eax
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x40], 0x44
mov dword [esp + 0x34], ecx
mov dword [esp + 0x48], str.WinSta0Default
mov dword [esp + 0x38], ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x3c], ecx
call fcn.004012e0
mov edi, eax
cmp edi, ebx
mov dword [esp + 0x20], edi
jne 0x401449
mov edx, dword [esp + 0xc]
push edx
call ebp
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x78
ret
xor eax, eax
push esi
mov dword [esp + 0x2c], eax
push 0x14
mov dword [esp + 0x34], eax
mov dword [esp + 0x34], 1
mov dword [esp + 0x2c], 0xc
mov dword [esp + 0x30], ebx
call fcn.0040747f
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x401490
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push ebx
push ebx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov dword [esp + 0x2c], esi
push ebx
lea ecx, [esp + 0x1c]
push edi
push ecx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x4014fb
lea edx, [esp + 0x34]
lea eax, [esp + 0x44]
push edx
push eax
mov eax, dword [esp + 0x9c]
mov edx, dword [esp + 0x20]
mov cx, word [eax]
neg cx
sbb ecx, ecx
and ecx, eax
lea eax, [esp + 0x30]
push ecx
push edx
push 0x430
push ebx
push ebx
push eax
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0xb0]
push ecx
mov dx, word [eax]
neg dx
sbb edx, edx
and edx, eax
mov eax, dword [esp + 0x34]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, dword [esp + 0x3c]
test eax, eax
jne 0x4014ff
mov edi, dword [esp + 0x20]
cmp esi, ebx
je 0x40150c
push esi
call fcn.004072d0
add esp, 4
mov eax, dword [esp + 0x34]
pop esi
cmp eax, ebx
je 0x401518
push eax
call ebp
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x401523
push eax
call ebp
mov ecx, dword [esp + 0x20]
push ecx
call ebp
mov edx, dword [esp + 0xc]
push edx
call ebp
mov eax, edi
pop edi
pop ebp
pop ebx
add esp, 0x78
ret