Function at 0x140050310
Capabilities:
Get uefi variable
Query environment variable
Query or enumerate registry value

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x360]
sub rsp, 0x460
mov r8d, 0x400
lea rdx, [rsp + 0x60]
lea rcx, str._ProgramFiles_Windows_DefenderMpClient.dll
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
test rax, rax
je 0x140050372
mov r8b, 1
lea rdx, str.WDStatus
mov rcx, rax
call fcn.14004f980
test rax, rax
jne 0x14005040a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
xor ebx, ebx
mov dword [rbp + 0x380], ebx
mov dword [rbp + 0x388], 4
mov dword [rbp + 0x390], 4
lea rax, [rbp + 0x398]
mov qword [rsp + 0x20], rax
mov r9d, 0xf003f
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetControlSecureBootState
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140050437
lea rax, [rbp + 0x388]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x380]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x390]
xor r8d, r8d
lea rdx, str.UEFISecureBootEnabled
mov rcx, qword [rbp + 0x398]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [rbp + 0x380], ebx
setne al
test al, al
je 0x140050437
lea rdx, str.You_need_to_disable_Secure_Boot.
jmp 0x140050576
lea rcx, [rbp + 0x380]
call rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [rbp + 0x380], 0
je 0x140050372
xor ebx, ebx
lea rdx, str.Windows_Defender_is_turned_on._Download_Defender_Control_and_use_it_to_disable.
jmp 0x140050576
lea rcx, [rbp + 0x380]
call qword [sym.imp.KERNEL32.dll_GetFirmwareType]
cmp dword [rbp + 0x380], 2
jne 0x140050490
lea rcx, str.SeSystemEnvironmentPrivilege
call fcn.140003470
test eax, eax
je 0x140050490
xor r9d, r9d
xor r8d, r8d
lea rdx, str.00000000_0000_0000_0000_000000000000
lea rcx, [0x1400df138]
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
test eax, eax
jne 0x140050490
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 1
je 0x140050536
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], 0xf
mov byte [rsp + 0x30], 0
mov ecx, 0x20
call fcn.1400953a8
mov qword [rsp + 0x40], 0x19
mov qword [rsp + 0x48], 0x1f
movups xmm0, xmmword [str.C:ChairsBypassTPM.Chair]
movups xmmword [rax], xmm0
movsd xmm1, qword [0x140131920]
movsd qword [rax + 0x10], xmm1
movzx ecx, byte [0x140131928]
mov byte [rax + 0x18], cl
mov byte [rax + 0x19], 0
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x30]
call fcn.140003c90
movzx edi, al
mov rdx, qword [rsp + 0x48]
cmp rdx, 0x10
jb 0x140050544
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005053f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005053f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
lea rdx, str.Your_BIOS_mode_must_be_UEFI.
jmp 0x140050576
call fcn.1400953e4
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], 0xf
mov byte [rsp + 0x30], 0
test dil, dil
jne 0x1400505a4
lea rdx, [rsp + 0x50]
mov ecx, 0x10
call sub.tbs.dll_Tbsi_GetDeviceInfo
test eax, eax
jne 0x1400505a4
lea rdx, str.You_need_to_disable_TPM.
mov dword [rsp + 0x28], 0x4e20
mov word [rsp + 0x20], bx
mov r9d, 0x1010
lea r8, str.Info
xor ecx, ecx
call fcn.140003ea0
xor al, al
add rsp, 0x460
pop rdi
pop rbx
pop rbp
ret
mov al, 1
add rsp, 0x460
pop rdi
pop rbx
pop rbp
ret