Function at 0x4c5740
Capabilities:
Get common file path
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb00
mov eax, dword [0x567e00]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x50
mov dword [ebp - 0xb00], eax
lea eax, [ebp - 0x90]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov dword [ebp - 0x14], 0
add esp, 0xc
mov dword [ebp - 0x8d8], eax
mov dword [ebp - 0x8d4], eax
mov dword [ebp - 0x8d0], eax
mov dword [ebp - 0x8cc], eax
mov dword [ebp - 0x8c8], eax
mov dword [ebp - 0x8c4], eax
lea eax, [ebp - 0x298]
push 0x104
push eax
mov byte [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov byte [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x4c57f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push esi
push str.GetSystemDirectory___Error:__ld_n
push eax
call fcn.004c6b80
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c6f8b
mov esp, ebp
pop ebp
ret
movzx eax, word [ebp - 0x298]
push eax
push str.._c:
lea eax, [ebp - 0x4a0]
push 0x104
push eax
call fcn.00411c10
add esp, 0x10
lea eax, [ebp - 0x4a0]
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4c586c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push esi
push str.CreateFile___Error:__ld_n
push eax
call fcn.004c6b80
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c6f8b
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0xaf8]
push eax
push 0xc
lea eax, [ebp - 0x8e4]
push eax
push 0
push 0
push 0x2d1080
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4c58cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push esi
push str.IOCTL_STORAGE_GET_DEVICE_NUMBER_Error:__ld_n
push eax
call fcn.004c6b80
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c6f8b
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x8e0]
cmp ebx, 0xffffffff
je 0x4c5b48
push ebx
push str..PhysicalDrive_d
lea eax, [ebp - 0x90]
push 0x50
push eax
call fcn.0044c6b0
add esp, 0x10
lea eax, [ebp - 0x90]
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0xaf8], esi
cmp esi, 0xffffffff
je 0x4c5b48
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [ebp - 0xafc]
push 0
push eax
push 0x18
lea eax, [ebp - 0x8d8]
push eax
push 0
push 0
push 0x74080
push esi
call edi
test eax, eax
je 0x4c5b40
test byte [ebp - 0x8d4], 1
je 0x4c5b40
xor eax, eax
push 0x210
push eax
mov dword [ebp - 0x8c0], eax
mov dword [ebp - 0x8bc], eax
mov dword [ebp - 0x8b8], eax
mov dword [ebp - 0x8b4], eax
mov dword [ebp - 0x8b0], eax
mov dword [ebp - 0x8ac], eax
mov dword [ebp - 0x8a8], eax
mov dword [ebp - 0x8a4], eax
lea eax, [ebp - 0xaf4]
push eax
call sub.VCRUNTIME140.dll_memset
mov al, bl
mov ecx, ebx
and al, 1
add esp, 0xc
or al, 0xfa
shl al, 4
mov byte [ebp - 0x8b7], al
mov eax, 0x10
sar eax, cl
test dword [ebp - 0x8d4], eax
jne 0x4c5b40
push 0
lea eax, [ebp - 0xafc]
mov byte [ebp - 0x8b6], 0xec
push eax
push 0x210
lea eax, [ebp - 0xaf4]
mov byte [ebp - 0x8b4], bl
push eax
push 0x20
lea eax, [ebp - 0x8c0]
mov word [ebp - 0x8bb], 0x101
push eax
push 0x7c088
push esi
mov dword [ebp - 0x8c0], 0x200
call edi
test eax, eax
je 0x4c5b40
lea eax, [ebp - 0x40]
mov ecx, 0xa
lea esi, [ebp - 0xaae]
lea edi, [ebp - 0x40]
push 0x28
rep movsd dword es:[edi], dword [esi]
push eax
mov byte [ebp - 0x18], 0
call fcn.004bfee0
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
lea eax, [ebp - 0x40]
push 4
push eax
lea eax, [ebp - 0x14]
push 5
push eax
call esi
mov eax, dword [ebp - 0xab6]
mov ecx, dword [ebp - 0xab2]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x40]
push 8
push eax
mov byte [ebp - 0x10], 0
mov dword [ebp - 0x3c], ecx
mov byte [ebp - 0x38], 0
call fcn.004bfee0
push 4
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xc]
push 5
push eax
call esi
mov eax, dword [ebp - 0xad0]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0xacc]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0xac8]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0xac4]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0xac0]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x40]
push 0x14
push eax
mov byte [ebp - 8], 0
mov byte [ebp - 0x2c], 0
call fcn.004bfee0
push 0x400
lea eax, [ebp - 0x8a0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x44
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x535394
lea eax, [ebp - 0x8a0]
push 0x400
push eax
call fcn.0044c6b0
lea edx, [ebp - 0x8a0]
add esp, 0x18
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4c5b01
sub edx, ecx
lea eax, [ebp - 0x8a0]
mov ecx, dword [ebp - 0xb00]
push edx
push eax
call fcn.0041a800
push dword [ebp - 0xaf8]
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c6f8b
mov esp, ebp
pop ebp
ret
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call eax
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004c6f8b
mov esp, ebp
pop ebp
ret