Function at 0x140004950
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.14000d320
movups xmm0, xmmword [str.SYSTEMCurrentControlSetServices]
movzx eax, word [0x14006d590]
lea rcx, [rsp + 0x30]
movups xmm1, xmmword [0x14006d580]
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 0x1400049b0
movzx eax, word [0x14006d594]
mov word [rcx], ax
lea rcx, [rsp + 0x30]
dec rcx
nop dword [rax + rax]
cmp byte [rcx + 1], bl
lea rcx, [rcx + 1]
jne 0x1400049d0
movzx eax, byte [0x14006d5a0]
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.140007200
cmp eax, 1
jne 0x140004bb0
cmp dword [rsp + 0x248], eax
jne 0x140004bb0
movzx ecx, al
call fcn.1400043c0
test eax, eax
je 0x140004b8a
xor r9d, r9d
lea rdx, str.00000000_0000_0000_0000_000000000000
xor r8d, r8d
lea rcx, [0x14006d5e7]
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
test eax, eax
jne 0x140004b8a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 1
jne 0x140004a9b
mov rcx, qword [0x140086ce0]
test rcx, rcx
je 0x140004b8a
lea r8, str.SetFirmwareSettings__:_Windows_is_not_installed_on_UEFI_mode_
lea edx, [rax + 1]
call fcn.140006880
jmp 0x140004b8a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e6
jne 0x140004b8a
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 0x140004b35
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e6
je 0x140004af0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x140004b8a
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 0x140004b1d
mov ebx, 1
jmp 0x140004b8a
cmp qword [0x140086ce0], rbx
je 0x140004b8a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.SetFirmwareSettings__:_SetFirmwareEnvironmentVariable_failed_with_error:_0x_8.8X
jmp 0x140004b76
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 0x140004b60
mov ebx, eax
jmp 0x140004b8a
cmp qword [0x140086ce0], rbx
je 0x140004b8a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.SetFirmwareSettings__:_SetFirmwareSettings_failed_with_error:_0x_8.8X
mov rcx, qword [0x140086ce0]
mov r9d, eax
mov edx, 2
call fcn.140006880
xor ecx, ecx
call fcn.1400043c0
test eax, eax
jne 0x140004bb0
mov rcx, qword [0x140086ce0]
test rcx, rcx
je 0x140004bb0
lea r8, str.SetFirmwareSettings__:_Failing_to_remove_privilege
lea edx, [rax + 2]
call fcn.140006880
mov eax, ebx
add rsp, 0x230
pop rbx
ret