Function at 0x140012590
Capabilities:
Get uefi variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov rbx, rcx
xor edx, edx
xor ecx, ecx
mov qword [rbp - 0x38], rdx
and dword [rbp + 0x48], ecx
xor edi, edi
mov qword [rbp - 0x30], rcx
xor r13d, r13d
lea rcx, str.SeSystemEnvironmentPrivilege
mov qword [rbp - 0x48], rdi
xor r12d, r12d
mov qword [rbp - 0x28], r13
xor r14d, r14d
xor r15d, r15d
xor esi, esi
call fcn.14001238c
test eax, eax
jns 0x1400125fc
mov ebx, 0xc0000061
jmp 0x1400129a2
mov rdx, rbx
lea rcx, [rbp - 0x10]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
nop dword [rax + rax]
and qword [rsp + 0x20], rsi
lea r9, [rbp + 0x48]
xor r8d, r8d
lea rdx, [0x1400346b8]
lea rcx, [rbp - 0x10]
call qword [sym.imp.ntdll.dll_NtQuerySystemEnvironmentValueEx]
nop dword [rax + rax]
mov ecx, 0x80000000
mov ebx, eax
add eax, ecx
test ecx, eax
jne 0x140012647
cmp ebx, 0xc0000023
jne 0x1400126b5
mov edx, dword [rbp + 0x48]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
nop dword [rax + rax]
mov rdi, rax
test rax, rax
jne 0x14001266d
mov ebx, 0xc000009a
mov rdi, rsi
jmp 0x1400126b5
lea rax, [rbp - 0x20]
mov r8, rdi
lea r9, [rbp + 0x48]
mov qword [rsp + 0x20], rax
lea rdx, [0x1400346b8]
lea rcx, [rbp - 0x10]
call qword [sym.imp.ntdll.dll_NtQuerySystemEnvironmentValueEx]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x1400126a4
mov r12d, dword [rbp + 0x48]
mov qword [rbp - 0x48], rdi
xor edi, edi
test rdi, rdi
je 0x1400126b1
mov rcx, rdi
call fcn.14001235c
mov rdi, qword [rbp - 0x48]
xor ecx, ecx
call fcn.14001238c
test ebx, ebx
js 0x140012991
xor edx, edx
mov qword [rbp - 0x18], r12
mov dword [rbp - 0x4c], edx
test edx, edx
je 0x140012734
mov edi, esi
mov ecx, 0x40
mov esi, r14d
lea rdx, [rsi + r15]
add rdx, rdi
shl rdx, 4
add rdx, r12
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
nop dword [rax + rax]
mov qword [rbp - 0x28], rax
mov r13, rax
test rax, rax
je 0x140012931
mov rdx, qword [rbp - 0x48]
add rsi, rsi
shl r15, 4
mov r8, r12
shl rdi, 4
lea rax, [rax + rsi*8]
mov qword [rbp - 0x30], rax
add rax, r15
add rdi, rax
mov qword [rbp - 0x38], rax
mov rcx, rdi
call sub.msvcrt.dll_memcpy
mov edx, dword [rbp - 0x4c]
xor r14d, r14d
xor r15d, r15d
xor esi, esi
mov dword [rbp - 0x40], r14d
add r12, rdi
mov dword [rbp - 0x3c], r15d
mov dword [rbp - 0x50], esi
cmp rdi, r12
jae 0x140012918
mov rax, r12
sub rax, rdi
cmp rax, 0x1c
jb 0x140012938
mov r11d, dword [rdi + 0x10]
lea rax, [r11 + rdi]
cmp rax, rdi
jb 0x140012938
cmp rax, r12
ja 0x140012938
cmp r11d, 0x1c
jb 0x14001297f
mov rax, qword [rdi]
cmp rax, qword [0x1400346d8]
jne 0x1400127c4
mov rax, qword [rdi + 8]
cmp rax, qword [0x1400346e0]
jne 0x1400127c4
cmp dword [rdi + 0x14], r14d
jne 0x14001297f
cmp dword [rdi + 0x18], 0x110
jne 0x14001297f
lea r9, [rbp - 0x28]
lea r8, [rbp - 0x40]
jmp 0x140012890
mov rax, qword [rdi]
cmp rax, qword [0x1400346c8]
jne 0x1400127f4
mov rax, qword [rdi + 8]
cmp rax, qword [0x1400346d0]
jne 0x1400127f4
cmp dword [rdi + 0x14], r14d
jne 0x14001297f
lea r9, [rbp - 0x30]
lea r8, [rbp - 0x3c]
jmp 0x140012890
mov ecx, r11d
cmp qword [rbp + 0x78], r14
je 0x1400128ff
mov rax, qword [rdi]
cmp rax, qword [0x1400346a8]
jne 0x14001282a
mov rax, qword [rdi + 8]
cmp rax, qword [0x1400346b0]
jne 0x14001282a
cmp dword [rdi + 0x14], r14d
jne 0x14001297f
cmp dword [rdi + 0x18], 0x30
jmp 0x140012882
mov rax, qword [rdi]
cmp rax, qword [0x1400346f8]
jne 0x140012853
mov rax, qword [rdi + 8]
cmp rax, qword [0x140034700]
jne 0x140012853
cmp dword [rdi + 0x14], r14d
jne 0x14001297f
cmp dword [rdi + 0x18], 0x40
jmp 0x140012882
mov rax, qword [rdi]
cmp rax, qword [0x1400346e8]
jne 0x1400128ff
mov rax, qword [rdi + 8]
cmp rax, qword [0x1400346f0]
jne 0x1400128ff
cmp dword [rdi + 0x14], r14d
jne 0x14001297f
cmp dword [rdi + 0x18], 0x50
jne 0x14001297f
lea r9, [rbp - 0x38]
lea r8, [rbp - 0x50]
lea rax, [r11 - 0x1c]
test rax, rax
je 0x14001297f
mov ecx, dword [rdi + 0x18]
xor edx, edx
div rcx
mov r10, rax
test rdx, rdx
jne 0x14001297f
mov edx, dword [rbp - 0x4c]
mov ecx, r11d
test edx, edx
jne 0x1400128c0
add dword [r8], eax
jmp 0x1400128ff
lea rsi, [rdi + 0x1c]
test rax, rax
je 0x1400128ff
mov r11, qword [r9]
mov edx, dword [r8]
lea rax, [rsi + 0x10]
mov ecx, edx
add rcx, rcx
mov qword [r11 + rcx*8 + 8], rax
mov eax, dword [rdi + 0x18]
sub eax, 0x10
mov dword [r11 + rcx*8], eax
lea eax, [rdx + 1]
mov dword [r8], eax
mov eax, dword [rdi + 0x18]
add rsi, rax
sub r10, 1
jne 0x1400128cc
mov ecx, dword [rdi + 0x10]
mov edx, dword [rbp - 0x4c]
mov eax, ecx
add rdi, rax
cmp rdi, r12
jb 0x140012753
mov r14d, dword [rbp - 0x40]
mov r15d, dword [rbp - 0x3c]
mov esi, dword [rbp - 0x50]
jne 0x14001297f
inc edx
mov dword [rbp - 0x4c], edx
cmp edx, 2
jae 0x14001293f
mov rdi, qword [rbp - 0x48]
mov r12, qword [rbp - 0x18]
jmp 0x1400126cd
mov ebx, 0xc000009a
jmp 0x140012991
mov ebx, 0xc0000095
jmp 0x140012984
mov rax, qword [rbp + 0x50]
mov rcx, qword [rbp - 0x30]
mov qword [rax], r13
mov rax, qword [rbp + 0x58]
mov dword [rax], r14d
mov rax, qword [rbp + 0x60]
mov qword [rax], rcx
mov rax, qword [rbp + 0x68]
mov dword [rax], r15d
mov rax, qword [rbp + 0x70]
test rax, rax
je 0x14001297a
mov rcx, qword [rbp + 0x78]
test rcx, rcx
je 0x14001297a
mov rdx, qword [rbp - 0x38]
mov qword [rax], rdx
mov dword [rcx], esi
xor r13d, r13d
jmp 0x140012984
mov ebx, 0xc000a000
test r13, r13
je 0x140012991
mov rcx, r13
call fcn.14001235c
mov rax, qword [rbp - 0x48]
test rax, rax
je 0x1400129a2
mov rcx, rax
call fcn.14001235c
mov eax, ebx
mov rbx, qword [rsp + 0xc0]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret