Function at 0x4612e0
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.00461153
push ecx
lea ecx, [ebp - 0x44]
call fcn.004617a2
test al, al
jne 0x461307
xor bl, bl
jmp 0x46159c
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.00422450
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 0x46152e
cmp dword [ebp - 0x1c], ebx
je 0x4613a4
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 0x46152e
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 0x46152e
cmp esi, 0xffffffff
je 0x46152e
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 0x46152e
push 0x60081
push 0
push 0
push str.default
call dword [sym.imp.USER32.dll_OpenDesktopW]
mov ebx, eax
test ebx, ebx
je 0x46152e
cmp ebx, 0xffffffff
je 0x46152e
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
call fcn.0046183c
mov edi, dword [ebp - 0x10]
test al, al
je 0x46152e
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.00460e6a
test al, al
je 0x46152e
push ecx
lea eax, [ebp - 0x28]
mov word [ebp - 0x28], 0
push eax
push edi
push ebx
mov dword [ebp - 0x24], 0xf01ff
call fcn.00460c41
test al, al
je 0x46152e
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 0x4614b5
push dword [ebp + 0x1c]
call fcn.00424a73
xor ecx, ecx
inc eax
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041ff1b
push dword [ebp + 0x1c]
mov dword [ebp - 0x14], eax
push eax
call fcn.00424a93
add esp, 0x10
cmp byte [ebp + 8], 0
je 0x4614cc
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 8]
call dword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
je 0x46152e
test byte [ebp + 0x14], 4
jne 0x4614e5
push 0
push dword [ebp - 8]
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x46152e
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 0x46152e
cmp byte [ebp + 8], 0
je 0x461528
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 0x2c]
call fcn.004618e2
mov byte [ebp - 1], 1
jmp 0x461540
cmp dword [ebp - 0x48], 0
je 0x461540
push dword [ebp - 0x48]
push dword [ebp - 8]
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
test edi, edi
je 0x461554
push edi
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
test esi, esi
je 0x46155f
push esi
call dword [sym.imp.USER32.dll_CloseWindowStation]
test ebx, ebx
je 0x46156a
push ebx
call dword [sym.imp.USER32.dll_CloseDesktop]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x461578
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.0041ff24
cmp dword [ebp - 0xc], 0
pop ecx
je 0x461599
push dword [ebp - 0xc]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov bl, byte [ebp - 1]
lea ecx, [ebp - 0x44]
call fcn.0046119e
pop edi
pop esi
mov al, bl
pop ebx
leave
ret 0x28