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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8c
mov eax, dword [0x4510e0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0xa28]
push eax
push 0x201eb
push edi
mov dword [ebp - 0xa0c], ecx
mov dword [ebp - 0xa28], 0
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4012a5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bcb9
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0xa14]
push eax
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x4012e9
push dword [ebp - 0xa28]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bcb9
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0xa14]
mov dword [ebp - 0xa20], eax
mov eax, dword [ebp - 0xa10]
mov dword [ebp - 0xa1c], eax
lea eax, [ebp - 0xa2c]
push eax
push 1
push 1
push 0
push 0x2000000
push dword [ebp - 0xa28]
mov dword [ebp - 0xa24], 1
mov dword [ebp - 0xa18], 2
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
push 4
lea eax, [ebp - 0xa0c]
push eax
push 0xc
push dword [ebp - 0xa2c]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push 0
push 0
push 0x10
lea eax, [ebp - 0xa24]
push eax
push 0
push dword [ebp - 0xa2c]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x401455
push 1
push dword [ebp - 0xa2c]
lea eax, [ebp - 0xa30]
push eax
mov dword [ebp - 0xa30], 0
mov esi, 0x8000020
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x40139c
mov esi, 0x8000420
jmp 0x4013a6
mov dword [ebp - 0xa30], 0
push 0x44
lea eax, [ebp - 0xa88]
push 0
push eax
call fcn.0041d590
xor eax, eax
push 0x9fe
push eax
mov word [ebp - 0xa08], ax
xorps xmm0, xmm0
lea eax, [ebp - 0xa06]
push eax
mov dword [ebp - 0xa88], 0x44
mov dword [ebp - 0xa80], str.winsta0default
movq qword [ebp - 0xa40], xmm0
movq qword [ebp - 0xa38], xmm0
call fcn.0041d590
push ebx
lea eax, [ebp - 0xa08]
push 0x447368
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x24
lea eax, [ebp - 0xa40]
push eax
lea eax, [ebp - 0xa88]
push eax
push 0
push dword [ebp - 0xa30]
lea eax, [ebp - 0xa08]
push esi
push 0
push 0
push 0
push eax
push 0
push dword [ebp - 0xa28]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x401489
mov eax, dword [ebp - 0xa30]
test eax, eax
je 0x401455
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
push dword [ebp - 0xa2c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xa28]
call esi
push edi
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bcb9
mov esp, ebp
pop ebp
ret 8
push dword [ebp - 0xa40]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xa3c]
call esi
mov eax, dword [ebp - 0xa30]
test eax, eax
je 0x4014b0
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
push dword [ebp - 0xa2c]
call esi
push dword [ebp - 0xa28]
call esi
push edi
call esi
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0041bcb9
mov esp, ebp
pop ebp
ret 8