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

Disassembly:
mov rax, rsp
push rbx
sub rsp, 0x230
xor ebx, ebx
mov dword [rax + 8], 1
xor edx, edx
mov dword [rax + 0x10], ebx
mov r8d, 0x1de
mov dword [rax + 0x18], 4
lea rcx, [rsp + 0x52]
call fcn.14000ce80
movups xmm0, xmmword [str.SYSTEMCurrentControlSetServices]
movzx eax, word [0x14005d570]
lea rcx, [rsp + 0x30]
movups xmm1, xmmword [0x14005d560]
dec rcx
mov word [rsp + 0x50], ax
movaps xmmword [rsp + 0x30], xmm0
movaps xmmword [rsp + 0x40], xmm1
nop dword [rax]
cmp byte [rcx + 1], bl
lea rcx, [rcx + 1]
jne 0x140004980
movzx eax, word [0x14005d574]
mov word [rcx], ax
lea rcx, [rsp + 0x30]
dec rcx
nop dword [rax + rax]
cmp byte [rcx + 1], bl
lea rcx, [rcx + 1]
jne 0x1400049a0
movzx eax, byte [0x14005d580]
lea r8, str.DetachGfxPlatform
movsd xmm0, qword [str.AMDKMDAP]
lea rdx, [rsp + 0x30]
movsd qword [rcx], xmm0
xor r9d, r9d
mov byte [rcx + 8], al
lea rax, [rsp + 0x250]
mov qword [rsp + 0x28], rax
mov rcx, 0xffffffff80000002
lea rax, [rsp + 0x248]
mov qword [rsp + 0x20], rax
call fcn.140007160
cmp eax, 1
jne 0x140004b80
cmp dword [rsp + 0x248], eax
jne 0x140004b80
movzx ecx, al
call fcn.140004390
test eax, eax
je 0x140004b5a
xor r9d, r9d
lea rdx, str.00000000_0000_0000_0000_000000000000
xor r8d, r8d
lea rcx, [0x14005d5c7]
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
test eax, eax
jne 0x140004b5a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 1
jne 0x140004a6b
mov rcx, qword [0x140075cd8]
test rcx, rcx
je 0x140004b5a
lea r8, str.SetFirmwareSettings__:_Windows_is_not_installed_on_UEFI_mode_
lea edx, [rax + 1]
call fcn.1400067e0
jmp 0x140004b5a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e6
jne 0x140004b5a
mov r9d, 1
lea r8, [rsp + 0x240]
lea rdx, str.5E53B969_BD15_4889_B3BB_2BAB6A5CDB67
lea rcx, str.XConnectMode
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
test eax, eax
jne 0x140004b05
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e6
je 0x140004ac0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x140004b5a
mov r9d, 1
lea r8, [rsp + 0x240]
lea rdx, str.5E53B969_BD15_4889_B3BB_2BAB6A5CDB67
lea rcx, str.XConnectMode
call qword [sym.imp.KERNEL32.dll_SetFirmwareEnvironmentVariableA]
test eax, eax
je 0x140004aed
mov ebx, 1
jmp 0x140004b5a
cmp qword [0x140075cd8], rbx
je 0x140004b5a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.SetFirmwareSettings__:_SetFirmwareEnvironmentVariable_failed_with_error:_0x_8.8X
jmp 0x140004b46
mov r9d, 1
lea r8, [rsp + 0x240]
lea rdx, str.5E53B969_BD15_4889_B3BB_2BAB6A5CDB67
lea rcx, str.XConnectMode
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
cmp eax, 1
jne 0x140004b30
mov ebx, eax
jmp 0x140004b5a
cmp qword [0x140075cd8], rbx
je 0x140004b5a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.SetFirmwareSettings__:_SetFirmwareSettings_failed_with_error:_0x_8.8X
mov rcx, qword [0x140075cd8]
mov r9d, eax
mov edx, 2
call fcn.1400067e0
xor ecx, ecx
call fcn.140004390
test eax, eax
jne 0x140004b80
mov rcx, qword [0x140075cd8]
test rcx, rcx
je 0x140004b80
lea r8, str.SetFirmwareSettings__:_Failing_to_remove_privilege
lea edx, [rax + 2]
call fcn.1400067e0
mov eax, ebx
add rsp, 0x230
pop rbx
ret