Function at 0x4226e5
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.00414671
cmp eax, 9
pop ecx
mov dword [ebp + 8], eax
jne 0x422715
push 0
push dword [ebp + 0xc]
mov ecx, edi
call fcn.00422cd4
jmp 0x422ba2
cmp eax, 4
push ebx
jne 0x42278e
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.0043880f
lea eax, [ebp - 0x130]
push eax
call fcn.00454880
xor ebx, ebx
add esp, 0x10
cmp eax, ebx
je 0x422754
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x422754
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.00401aa2
pop ecx
push eax
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.DLL_SetVolumeLabelA]
test eax, eax
mov eax, 0x45771c
jne 0x422784
mov eax, 0x458f24
push edi
push ebx
push 0xffffffffffffffff
push eax
jmp 0x422b96
mov ecx, dword [0x464c98]
xor edi, edi
inc edi
push edi
xor ebx, ebx
push ebx
push 0xffffffffffffffff
push 0x458f24
call fcn.0040152b
mov eax, dword [ebp + 8]
cmp eax, 8
mov esi, dword [0x467168]
mov dword [ebp - 4], esi
ja case.0x4227bc.4
jmp dword [eax*4 + 0x422ba8]
mov esi, dword [ebp + 0xc]
cmp byte [esi], bl
jne 0x4227d6
mov dword [ebp + 8], pe_nt_image_headers32
jmp 0x42286c
push str.CDRom
push esi
call fcn.00441439
test eax, eax
pop ecx
pop ecx
jne 0x4227f0
mov dword [ebp + 8], 5
jmp 0x42286c
push str.Removable
push esi
call fcn.00441439
test eax, eax
pop ecx
pop ecx
jne 0x42280a
mov dword [ebp + 8], 2
jmp 0x42286c
push str.Fixed
push esi
call fcn.00441439
test eax, eax
pop ecx
pop ecx
jne 0x422824
mov dword [ebp + 8], 3
jmp 0x42286c
push str.Network
push esi
call fcn.00441439
test eax, eax
pop ecx
pop ecx
jne 0x42283e
mov dword [ebp + 8], 4
jmp 0x42286c
push str.Ramdisk
push esi
call fcn.00441439
test eax, eax
pop ecx
pop ecx
jne 0x422858
mov dword [ebp + 8], 6
jmp 0x42286c
push str.Unknown
push esi
call fcn.00441439
test eax, eax
pop ecx
pop ecx
jne 0x4228e3
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 0x4228b5
cmp dword [ebp + 8], 0x100
jne 0x4228bd
cmp eax, edi
je 0x4228bd
mov al, byte [ebp + 0xf]
mov byte [ebp + esi - 0x28], al
inc esi
inc byte [ebp + 0xf]
cmp byte [ebp + 0xf], 0x5a
jbe 0x422879
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.0040152b
cmp byte [ebp - 0x28], bl
jne case.0x4227bc.4
mov eax, edi
jmp 0x422ba1
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.0043880f
lea eax, [ebp - 0x130]
push eax
call fcn.00454880
add esp, 0x10
cmp eax, ebx
je 0x422921
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x422921
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.0x4227bc.0
mov eax, dword [ebp + 8]
dec eax
dec eax
je 0x42298a
dec eax
je 0x42297f
dec eax
dec eax
jne case.0x4227bc.4
push dword [ebp + 0xc]
mov ecx, esi
call fcn.00401891
jmp case.0x4227bc.4
lea eax, [ebp - 0x230]
jmp 0x422b81
lea eax, [ebp - 0x4b0]
jmp 0x422b81
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.0043880f
lea eax, [ebp - 0x130]
push eax
call fcn.00454880
add esp, 0x10
cmp eax, ebx
je 0x4229cc
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x4229cc
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 0x422ab7
dec eax
dec eax
je 0x422a2c
dec eax
je 0x422a22
dec eax
je 0x422a18
dec eax
je 0x422a0e
dec eax
je 0x422a04
push ebx
jmp 0x422b9c
push str.RAMDisk
jmp 0x422b88
push str.CDROM
jmp 0x422b88
push str.Network
jmp 0x422b88
push str.Fixed
jmp 0x422b88
push str.Removable
jmp 0x422b88
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.0043880f
lea eax, [ebp - 0x130]
push eax
call fcn.00454880
add esp, 0x10
cmp eax, ebx
je 0x422a6d
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x422a6d
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 0x422a99
xor eax, eax
jmp 0x422a9f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
sub eax, ebx
push edi
push ebx
push 0xffffffffffffffff
je 0x422adf
sub eax, 3
je 0x422ad5
sub eax, 0x10
mov ecx, esi
je 0x422acb
dec eax
dec eax
je 0x422ac1
push str.Unknown
jmp 0x422b88
push str.NotReady
jmp 0x422b88
push str.ReadOnly
jmp 0x422b88
push str.Invalid
jmp 0x422b86
push str.Ready
jmp 0x422b86
mov eax, dword [ebp + 0xc]
cmp byte [eax], bl
jne 0x422b18
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 0x422b7b
push edi
push ebx
push 0xffffffffffffffff
push ebx
mov ecx, esi
jmp 0x422b9c
push eax
push str.open__s_type_cdaudio_alias_cd_wait_shareable
lea eax, [ebp - 0x3b0]
push pe_nt_image_headers32
push eax
call fcn.0040aa6c
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 0x422b6e
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 0x422b78
mov ecx, dword [ebp - 4]
push edi
push ebx
push 0xffffffffffffffff
push ebx
jmp 0x422b9c
mov esi, dword [ebp - 4]
lea eax, [ebp - 0x2b0]
push edi
push ebx
push 0xffffffffffffffff
push eax
mov ecx, esi
call fcn.0040152b
push edi
push ebx
push 0xffffffffffffffff
push 0x45771c
mov ecx, dword [0x464c98]
call fcn.0040152b
pop ebx
pop edi
pop esi
leave
ret 8