Function at 0x42fe50
Capabilities:
Manipulate user privileges

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov rax, qword [0x004d3050]
mov rbx, qword [0x004d3090]
mov rsi, qword [0x004d3040]
cmp ecx, 1
mov dword [rax], ecx
mov dword [rbx], edx
mov byte [rsi], r8b
je 0x42fe8d
lea edi, [rdx + rdx]
test r8b, r8b
cmovne edx, edi
add edx, 1
shl edx, 0x15
cmp ecx, 2
movsxd rdx, edx
jne 0x42fe9e
add rdx, rdx
mov rbx, qword [0x004d3060]
test r9b, r9b
mov qword [rbx], rdx
je 0x42ff43
lea rbp, [rsp + 0x40]
mov rdi, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rdi
mov r8, rbp
mov edx, 0x28
mov rcx, rax
mov rsi, qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call rsi
cmp eax, 1
je 0x42ff80
call rdi
lea r8, [rsp + 0x30]
mov edx, 8
mov rcx, rax
call rsi
cmp eax, 1
je 0x430050
xor ecx, ecx
mov r9d, 4
mov r8d, 0x20003000
mov rdx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, qword [0x004d3080]
test rax, rax
mov qword [rdi], rax
je 0x430010
mov rax, qword [0x004d3070]
or dword [rax], 2
mov eax, 1
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test rdx, rdx
je 0x430042
lea rcx, [rdx + 0x10]
call sub.msvcrt.dll_malloc
test rax, rax
je 0x430042
lea rbx, [rax + 0x10]
and rbx, 0xfffffffffffffff0
mov qword [rbx - 8], rax
mov rbp, qword [0x004d3080]
mov qword [rbp], rbx
jmp 0x42ff2a
xor ecx, ecx
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x5c], 2
lea r8, [rsp + 0x54]
lea rdx, str.SeLockMemoryPrivilege
lea r12, [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
cmp eax, 1
jne 0x42fedc
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8, r12
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
cmp eax, 1
jne 0x42fedc
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x42fedc
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [0x004d3070]
or dword [r11], 1
jmp 0x42fef6
mov rcx, qword [rbx]
test rcx, rcx
je 0x430150
add rcx, 0x10
call sub.msvcrt.dll_malloc
test rax, rax
je 0x430150
lea rdx, [rax + 0x10]
and rdx, 0xfffffffffffffff0
mov qword [rdx - 8], rax
mov qword [rdi], rdx
jmp 0x42ff2a
xor ebx, ebx
jmp 0x42ff6a
lea r12, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x30]
mov dword [rsp + 0x50], 0
mov edx, 1
mov qword [rsp + 0x20], r12
mov r14, qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
call r14
mov ecx, dword [rsp + 0x50]
test ecx, ecx
jne 0x4300b0
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x20], r12
xor r9d, r9d
xor r8d, r8d
mov edx, 1
call r14
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x42fef6
mov edx, ecx
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r13, rax
mov r9d, dword [rsp + 0x50]
mov r8, rax
mov edx, 1
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x20], r12
call r14
mov rcx, qword [rsp + 0x30]
mov r14, qword [sym.imp.KERNEL32.dll_CloseHandle]
call r14
test r13, r13
je 0x42fef6
lea r9, [rsp + 0x38]
xor ecx, ecx
mov r8d, 0xf0fff
mov rdx, r12
mov qword [r12], 0
mov qword [r12 + 8], 0
mov qword [r12 + 0x10], 0
mov qword [r12 + 0x18], 0
mov qword [r12 + 0x20], 0
mov qword [r12 + 0x28], 0
call sub.ADVAPI32.dll_LsaOpenPolicy
test eax, eax
je 0x430157
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x42fef6
xor edx, edx
jmp 0x43003a
lea rcx, str.SeLockMemoryPrivilege
lea r15, str.SeLockMemoryPrivilege
call sub.msvcrt.dll_wcslen
mov rdx, qword [r13]
lea r8d, [rax + rax]
lea r9d, [rax + rax + 2]
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x48], r15
mov word [rsp + 0x40], r8w
mov word [rsp + 0x42], r9w
mov r8, rbp
mov r9d, 1
call sub.ADVAPI32.dll_LsaAddAccountRights
test eax, eax
je 0x4301b0
mov rcx, qword [rsp + 0x38]
call sub.ADVAPI32.dll_LsaClose
jmp 0x430140
mov r10, qword [0x004d3030]
lea r8, str.Huge_pages_support_was_successfully_enabled__but_reboot_required_to_use_it
mov edx, 2
mov rcx, qword [r10]
call fcn.0040a670
mov rcx, qword [rsp + 0x38]
call sub.ADVAPI32.dll_LsaClose
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
call rdi
mov r8, rbp
mov edx, 0x28
mov rcx, rax
call rsi
cmp eax, 1
jne 0x42fef6
xor ecx, ecx
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x5c], 2
lea r8, [r12 + 4]
mov rdx, r15
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
cmp eax, 1
jne 0x42fef6
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r8, r12
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
cmp eax, 1
jne 0x42fef6
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x42fef6
mov rcx, qword [rsp + 0x40]
call r14
jmp 0x42fff9