Function at 0x461a91
Capabilities:
Create process on windows
Impersonate user

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
push edi
push ecx
push ecx
lea ecx, [ebp - 0x44]
call fcn.00461904
push ecx
lea ecx, [ebp - 0x44]
call fcn.00461f53
test al, al
jne 0x461ab8
xor bl, bl
jmp 0x461d4d
xor ecx, ecx
lea eax, [ebp - 0x64]
push 0x20
push ecx
mov edi, ecx
mov byte [ebp - 1], cl
push eax
mov dword [ebp - 8], ecx
mov esi, ecx
mov ebx, ecx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0xc], ecx
call fcn.004226d0
mov ecx, dword [ebp + 8]
add esp, 0xc
mov eax, dword [ebp + 0x14]
and eax, 1
mov dword [ebp - 0x64], 0x20
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0x14]
push 2
pop edx
and eax, edx
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 8]
push eax
push edi
push edi
pop eax
setne al
add eax, edx
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_LogonUserW]
test eax, eax
je 0x461cdf
cmp dword [ebp - 0x1c], ebx
je 0x461b55
lea eax, [ebp + 0x10]
push eax
push 1
push 2
pop eax
push eax
push edi
push edi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x461cdf
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], eax
push 0x60000
push 0
push str.winsta0
call dword [sym.imp.USER32.dll_OpenWindowStationW]
mov esi, eax
test esi, esi
je 0x461cdf
cmp esi, 0xffffffff
je 0x461cdf
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
push esi
mov dword [ebp - 0x18], eax
call dword [sym.imp.USER32.dll_SetProcessWindowStation]
test eax, eax
je 0x461cdf
push 0x60081
push 0
push 0
push str.default
call dword [sym.imp.USER32.dll_OpenDesktopW]
mov ebx, eax
test ebx, ebx
je 0x461cdf
cmp ebx, 0xffffffff
je 0x461cdf
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
call fcn.00461fed
mov edi, dword [ebp - 0x10]
test al, al
je 0x461cdf
push ecx
lea eax, [ebp - 0x34]
mov word [ebp - 0x34], 0xb00
push eax
push edi
push esi
mov dword [ebp - 0x30], 0xf0000000
mov word [ebp - 0x28], 0x400
mov dword [ebp - 0x24], 0xf037f
call fcn.0046161b
test al, al
je 0x461cdf
push ecx
lea eax, [ebp - 0x28]
mov word [ebp - 0x28], 0
push eax
push edi
push ebx
mov dword [ebp - 0x24], 0xf01ff
call fcn.004613f2
test al, al
je 0x461cdf
mov eax, dword [ebp + 0x28]
mov dword [eax + 8], str.winsta0default
mov eax, dword [eax + 0x2c]
and eax, 0x100
cmp dword [ebp + 0x1c], 0
mov dword [ebp + 0x10], eax
je 0x461c66
push dword [ebp + 0x1c]
call fcn.00424cf3
xor ecx, ecx
inc eax
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0042019b
push dword [ebp + 0x1c]
mov dword [ebp - 0x14], eax
push eax
call fcn.00424d13
add esp, 0x10
cmp byte [ebp + 8], 0
je 0x461c7d
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 8]
call dword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
je 0x461cdf
test byte [ebp + 0x14], 4
jne 0x461c96
push 0
push dword [ebp - 8]
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x461cdf
push dword [ebp + 0x2c]
mov eax, dword [ebp + 0x20]
push dword [ebp + 0x28]
or eax, 0x400
push dword [ebp + 0x24]
push dword [ebp - 0xc]
push eax
push dword [ebp + 0x10]
xor eax, eax
push eax
push eax
push dword [ebp - 0x14]
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x461cdf
cmp byte [ebp + 8], 0
je 0x461cd9
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 0x2c]
call fcn.00462093
mov byte [ebp - 1], 1
jmp 0x461cf1
cmp dword [ebp - 0x48], 0
je 0x461cf1
push dword [ebp - 0x48]
push dword [ebp - 8]
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
test edi, edi
je 0x461d05
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x461d10
push esi
call dword [sym.imp.USER32.dll_CloseWindowStation]
test ebx, ebx
je 0x461d1b
push ebx
call dword [sym.imp.USER32.dll_CloseDesktop]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x461d29
push eax
call dword [sym.imp.USER32.dll_SetProcessWindowStation]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x14]
call fcn.004201a4
cmp dword [ebp - 0xc], 0
pop ecx
je 0x461d4a
push dword [ebp - 0xc]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov bl, byte [ebp - 1]
lea ecx, [ebp - 0x44]
call fcn.0046194f
pop edi
pop esi
mov al, bl
pop ebx
leave
ret 0x28