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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
xor eax, eax
mov esi, dword [ebp + 0x30]
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, 2
mov dword [ebp - 8], ebx
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], ebx
call fcn.0043c6a1
pop ecx
mov dword [ebp - 4], ebx
call fcn.00402d8f
call dword [sym.imp.KERNEL32.DLL_WTSGetActiveConsoleSessionId]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x4057ab
test byte [ebp + 0x30], 1
mov dword [ebp - 0x10], ebx
je 0x405651
mov ecx, dword [0x4c8bac]
cmp ecx, ebx
je 0x4057ab
lea edx, [ebp - 4]
push edx
push eax
call ecx
test eax, eax
je 0x4057ab
lea eax, [ebp + 0x30]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push 0x13
push dword [ebp - 4]
mov dword [ebp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x405629
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], ebx
jne 0x4056ef
lea eax, [ebp - 8]
push eax
push 1
push 1
lea eax, [ebp - 0x28]
push eax
push 0xf01ff
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
jmp 0x4056e7
lea eax, [ebp - 4]
push eax
push 0x201eb
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4057ab
lea eax, [ebp - 0x1c]
push eax
push str.SeDebugPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x4057ab
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x30], ecx
xor eax, eax
inc eax
lea ecx, [ebp - 8]
push ecx
push eax
push eax
push ebx
push 0x2000000
push dword [ebp - 4]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x2c], 2
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x4057ab
push 4
lea eax, [ebp - 0x14]
push eax
push edi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x4057ab
push ebx
push ebx
push 0x10
lea eax, [ebp - 0x38]
push eax
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x4057ab
mov eax, dword [ebp - 8]
cmp eax, ebx
mov dword [ebp + 0x30], eax
je 0x4057ab
mov edi, dword [ebp + 0x1c]
or edi, 0x10
cmp esi, ebx
je 0x40572a
push eax
call fcn.00404513
cmp eax, ebx
pop ecx
mov dword [ebp - 0x18], eax
je 0x4057ab
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 8], eax
jmp 0x40572f
cmp dword [ebp + 0x34], ebx
jne 0x4057ab
mov ecx, dword [ebp + 0x20]
cmp ecx, ebx
mov dword [ebp - 0xc], ebx
jne 0x40575d
mov eax, dword [0x4c8bb4]
cmp eax, ebx
je 0x40575d
push ebx
push dword [ebp + 0x30]
lea ecx, [ebp - 0xc]
push ecx
call eax
mov ecx, dword [ebp - 0xc]
cmp ecx, ebx
je 0x405759
or edi, 0x400
cmp eax, ebx
je 0x4057ab
push dword [ebp + 0x2c]
lea eax, [ebp - 0x28]
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push ecx
push edi
push dword [ebp + 0x18]
push eax
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
cmp dword [ebp - 0xc], ebx
mov edi, eax
je 0x405792
push dword [ebp - 0xc]
call dword [0x4c8bb8]
mov dword [ebp - 0xc], ebx
cmp dword [ebp - 4], ebx
je 0x4057a0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp edi, ebx
mov dword [ebp - 4], ebx
jne 0x405859
cmp dword [ebp - 4], ebx
je 0x4057b9
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp esi, ebx
mov dword [ebp - 4], ebx
je 0x4057f1
push ebx
call fcn.00404513
pop ecx
push dword [ebp + 0x2c]
mov dword [ebp - 4], 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 0x405834
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 0x40581f
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 0x405834
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 - 4], ebx
mov esi, eax
je 0x405844
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
je 0x405855
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, esi
jmp 0x40585b
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret