Function at 0x140004cc0
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.1400144d0
movups xmm0, xmmword [str.SYSTEMCurrentControlSetServices]
movzx eax, word [0x1400757a0]
lea rcx, [rsp + 0x30]
movups xmm1, xmmword [0x140075790]
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 0x140004d20
movzx eax, word [0x1400757a4]
mov word [rcx], ax
lea rcx, [rsp + 0x30]
dec rcx
nop dword [rax + rax]
cmp byte [rcx + 1], bl
lea rcx, [rcx + 1]
jne 0x140004d40
movzx eax, byte [0x1400757b0]
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.140007ab0
cmp eax, 1
mov eax, ebx
jne 0x140004f29
cmp dword [rsp + 0x248], 1
sete al
test eax, eax
je 0x140004f27
mov cl, 1
call fcn.140004730
test eax, eax
je 0x140004f01
xor r9d, r9d
lea rdx, str.00000000_0000_0000_0000_000000000000
xor r8d, r8d
lea rcx, [0x1400757f7]
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
test eax, eax
jne 0x140004f01
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 1
jne 0x140004e12
mov rcx, qword [0x140090dc0]
test rcx, rcx
je 0x140004f01
lea r8, str.SetFirmwareSettings__:_Windows_is_not_installed_on_UEFI_mode_
lea edx, [rax + 1]
call fcn.140006d90
jmp 0x140004f01
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e6
jne 0x140004f01
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 0x140004eac
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e6
je 0x140004e67
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x140004f01
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 0x140004e94
mov ebx, 1
jmp 0x140004f01
cmp qword [0x140090dc0], rbx
je 0x140004f01
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.SetFirmwareSettings__:_SetFirmwareEnvironmentVariable_failed_with_error:_0x_8.8X
jmp 0x140004eed
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 0x140004ed7
mov ebx, eax
jmp 0x140004f01
cmp qword [0x140090dc0], rbx
je 0x140004f01
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.SetFirmwareSettings__:_SetFirmwareSettings_failed_with_error:_0x_8.8X
mov rcx, qword [0x140090dc0]
mov r9d, eax
mov edx, 2
call fcn.140006d90
xor ecx, ecx
call fcn.140004730
test eax, eax
jne 0x140004f27
mov rcx, qword [0x140090dc0]
test rcx, rcx
je 0x140004f27
lea r8, str.SetFirmwareSettings__:_Failing_to_remove_privilege
lea edx, [rax + 2]
call fcn.140006d90
mov eax, ebx
add rsp, 0x230
pop rbx
ret