Function at 0x401320
Capabilities:
Acquire debug privileges
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41a2d8
mov eax, dword fs:[0]
push eax
sub esp, 0x94
mov eax, dword [0x42465c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor esi, esi
mov edi, 1
mov dword [ebp - 4], edi
push str.kernel32.dll
mov byte [ebp - 0x21], 0
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x28], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, esi
je 0x401548
push str.WTSGetActiveConsoleSessionId
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, esi
je 0x401548
call eax
lea ecx, [ebp - 0x34]
push ecx
push eax
mov dword [ebp - 0x3c], eax
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x401548
lea edx, [ebp - 0x30]
push edx
push 0x201eb
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x401548
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x28]
push eax
push edi
push edi
push esi
push 0x2000000
push ecx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x401548
mov eax, dword [ebp - 0x28]
push 4
lea edx, [ebp - 0x3c]
push edx
push 0xc
push eax
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x401548
lea ecx, [ebp - 0x54]
push ecx
push str.SeDebugPrivilege
push esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x401548
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
push esi
push esi
push 0x10
lea ecx, [ebp - 0x20]
push ecx
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x28]
push esi
push edx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x401548
mov eax, dword [ebp - 0x28]
push edi
push eax
lea ecx, [ebp - 0x38]
push ecx
mov dword [ebp - 0x38], esi
xor ebx, ebx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x401462
mov ebx, 0x400
jmp 0x401465
mov dword [ebp - 0x38], esi
push 0x44
lea edx, [ebp - 0xa0]
push esi
push edx
or ebx, 0x30
call fcn.0040b2c0
xor eax, eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
add esp, 0xc
mov ecx, section..data
mov dword [ebp - 0xa0], 0x44
mov dword [ebp - 0x98], str.winsta0default
call edx
add eax, 0x10
mov dword [ebp - 0x2c], eax
mov byte [ebp - 4], 2
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push eax
push ecx
push str.__s___s
lea edi, [ebp - 0x2c]
call fcn.00401f50
mov esi, dword [ebp - 0x2c]
add esp, 0xc
cmp dword [esi - 4], 1
jle 0x4014e5
mov edx, dword [esi - 0xc]
push edx
mov eax, edi
push eax
call fcn.00401c40
mov esi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x4c]
push ecx
mov ecx, dword [ebp - 0x28]
lea edx, [ebp - 0xa0]
push edx
push 0
push eax
push ebx
push 0
push 0
push 0
push esi
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x401524
mov edx, dword [ebp - 0x48]
push edx
mov byte [ebp - 0x21], 1
call edi
mov eax, dword [ebp - 0x4c]
push eax
call edi
add esi, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401544
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
xor esi, esi
jmp 0x40154e
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
cmp eax, esi
je 0x40155b
push eax
call edi
mov dword [ebp - 0x30], esi
mov eax, dword [ebp - 0x28]
cmp eax, esi
je 0x401568
push eax
call edi
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x34]
cmp eax, esi
je 0x401575
push eax
call edi
mov dword [ebp - 0x34], esi
movzx esi, byte [ebp - 0x21]
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40159c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4015c2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004088c3
mov esp, ebp
pop ebp
ret