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

Disassembly:
push 0x98
mov eax, 0x53cc33
call fcn.00508093
push 1
xor ebx, ebx
push str.SeDebugPrivilege
push ebx
mov dword [ebp - 0x10], ebx
xor esi, esi
call fcn.0051f7d4
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call fcn.0051f64d
add esp, 0x14
jmp 0x51fa52
cmp dword [ebp - 0x10], ebx
jne 0x51fa5b
cmp esi, 0x14
jge 0x51fa9e
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
inc esi
call fcn.0051f64d
pop ecx
pop ecx
test eax, eax
je 0x51fa2e
cmp dword [ebp - 0x10], ebx
je 0x51fa9e
push dword [ebp - 0x10]
push ebx
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
or esi, 0xffffffff
mov dword [ebp - 0x24], edi
cmp edi, esi
je 0x51fa9e
cmp edi, ebx
je 0x51fa9e
mov dword [ebp - 0x60], edi
lea eax, [ebp - 0x20]
push eax
push 0xf01ff
push edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x51faa6
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
call fcn.0050816b
ret
push 0x40
lea eax, [ebp - 0xa0]
push ebx
push eax
mov dword [ebp - 0xa4], ebx
call fcn.00506060
mov edi, dword [ebp - 0x20]
add esp, 0xc
mov dword [ebp - 0x10], edi
lea eax, [ebp - 0x2c]
push eax
push 1
push 1
push ebx
push 0x2000000
push edi
mov byte [ebp - 4], 1
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x51fafc
cmp edi, esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x51faf5
cmp edi, ebx
je 0x51faf5
push edi
call esi
push dword [ebp - 0x24]
call esi
jmp 0x51fa9e
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x40]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push 0xc
push dword [ebp - 0x20]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x40], ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp dword [ebp - 0x1c], esi
jne 0x51fb2f
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x51fb40
push 4
lea eax, [ebp - 0x1c]
push eax
push 0xc
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
call fcn.0052251b
test eax, eax
jne 0x51fb5a
mov dword [ebp - 0x78], 0x100
mov dword [ebp - 0x9c], str.WinSta0Default
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], 2
cmp edi, dword [ebp - 0x20]
je 0x51fb69
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x50], ebx
xor eax, eax
lea edi, [ebp - 0x4c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea ecx, [ebp - 0x38]
stosd dword es:[edi], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x28], ebx
call fcn.00522200
push 1
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 3
call fcn.00523242
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov byte [ebp - 4], 4
mov edi, 0x80
cmp dword [ebp + 0x1c], ebx
je 0x51fbce
lea ecx, [ebp - 0x5c]
call fcn.0041140e
push ebx
push edi
push 3
push eax
push 3
push SysReAllocString
push dword [ebp + 0x1c]
call esi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], 1
cmp dword [ebp + 0x20], ebx
je 0x51fbf7
lea ecx, [ebp - 0x5c]
call fcn.0041140e
push ebx
push edi
push 4
push eax
push 3
push 0x40000000
push dword [ebp + 0x20]
call esi
mov edi, eax
mov dword [ebp - 0x28], 1
jmp 0x51fbfa
mov edi, dword [ebp - 0x3c]
mov dword [ebp - 0xa4], 0x44
cmp dword [ebp - 0x28], ebx
je 0x51fc19
mov eax, dword [ebp - 0x18]
or dword [ebp - 0x78], 0x100
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], edi
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0xa4]
push eax
mov eax, dword [ebp + 0x18]
push ebx
push ebx
or eax, 0x8000000
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0xc]
push ebx
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
jne 0x51fc8c
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 3
call fcn.0047c433
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.0052327e
cmp dword [ebp - 0x14], 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x51fc71
cmp dword [ebp - 0x14], ebx
je 0x51fc71
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 0x10], 0xffffffff
je 0x51faf5
cmp dword [ebp - 0x10], ebx
je 0x51faf5
push dword [ebp - 0x10]
jmp 0x51faf3
cmp dword [ebp + 0x14], ebx
je 0x51fca8
push 0xffffffffffffffff
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp + 0x10]
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [ebp - 0x18], 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x51fcbe
cmp dword [ebp - 0x18], ebx
je 0x51fcbe
push dword [ebp - 0x18]
call esi
cmp edi, 0xffffffff
je 0x51fcca
cmp edi, ebx
je 0x51fcca
push edi
call esi
push dword [ebp - 0x50]
call esi
push dword [ebp - 0x4c]
call esi
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 3
call fcn.0047c433
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.0052327e
cmp dword [ebp - 0x14], 0xffffffff
je 0x51fcfc
cmp dword [ebp - 0x14], ebx
je 0x51fcfc
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 0x10], 0xffffffff
je 0x51fd0c
cmp dword [ebp - 0x10], ebx
je 0x51fd0c
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x24]
call esi
xor eax, eax
inc eax
jmp 0x51faa0