Function at 0x180007ba0
Capabilities:
Get common file path
Get disk information
Get uefi variable
Query or enumerate registry value
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x18c0]
mov eax, 0x19c0
call fcn.180025e10
sub rsp, rax
mov rax, qword [0x180038010]
xor rax, rsp
mov qword [rbp + 0x18b0], rax
xor r12d, r12d
mov dword [rsp + 0x48], r12d
mov r15d, r12d
mov edi, r12d
nop word [rax + rax]
xor edx, edx
lea rcx, [rbp - 0x60]
mov r8d, 0x100
call fcn.1800115d0
mov r8d, edi
lea rdx, str..PhysicalDrive_d
lea rcx, [rbp - 0x60]
call fcn.180001920
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
lea rcx, [rbp - 0x60]
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, 0xffffffffffffffff
mov rsi, rax
cmp rax, r14
je 0x180007c97
lea r9, [rsp + 0x4c]
mov qword [rsp + 0x20], r12
mov r8d, 0x200
lea rdx, [rbp + 0xb0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180007c80
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180007c9d
cmp dword [rbp + 0x230], 0x44535352
je 0x180007d07
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180007c9d
call qword [sym.imp.KERNEL32.dll_GetLastError]
inc edi
cmp edi, 0x10
jb 0x180007bf0
lea rcx, str.SSD_Cache_disk_is_not_found__n
call fcn.180003280
call fcn.180003c10
mov ebx, eax
test eax, eax
jle 0x180007cc4
call fcn.180008460
cmp ebx, 1
jne 0x180008195
lea rsi, [0x180039f78]
mov r8, rsi
lea r9d, [rbx + 0x27]
lea rdx, str.8BE4DF61_93CA_11D2_AA0D_00E098032B8C
lea rcx, str.BootOrder
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableW]
test eax, eax
je 0x180008085
cdqe
shr rax, 1
mov dword [0x180039fa4], eax
jmp 0x18000808b
mov edx, edi
mov qword [rsp + 0x19f0], r13
lea rcx, str.Find_SSD_Cache_Disk_:_d_n
call fcn.180003280
lea r9, [rsp + 0x48]
mov qword [rsp + 0x50], r12
lea r8, [rsp + 0x40]
mov qword [rsp + 0x40], r12
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.180004470
mov ebx, dword [rsp + 0x48]
lea rcx, str.bFind:__d__bNeedFormat:_d__status:__d_n
mov r13d, 1
mov r9d, eax
mov edx, r13d
mov r8d, ebx
mov r15d, eax
call fcn.180003280
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x180007f6b
xor edx, edx
lea rcx, [rbp - 0x60]
mov r8d, 0x104
call fcn.1800115d0
xor edx, edx
lea rcx, [rbp + 0x4b0]
mov r8d, 0x400
call fcn.1800115d0
call qword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov ecx, eax
mov bl, 3
movzx eax, bl
bt ecx, eax
jae 0x180007db3
inc bl
cmp bl, 0x1a
jb 0x180007da0
xor bl, bl
jmp 0x180007db6
add bl, 0x41
mov edx, 0x104
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea r8, str._temp_rdv_dps.txt
mov edx, 0x104
lea rcx, [rbp - 0x60]
call fcn.180017e0c
xor edx, edx
lea rcx, [rbp + 0x8b0]
mov r8d, 0x1000
mov esi, r12d
call fcn.1800115d0
mov r8d, edi
lea rdx, str.select_disk__d_r_n
lea rcx, [rbp + 0xb0]
call fcn.180001920
lea r8, [rbp + 0xb0]
mov edx, 0x1000
lea rcx, [rbp + 0x8b0]
call fcn.180017e0c
mov r8d, 4
lea rdx, str.select_partition__d_r_n
lea rcx, [rbp + 0xb0]
call fcn.180001920
lea r8, [rbp + 0xb0]
mov edx, 0x1000
lea rcx, [rbp + 0x8b0]
call fcn.180017e0c
lea rdx, str.format_fsntfs_label_
lea rcx, [rbp + 0xb0]
call fcn.180001920
lea r8, [rbp + 0xb0]
mov edx, 0x1000
lea rcx, [rbp + 0x8b0]
call fcn.180017e0c
movsx r8d, bl
lea rdx, str.assign_letter__c__r_n
lea rcx, [rbp + 0xb0]
call fcn.180001920
lea r8, [rbp + 0xb0]
mov edx, 0x1000
lea rcx, [rbp + 0x8b0]
call fcn.180017e0c
lea r8, str.exit_r_n
mov edx, 0x1000
lea rcx, [rbp + 0x8b0]
call fcn.180017e0c
mov qword [rsp + 0x30], r12
lea rcx, [rbp - 0x60]
mov dword [rsp + 0x28], r12d
xor r9d, r9d
mov r8d, r13d
mov dword [rsp + 0x20], 2
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, r14
je 0x180007f3a
lea rax, [rbp + 0x8b0]
mov r8, r14
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], sil
jne 0x180007f00
lea r9, [rsp + 0x4c]
mov qword [rsp + 0x20], r12
lea rdx, [rbp + 0x8b0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180007f2f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180007f42
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x180007f7b
lea r8, [rbp - 0x60]
lea rdx, str.diskpart.exe__s__s
lea rcx, [rbp + 0x4b0]
call fcn.180001920
lea rcx, [rbp + 0x4b0]
call fcn.180017cd0
jmp 0x180007f74
cmp r15d, 0xb7
jne 0x180007f7b
mov ecx, edi
call fcn.1800076f0
mov ecx, edi
call fcn.1800049e0
mov r15d, eax
test eax, eax
jne 0x180007fdc
movups xmm0, xmmword [str..Harddisk0Partition1]
movsx ecx, dil
lea rdx, [rsp + 0x58]
movups xmm1, xmmword [0x1800307c0]
add cx, 0x30
movups xmmword [rsp + 0x58], xmm0
movups xmm0, xmmword [0x1800307d0]
movups xmmword [rsp + 0x68], xmm1
mov word [rsp + 0x70], cx
movups xmmword [rsp + 0x78], xmm0
call fcn.180008880
test eax, eax
jne 0x180007fdc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.MakeMediaBootOption_failed__d_n
call fcn.180003280
lea rax, [rsp + 0x40]
mov qword [rsp + 0x40], r12
mov r9d, r13d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x48], r12d
lea rdx, str.SystemCurrentControlSetServices_richdisk
mov dword [rsp + 0x4c], 4
mov rcx, 0xffffffff80000002
xor bl, bl
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x180008056
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x50]
lea rax, [rsp + 0x48]
xor r8d, r8d
lea rdx, str.BootFromSSDCache
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x180008056
cmp dword [rsp + 0x48], r13d
movzx ebx, bl
cmove ebx, r13d
mov rcx, qword [rsp + 0x40]
mov r13, qword [rsp + 0x19f0]
test rcx, rcx
je 0x18000806e
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test bl, bl
jne 0x180007cb4
mov ecx, edi
call fcn.180004d00
mov r15d, eax
jmp 0x180007cb4
mov eax, dword [0x180039fa4]
movzx ebx, r12w
test eax, eax
jle 0x180008195
test r14d, r14d
jns 0x180008156
movzx eax, bx
lea r8, str.Boot_04X
mov edx, 0xa
lea rcx, [rbp - 0x78]
movzx r9d, word [rsi + rax*2]
call fcn.1800082b0
movzx edi, bx
lea rcx, [rbp - 0x78]
mov edx, edi
call fcn.18000a0f0
mov r10, rax
test rax, rax
je 0x180008141
mov r8, qword [rax + 0x10]
test r8, r8
je 0x180008141
movzx ecx, byte [r8 + 3]
mov r9d, r12d
movzx edx, byte [r8 + 2]
movzx eax, byte [r8]
shl rcx, 8
or rcx, rdx
add rcx, r8
cmp al, 0x7f
je 0x180008139
nop dword [rax + rax]
cmp r9d, 0x200
jg 0x180008139
cmp al, 3
jne 0x180008114
cmp byte [r8 + 1], 0xc
je 0x180008136
movzx eax, byte [rcx + 2]
mov r8, rcx
movzx edx, byte [rcx + 3]
inc r9d
shl rdx, 8
or rdx, rax
movzx eax, byte [r8]
add rcx, rdx
cmp al, 0x7f
jne 0x180008100
jmp 0x180008139
mov r14d, edi
mov rcx, r10
call fcn.180013668
inc bx
movzx eax, bx
cmp eax, dword [0x180039fa4]
jl 0x180008097
test r14d, r14d
jle 0x180008195
lea r8, [0x1800308b8]
mov edx, 0x34c
lea rcx, str.Line:_d__s::SetBootDefault
call fcn.180003280
movzx ecx, r14w
call fcn.180008310
mov ebx, eax
test eax, eax
je 0x180008198
mov r8d, eax
lea rcx, str.Set_PXE_boot_order_::SetBootDefault__d__failed:_d
mov edx, r14d
call fcn.180003280
mov eax, ebx
jmp 0x180008198
mov eax, r15d
mov rcx, qword [rbp + 0x18b0]
xor rcx, rsp
call fcn.18000ed70
lea r11, [rsp + 0x19c0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret