Function at 0x462540
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
push ebx
push esi
push edi
lea eax, [ebp - 0x344]
mov dword [ebp - 8], 0xffffffff
push 0x30a
xor esi, esi
push eax
mov dword [ebp - 4], esi
call fcn.00462a10
mov edi, eax
mov dword [ebp - 0x1c], eax
add esp, 8
test edi, edi
je 0x46257a
cmp byte [edi], 0
jne 0x462582
mov edi, str.steam.exe
mov dword [ebp - 0x1c], edi
xor ebx, ebx
test esi, esi
jne 0x4626e2
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
lea ecx, [ebp - 0xc]
mov dword [ebp - 8], eax
push ecx
push eax
push str.winlogon.exe
call fcn.00461fa0
add esp, 0xc
test al, al
je 0x4625d1
test ebx, ebx
jne 0x4625c6
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 8]
push edi
call fcn.00461fa0
add esp, 0xc
test al, al
je 0x4625d1
mov esi, dword [ebp - 0xc]
mov dword [ebp - 4], esi
jmp 0x4626b7
cmp byte [ebp + 0x1c], 0
jne 0x4626b7
push str.wtsapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x4626b7
push str.WTSEnumerateSessionsA
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WTSFreeMemory
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x28], eax
test esi, esi
je 0x4626ad
test eax, eax
je 0x4626ad
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
lea eax, [ebp - 0x10]
push eax
push 1
push 0
push 0
call esi
test eax, eax
je 0x4626ad
mov ecx, dword [ebp - 0x18]
xor edi, edi
test ecx, ecx
je 0x4626a4
xor esi, esi
mov eax, dword [ebp - 0x10]
cmp dword [esi + eax + 8], 1
jne 0x462688
lea ecx, [ebp - 0xc]
push ecx
push dword [esi + eax]
push str.winlogon.exe
call fcn.00461fa0
add esp, 0xc
test al, al
je 0x462685
test ebx, ebx
jne 0x462692
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x10]
push dword [esi + eax]
push dword [ebp - 0x1c]
call fcn.00461fa0
add esp, 0xc
test al, al
jne 0x462692
mov ecx, dword [ebp - 0x18]
inc edi
add esi, 0xc
cmp edi, ecx
jb 0x462646
jmp 0x4626a4
mov eax, dword [ebp - 0xc]
lea ecx, [edi + edi*2]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 8], eax
push dword [ebp - 0x10]
call dword [ebp - 0x28]
mov edi, dword [ebp - 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 0x1c]
inc ebx
cmp ebx, 2
jl 0x462584
test esi, esi
jne 0x4626e2
push 1
lea eax, [ebp - 4]
push eax
push str.winlogon.exe
call fcn.00462980
add esp, 0xc
test eax, eax
jle 0x4626f6
mov esi, dword [ebp - 4]
push esi
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x4626ff
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x20]
xor edi, edi
push eax
push 2
push esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x14], edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4627b5
lea eax, [ebp - 0x14]
mov dword [ebp - 0x34], edi
push eax
push 1
push 1
lea eax, [ebp - 0x38]
mov dword [ebp - 0x30], edi
push eax
push 0x2000000
push dword [ebp - 0x20]
mov dword [ebp - 0x38], 0xc
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x4627b5
cmp byte [ebp + 0x1c], 0
mov eax, str.winsta0winlogon
mov edi, dword [ebp + 0x10]
mov ecx, str.winsta0default
cmove eax, ecx
cmp dword [ebp - 8], 0xffffffff
mov dword [edi + 8], eax
je 0x462775
push 4
lea eax, [ebp - 8]
push eax
push 0xc
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push dword [ebp + 0x14]
cmp byte [ebp + 0x18], 0
mov eax, 0x8000020
push edi
mov edx, 0x30
cmove edx, eax
mov eax, dword [ebp + 0xc]
push 0
push eax
mov ecx, edx
or ecx, 0x400
test eax, eax
lea eax, [ebp - 0x38]
cmove ecx, edx
push ecx
push 0
push eax
push eax
push dword [ebp + 8]
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x20]
call esi
push dword [ebp - 0x14]
call esi
test edi, edi
pop edi
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret