Function at 0x10062130
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.10063640
mov edi, eax
mov dword [ebp - 0x1c], eax
add esp, 8
test edi, edi
je 0x1006216a
cmp byte [edi], 0
jne 0x10062172
mov edi, str.steam.exe
mov dword [ebp - 0x1c], edi
xor ebx, ebx
test esi, esi
jne 0x100622d2
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.10061e90
add esp, 0xc
test al, al
je 0x100621c1
test ebx, ebx
jne 0x100621b6
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 8]
push edi
call fcn.10061e90
add esp, 0xc
test al, al
je 0x100621c1
mov esi, dword [ebp - 0xc]
mov dword [ebp - 4], esi
jmp 0x100622a7
cmp byte [ebp + 0x1c], 0
jne 0x100622a7
push str.wtsapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x100622a7
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 0x1006229d
test eax, eax
je 0x1006229d
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 0x1006229d
mov ecx, dword [ebp - 0x18]
xor edi, edi
test ecx, ecx
je 0x10062294
xor esi, esi
mov eax, dword [ebp - 0x10]
cmp dword [esi + eax + 8], 1
jne 0x10062278
lea ecx, [ebp - 0xc]
push ecx
push dword [esi + eax]
push str.winlogon.exe
call fcn.10061e90
add esp, 0xc
test al, al
je 0x10062275
test ebx, ebx
jne 0x10062282
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x10]
push dword [esi + eax]
push dword [ebp - 0x1c]
call fcn.10061e90
add esp, 0xc
test al, al
jne 0x10062282
mov ecx, dword [ebp - 0x18]
inc edi
add esi, 0xc
cmp edi, ecx
jb 0x10062236
jmp 0x10062294
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 0x10062174
test esi, esi
jne 0x100622d2
push 1
lea eax, [ebp - 4]
push eax
push str.winlogon.exe
call fcn.100635b0
add esp, 0xc
test eax, eax
jle 0x100622e6
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 0x100622ef
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 0x100623a5
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 0x100623a5
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 0x10062365
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