Function at 0x140060570
Capabilities:
Check if file exists
Get disk information

Disassembly:
push rbx
push rbp
push rdi
push r13
push r14
push r15
sub rsp, 0x588
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x570], rax
mov rbp, rcx
mov ecx, edx
mov r13d, r9d
mov qword [rsp + 0x50], r8
mov r15d, edx
call fcn.140119fd0
mov dword [rbp], eax
call fcn.140049400
mov rdx, qword [rax]
mov rcx, rax
mov rbx, rax
call qword [rdx + 0x80]
mov r14, qword [rsp + 0x5e0]
mov word [rsp + 0x40], 0
movzx edi, ax
mov rax, qword [rbx]
lea rdx, [rsp + 0x40]
mov r9, r14
mov r8d, r13d
mov rcx, rbx
call qword [rax + 0x50]
movzx r11d, word [rsp + 0x40]
cmp r11w, di
jne 0x1400605fb
mov eax, 1
jmp 0x140060c33
mov qword [rsp + Ordinal_1493], rsi
xor esi, esi
test r11w, r11w
mov qword [rsp + Ordinal_1412], r12
lea ebx, [rsi + 1]
mov r12d, esi
je 0x140060624
cmp r11w, 0x2a
jne 0x140060756
call qword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov ecx, 2
nop
bt eax, ecx
jae 0x140060647
add ecx, ebx
cmp ecx, 0x1a
jl 0x140060630
mov r11w, word [rsp + 0x40]
jmp 0x140060756
add cx, 0x41
mov word [rsp + 0x40], cx
call fcn.140049400
movzx edx, word [rsp + 0x40]
mov rdi, qword [rax]
mov r9, r14
mov r8d, r13d
mov rcx, rax
call qword [rdi + 0x18]
test eax, eax
jne 0x14006074d
call fcn.140049470
lea rbp, [0x140433b50]
xor edx, edx
mov rcx, rbp
mov r8d, 0x80
mov rbx, rax
call sub.ntdll.dll_memset
lea rcx, str..._reg.cpp
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
mov rdi, rax
je 0x140060733
xor eax, eax
lea rdx, [0x1402dfd08]
lea rcx, [rsp + 0x50]
mov r8d, 0x2c3
mov byte [rsp + 0x50], sil
mov qword [rsp + 0x51], rax
mov word [rsp + 0x59], ax
mov byte [rsp + 0x5b], al
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, rbp
sub rcx, rdx
nop
nop
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x1400606f0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbp
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x50]
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x140060720
mov rsi, rbp
mov rax, qword [rbx]
lea rdx, str._s:_Failed_to_MountVolume_in_SetPartitionPos.
mov r8, rsi
mov rcx, rbx
call qword [rax + 0x10]
xor eax, eax
jmp 0x140060c23
mov r11w, word [rsp + 0x40]
mov r12d, ebx
xor eax, eax
lea rdx, [0x140000000]
lea rcx, [rsp + 0x120]
mov qword [rsp + 0xa2], rax
mov qword [rsp + 0xaa], rax
mov qword [rsp + 0xb2], rax
mov qword [rsp + 0xba], rax
mov qword [rsp + 0xc2], rax
mov qword [rsp + 0xca], rax
mov qword [rsp + 0xd2], rax
mov dword [rsp + 0xda], eax
mov word [rsp + 0xde], ax
mov rax, qword [rdx + 0x2e0b70]
mov qword [rcx], rax
mov rax, qword [rdx + 0x2e0b78]
mov qword [rcx + 8], rax
mov rax, qword [rdx + 0x2e0b80]
mov qword [rcx + 0x10], rax
mov rax, qword [rdx + 0x2e0b88]
mov qword [rcx + 0x18], rax
mov rax, qword [rdx + 0x2e0b90]
mov qword [rcx + 0x20], rax
mov rax, qword [rdx + 0x2e0b98]
mov qword [rcx + 0x28], rax
mov rax, qword [rdx + 0x2e0ba0]
mov qword [rcx + 0x30], rax
mov rax, qword [rdx + 0x2e0ba8]
mov qword [rcx + 0x38], rax
mov eax, dword [rdx + 0x2e0bb0]
mov dword [rcx + 0x40], eax
mov rax, qword [rdx + 0x2e0b30]
lea rcx, [rsp + 0xe0]
mov qword [rcx], rax
mov rax, qword [rdx + 0x2e0b38]
mov word [rsp + 0x120], r11w
mov qword [rcx + 8], rax
mov rax, qword [rdx + 0x2e0b40]
mov qword [rcx + 0x10], rax
mov rax, qword [rdx + 0x2e0b48]
mov qword [rcx + 0x18], rax
mov rax, qword [rdx + 0x2e0b50]
mov qword [rcx + 0x20], rax
mov rax, qword [rdx + 0x2e0b58]
mov qword [rcx + 0x28], rax
mov rax, qword [rdx + 0x2e0b60]
mov qword [rcx + 0x30], rax
mov rax, qword [rdx + 0x2e0b68]
mov qword [rcx + 0x38], rax
mov rcx, rsi
nop
nop
movzx eax, word [rcx + rdx + 0x2e0b10]
add rcx, 2
test ax, ax
mov word [rsp + rcx + 0x9e], ax
jne 0x140060880
xor r9d, r9d
mov qword [rsp + 0x30], rsi
lea rcx, [rsp + 0x120]
lea r8d, [r9 + 3]
mov edx, 0x80000000
mov dword [rsp + 0x28], esi
mov word [rsp + 0xa0], r11w
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x1400609d1
cmp rdi, 0xffffffffffffffff
jne 0x1400609c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x14006090b
cmp eax, 3
je 0x14006090b
cmp eax, 0x3ed
je 0x14006090b
cmp eax, 0x570
jne 0x1400609c8
movzx eax, word [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x30], rsi
lea rcx, [rsp + 0xe0]
lea r8d, [r9 + 3]
mov edx, 0x80000000
mov dword [rsp + 0x28], esi
mov word [rsp + 0xe0], ax
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x14006098e
cmp rdi, 0xffffffffffffffff
jne 0x140060985
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x140060c21
cmp eax, 3
je 0x140060c21
cmp eax, 0x3ed
je 0x140060c21
cmp eax, 0x570
je 0x140060c21
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
lea rdx, [0x140000000]
nop
nop
movzx eax, word [rcx + rdx + 0x2e0af8]
add rcx, 2
test ax, ax
mov word [rsp + rcx + 0x9e], ax
jne 0x1400609a0
movzx eax, word [rsp + 0x40]
mov word [rsp + 0xa0], ax
jmp 0x1400609d1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0xa0]
mov rcx, rbp
call fcn.14005c040
test eax, eax
je 0x140060c21
lea rcx, [rsp + 0x372]
xor edx, edx
mov r8d, Ordinal_512
mov word [rsp + 0x370], si
call sub.ntdll.dll_memset
lea r8, [rsp + 0xa0]
lea rdx, str._sSystem32ConfigSystem
lea rcx, [rsp + 0x370]
call qword [sym.imp.MSVCR80.dll__swprintf]
xor eax, eax
mov word [rsp + 0x60], si
mov qword [rsp + 0x62], rax
mov qword [rsp + 0x6a], rax
mov qword [rsp + 0x72], rax
mov qword [rsp + 0x7a], rax
mov qword [rsp + 0x82], rax
mov qword [rsp + 0x8a], rax
mov qword [rsp + 0x92], rax
mov dword [rsp + 0x9a], eax
mov word [rsp + 0x9e], ax
nop
nop
nop
lea rdx, str.MySystem_d
lea rcx, [rsp + 0x60]
mov r8d, ebx
call qword [sym.imp.MSVCR80.dll__swprintf]
lea r8, [rsp + 0x370]
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.14005b310
test eax, eax
jne 0x140060aa6
add ebx, 1
cmp ebx, 0xa
jle 0x140060a70
mov edx, r15d
mov rcx, rbp
call fcn.14005b270
mov edx, r13d
mov rcx, rbp
mov ebx, eax
call fcn.14005b270
lea rcx, [rsp + 0x272]
xor edx, edx
mov r8d, 0xfe
mov word [rsp + 0x270], si
mov edi, eax
call sub.ntdll.dll_memset
lea r8, [rsp + 0x60]
lea rdx, str._sMountedDevices
lea rcx, [rsp + 0x270]
call qword [sym.imp.MSVCR80.dll__swprintf]
mov r9, qword [rsp + 0x50]
lea rdx, [rsp + 0x270]
mov r8d, ebx
mov rcx, rbp
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], edi
call fcn.14005c300
lea rdx, [rsp + 0x270]
mov ebx, eax
lea rax, [rsp + 0x48]
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140060b61
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, [rsp + 0x172]
xor edx, edx
mov r8d, 0xfe
mov word [rsp + 0x170], si
call sub.ntdll.dll_memset
mov edi, esi
lea r8, [rsp + 0x60]
lea rdx, str._sControlSet00_dControlSession_Manager
lea rcx, [rsp + 0x170]
mov r9d, edi
call qword [sym.imp.MSVCR80.dll__swprintf]
lea rdx, [rsp + 0x170]
mov rcx, rbp
call fcn.14005f730
lea rax, [rsp + 0x50]
lea rdx, [rsp + 0x170]
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x50], rsi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140060bf4
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
add edi, 1
cmp edi, 5
jl 0x140060b80
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.14005b510
test r12d, r12d
je 0x140060c21
call fcn.140049400
movzx edx, word [rsp + 0x40]
mov rdi, qword [rax]
mov rcx, rax
call qword [rdi + 0x20]
mov eax, ebx
mov rsi, qword [rsp + 0x5d0]
mov r12, qword [rsp + 0x580]
mov rcx, qword [rsp + 0x570]
xor rcx, rsp
call fcn.140161080
add rsp, 0x588
pop r15
pop r14
pop r13
pop rdi
pop rbp
pop rbx
ret