Function at 0x180008880
Capabilities:
Get uefi variable
Set uefi variable

Disassembly:
push rbp
push r14
push r15
lea rbp, [rsp - 0x11d0]
mov eax, 0x12d0
call fcn.180025e10
sub rsp, rax
mov rax, qword [0x180038010]
xor rax, rsp
mov qword [rbp + 0x11b0], rax
mov qword [rsp + 0x12f0], rbx
mov r14d, 1
mov qword [rsp + 0x1300], rsi
mov rbx, rdx
mov qword [rsp + 0x12c8], r12
call fcn.180003ac0
lea edx, [r14 + 0x29]
mov ecx, r14d
call fcn.180017e84
mov r12, rax
test rax, rax
je 0x180008a3d
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
jne 0x18000893e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rbx
lea rcx, str.GetDiskInfo::CreateFile__s__failed:_d
mov r8d, eax
call fcn.180003280
xor r12d, r12d
jmp 0x180008a3d
mov qword [rsp + 0x38], 0
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x30], rcx
xor r9d, r9d
lea rcx, [rbp + 0x1b0]
mov dword [rsp + 0x28], 0x90
mov qword [rsp + 0x20], rcx
xor r8d, r8d
mov rcx, rax
mov edx, 0x70048
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x180008999
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetDiskInfo::DeviceIoControl_failed:_d
call fcn.180003280
xor r12d, r12d
jmp 0x180008a3d
cmp dword [rbp + 0x1b0], r14d
je 0x1800089b6
lea rcx, str.GetDiskInfo_is_not_gpt
call fcn.180003280
xor r12d, r12d
jmp 0x180008a3d
mov ecx, 0x38
call fcn.180017cc8
mov rcx, rax
mov eax, dword [rbp + 0x1c8]
mov dword [rcx + 0x10], eax
movaps xmm0, xmmword [rbp + 0x1e0]
movups xmmword [rcx + 0x24], xmm0
mov rax, qword [rbp + 0x1c0]
cqo
and edx, 0x1ff
add rax, rdx
sar rax, 9
mov qword [rcx + 8], rax
mov rax, qword [rbp + 0x1b8]
cqo
and edx, 0x1ff
add rax, rdx
sar rax, 9
mov qword [rcx], rax
mov dword [r12], 0x2a0104
mov eax, dword [rcx + 0x10]
mov dword [r12 + 4], eax
mov rax, qword [rcx]
mov qword [r12 + 8], rax
mov rax, qword [rcx + 8]
mov qword [r12 + 0x10], rax
mov word [r12 + 0x28], 0x202
movups xmm0, xmmword [rcx + 0x24]
movups xmmword [r12 + 0x18], xmm0
mov edx, 6
mov rcx, r14
call fcn.180017e84
mov rsi, rax
test rax, rax
je 0x180008a58
mov dword [rax], 0x300404
mov edx, 4
mov rcx, r14
call fcn.180017e84
mov r15, rax
test rax, rax
je 0x180008a73
mov dword [rax], 0x4ff7f
mov qword [rsp + 0x12c0], r13
test r12, r12
je 0x180008d54
test rsi, rsi
je 0x180008d54
test r15, r15
je 0x180008d54
movups xmm0, xmmword [str.RDV_Boot_Manager]
mov dword [rbp - 0x50], r14d
mov eax, 0x5e
movups xmm1, xmmword [0x180030820]
mov word [rbp - 0x4c], ax
mov edx, 0x21
movzx eax, word [0x180030830]
mov rcx, r14
movups xmmword [rbp - 0x4a], xmm0
mov word [rbp - 0x2a], ax
movups xmmword [rbp - 0x3a], xmm1
movups xmm0, xmmword [r12]
movups xmmword [rbp - 0x28], xmm0
movups xmm1, xmmword [r12 + 0x10]
movups xmmword [rbp - 0x18], xmm1
movsd xmm0, qword [r12 + 0x20]
movups xmm1, xmmword [0x1800307f0]
movsd qword [rbp - 8], xmm0
movzx eax, word [r12 + 0x28]
movups xmm0, xmmword [str.EFIBOOTBOOTX64.EFI]
mov word [rbp], ax
mov eax, dword [rsi]
movups xmmword [rbp + 6], xmm0
mov dword [rbp + 2], eax
mov eax, dword [0x180030808]
movsd xmm0, qword [0x180030800]
movsd qword [rbp + 0x26], xmm0
movups xmmword [rbp + 0x16], xmm1
mov dword [rbp + 0x2e], eax
mov eax, dword [r15]
mov dword [rbp + 0x32], eax
call fcn.180017e84
mov qword [rsp + 0x40], rax
mov rdx, rax
test rax, rax
je 0x180008e08
movzx eax, byte [rbp - 0x4e]
movzx ecx, byte [rbp - 0x4d]
movzx r13d, byte [rbp - 0x4b]
shl ecx, 8
or ecx, eax
shl r13w, 8
movzx eax, byte [rbp - 0x4f]
shl ecx, 8
or ecx, eax
movzx eax, byte [rbp - 0x50]
shl ecx, 8
or ecx, eax
movzx eax, byte [rbp - 0x4c]
or r13w, ax
mov dword [rdx + 2], ecx
mov word [rdx + 6], r13w
lea rcx, [rbp - 0x4a]
mov rax, 0xffffffffffffffff
nop word [rax + rax]
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x180008b90
lea eax, [rax*2 + 2]
mov dword [rsp + 0x48], eax
test eax, eax
je 0x180008e08
movsxd rbx, eax
mov edx, 2
mov rcx, rbx
call fcn.180017e84
mov rcx, qword [rsp + 0x40]
mov qword [rcx + 8], rax
test rax, rax
je 0x180008e08
mov r8, rbx
lea rdx, [rbp - 0x4a]
mov rcx, rax
call fcn.180011170
movzx edx, r13w
mov rcx, r14
call fcn.180017e84
mov rbx, rax
mov rax, qword [rsp + 0x40]
mov qword [rax + 0x10], rbx
test rbx, rbx
je 0x180008e08
movsxd rcx, dword [rsp + 0x48]
lea rdx, [rbp - 0x4a]
add rdx, rcx
movzx r8d, r13w
mov rcx, rbx
call fcn.180011170
test r13w, r13w
je 0x180008e08
cmp byte [rbx], 4
jne 0x180008e08
nop dword [rax]
movzx ecx, byte [rbx + 3]
movzx eax, byte [rbx + 2]
shl rcx, 8
or rcx, rax
add rbx, rcx
cmp byte [rbx], 0x7f
jne 0x180008c30
xor eax, eax
xor ebx, ebx
mov qword [rsp + 0x68], rax
xor r13d, r13d
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rax
mov dword [rbp - 0x60], eax
mov r8d, ebx
lea rdx, str.Boot_04x
lea rcx, [rsp + 0x68]
call qword [sym.imp.USER32.dll_wsprintfW]
mov r9d, 0x800
lea r8, [rbp + 0x1b0]
lea rdx, str.8BE4DF61_93CA_11D2_AA0D_00E098032B8C
inc ebx
lea rcx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableW]
test eax, eax
je 0x180008ccb
cmp eax, 0x86
jne 0x180008c70
mov r8d, eax
lea rdx, [rbp - 0x50]
lea rcx, [rbp + 0x1b0]
call fcn.180025e80
test eax, eax
jne 0x180008c70
mov r13d, r14d
mov eax, 0x10000
cmp ebx, eax
cmova ebx, eax
dec ebx
test r13d, r13d
jne 0x180008dbd
movzx eax, word [0x180032450]
lea r8, str.Boot_04X
movups xmm0, xmmword [str.BootFFFF]
mov word [rsp + 0x60], ax
lea rcx, [rsp + 0x50]
xor eax, eax
mov r9d, ebx
movups xmmword [rsp + 0x50], xmm0
mov word [rsp + 0x62], ax
lea edx, [rax + 0xa]
call fcn.1800082b0
mov r9d, 0x86
lea r8, [rbp - 0x50]
lea rdx, str.8BE4DF61_93CA_11D2_AA0D_00E098032B8C
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_SetFirmwareEnvironmentVariableW]
test eax, eax
jne 0x180008dbd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x131
lea rcx, str.Line:_d_SetFirmwareEnvironmentVariableW_failed__d_n
mov r8d, eax
call fcn.180003280
xor r14d, r14d
mov r13, qword [rsp + 0x12c0]
mov rbx, qword [rsp + 0x12f0]
test r12, r12
je 0x180008d74
mov rcx, r12
call fcn.180013668
mov r12, qword [rsp + 0x12c8]
test rsi, rsi
je 0x180008d89
mov rcx, rsi
call fcn.180013668
mov rsi, qword [rsp + 0x1300]
test r15, r15
je 0x180008d9e
mov rcx, r15
call fcn.180013668
mov eax, r14d
mov rcx, qword [rbp + 0x11b0]
xor rcx, rsp
call fcn.18000ed70
add rsp, 0x12d0
pop r15
pop r14
pop rbp
ret
call fcn.180003c10
cmp eax, 2
jne 0x180008d57
lea r8, str.MakeMediaBootOption
mov edx, 0x139
lea rcx, str.Line:_d__s::SetBootDefault
call fcn.180003280
movzx ecx, bx
call fcn.180008310
test eax, eax
je 0x180008d57
mov r8d, eax
lea rcx, str.Line:_d_SetBootDefault_failed__d_n
mov edx, 0x13c
call fcn.180003280
jmp 0x180008d57
xor r14d, r14d
lea rcx, str.ValidateBootEntry_failed__d_n
call fcn.180003280
jmp 0x180008d57