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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb00
mov eax, dword [0x63434c]
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.0055c530
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 0x5956e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call fcn.0056c74a
push esi
push str.GetSystemDirectory___Error:__ld_n
push eax
call fcn.004fcf90
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00557e89
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.00460ce0
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 0x59575a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call fcn.0056c74a
push esi
push str.CreateFile___Error:__ld_n
push eax
call fcn.004fcf90
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00557e89
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 0x5957b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call fcn.0056c74a
push esi
push str.IOCTL_STORAGE_GET_DEVICE_NUMBER_Error:__ld_n
push eax
call fcn.004fcf90
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.00557e89
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x8e0]
cmp ebx, 0xffffffff
je 0x595a37
push ebx
push str..PhysicalDrive_d
lea eax, [ebp - 0x90]
push 0x50
push eax
call fcn.0046c230
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 0x595a37
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 0x595a2f
test byte [ebp - 0x8d4], 1
je 0x595a2f
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.0055c530
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 0x595a2f
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 0x595a2f
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.00528590
push 4
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x14]
push 5
push eax
call fcn.0056fa7a
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.00528590
push 4
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xc]
push 5
push eax
call fcn.0056fa7a
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.00528590
push 0x400
lea eax, [ebp - 0x8a0]
push 0
push eax
call fcn.0055c530
add esp, 0x44
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x5d3bcc
lea eax, [ebp - 0x8a0]
push 0x400
push eax
call fcn.0046c230
lea edx, [ebp - 0x8a0]
add esp, 0x18
lea ecx, [edx + 1]
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x5959f0
sub edx, ecx
lea eax, [ebp - 0x8a0]
mov ecx, dword [ebp - 0xb00]
push edx
push eax
call fcn.004385d0
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.00557e89
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.00557e89
mov esp, ebp
pop ebp
ret