Function at 0x140012b40
Capabilities:
Check mutex on windows
Set uefi variable

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x1e8]
sub rsp, 0x2d0
mov qword [rbp], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14009b3f8]
xor rax, rsp
mov qword [rbp + 0x1c0], rax
mov rdi, rcx
xor esi, esi
mov r14d, esi
mov rax, rcx
lea rcx, [rbp + 0x40]
lea edx, [rsi + 3]
nop dword [rax]
movups xmm0, xmmword [rax]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x20], xmm0
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x30], xmm1
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x40], xmm0
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rcx + 0x50], xmm1
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rcx + 0x60], xmm0
lea rcx, [rcx + 0x80]
movups xmm1, xmmword [rax + 0x70]
movups xmmword [rcx - 0x10], xmm1
lea rax, [rax + 0x80]
sub rdx, 1
jne 0x140012b90
mov dword [rbp + 8], esi
mov eax, 1
xor ecx, ecx
cpuid
mov dword [rbp + 0xc], ebx
mov dword [rbp + 0x10], ecx
mov dword [rbp + 0x14], edx
and eax, 0xfffffff0
cmp eax, 0x30650
jne 0x140012d6f
mov eax, dword [rdi]
mov dword [rbp + 0x18], eax
mov eax, dword [rdi + 4]
mov dword [rbp + 0x1c], eax
mov eax, dword [rdi + 8]
mov dword [rbp + 0x20], eax
mov eax, dword [rdi + 0xc]
mov dword [rbp + 0x24], eax
mov eax, dword [rdi + 0x14]
mov dword [rbp + 0x28], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x60]
mov edx, 0x28
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14001312a
lea r8, [rbp + 0xc]
lea rdx, str.SeSystemEnvironmentPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov dword [rbp + 8], 1
mov dword [rbp + 0x14], 2
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
xor r9d, r9d
lea r8, [rbp + 8]
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140012cae
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x1400a7130]
mov rbx, qword [rcx]
mov r8d, eax
lea rdx, str.Problem_adjusting_the_token_privledges._OS_error_code_is__08X
call qword [rbx + SafeArrayPutElement]
jmp 0x14001312a
cmp dword [0x14009fd00], esi
je 0x140012ced
lea r8, [0x14009fd08]
nop dword [rax]
mov eax, 1
xor ecx, ecx
cpuid
and eax, 0xfffffff0
cmp eax, 0x30650
jne 0x140012ce3
mov eax, dword [rdi]
cmp dword [r8 - 4], eax
jne 0x140012ce3
mov eax, dword [rdi + 4]
cmp dword [r8], eax
je 0x140012d2c
add r8, 0xc
cmp dword [r8 - 8], esi
jne 0x140012cc0
mov r9d, reloc.OLEAUT32.dll_SafeArrayLock
lea r8, [rbp + 0x18]
lea rdx, str.0a602C5B_05a0_40c4_9181_edcd891d00f5
lea rcx, str.DellDiag
call qword [sym.imp.KERNEL32.dll_SetFirmwareEnvironmentVariableW]
test eax, eax
jne 0x140012d2c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x1400a7130]
mov rbx, qword [rcx]
mov r8d, eax
lea rdx, str.SetVarible_failed._OS_error_code_is__08X
call qword [rbx + SafeArrayPutElement]
mov dword [rbp + 0x14], esi
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
xor r9d, r9d
lea r8, [rbp + 8]
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov eax, dword [rbp + 0x18]
mov dword [rdi], eax
mov eax, dword [rbp + 0x1c]
mov dword [rdi + 4], eax
mov eax, dword [rbp + 0x20]
mov dword [rdi + 8], eax
mov eax, dword [rbp + 0x24]
mov dword [rdi + 0xc], eax
mov eax, dword [rbp + 0x28]
mov dword [rdi + 0x14], eax
jmp 0x14001312a
cmp dword [0x1400a71f0], esi
jne 0x140012e66
cmp dword [0x1400a746c], esi
jne 0x140012d9d
mov rcx, qword [0x1400a7130]
mov rax, qword [rcx]
lea rdx, str.A3_SMIs_are_using_legacy_driver
call qword [rax + 0x50]
inc dword [0x1400a746c]
mov dword [rdi + 0x54], esi
lea r8, str.A87F5F0B_BC65_4a66_92EF_3B3635851CD4___FSMI
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov r15, rax
test rax, rax
jne 0x140012dc2
nop dword [rax]
jmp 0x140012dc0
mov edx, 0xffffffff
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea r8, str.FFE1D941AA8D4af0BB485D79D79BAEF01D348ADC95304d9f
mov edx, 0x31
lea rcx, [rdi + 0x60]
call fcn.1400436bc
mov rdx, rdi
lea rcx, [rdi + 0x60]
call fcn.140006c80
mov edx, 0x9c402424
mov rcx, rdi
call fcn.140012a20
mov r14d, eax
test r14d, r14d
jne 0x140012e33
mov edx, 0x9c402428
mov rcx, rdi
call fcn.140012a20
mov r14d, eax
cmp dword [rdi + 0x54], 0
jne 0x140012e33
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x1388
jl 0x140012e01
jmp 0x140012e3b
cmp esi, 0x1388
jl 0x140012e4f
mov rcx, qword [0x1400a7130]
mov rax, qword [rcx]
lea rdx, str.SW_SMI_DID_NOT_FIRE_
call qword [rax + SafeArrayPutElement]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14001312a
cmp dword [0x1400a746c], esi
jne 0x140012e88
mov rcx, qword [0x1400a7130]
mov rax, qword [rcx]
lea rdx, str.A3_over_WMI_interface_is_used
call qword [rax + 0x50]
inc dword [0x1400a746c]
lea rbx, [rdi + 4]
cmp dword [rbx], 0x44454c4c
jne 0x14001301c
lea rdx, [0x1400a5c40]
lea rcx, [rbp - 0x50]
call qword [sym.imp.BIOSIntf.dll_public:_void___cdecl_CHapiIntf::constructor_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____ptr64]
nop
lea rax, vtable.CSimpleTokenData.0
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x70], rsi
mov qword [rbp - 0x78], rsi
mov qword [rbp - 0x80], rsi
mov dword [rbp - 0x70], esi
mov r9b, 1
movzx r8d, r9b
xor edx, edx
lea rcx, [rbp - 0x50]
call qword [sym.imp.BIOSIntf.dll_public:_enum_Status___cdecl_CHapiIntf::Init_bool__bool__bool____ptr64]
test eax, eax
je 0x140012f01
mov rcx, qword [0x1400a7130]
mov rdx, qword [rcx]
mov rbx, qword [rdx + 0x18]
mov r8d, eax
lea rdx, str.HAPI_initialization_failed__Return_code___x
call rbx
jmp 0x140012ffc
mov eax, dword [rdi + 0x34]
mov dword [rsp + 0x70], eax
mov eax, dword [rdi + 0x38]
mov dword [rsp + 0x74], eax
mov eax, dword [rdi + 0x3c]
mov dword [rsp + 0x78], eax
mov eax, dword [rdi + 0x40]
mov dword [rsp + 0x7c], eax
movdqa xmm0, xmmword [0x140090f60]
movdqu xmmword [rbp + 0x28], xmm0
mov byte [rbp + 0x18], 0
lea rdx, [0x14007ac22]
lea rcx, [rbp + 0x18]
call fcn.1400133b0
nop
mov dword [rsp + 0x28], esi
lea rax, [rbp + 0x18]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
movzx r8d, word [rdi + 0x32]
movzx edx, word [rdi + 0x30]
lea rcx, [rbp - 0x50]
call qword [sym.imp.BIOSIntf.dll_public:_enum_Status___cdecl_CHapiIntf::ExecuteDACI_unsigned_short_int__unsigned_short_int__struct_IBIOSData____ptr64__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const____ptr64__enum_PwdInfo::PWDTYPE____ptr64]
mov ebx, eax
mov rdx, qword [rbp + 0x30]
cmp rdx, 0x10
jb 0x140012fa1
inc rdx
mov rcx, qword [rbp + 0x18]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012f9c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400131b7
call fcn.1400302b8
test ebx, ebx
jne 0x140012fda
cmp dword [rbp - 0x80], ebx
jne 0x140012fda
mov dword [rdi + 0x44], esi
mov eax, dword [rbp - 0x7c]
mov dword [rdi + 0x48], eax
mov eax, dword [rbp - 0x78]
mov dword [rdi + 0x4c], eax
mov eax, dword [rbp - 0x74]
mov dword [rdi + 0x50], eax
lea rax, vtable.IBIOSData.0
mov qword [rsp + 0x68], rax
lea rcx, [rbp - 0x50]
call qword [sym.imp.BIOSIntf.dll_public:_void___cdecl_CHapiIntf::destructor_void____ptr64]
jmp 0x14001312a
movzx r9d, word [rdi + 0x32]
movzx r8d, word [rdi + 0x30]
mov rcx, qword [0x1400a7130]
mov rdx, qword [rcx]
mov rbx, qword [rdx + 0x18]
lea rdx, str.Error_Executing_DACI_call__cbClass___x__cbSelect___x
call rbx
nop
lea rax, vtable.IBIOSData.0
mov qword [rsp + 0x68], rax
lea rcx, [rbp - 0x50]
call qword [sym.imp.BIOSIntf.dll_public:_void___cdecl_CHapiIntf::destructor_void____ptr64]
mov eax, 1
jmp 0x14001318b
lea rcx, [rbp - 0x50]
call qword [sym.imp.BIOSIntf.dll_public:_void___cdecl_CDiagsIntf::constructor_void____ptr64]
nop
mov dword [rsp + 0x5c], 4
mov dword [rsp + 0x58], 4
mov dword [rsp + 0x54], 4
mov dword [rsp + 0x60], 4
mov dword [rsp + 0x50], 0x40
lea rcx, [rbp - 0x50]
call qword [sym.imp.BIOSIntf.dll_public:_enum_Status___cdecl_CDiagsIntf::Init_void____ptr64]
test eax, eax
je 0x14001308c
mov rcx, qword [0x1400a7130]
mov rdx, qword [rcx]
mov rbx, qword [rdx + 0x18]
mov r8d, eax
lea rdx, str.diagsIntf_initialization_failed__Return_code___x
call rbx
nop
lea rcx, [rbp - 0x50]
call qword [sym.imp.BIOSIntf.dll_public:_void___cdecl_CDiagsIntf::destructor_void____ptr64]
mov eax, 1
jmp 0x14001318b
lea rcx, [rdi + 0xc]
cmp dword [rcx], 0x44454c4c
jne 0x1400130c9
cmp dword [rdi + 0x58], 0x44454c4c
jne 0x1400130a8
mov eax, dword [rdi + 0x5c]
mov dword [rsp + 0x50], eax
lea rax, [rdi + 0x140]
lea rcx, [rdi + 8]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
jmp 0x1400130e1
lea rax, [rdi + 8]
mov qword [rsp + 0x40], rcx
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x54]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x58]
mov r8, rdi
lea rdx, [rsp + 0x5c]
lea rcx, [rbp - 0x50]
call qword [sym.imp.BIOSIntf.dll_public:_enum_Status___cdecl_CDiagsIntf::Execute_unsigned_int____ptr64__unsigned_char__const___ptr64__unsigned_int____ptr64__unsigned_char__const___ptr64__unsigned_int____ptr64__unsigned_char__const___ptr64__unsigned_int____ptr64__unsigned_char__const___ptr64____ptr64]
test eax, eax
je 0x140013120
mov rcx, qword [0x1400a7130]
mov rax, qword [rcx]
lea rdx, str.Failed_to_execute_A3_call_
call qword [rax + SafeArrayPutElement]
nop
lea rcx, [rbp - 0x50]
call qword [sym.imp.BIOSIntf.dll_public:_void___cdecl_CDiagsIntf::destructor_void____ptr64]
mov rdx, qword [rbp + 0x40]
cmp rdx, qword [rdi]
jne 0x140013178
mov ebx, dword [rbp + 0x48]
cmp ebx, dword [rdi + 8]
jne 0x140013178
mov eax, 0x2a3
cmp word [rdi], ax
jne 0x14001314a
mov word [rdi], ax
jmp 0x140013188
mov rcx, qword [0x1400a7130]
test rcx, rcx
je 0x14001316e
mov rax, qword [rcx]
mov dword [rsp + 0x20], ebx
mov r9d, dword [rbp + 0x44]
mov r8d, edx
lea rdx, str.Warning:_SW_SMI_didnt_update_any_registers__SMI_was_0x_08X_0x_08X_0x_08X
call qword [rax + 0x50]
mov eax, 0xffff
mov word [rdi], ax
jmp 0x140013182
mov eax, 0xffff
cmp word [rdi], ax
jne 0x140013188
mov r14d, 1
mov eax, r14d
mov rcx, qword [rbp + 0x1c0]
xor rcx, rsp
call fcn.1400303d0
lea r11, [rsp + 0x2d0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.140041d64
nop
int3