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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4b0
push esi
mov esi, dword [ebp + 8]
push edi
push esi
mov edi, ecx
call fcn.0041454c
cmp eax, 9
pop ecx
mov dword [ebp + 8], eax
jne 0x422c48
push 0
push dword [ebp + 0xc]
mov ecx, edi
call fcn.00423207
jmp 0x4230d5
cmp eax, 4
push ebx
jne 0x422cc1
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.00438c34
lea eax, [ebp - 0x130]
push eax
call fcn.00453b00
xor ebx, ebx
add esp, 0x10
cmp eax, ebx
je 0x422c87
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x422c87
mov byte [eax], 0x5c
xor edi, edi
inc edi
push edi
call dword [sym.imp.KERNEL32.DLL_SetErrorMode]
add esi, 9
push esi
call fcn.00401a9c
pop ecx
push eax
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.DLL_SetVolumeLabelA]
test eax, eax
mov eax, 0x45671c
jne 0x422cb7
mov eax, 0x457f24
push edi
push ebx
push 0xffffffffffffffff
push eax
jmp 0x4230c9
mov ecx, dword [0x463c78]
xor edi, edi
inc edi
push edi
xor ebx, ebx
push ebx
push 0xffffffffffffffff
push 0x457f24
call fcn.00401525
mov eax, dword [ebp + 8]
cmp eax, 8
mov esi, dword [0x466148]
mov dword [ebp - 4], esi
ja case.0x422cef.4
jmp dword [eax*4 + 0x4230db]
mov esi, dword [ebp + 0xc]
cmp byte [esi], bl
jne 0x422d09
mov dword [ebp + 8], 0x100
jmp 0x422d9f
push str.CDRom
push esi
call fcn.00441849
test eax, eax
pop ecx
pop ecx
jne 0x422d23
mov dword [ebp + 8], 5
jmp 0x422d9f
push str.Removable
push esi
call fcn.00441849
test eax, eax
pop ecx
pop ecx
jne 0x422d3d
mov dword [ebp + 8], 2
jmp 0x422d9f
push str.Fixed
push esi
call fcn.00441849
test eax, eax
pop ecx
pop ecx
jne 0x422d57
mov dword [ebp + 8], 3
jmp 0x422d9f
push str.Network
push esi
call fcn.00441849
test eax, eax
pop ecx
pop ecx
jne 0x422d71
mov dword [ebp + 8], 4
jmp 0x422d9f
push str.Ramdisk
push esi
call fcn.00441849
test eax, eax
pop ecx
pop ecx
jne 0x422d8b
mov dword [ebp + 8], 6
jmp 0x422d9f
push str.Unknown
push esi
call fcn.00441849
test eax, eax
pop ecx
pop ecx
jne 0x422e16
mov dword [ebp + 8], ebx
push edi
call dword [sym.imp.KERNEL32.DLL_SetErrorMode]
xor esi, esi
mov byte [ebp + 0xf], 0x41
mov al, byte [ebp + 0xf]
mov byte [ebp - 0x1b0], al
lea eax, [ebp - 0x1b0]
push eax
mov byte [ebp - 0x1af], 0x3a
mov byte [ebp - 0x1ae], 0x5c
mov byte [ebp - 0x1ad], bl
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeA]
cmp eax, dword [ebp + 8]
je 0x422de8
cmp dword [ebp + 8], 0x100
jne 0x422df0
cmp eax, edi
je 0x422df0
mov al, byte [ebp + 0xf]
mov byte [ebp + esi - 0x28], al
inc esi
inc byte [ebp + 0xf]
cmp byte [ebp + 0xf], 0x5a
jbe 0x422dac
mov ecx, dword [ebp - 4]
push edi
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x28]
push eax
mov byte [ebp + esi - 0x28], bl
call fcn.00401525
cmp byte [ebp - 0x28], bl
jne case.0x422cef.4
mov eax, edi
jmp 0x4230d4
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.00438c34
lea eax, [ebp - 0x130]
push eax
call fcn.00453b00
add esp, 0x10
cmp eax, ebx
je 0x422e54
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x422e54
mov byte [eax], 0x5c
push edi
call dword [sym.imp.KERNEL32.DLL_SetErrorMode]
mov eax, 0xff
push eax
lea ecx, [ebp - 0x4b0]
push ecx
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp + 0xc]
push ecx
push eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationA]
test eax, eax
je case.0x422cef.0
mov eax, dword [ebp + 8]
dec eax
dec eax
je 0x422ebd
dec eax
je 0x422eb2
dec eax
dec eax
jne case.0x422cef.4
push dword [ebp + 0xc]
mov ecx, esi
call fcn.0040188b
jmp case.0x422cef.4
lea eax, [ebp - 0x230]
jmp 0x4230b4
lea eax, [ebp - 0x4b0]
jmp 0x4230b4
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.00438c34
lea eax, [ebp - 0x130]
push eax
call fcn.00453b00
add esp, 0x10
cmp eax, ebx
je 0x422eff
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x422eff
mov byte [eax], 0x5c
push edi
call dword [sym.imp.KERNEL32.DLL_SetErrorMode]
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeA]
sub eax, ebx
push edi
push ebx
mov ecx, esi
push 0xffffffffffffffff
je 0x422fea
dec eax
dec eax
je 0x422f5f
dec eax
je 0x422f55
dec eax
je 0x422f4b
dec eax
je 0x422f41
dec eax
je 0x422f37
push ebx
jmp 0x4230cf
push str.RAMDisk
jmp 0x4230bb
push str.CDROM
jmp 0x4230bb
push str.Network
jmp 0x4230bb
push str.Fixed
jmp 0x4230bb
push str.Removable
jmp 0x4230bb
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.00438c34
lea eax, [ebp - 0x130]
push eax
call fcn.00453b00
add esp, 0x10
cmp eax, ebx
je 0x422fa0
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x422fa0
mov byte [eax], 0x5c
push edi
call dword [sym.imp.KERNEL32.DLL_SetErrorMode]
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.DLL_GetDiskFreeSpaceA]
test eax, eax
je 0x422fcc
xor eax, eax
jmp 0x422fd2
call dword [sym.imp.KERNEL32.DLL_GetLastError]
sub eax, ebx
push edi
push ebx
push 0xffffffffffffffff
je 0x423012
sub eax, 3
je 0x423008
sub eax, 0x10
mov ecx, esi
je 0x422ffe
dec eax
dec eax
je 0x422ff4
push str.Unknown
jmp 0x4230bb
push str.NotReady
jmp 0x4230bb
push str.ReadOnly
jmp 0x4230bb
push str.Invalid
jmp 0x4230b9
push str.Ready
jmp 0x4230b9
mov eax, dword [ebp + 0xc]
cmp byte [eax], bl
jne 0x42304b
push ebx
push 0x80
lea eax, [ebp - 0x2b0]
push eax
push str.status_cdaudio_mode
call dword [sym.imp.WINMM.dll_mciSendStringA]
test eax, eax
je 0x4230ae
push edi
push ebx
push 0xffffffffffffffff
push ebx
mov ecx, esi
jmp 0x4230cf
push eax
push str.open__s_type_cdaudio_alias_cd_wait_shareable
lea eax, [ebp - 0x3b0]
push 0x100
push eax
call fcn.0040a9c1
mov esi, dword [sym.imp.WINMM.dll_mciSendStringA]
add esp, 0x10
push ebx
push ebx
push ebx
lea eax, [ebp - 0x3b0]
push eax
call esi
test eax, eax
jne 0x4230a1
push ebx
push 0x80
lea eax, [ebp - 0x2b0]
push eax
push str.status_cd_mode
call esi
push ebx
push ebx
push ebx
push str.close_cd_wait
mov dword [ebp + 0xc], eax
call esi
cmp dword [ebp + 0xc], ebx
je 0x4230ab
mov ecx, dword [ebp - 4]
push edi
push ebx
push 0xffffffffffffffff
push ebx
jmp 0x4230cf
mov esi, dword [ebp - 4]
lea eax, [ebp - 0x2b0]
push edi
push ebx
push 0xffffffffffffffff
push eax
mov ecx, esi
call fcn.00401525
push edi
push ebx
push 0xffffffffffffffff
push 0x45671c
mov ecx, dword [0x463c78]
call fcn.00401525
pop ebx
pop edi
pop esi
leave
ret 8