Function at 0x459590
Capabilities:
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa6c
push ebx
push esi
mov ebx, ecx
push edi
mov esi, ebx
mov edi, eax
call fcn.00428c50
mov esi, eax
cmp esi, 9
jne 0x4595c7
mov eax, dword [ebp + 8]
push eax
xor bl, bl
mov eax, edi
call fcn.00459110
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp esi, 4
jne 0x459667
push 0x103
lea ecx, [esp + 0x6c]
push edi
push ecx
call dword [sym.imp.MSVCR100.dll_wcsncpy]
add esp, 0xc
xor edx, edx
lea eax, [esp + 0x68]
mov word [esp + 0x26e], dx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4595f5
sub eax, edx
sar eax, 1
je 0x45961a
cmp word [esp + eax*2 + 0x66], 0x5c
lea eax, [esp + eax*2 + 0x68]
je 0x45961a
mov ecx, 0x5c
mov word [eax], cx
lea ecx, [ebx + 0x12]
lea ecx, [ecx]
movzx eax, word [ecx]
cmp eax, 0x20
je 0x45962d
cmp eax, 9
jne 0x459632
add ecx, 2
jmp 0x459620
push ecx
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_SetVolumeLabelW]
test eax, eax
mov eax, 0x4bbb9c
jne 0x45964c
mov eax, 0x4bf81c
push 1
push 0
push 0xffffffffffffffff
push eax
mov eax, dword [0x4e86f0]
push eax
call fcn.004a2810
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [0x4e7de0]
mov ecx, ebx
mov dword [esp + 0x10], ebx
call fcn.004269a0
cmp esi, 8
ja case.0x459681.4
jmp dword [esi*4 + 0x459acc]
cmp word [edi], 0
jne 0x459695
mov edi, 0x100
jmp 0x459714
mov esi, dword [sym.imp.MSVCR100.dll__wcsicmp]
push str.CDRom
push edi
call esi
add esp, 8
test eax, eax
jne 0x4596af
lea edi, [eax + 5]
jmp 0x459714
push str.Removable
push edi
call esi
add esp, 8
test eax, eax
jne 0x4596c3
lea edi, [eax + 2]
jmp 0x459714
push str.Fixed
push edi
call esi
add esp, 8
test eax, eax
jne 0x4596d7
lea edi, [eax + 3]
jmp 0x459714
push str.Network
push edi
call esi
add esp, 8
test eax, eax
jne 0x4596eb
lea edi, [eax + 4]
jmp 0x459714
push str.Ramdisk
push edi
call esi
add esp, 8
test eax, eax
jne 0x4596ff
lea edi, [eax + 6]
jmp 0x459714
push str.Unknown
push edi
call esi
add esp, 8
test eax, eax
jne case.0x459681.0
xor edi, edi
mov dword [esp + 0xc], 0
mov bl, 0x41
mov edi, edi
movzx esi, bl
lea ecx, [esp + 0x278]
xor eax, eax
push ecx
mov word [esp + 0x27c], si
mov dword [esp + 0x27e], 0x5c003a
mov word [esp + 0x282], ax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, edi
je 0x45975f
cmp edi, 0x100
jne 0x45976d
cmp eax, 1
je 0x45976d
mov eax, dword [esp + 0xc]
mov word [esp + eax*2 + 0x28], si
inc eax
mov dword [esp + 0xc], eax
inc bl
cmp bl, 0x5a
jbe 0x459720
mov eax, dword [esp + 0xc]
push 1
xor edx, edx
push edx
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
mov word [esp + eax*2 + 0x34], dx
mov edx, dword [esp + 0x1c]
push ecx
push edx
call fcn.004a2810
cmp word [esp + 0x28], 0
je case.0x459681.0
jmp case.0x459681.4
push 0x103
lea eax, [esp + 0x6c]
push edi
push eax
call dword [sym.imp.MSVCR100.dll_wcsncpy]
add esp, 0xc
xor ecx, ecx
lea eax, [esp + 0x68]
mov word [esp + 0x26e], cx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4597d0
sub eax, edx
sar eax, 1
je 0x4597f5
cmp word [esp + eax*2 + 0x66], 0x5c
lea eax, [esp + eax*2 + 0x68]
je 0x4597f5
mov edx, 0x5c
mov word [eax], dx
push 0xff
lea eax, [esp + 0x47c]
push eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x20]
push eax
push 0xff
lea ecx, [esp + 0x890]
push ecx
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je case.0x459681.0
mov eax, esi
sub eax, 2
je 0x45986e
dec eax
je 0x45985b
sub eax, 2
jne case.0x459681.4
push 0x18
push eax
mov eax, dword [esp + 0x18]
push eax
mov eax, ebx
call fcn.004010e0
jmp case.0x459681.4
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x884]
push ecx
jmp 0x459a38
lea edx, [esp + 0x478]
jmp 0x459a31
push 0x103
lea eax, [esp + 0x6c]
push edi
push eax
call dword [sym.imp.MSVCR100.dll_wcsncpy]
add esp, 0xc
xor ecx, ecx
lea eax, [esp + 0x68]
mov word [esp + 0x26e], cx
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4598a0
sub eax, edx
sar eax, 1
je 0x4598c5
cmp word [esp + eax*2 + 0x66], 0x5c
lea eax, [esp + eax*2 + 0x68]
je 0x4598c5
mov edx, 0x5c
mov word [eax], dx
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 6
ja case.0x459681.0
jmp dword [eax*4 + 0x459af0]
push 1
push 0
push 0xffffffffffffffff
push str.Unknown
jmp 0x459a38
push 1
push 0
push 0xffffffffffffffff
push str.Removable
jmp 0x459a38
push 1
push 0
push 0xffffffffffffffff
push str.Fixed
jmp 0x459a38
push 1
push 0
push 0xffffffffffffffff
push str.Network
jmp 0x459a38
push 1
push 0
push 0xffffffffffffffff
push str.CDROM
jmp 0x459a38
push 1
push 0
push 0xffffffffffffffff
push str.RAMDisk
jmp 0x459a38
push 0x103
lea ecx, [esp + 0x6c]
push edi
push ecx
call dword [sym.imp.MSVCR100.dll_wcsncpy]
add esp, 0xc
xor edx, edx
lea eax, [esp + 0x68]
mov word [esp + 0x26e], dx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x459965
sub eax, edx
sar eax, 1
je 0x45998a
cmp word [esp + eax*2 + 0x66], 0x5c
lea eax, [esp + eax*2 + 0x68]
je 0x45998a
mov ecx, 0x5c
mov word [eax], cx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x4599b1
xor eax, eax
jmp 0x4599c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x15
ja case.0x4598d9.104
movzx ecx, byte [eax + 0x459b20]
jmp dword [ecx*4 + 0x459b0c]
push 1
push 0
push 0xffffffffffffffff
push str.Ready
jmp 0x459a38
push 1
push 0
push 0xffffffffffffffff
push str.Invalid
jmp 0x459a38
push 1
push 0
push 0xffffffffffffffff
push str.NotReady
jmp 0x459a38
push 1
push 0
push 0xffffffffffffffff
push str.ReadOnly
jmp 0x459a38
cmp word [edi], 0
jne 0x459a5d
push 0
push 0x80
lea edx, [esp + 0x380]
push edx
push str.status_cdaudio_mode
call dword [sym.imp.WINMM.dll_mciSendStringW]
test eax, eax
jne case.0x459681.0
lea edx, [esp + 0x378]
push 1
push 0
push 0xffffffffffffffff
push edx
push ebx
call fcn.004a2810
mov eax, dword [0x4e86f0]
push 1
push 0
push 0xffffffffffffffff
push 0x4bbb9c
push eax
call fcn.004a2810
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push edi
push str.open__s_type_cdaudio_alias_cd_wait_shareable
mov esi, 0x100
lea edi, [esp + 0x680]
call fcn.0049e5c0
mov esi, dword [sym.imp.WINMM.dll_mciSendStringW]
add esp, 8
push 0
push 0
push 0
mov eax, edi
push eax
call esi
test eax, eax
jne case.0x459681.0
push eax
push 0x80
lea ecx, [esp + 0x380]
push ecx
push str.status_cd_mode
call esi
push 0
push 0
push 0
push str.close_cd_wait
mov edi, eax
call esi
test edi, edi
je 0x459a2a
mov edi, dword [ebp + 8]
call fcn.0044b7c0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4