Function at 0x14016dad0
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1e30
call sub.ntdll.dll___chkstk
sub rsp, rax
mov qword [rsp + 0xd8], 0xfffffffffffffffe
mov qword [rsp + 0x1e60], rbx
mov qword [rsp + 0x1e70], rbp
mov qword [rsp + 0x1e78], rsi
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x1e20], rax
movsxd r14, r8d
mov r13, rdx
mov byte [rsp + 0x6c0], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0x6c1]
call sub.ntdll.dll_memset
xor ebx, ebx
mov dword [rsp + 0xe0], ebx
xor edx, edx
mov r8d, Ordinal_265
lea rcx, [rsp + 0x1e8]
call sub.ntdll.dll_memset
xor edx, edx
mov r8d, Ordinal_265
lea rcx, [rsp + 0xe4]
call sub.ntdll.dll_memset
nop
lea rdx, [rsp + 0x6c0]
lea rcx, [rsp + 0xe0]
call fcn.140019890
test eax, eax
jne 0x14016dbad
lea r8, [rsp + 0xe4]
lea rdx, [rsp + 0x1ec]
lea ecx, [rbx + 2]
call qword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
xor eax, eax
jmp 0x14016e57a
mov byte [rsp + 0x5b0], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rsp + 0x5b1]
call sub.ntdll.dll_memset
lea r8, [rsp + 0x6c0]
lea rdx, str._sBCD
lea rcx, [rsp + 0x5b0]
call qword [sym.imp.ntdll.dll_sprintf]
lea rcx, [rsp + 0x5b0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x14016dc61
xor edx, edx
mov r8d, Ordinal_265
lea rcx, [rsp + 0x5b0]
call sub.ntdll.dll_memset
lea r8, [rsp + 0x6c0]
lea rdx, str._sBootBCD
lea rcx, [rsp + 0x5b0]
call qword [sym.imp.ntdll.dll_sprintf]
lea rcx, [rsp + 0x5b0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x14016dc61
lea r8, [rsp + 0xe4]
lea rdx, [rsp + 0x1ec]
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
xor eax, eax
jmp 0x14016e57a
call fcn.140168650
mov word [rsp + 0x570], 0
xor eax, eax
mov qword [rsp + 0x572], rax
mov qword [rsp + Ordinal_1404], rax
mov qword [rsp + Ordinal_1412], rax
mov qword [rsp + 0x58a], rax
mov qword [rsp + 0x592], rax
mov qword [rsp + Ordinal_1435], rax
mov qword [rsp + 0x5a2], rax
mov dword [rsp + 0x5aa], eax
mov word [rsp + 0x5ae], ax
mov word [rsp + Ordinal_4069], ax
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0xfe2]
call sub.ntdll.dll_memset
mov ebp, 1
mov esi, ebp
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x5b0]
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rsp + 0x5b0]
lea rcx, [rsp + 0xfe0]
call qword [sym.imp.ntdll.dll_mbstowcs]
nop
nop
mov r8d, esi
lea rdx, str.MyBCD_d
lea rcx, [rsp + 0x570]
call qword [sym.imp.MSVCR80.dll__swprintf]
lea r8, [rsp + 0xfe0]
lea rdx, [rsp + 0x570]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
test eax, eax
je 0x14016dd53
mov ebp, ebx
add esi, 1
cmp esi, 0xa
jle 0x14016dd10
mov r12d, ebx
mov word [rsp + 0x7d0], r12w
xor edx, edx
mov r8d, Ordinal_512
lea rcx, [rsp + 0x7d2]
call sub.ntdll.dll_memset
mov word [rsp + Ordinal_1362], r12w
xor eax, eax
mov qword [rsp + reloc.MFC80U.DLL_Ordinal_1362], rax
mov qword [rsp + reloc.MFC80U.DLL_Ordinal_1370], rax
mov qword [rsp + 0x562], rax
mov dword [rsp + Ordinal_1388], eax
mov word [rsp + 0x56e], ax
mov qword [rsp + 0x70], rbx
lea r8d, [rax + 9]
lea rdx, [0x140364e80]
lea rcx, [rsp + 0x550]
call qword [sym.imp.ntdll.dll_mbstowcs]
lea rdx, [0x1403b5708]
mov qword [rsp + 0x4f0], rdx
mov qword [rsp + 0x4f8], rbx
mov qword [rsp + reloc.MFC80U.DLL_Ordinal_1288], rbx
mov byte [rsp + 0x510], r12b
mov dword [rsp + 0x514], 2
lea rax, [0x1403b5648]
mov qword [rsp + Ordinal_1282], rax
mov qword [rsp + Ordinal_1311], rbx
mov qword [rsp + Ordinal_1315], rbx
mov qword [rsp + 0x528], rbx
mov dword [rsp + 0x530], ebx
xor edx, edx
mov r8d, reloc.MFC80U.DLL_Ordinal_512
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_752]
call sub.ntdll.dll_memset
nop
lea rdx, [rsp + 0x570]
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_752]
call fcn.140018f30
cmp esi, 0xb
jne 0x14016ded2
test ebp, ebp
jne 0x14016ded2
lea r8, [0x140364e90]
lea rdx, str.BCD00000000_s
lea rcx, [rsp + 0x7d0]
call qword [sym.imp.MSVCR80.dll__swprintf]
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0x7d0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14016e04d
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_752]
call fcn.140018ca0
nop
lea r8, [rsp + 0xe4]
lea rdx, [rsp + 0x1ec]
lea ecx, [rsi - 9]
call qword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
xor eax, eax
jmp 0x14016e57a
lea r9, [0x140364ec0]
lea r8, [rsp + 0x570]
lea rdx, [0x140364ed8]
lea rcx, [rsp + 0x7d0]
call qword [sym.imp.MSVCR80.dll__swprintf]
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0x7d0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14016e04d
call fcn.140049470
mov rsi, rax
xor edx, edx
mov r8d, 0x80
lea rbp, [0x140c47f60]
mov rcx, rbp
call sub.ntdll.dll_memset
mov edx, 0x5c
lea rcx, str..PeRestartMod_bootset.cpp
call qword [sym.imp.ntdll.dll_strrchr]
mov rdi, rax
test rax, rax
je 0x14016dff4
mov byte [rsp + 0x540], 0
xor eax, eax
mov qword [rsp + Ordinal_1352], rax
mov word [rsp + Ordinal_1359], ax
mov byte [rsp + Ordinal_1359], al
mov r8d, Ordinal_1930
lea rdx, [0x140364f64]
lea rcx, [rsp + 0x540]
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, rbp
sub rcx, rdx
nop
nop
movzx eax, byte [rdx]
mov byte [rcx + rdx], al
add rdx, 1
test al, al
jne 0x14016dfb0
mov rdi, rbp
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
lea r8, [rsp + 0x540]
xor edx, edx
nop
nop
nop
nop
movzx eax, byte [r8 + rdx]
mov byte [rdi + rdx - 1], al
add rdx, 1
test al, al
jne 0x14016dfe0
mov rbx, rbp
mov rax, qword [rsi]
mov r8, rbx
lea rdx, str._s:_Failed_to_RegOpenKeyEx.
mov rcx, rsi
call qword [rax + 0x10]
lea rdx, [rsp + 0x570]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
nop
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_752]
call fcn.140018ca0
nop
lea r8, [rsp + 0xe4]
lea rdx, [rsp + 0x1ec]
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
xor eax, eax
jmp 0x14016e57a
mov word [rsp + reloc.MFC80U.DLL_Ordinal_5648], 0
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x1612]
call sub.ntdll.dll_memset
mov dword [rsp + 0x88], Ordinal_265
mov dword [rsp + 0x68], ebx
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0xac]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0xb4]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xbc]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0xc4]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xd4]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rsp + 0x88]
lea rdx, [rsp + reloc.MFC80U.DLL_Ordinal_5648]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov edx, dword [rsp + 0x68]
test edx, edx
je 0x14016e52d
mov ebp, ebx
test edx, edx
je 0x14016e52d
lea r15, [0x140364f28]
nop
nop
mov dword [rsp + 0x98], Ordinal_265
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x98]
lea r8, [rsp + 0xbd0]
mov edx, ebp
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x14016e520
mov word [rsp + Ordinal_3542], ax
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0xdd2]
call sub.ntdll.dll_memset
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0xbd0]
lea r8, [rsp + 0x7d0]
lea rdx, str._s_s_s
lea rcx, [rsp + 0xdd0]
call qword [sym.imp.MSVCR80.dll__swprintf]
lea rdx, [rsp + 0x80]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0xdd0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14016e520
mov word [rsp + 0x1400], ax
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x1402]
call sub.ntdll.dll_memset
mov dword [rsp + 0x90], Ordinal_265
mov dword [rsp + 0x60], ebx
lea rax, [rsp + 0x540]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0xcc]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0x1400]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
mov edx, dword [rsp + 0x60]
test edx, edx
je 0x14016e50d
mov esi, ebx
test edx, edx
je 0x14016e50d
nop
mov dword [rsp + 0x8c], Ordinal_265
lea rax, [rsp + 0x540]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x8c]
lea r8, [rsp + 0x1820]
mov edx, esi
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x14016e500
mov word [rsp + Ordinal_4599], ax
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x11f2]
call sub.ntdll.dll_memset
lea r9, [rsp + 0x1820]
lea r8, [rsp + 0xdd0]
lea rdx, [0x140364f58]
lea rcx, [rsp + 0x11f0]
call qword [sym.imp.MSVCR80.dll__swprintf]
lea rdx, [rsp + 0x78]
mov qword [rsp + 0x20], rdx
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [rsp + 0x11f0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14016e500
mov word [rsp + 0x9d0], ax
xor edx, edx
mov r8d, Ordinal_512
lea rcx, [rsp + 0x9d2]
call sub.ntdll.dll_memset
mov dword [rsp + 0x64], reloc.MFC80U.DLL_Ordinal_512
mov edi, ebx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x64]
lea r8, [rsp + 0x9d0]
xor edx, edx
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x14016e4f0
nop
add edi, 1
mov byte [rsp + 0x1a20], 0
xor edx, edx
mov r8d, 0x3ff
lea rcx, [rsp + 0x1a21]
call sub.ntdll.dll_memset
mov dword [rsp + 0x94], 0x400
lea rax, [rsp + 0x94]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x1a20]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x9d0]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14016e44d
lea rdx, [rsp + 0x550]
lea rcx, [rsp + 0x1a20]
call qword [sym.imp.ntdll.dll_wcsstr]
test rax, rax
jne 0x14016e4a1
xor edx, edx
mov r8d, 0x100
lea rcx, [rsp + 0x9d0]
call sub.ntdll.dll_memset
mov dword [rsp + 0x64], reloc.MFC80U.DLL_Ordinal_512
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x64]
lea r8, [rsp + 0x9d0]
mov edx, edi
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x14016e4f0
jmp 0x14016e3d0
xor eax, eax
lea r12d, [rax + 1]
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xbd0]
repne scasw ax, word [rdi]
not rcx
sub rcx, r12
cmp rcx, r14
jae 0x14016e4f0
lea rcx, [rsp + 0xbd0]
lea rax, [rsp + 0xbd0]
mov rdx, r13
sub rdx, rax
nop
nop
nop
movzx eax, word [rcx]
mov word [rdx + rcx], ax
add rcx, 2
test ax, ax
jne 0x14016e4e0
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r12d, r12d
jne 0x14016e50d
add esi, 1
cmp esi, dword [rsp + 0x60]
jb 0x14016e2b0
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r12d, r12d
jne 0x14016e52d
add ebp, 1
cmp ebp, dword [rsp + 0x68]
jb 0x14016e120
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, [rsp + 0x570]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
nop
lea rcx, [rsp + reloc.MFC80U.DLL_Ordinal_752]
call fcn.140018ca0
nop
lea r8, [rsp + 0xe4]
lea rdx, [rsp + 0x1ec]
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_DefineDosDeviceA]
mov eax, r12d
mov rcx, qword [rsp + 0x1e20]
xor rcx, rsp
call fcn.140161080
lea r11, [rsp + 0x1e30]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret