Function at 0x4047e0
Capabilities:
Create process on windows
Impersonate user
Print debug messages

Disassembly:
sub esp, 0x4a0
mov eax, dword [0x4a4720]
xor eax, esp
mov dword [esp + 0x49c], eax
push ebx
push ebp
xor eax, eax
push esi
push edi
xor edi, edi
push 0x40
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
lea eax, [esp + 0x58]
push edi
push eax
mov ebx, ecx
mov dword [esp + 0x28], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x5c], edi
call fcn.00464a00
mov edx, dword [esp + 0x4c0]
add esp, 0xc
lea ecx, [esp + 0x14]
xor eax, eax
push ecx
push edx
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
call sub.WTSAPI32.dll_WTSQueryUserToken
mov esi, eax
cmp esi, edi
je 0x404a90
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push 1
push 1
push edi
push 0x2000000
push ecx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov esi, eax
cmp esi, edi
je 0x404a90
mov eax, dword [esp + 0x10]
push 4
lea edx, [esp + 0x4b8]
push edx
push 0xc
push eax
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov esi, eax
cmp esi, edi
je 0x404a90
push 0x206
lea edx, [esp + 0x9e]
xor ecx, ecx
push edi
push edx
mov word [esp + 0xa4], cx
call fcn.00464a00
push 0x206
lea ecx, [esp + 0x2b2]
xor eax, eax
push edi
push ecx
mov word [esp + 0x2b8], ax
call fcn.00464a00
lea edx, [esp + 0x2b8]
push edx
lea eax, [esp + 0xb4]
push eax
mov eax, dword [esp + 0x34]
call fcn.004044e0
mov esi, eax
add esp, 0x20
cmp esi, edi
jne 0x404921
push str.GetTokenUserInfo_failed__r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x404a90
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
lea edx, [esp + 0x30]
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x14]
push edx
lea ecx, [esp + 0x9c]
push eax
mov dword [esp + 0x38], 0x20
mov dword [esp + 0x40], ecx
call dword [sym.imp.USERENV.dll_LoadUserProfileW]
mov ecx, dword [esp + 0x14]
push 1
push ecx
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
push 0x44
lea eax, [esp + 0x54]
push edi
push eax
call fcn.00464a00
add esp, 0xc
mov ebp, dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
or dword [esp + 0x7c], 0x81
xor eax, eax
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea eax, [esp + 0x54]
push eax
push edi
mov ecx, 5
mov word [esp + 0x8c], cx
mov ecx, dword [esp + 0x24]
push ecx
push 0x430
push edi
push edi
push edi
push ebx
push edi
push edx
mov dword [esp + 0x7c], 0x44
mov dword [esp + 0x84], str.WinSta0Default
call ebp
mov esi, eax
cmp esi, edi
jne 0x404a90
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2e4
jne 0x404a90
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0x1c]
push ecx
push 0xf01ff
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov esi, eax
cmp esi, edi
je 0x404a90
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x10]
push edx
push 1
push 1
push edi
push 0x2000000
push eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov esi, eax
cmp esi, edi
je 0x404a90
mov edx, dword [esp + 0x10]
push 4
lea ecx, [esp + 0x4b8]
push ecx
push 0xc
push edx
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov esi, eax
cmp esi, edi
je 0x404a90
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x54]
push ecx
push edi
push edx
push 0x430
push edi
push edi
push edi
push ebx
push edi
push eax
call ebp
mov esi, eax
mov eax, dword [esp + 0x4c]
cmp eax, edi
je 0x404aa4
mov ecx, dword [esp + 0x14]
push eax
push ecx
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x404ab3
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov eax, dword [esp + 0x1c]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, edi
je 0x404ac4
push eax
call ebx
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x404acf
push eax
call ebx
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x404ada
push eax
call ebx
mov eax, dword [esp + 0x20]
cmp eax, edi
je 0x404ae5
push eax
call ebx
mov eax, dword [esp + 0x24]
cmp eax, edi
je 0x404af0
push eax
call ebx
mov ecx, dword [esp + 0x4ac]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00461706
add esp, 0x4a0
ret