Function at 0x404b78
Capabilities:
Create process on windows
Get token privileges

Disassembly:
push 0xac
mov eax, 0x421d02
call fcn.0040ad25
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x40], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0x44
mov esi, eax
mov dword [ebp - 0x44], ebx
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa8], ebx
push ebx
push eax
call fcn.0040dd30
xor eax, eax
lea edi, [ebp - 0x60]
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x3c]
push eax
cmp byte [ebp + 0x14], bl
je 0x404cbb
lea eax, [ebp + 0x10]
mov dword [ebp - 0xac], ebx
push eax
lea eax, [ebp - 0xac]
push eax
push str.WTSQueryUserToken
push str.Wtsapi32.dll
call fcn.00404a29
add esp, 0x14
cmp dword [ebp - 0xac], ebx
je 0x404daf
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], ebx
push eax
push 4
lea eax, [ebp - 0x30]
xor esi, esi
push eax
push 0x12
push dword [ebp - 0x3c]
inc esi
mov dword [ebp - 0x30], esi
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp dword [ebp - 0x30], 3
jne 0x404c57
lea eax, [ebp - 0x34]
push eax
push 4
lea eax, [ebp - 0x48]
push eax
push 0x13
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x404c6c
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x40], eax
jmp 0x404c6c
lea eax, [ebp - 0x40]
push eax
push esi
push esi
push ebx
push 0x2000000
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
push 6
pop ecx
mov esi, str.S_1_16_12288
lea edi, [ebp - 0x2c]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2c]
push eax
movsw word es:[edi], word [esi]
call sub.ADVAPI32.dll_ConvertStringSidToSidW
test eax, eax
je 0x404daf
mov eax, dword [ebp - 0x44]
push eax
mov dword [ebp - 0x4c], 0x20
mov dword [ebp - 0x50], eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
add eax, 8
push eax
lea eax, [ebp - 0x50]
push eax
push 0x19
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jmp 0x404cea
push 0xf01ff
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
cmp dword [ebp - 0x3c], ebx
je 0x404dbe
lea eax, [ebp - 0x40]
push eax
push 1
push 1
push ebx
push 0x2000000
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
cmp dword [ebp - 0x40], ebx
je 0x404daf
mov eax, dword [ebp + 0x10]
push 4
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push eax
push 0xc
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x404daf
movzx eax, byte [ebp + 0x18]
mov dword [ebp - 0xa4], 0x44
mov dword [ebp - 0x9c], str.WinSta0Default
lea esi, [eax*4 + 0x420]
cmp byte [ebp + 0x14], bl
jne 0x404d6c
push 0x18
call fcn.0040a790
mov edx, eax
pop ecx
mov dword [ebp - 0x48], edx
mov dword [ebp - 4], ebx
test edx, edx
je 0x404d66
push 6
pop ecx
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
push 0x101000
push 1
mov ecx, edx
call fcn.004039cb
mov dword [ebp - 0xa8], eax
jmp 0x404d6c
mov dword [ebp - 0xa8], ebx
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0xa4]
push eax
push ebx
push ebx
push esi
mov esi, dword [ebp - 0xa8]
push ebx
push esi
push esi
push dword [ebp - 0xb0]
push dword [ebp - 0xb4]
push dword [ebp - 0x40]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebx, eax
test esi, esi
je 0x404daf
mov ecx, esi
call fcn.00403a2e
push 0x18
push esi
call fcn.0040aa11
pop ecx
pop ecx
cmp dword [ebp - 0x3c], 0
je 0x404dbe
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x40], 0
je 0x404dcd
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x404df3
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xb8]
mov eax, dword [ebp - 0x58]
mov dword [ecx], eax
mov eax, dword [ebp - 0x5c]
jmp 0x404df5
xor eax, eax
call fcn.0040accf
ret 0x18