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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4b8
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, eax
call fcn.00415e71
mov edi, eax
cmp edi, 9
mov dword [ebp - 8], edi
jne 0x42246d
push 0
mov eax, esi
call fcn.004229ef
jmp 0x4228bb
cmp edi, 4
push ebx
jne 0x4224e8
push esi
mov eax, 0x104
lea edi, [ebp - 0x138]
call fcn.00438a10
mov eax, edi
push eax
call sub.MSVCR71.dll_strlen
xor ebx, ebx
cmp eax, ebx
pop ecx
pop ecx
je 0x4224a4
lea eax, [ebp + eax - 0x138]
cmp byte [eax - 1], 0x5c
je 0x4224a4
mov byte [eax], 0x5c
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov eax, dword [ebp + 0xc]
add eax, 9
mov cl, byte [eax]
cmp cl, 0x20
je 0x4224be
cmp cl, 9
jne 0x4224c1
inc eax
jmp 0x4224b2
push eax
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_SetVolumeLabelA]
test eax, eax
mov eax, 0x452954
jne 0x4224dd
mov eax, 0x454094
push 1
push ebx
push 0xffffffffffffffff
push eax
jmp 0x4228af
mov ecx, dword [0x45e2f0]
push 1
xor ebx, ebx
push ebx
push 0xffffffffffffffff
push 0x454094
call fcn.0040161c
cmp edi, 8
mov ecx, dword [0x45d970]
mov dword [ebp - 4], ecx
ja case.0x422511.4
jmp dword [edi*4 + 0x4228c1]
push 1
push ebx
push 0xffffffffffffffff
jmp 0x422731
cmp byte [esi], bl
jne 0x42252d
mov edi, 0x100
jmp 0x42259e
mov edi, dword [sym.imp.MSVCR71.dll__stricmp]
push str.CDRom
push esi
call edi
test eax, eax
pop ecx
pop ecx
jne 0x422546
push 5
pop edi
jmp 0x42259e
push str.Removable
push esi
call edi
test eax, eax
pop ecx
pop ecx
jne 0x422558
push 2
jmp 0x422543
push str.Fixed
push esi
call edi
test eax, eax
pop ecx
pop ecx
jne 0x42256a
push 3
jmp 0x422543
push str.Network
push esi
call edi
test eax, eax
pop ecx
pop ecx
jne 0x42257c
push 4
jmp 0x422543
push str.Ramdisk
push esi
call edi
test eax, eax
pop ecx
pop ecx
jne 0x42258e
push 6
jmp 0x422543
push str.Unknown
push esi
call edi
test eax, eax
pop ecx
pop ecx
jne 0x422616
xor edi, edi
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
xor esi, esi
mov byte [ebp + 0xf], 0x41
mov al, byte [ebp + 0xf]
mov byte [ebp - 0x1b8], al
lea eax, [ebp - 0x1b8]
push eax
mov byte [ebp - 0x1b7], 0x3a
mov byte [ebp - 0x1b6], 0x5c
mov byte [ebp - 0x1b5], bl
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, edi
je 0x4225e7
cmp edi, 0x100
jne 0x4225ef
cmp eax, 1
je 0x4225ef
mov al, byte [ebp + 0xf]
mov byte [ebp + esi - 0x30], al
inc esi
inc byte [ebp + 0xf]
cmp byte [ebp + 0xf], 0x5a
jbe 0x4225ac
mov ecx, dword [ebp - 4]
push 1
push ebx
push 0xffffffffffffffff
lea eax, [ebp - 0x30]
push eax
mov byte [ebp + esi - 0x30], bl
call fcn.0040161c
cmp byte [ebp - 0x30], bl
jne case.0x422511.4
xor eax, eax
inc eax
jmp 0x4228ba
push esi
mov eax, 0x104
lea edi, [ebp - 0x138]
call fcn.00438a10
mov eax, edi
push eax
call sub.MSVCR71.dll_strlen
cmp eax, ebx
pop ecx
pop ecx
je 0x42264d
lea eax, [ebp + eax - 0x138]
cmp byte [eax - 1], 0x5c
je 0x42264d
mov byte [eax], 0x5c
xor esi, esi
inc esi
push esi
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov eax, 0xff
push eax
lea ecx, [ebp - 0x3b8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp + 0xc]
push ecx
push eax
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x42268f
push esi
jmp 0x422888
mov eax, dword [ebp - 8]
dec eax
dec eax
je 0x4226c0
dec eax
je 0x4226b4
dec eax
dec eax
jne case.0x422511.4
mov eax, dword [ebp - 4]
push 0x18
push ebx
push dword [ebp + 0xc]
call fcn.004019da
jmp case.0x422511.4
push esi
lea eax, [ebp - 0x238]
jmp 0x422899
push esi
lea eax, [ebp - 0x3b8]
jmp 0x422899
push esi
mov eax, 0x104
lea edi, [ebp - 0x138]
call fcn.00438a10
mov eax, edi
push eax
call sub.MSVCR71.dll_strlen
cmp eax, ebx
pop ecx
pop ecx
je 0x4226fb
lea eax, [ebp + eax - 0x138]
cmp byte [eax - 1], 0x5c
je 0x4226fb
mov byte [eax], 0x5c
xor esi, esi
inc esi
push esi
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
sub eax, ebx
mov ecx, dword [ebp - 4]
push esi
push ebx
push 0xffffffffffffffff
je 0x4227e6
dec eax
dec eax
je 0x42275f
dec eax
je 0x422755
dec eax
je 0x42274b
dec eax
je 0x422741
dec eax
je 0x422737
push ebx
jmp 0x4228b5
push str.RAMDisk
jmp 0x4228a0
push str.CDROM
jmp 0x4228a0
push str.Network
jmp 0x4228a0
push str.Fixed
jmp 0x4228a0
push str.Removable
jmp 0x4228a0
push esi
mov eax, 0x104
lea edi, [ebp - 0x138]
call fcn.00438a10
mov eax, edi
push eax
call sub.MSVCR71.dll_strlen
cmp eax, ebx
pop ecx
pop ecx
je 0x422798
lea eax, [ebp + eax - 0x138]
cmp byte [eax - 1], 0x5c
je 0x422798
mov byte [eax], 0x5c
xor esi, esi
inc esi
push esi
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x4227c7
xor eax, eax
jmp 0x4227cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, ebx
push esi
push ebx
push 0xffffffffffffffff
je 0x42280e
sub eax, 3
je 0x422804
sub eax, 0x10
mov ecx, dword [ebp - 4]
je 0x4227fa
dec eax
dec eax
je 0x4227f0
push str.Unknown
jmp 0x4228a0
push str.NotReady
jmp 0x4228a0
push str.ReadOnly
jmp 0x4228a0
push str.Invalid
jmp 0x42289d
push str.Ready
jmp 0x42289d
cmp byte [esi], bl
jne 0x422838
push ebx
push 0x80
lea eax, [ebp - 0x2b8]
push eax
push str.status_cdaudio_mode
call dword [sym.imp.WINMM.dll_mciSendStringA]
test eax, eax
jmp 0x422884
push esi
push str.open__s_type_cdaudio_alias_cd_wait_shareable
mov esi, 0x100
lea edi, [ebp - 0x4b8]
call fcn.0040a3cc
mov esi, dword [sym.imp.WINMM.dll_mciSendStringA]
pop ecx
pop ecx
push ebx
push ebx
push ebx
mov eax, edi
push eax
call esi
test eax, eax
jne 0x422886
push ebx
push 0x80
lea eax, [ebp - 0x2b8]
push eax
push str.status_cd_mode
call esi
push ebx
push ebx
push ebx
push str.close_cd_wait
mov edi, eax
call esi
cmp edi, ebx
je 0x422891
push 1
mov ecx, dword [ebp - 4]
push ebx
push 0xffffffffffffffff
push ebx
jmp 0x4228b5
push 1
lea eax, [ebp - 0x2b8]
push ebx
push 0xffffffffffffffff
push eax
mov ecx, dword [ebp - 4]
call fcn.0040161c
push 1
push ebx
push 0xffffffffffffffff
push 0x452954
mov ecx, dword [0x45e2f0]
call fcn.0040161c
pop ebx
pop edi
pop esi
leave
ret 8