Function at 0x505150
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push edi
push esi
push ebx
sub esp, 0x90
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edx, [esp + 0x30]
mov dword [esp + 4], 0x1ab
mov dword [esp + 8], edx
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
sub esp, 0xc
mov ebx, eax
test eax, eax
jne 0x505195
add esp, 0x90
mov eax, ebx
pop ebx
pop esi
pop edi
ret
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x2000000
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
sub esp, 0x18
mov ebx, eax
test eax, eax
je 0x505363
lea eax, [esp + 0xa0]
mov dword [esp + 0xc], 4
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], 0xc
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
sub esp, 0x10
mov ebx, eax
test eax, eax
je 0x505380
mov eax, dword [esp + 0x34]
mov dword [esp + 8], 0
mov dword [esp + 0x38], 0
mov dword [esp + 4], eax
lea eax, [esp + 0x38]
mov dword [esp], eax
call sub.USERENV.dll_CreateEnvironmentBlock
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x505340
lea ebx, [esp + 0x50]
xor eax, eax
lea edx, [esp + 0x4c]
mov ecx, 0x10
mov edi, ebx
mov dword [esp + 0x4c], 0x44
rep stosd dword es:[edi], eax
mov eax, 5
lea ecx, [esp + 0x3c]
mov word [esp + 0x7c], ax
mov eax, dword [esp + 0xa8]
mov eax, dword [eax]
add eax, dword [eax + 0xc]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0xa4]
mov eax, dword [eax]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], 0x400
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
add eax, dword [eax + 0xc]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
sub esp, 0x2c
mov esi, eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call sub.USERENV.dll_DestroyEnvironmentBlock
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call ebx
sub esp, 4
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call ebx
sub esp, 4
test esi, esi
je 0x5053aa
mov eax, dword [esp + 0x40]
mov dword [esp], eax
call ebx
sub esp, 4
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call ebx
sub esp, 4
mov ebx, dword [esp + 0x44]
add esp, 0x90
mov eax, ebx
pop ebx
pop esi
pop edi
ret
mov eax, dword [esp + 0x30]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], eax
call esi
sub esp, 4
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call esi
sub esp, 4
jmp 0x505189
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
sub esp, 4
add esp, 0x90
pop ebx
pop esi
pop edi
ret
mov eax, dword [esp + 0x34]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], eax
call esi
sub esp, 4
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call esi
mov eax, ebx
sub esp, 4
add esp, 0x90
pop ebx
pop esi
pop edi
ret
mov ebx, 0xffffffff
jmp 0x505189