Function at 0x46cdcd
Capabilities:
Create process on windows
Enumerate processes

Disassembly:
push ebp
sub esp, 0x22c
lea ebp, [esp - 4]
mov eax, dword [0x4de270]
xor eax, ebp
mov dword [ebp + 0x22c], eax
push 0xa8
mov eax, 0x49ec1f
call fcn.00486a61
mov eax, dword [ebp + 0x238]
mov ebx, ecx
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___app_name
lea esi, [ebp - 0x30]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x40], eax
call fcn.00404db2
mov eax, esi
xor edi, edi
push eax
mov dword [ebp - 4], edi
call fcn.00404975
or dword [ebp - 4], 0xffffffff
pop ecx
xor ebx, ebx
push edi
inc ebx
push ebx
call fcn.00404f5a
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___parameters
lea esi, [ebp - 0x30]
call fcn.00404db2
mov eax, esi
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 0x40]
push eax
call fcn.00404975
or dword [ebp - 4], 0xffffffff
pop ecx
push edi
push 1
call fcn.00404f5a
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___session_id
lea esi, [ebp - 0x30]
call fcn.00404db2
push 2
pop ebx
push dword [ebp + 0x23c]
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.00408b56
or dword [ebp - 4], 0xffffffff
pop ecx
push edi
push 1
call fcn.00404f5a
push edi
push ebx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x3c], edi
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
jne 0x46cec2
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___CreateToolhelp32Snapshot_failed.
lea esi, [ebp - 0x30]
call fcn.00404db2
mov dword [ebp - 4], 3
lea esi, [ebp - 0x30]
call fcn.00404e64
push edi
push 1
call fcn.00404f5a
mov eax, 0x3eb
jmp 0x46d178
lea eax, [ebp]
push eax
push esi
mov dword [ebp], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x46ceed
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___Process32First_failed.
lea esi, [ebp - 0x30]
call fcn.00404db2
mov dword [ebp - 4], 4
jmp 0x46cea8
lea eax, [ebp + 0x24]
push str.explorer.exe
push eax
call fcn.00482643
pop ecx
pop ecx
test eax, eax
jne 0x46cf20
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x10], edi
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x46cf20
mov eax, dword [ebp + 0x23c]
cmp dword [ebp - 0x10], eax
je 0x46cf47
lea eax, [ebp]
push eax
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x46ceed
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___didnt_get_winlogonPid.
lea esi, [ebp - 0x30]
call fcn.00404db2
mov dword [ebp - 4], 6
jmp 0x46cea8
mov ebx, dword [ebp + 8]
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___winlogonPid
lea esi, [ebp - 0x30]
call fcn.00404db2
push ebx
mov ecx, esi
mov dword [ebp - 4], 5
call fcn.00408b56
or dword [ebp - 4], 0xffffffff
pop ecx
push edi
push 1
call fcn.00404f5a
push 0x44
pop esi
push esi
lea eax, [ebp - 0xb4]
push edi
push eax
mov dword [ebp - 0x10], 0x30
call fcn.004864e0
xor eax, eax
lea edi, [ebp - 0x54]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
push ebx
mov dword [ebp - 0xb4], esi
xor edi, edi
push edi
mov esi, 0x2000000
push esi
mov dword [ebp - 0xac], str.winsta0default
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea ecx, [ebp - 0x3c]
push ecx
push 0x201eb
push eax
mov dword [ebp - 0x44], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x46cffb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___OpenProcessToken_failed
lea esi, [ebp - 0x30]
mov ebx, eax
call fcn.00404db2
mov dword [ebp - 4], 7
push ebx
lea ecx, [ebp - 0x30]
call fcn.00408b56
lea esi, [ebp - 0x30]
jmp 0x46d158
lea eax, [ebp - 0x14]
push eax
push 1
push 1
push edi
push esi
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x46d030
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___DuplicateTokenEx_failed
lea esi, [ebp - 0x30]
mov ebx, eax
call fcn.00404db2
mov dword [ebp - 4], 8
jmp 0x46cfea
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0x514
jne 0x46d05e
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___we_got_ERROR_NOT_ALL_ASSIGNED
lea esi, [ebp - 0x30]
call fcn.00404db2
mov dword [ebp - 4], 9
call fcn.00404e64
jmp 0x46d159
push 1
push dword [ebp - 0x14]
lea eax, [ebp - 0x38]
push eax
mov dword [ebp - 0x38], edi
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x46d07c
mov dword [ebp - 0x10], 0x430
jmp 0x46d07f
mov dword [ebp - 0x38], edi
mov esi, dword [ebp - 0x40]
mov eax, dword [esi + 0x14]
xor ecx, ecx
push 2
add eax, 0xa
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00480474
cmp dword [esi + 0x18], 8
pop ecx
mov ebx, eax
jb 0x46d0aa
mov esi, dword [esi + 4]
jmp 0x46d0ad
add esi, 4
mov ecx, ebx
movzx eax, word [esi]
inc esi
mov word [ecx], ax
inc esi
inc ecx
inc ecx
cmp ax, di
jne 0x46d0af
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x34]
cmp dword [eax + 0x18], 8
jb 0x46d0d3
mov eax, dword [eax + 4]
jmp 0x46d0d6
add eax, 4
lea ecx, [ebp - 0x54]
push ecx
lea ecx, [ebp - 0xb4]
push ecx
push edi
push dword [ebp - 0x38]
push dword [ebp - 0x10]
push edi
push edi
push edi
push ebx
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
push ebx
mov dword [ebp - 0x34], eax
call fcn.0048139c
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___bResult
lea esi, [ebp - 0x30]
mov ebx, eax
call fcn.00404db2
cmp dword [ebp - 0x34], edi
mov dword [ebp - 4], 0xa
setne al
movzx eax, al
push eax
mov eax, esi
push eax
call fcn.00406bc9
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
push edi
push 1
call fcn.00404f5a
push str.CLocalSystemCommands::LaunchAppIntoDifferentSession___error
lea esi, [ebp - 0x70]
call fcn.00404db2
push ebx
mov ecx, esi
mov dword [ebp - 4], 0xb
call fcn.00408b56
pop ecx
push edi
push 1
call fcn.00404f5a
push dword [ebp - 0x44]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
push dword [ebp - 0x3c]
call esi
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x22c]
xor ecx, ebp
call fcn.004812cc
add ebp, 0x230
leave
ret