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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb00
mov eax, dword [0x639354]
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 fcn.00560a80
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 0x599c55
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call fcn.00570c9a
push esi
push str.GetSystemDirectory___Error:__ld_n
push eax
call fcn.004fdba0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055c3a9
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.00460920
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 0x599cca
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call fcn.00570c9a
push esi
push str.CreateFile___Error:__ld_n
push eax
call fcn.004fdba0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055c3a9
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 0x599d28
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call fcn.00570c9a
push esi
push str.IOCTL_STORAGE_GET_DEVICE_NUMBER_Error:__ld_n
push eax
call fcn.004fdba0
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.0055c3a9
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x8e0]
cmp ebx, 0xffffffff
je 0x599fa7
push ebx
push str..PhysicalDrive_d
lea eax, [ebp - 0x90]
push 0x50
push eax
call fcn.0046be40
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 0x599fa7
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 0x599f9f
test byte [ebp - 0x8d4], 1
je 0x599f9f
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 fcn.00560a80
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 0x599f9f
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 0x599f9f
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.0052df50
push 4
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x14]
push 5
push eax
call fcn.00573fca
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.0052df50
push 4
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xc]
push 5
push eax
call fcn.00573fca
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.0052df50
push 0x400
lea eax, [ebp - 0x8a0]
push 0
push eax
call fcn.00560a80
add esp, 0x44
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x5d8e64
lea eax, [ebp - 0x8a0]
push 0x400
push eax
call fcn.0046be40
lea edx, [ebp - 0x8a0]
add esp, 0x18
lea ecx, [edx + 1]
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x599f60
sub edx, ecx
lea eax, [ebp - 0x8a0]
mov ecx, dword [ebp - 0xb00]
push edx
push eax
call fcn.00438630
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.0055c3a9
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.0055c3a9
mov esp, ebp
pop ebp
ret