Function at 0x41a440
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 [0x004ba330]
mov rbx, qword [0x004ba360]
mov rsi, qword [0x004ba320]
cmp ecx, 1
mov dword [rax], ecx
mov dword [rbx], edx
mov byte [rsi], r8b
je 0x41a47d
lea ecx, [rdx + rdx]
test r8b, r8b
cmovne edx, ecx
add edx, 1
shl edx, 0x15
test r9b, r9b
movsxd rbx, edx
je 0x41a521
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 0x41a555
call rdi
lea r8, [rsp + 0x30]
mov edx, 8
mov rcx, rax
call rsi
cmp eax, 1
je 0x41a620
xor ecx, ecx
mov r9d, 4
mov r8d, 0x20003000
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, qword [0x004ba350]
test rax, rax
mov qword [rdi], rax
je 0x41a5e0
mov rax, qword [0x004ba340]
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 rbx, rbx
je 0x41a610
lea rcx, [rbx + 0x10]
call sub.msvcrt.dll_malloc
test rax, rax
je 0x41a610
lea rbx, [rax + 0x10]
and rbx, 0xfffffffffffffff0
mov qword [rbx - 8], rax
mov rbp, qword [0x004ba350]
mov qword [rbp], rbx
jmp 0x41a508
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 0x41a4ba
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 0x41a4ba
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41a4ba
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [0x004ba340]
or dword [r11], 1
jmp 0x41a4d4
test rbx, rbx
je 0x41a71e
lea rcx, [rbx + 0x10]
call sub.msvcrt.dll_malloc
test rax, rax
je 0x41a71e
lea rcx, [rax + 0x10]
and rcx, 0xfffffffffffffff0
mov qword [rcx - 8], rax
mov qword [rdi], rcx
jmp 0x41a508
xor ebx, ebx
jmp 0x41a548
lea r12, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
mov dword [rsp + 0x50], 0
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x20], r12
mov r14, qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
call r14
mov edx, dword [rsp + 0x50]
test edx, edx
jne 0x41a680
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 0x41a4d4
mov edx, edx
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 0x41a4d4
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 0x41a725
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x41a4d4
xor ecx, ecx
jmp 0x41a607
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 0x41a780
mov rcx, qword [rsp + 0x38]
call sub.ADVAPI32.dll_LsaClose
jmp 0x41a710
mov r10, qword [0x004ba310]
lea r8, str.Huge_pages_support_was_successfully_enabled__but_reboot_required_to_use_it
mov edx, 2
mov rcx, qword [r10]
call fcn.00408c80
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 0x41a4d4
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 0x41a4d4
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 0x41a4d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41a4d4
mov rcx, qword [rsp + 0x40]
call r14
jmp 0x41a5ce