Function at 0x14004cd50
Capabilities:
Get disk information via ioctl
Query or enumerate registry value

Disassembly:
mov r11, rsp
push rbp
push rsi
push r14
lea rbp, [r11 - 0x38]
sub rsp, 0x120
mov rax, qword [0x1403a8088]
xor rax, rsp
mov qword [rbp + 0x10], rax
mov rax, qword [0x140443d80]
lea r8, [0x140321ee0]
mov qword [r11 + 0x18], r12
lea rcx, [rbp - 0x70]
xor r12d, r12d
mov qword [r11 + 0x20], r15
mov r15d, r12d
mov dword [rsp + 0x54], r12d
movzx r9d, word [rax + 0x30]
lea edx, [r12 + 0x40]
call fcn.14004ec30
mov qword [rsp + 0x30], r12
lea r8d, [r12 + 3]
mov dword [rsp + 0x28], r12d
lea rcx, [rbp - 0x70]
xor r9d, r9d
mov dword [rsp + 0x20], 3
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14004ce5a
mov qword [rsp + 0x38], r12
lea rax, [rsp + 0x54]
mov qword [rsp + 0x30], rax
xor r9d, r9d
lea rax, [rsp + 0x58]
mov dword [rsp + 0x28], ntohs
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x2d1080
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x14004ce5a
mov qword [rsp + 0x38], r12
lea rax, [rsp + 0x54]
mov qword [rsp + 0x30], rax
xor r9d, r9d
lea rax, [rsp + 0x68]
mov dword [rsp + 0x28], 0x20
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x560000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x14004ce50
cmp dword [rsp + 0x68], 1
jae 0x14004ce5a
mov esi, 1
jmp 0x14004d1f8
mov esi, 1
mov qword [rsp + 0x48], r12
lea rax, [rsp + 0x48]
mov dword [rsp + 0x50], r12d
mov r9d, esi
mov dword [rsp + 0x40], 4
lea rdx, str.SYSTEMCurrentControlSetControlWinPE
mov qword [rsp + 0x20], rax
lea r8d, [rsi + 3]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14004cecf
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14004cedf
lea rax, [rsp + 0x40]
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea r9, [0x14044b738]
lea rax, [rsp + 0x50]
lea rdx, str.InstRootDrive
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14004cedf
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x50], r12d
ja 0x14004d1f8
lea rax, [rsp + 0x40]
mov qword [rsp + 0x140], rbx
mov qword [rsp + 0x148], rdi
lea rdx, [0x140321fb0]
mov r9d, esi
mov qword [rsp + 0x20], rax
mov r8d, 4
mov qword [rsp + 0x40], r12
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x50], r12d
mov rdi, r12
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14004cfe5
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14004d052
lea rax, [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea r9, [0x14044b73c]
lea rdx, [0x140321f60]
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14004cfe5
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x14004cfe5
add eax, 0x108
mov ecx, eax
mov dword [rsp + 0x50], eax
call fcn.14012a2dc
mov rdi, rax
test rax, rax
je 0x14004cfe5
mov r8d, dword [rsp + 0x50]
xor edx, edx
mov rcx, rax
call fcn.14027b2c0
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea r9, [0x14044b73c]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, [0x140321f60]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14004cfda
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x14004cfda
mov dword [rsp + 0x54], eax
jmp 0x14004cfe5
mov rcx, rdi
call fcn.14012a2d4
mov rdi, r12
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14004cffa
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x40], r12
test rdi, rdi
je 0x14004d052
mov rbx, rdi
cmp word [rdi], r12w
je 0x14004d04a
nop dword [rax + rax]
lea rdx, str.MININT
mov rcx, rbx
call fcn.140279308
test rax, rax
jne 0x14004d136
or rax, 0xffffffffffffffff
nop dword [rax]
cmp word [rbx + rax*2 + 2], r12w
lea rax, [rax + 1]
jne 0x14004d030
lea rbx, [rbx + rax*2]
add rbx, 2
cmp word [rbx], r12w
jne 0x14004d010
mov rcx, rdi
call fcn.14012a2d4
lea rax, [rsp + 0x40]
mov qword [rsp + 0x40], r12
mov r9d, esi
mov qword [rsp + 0x20], rax
mov r8d, 4
mov dword [rsp + 0x50], r12d
lea rdx, str.SYSTEMCurrentControlSetControl
mov rcx, 0xffffffff80000002
mov rdi, r12
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14004d151
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14004d1c2
lea rax, [rsp + 0x50]
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea r9, [0x14044b73c]
lea rdx, str.SystemBootDevice
mov qword [rsp + 0x20], r12
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14004d151
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x14004d151
add eax, 0x108
mov ecx, eax
mov dword [rsp + 0x50], eax
call fcn.14012a2dc
mov rdi, rax
test rax, rax
je 0x14004d151
mov r8d, dword [rsp + 0x50]
xor edx, edx
mov rcx, rax
call fcn.14027b2c0
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea r9, [0x14044b73c]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str.SystemBootDevice
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14004d146
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x14004d146
mov dword [rsp + 0x54], eax
jmp 0x14004d151
mov rcx, rdi
call fcn.14012a2d4
mov r15d, esi
jmp 0x14004d052
mov rcx, rdi
call fcn.14012a2d4
mov rdi, r12
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14004d166
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x40], r12
test rdi, rdi
je 0x14004d1c2
mov rbx, rdi
cmp word [rdi], r12w
je 0x14004d1ba
nop dword [rax]
nop dword [rax + rax]
lea rdx, str.RAMDISK
mov rcx, rdi
call fcn.140279308
test rax, rax
jne 0x14004d231
or rax, 0xffffffffffffffff
nop dword [rax]
cmp word [rbx + rax*2 + 2], r12w
lea rax, [rax + 1]
jne 0x14004d1a0
lea rbx, [rbx + rax*2]
add rbx, 2
cmp word [rbx], r12w
jne 0x14004d180
mov rcx, rdi
call fcn.14012a2d4
mov rcx, qword [0x140443d80]
lea rdx, [0x14032166c]
add rcx, 0x30
mov r8d, 2
call fcn.1402804bc
mov rdi, qword [rsp + 0x148]
test eax, eax
mov rbx, qword [rsp + 0x140]
cmove r15d, esi
mov esi, r15d
mov r15, qword [rsp + 0x158]
mov r12, qword [rsp + 0x150]
cmp r14, 0xffffffffffffffff
je 0x14004d217
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x10]
xor rcx, rsp
call fcn.14012a2b0
add rsp, 0x120
pop r14
pop rsi
pop rbp
ret
mov rcx, rdi
call fcn.14012a2d4
mov r15d, esi
jmp 0x14004d1c2