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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [ebp + 0x30]
push ebx
push esi
mov esi, eax
and eax, 2
push edi
mov dword [ebp - 0x1c], eax
xor eax, eax
xor ebx, ebx
mov byte [ebp - 0x4c], bl
lea edi, [ebp - 0x4b]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x4c]
push 0xc
mov dword [ebp - 0x24], eax
pop edi
lea eax, [ebp - 0x24]
push eax
and esi, 1
mov dword [ebp - 4], ebx
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], ebx
call fcn.1004276f
mov dword [ebp + 0x30], ebx
call fcn.10002e92
mov dword [esp], 0x100e3008
push 0x100e2bf8
push str.Kernel32
push str.WTSGetActiveConsoleSessionId
call fcn.10040e9d
mov eax, dword [0x100e2bf8]
or dword [ebp - 0xc], 0xffffffff
add esp, 0x10
cmp eax, ebx
je 0x10005eb2
call eax
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x10005eb2
cmp esi, ebx
mov dword [ebp - 0x10], ebx
je 0x10005d5b
mov eax, dword [0x100e2bf0]
cmp eax, ebx
je 0x10005eb2
lea ecx, [ebp + 0x30]
push ecx
push dword [ebp - 0xc]
call eax
test eax, eax
je 0x10005eb2
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push 0x13
push dword [ebp + 0x30]
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x10005d33
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], ebx
jne 0x10005df9
lea eax, [ebp - 4]
push eax
push 1
push 1
lea eax, [ebp - 0x28]
push eax
push 0xf01ff
push dword [ebp + 0x30]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
jmp 0x10005df1
lea eax, [ebp + 0x30]
push eax
push 0x201eb
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x10005eb2
lea eax, [ebp - 0x18]
push eax
push str.SeDebugPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x10005eb2
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x30], ecx
xor eax, eax
inc eax
lea ecx, [ebp - 4]
push ecx
push eax
push eax
push ebx
push 0x2000000
push dword [ebp + 0x30]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x2c], 2
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x10005eb2
push 4
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x10005eb2
push ebx
push ebx
push 0x10
lea eax, [ebp - 0x38]
push eax
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x10005eb2
mov eax, dword [ebp - 4]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x10005eb2
mov esi, dword [ebp + 0x1c]
or esi, 0x10
cmp dword [ebp - 0x1c], ebx
je 0x10005e31
push eax
call fcn.10004658
mov edi, eax
cmp edi, ebx
pop ecx
je 0x10005eb2
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], edi
jmp 0x10005e36
cmp dword [ebp + 0x34], ebx
jne 0x10005eb2
mov ecx, dword [ebp + 0x20]
cmp ecx, ebx
mov dword [ebp - 8], ebx
jne 0x10005e64
mov eax, dword [0x100e2bfc]
cmp eax, ebx
je 0x10005e64
push ebx
push dword [ebp - 0x14]
lea ecx, [ebp - 8]
push ecx
call eax
mov ecx, dword [ebp - 8]
cmp ecx, ebx
je 0x10005e60
or esi, 0x400
cmp eax, ebx
je 0x10005eb2
push dword [ebp + 0x2c]
lea eax, [ebp - 0x28]
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push ecx
push esi
push dword [ebp + 0x18]
push eax
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
cmp dword [ebp - 8], ebx
mov esi, eax
je 0x10005e99
push dword [ebp - 8]
call dword [0x100e2c00]
mov dword [ebp - 8], ebx
cmp dword [ebp + 0x30], ebx
je 0x10005ea7
push dword [ebp + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
mov dword [ebp + 0x30], ebx
jne 0x10005f5d
cmp dword [ebp + 0x30], ebx
je 0x10005ec0
push dword [ebp + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], ebx
mov dword [ebp + 0x30], ebx
je 0x10005ef9
push ebx
call fcn.10004658
pop ecx
push dword [ebp + 0x2c]
mov dword [ebp + 0x30], eax
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
jmp 0x10005f3c
cmp dword [ebp + 0x34], ebx
push dword [ebp + 0x2c]
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
je 0x10005f27
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp + 0x1c]
push dword [ebp + 0x3c]
push dword [ebp + 0x38]
push dword [ebp + 0x34]
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithLogonW]
jmp 0x10005f3c
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
cmp dword [ebp + 0x30], ebx
mov esi, eax
je 0x10005f4c
push dword [ebp + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], ebx
mov dword [ebp + 0x30], ebx
je 0x10005f5d
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret