Function at 0x461145
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.00460fb8
push ecx
lea ecx, [ebp - 0x44]
call fcn.00461607
test al, al
jne 0x46116c
xor bl, bl
jmp 0x461401
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.004222d0
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 0x461393
cmp dword [ebp - 0x1c], ebx
je 0x461209
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 0x461393
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 0x461393
cmp esi, 0xffffffff
je 0x461393
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 0x461393
push 0x60081
push 0
push 0
push str.default
call dword [sym.imp.USER32.dll_OpenDesktopW]
mov ebx, eax
test ebx, ebx
je 0x461393
cmp ebx, 0xffffffff
je 0x461393
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
call fcn.004616a1
mov edi, dword [ebp - 0x10]
test al, al
je 0x461393
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.00460ccf
test al, al
je 0x461393
push ecx
lea eax, [ebp - 0x28]
mov word [ebp - 0x28], 0
push eax
push edi
push ebx
mov dword [ebp - 0x24], 0xf01ff
call fcn.00460aa6
test al, al
je 0x461393
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 0x46131a
push dword [ebp + 0x1c]
call fcn.004248f3
xor ecx, ecx
inc eax
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041fd8b
push dword [ebp + 0x1c]
mov dword [ebp - 0x14], eax
push eax
call fcn.00424913
add esp, 0x10
cmp byte [ebp + 8], 0
je 0x461331
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 8]
call dword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
je 0x461393
test byte [ebp + 0x14], 4
jne 0x46134a
push 0
push dword [ebp - 8]
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x461393
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 0x461393
cmp byte [ebp + 8], 0
je 0x46138d
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 0x2c]
call fcn.00461747
mov byte [ebp - 1], 1
jmp 0x4613a5
cmp dword [ebp - 0x48], 0
je 0x4613a5
push dword [ebp - 0x48]
push dword [ebp - 8]
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
test edi, edi
je 0x4613b9
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x4613c4
push esi
call dword [sym.imp.USER32.dll_CloseWindowStation]
test ebx, ebx
je 0x4613cf
push ebx
call dword [sym.imp.USER32.dll_CloseDesktop]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4613dd
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.0041fd94
cmp dword [ebp - 0xc], 0
pop ecx
je 0x4613fe
push dword [ebp - 0xc]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov bl, byte [ebp - 1]
lea ecx, [ebp - 0x44]
call fcn.00461003
pop edi
pop esi
mov al, bl
pop ebx
leave
ret 0x28