Function at 0x422ca2
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.00416297
cmp eax, 9
pop ecx
mov dword [ebp + 8], eax
jne 0x422cd2
push 0
push dword [ebp + 0xc]
mov ecx, edi
call fcn.00423294
jmp 0x423162
cmp eax, 4
push ebx
jne 0x422d4b
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.004392af
lea eax, [ebp - 0x130]
push eax
call fcn.00457520
xor ebx, ebx
add esp, 0x10
cmp eax, ebx
je 0x422d11
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x422d11
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.00401ed8
pop ecx
push eax
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_SetVolumeLabelA]
test eax, eax
mov eax, 0x459724
jne 0x422d41
mov eax, 0x45af3c
push edi
push ebx
push 0xffffffffffffffff
push eax
jmp 0x423156
mov ecx, dword [0x466b78]
xor edi, edi
inc edi
push edi
xor ebx, ebx
push ebx
push 0xffffffffffffffff
push 0x45af3c
call fcn.0040187e
mov eax, dword [ebp + 8]
cmp eax, 8
mov esi, dword [0x4694f8]
mov dword [ebp - 4], esi
ja case.0x422d79.4
jmp dword [eax*4 + 0x423168]
mov esi, dword [ebp + 0xc]
cmp byte [esi], bl
jne 0x422d93
mov dword [ebp + 8], pe_nt_image_headers32
jmp 0x422e29
push str.CDRom
push esi
call fcn.00441ec1
test eax, eax
pop ecx
pop ecx
jne 0x422dad
mov dword [ebp + 8], 5
jmp 0x422e29
push str.Removable
push esi
call fcn.00441ec1
test eax, eax
pop ecx
pop ecx
jne 0x422dc7
mov dword [ebp + 8], 2
jmp 0x422e29
push str.Fixed
push esi
call fcn.00441ec1
test eax, eax
pop ecx
pop ecx
jne 0x422de1
mov dword [ebp + 8], 3
jmp 0x422e29
push str.Network
push esi
call fcn.00441ec1
test eax, eax
pop ecx
pop ecx
jne 0x422dfb
mov dword [ebp + 8], 4
jmp 0x422e29
push str.Ramdisk
push esi
call fcn.00441ec1
test eax, eax
pop ecx
pop ecx
jne 0x422e15
mov dword [ebp + 8], 6
jmp 0x422e29
push str.Unknown
push esi
call fcn.00441ec1
test eax, eax
pop ecx
pop ecx
jne 0x422ea0
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 0x422e72
cmp dword [ebp + 8], 0x100
jne 0x422e7a
cmp eax, edi
je 0x422e7a
mov al, byte [ebp + 0xf]
mov byte [ebp + esi - 0x28], al
inc esi
inc byte [ebp + 0xf]
cmp byte [ebp + 0xf], 0x5a
jbe 0x422e36
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.0040187e
cmp byte [ebp - 0x28], bl
jne case.0x422d79.4
mov eax, edi
jmp 0x423161
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.004392af
lea eax, [ebp - 0x130]
push eax
call fcn.00457520
add esp, 0x10
cmp eax, ebx
je 0x422ede
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x422ede
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.0x422d79.0
mov eax, dword [ebp + 8]
dec eax
dec eax
je 0x422f4a
dec eax
je 0x422f3f
dec eax
dec eax
jne case.0x422d79.4
push 0x18
push ebx
push dword [ebp + 0xc]
mov ecx, esi
call fcn.00401c4f
jmp case.0x422d79.4
lea eax, [ebp - 0x230]
jmp 0x423141
lea eax, [ebp - 0x4b0]
jmp 0x423141
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.004392af
lea eax, [ebp - 0x130]
push eax
call fcn.00457520
add esp, 0x10
cmp eax, ebx
je 0x422f8c
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x422f8c
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 0x423077
dec eax
dec eax
je 0x422fec
dec eax
je 0x422fe2
dec eax
je 0x422fd8
dec eax
je 0x422fce
dec eax
je 0x422fc4
push ebx
jmp 0x42315c
push str.RAMDisk
jmp 0x423148
push str.CDROM
jmp 0x423148
push str.Network
jmp 0x423148
push str.Fixed
jmp 0x423148
push str.Removable
jmp 0x423148
push 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x130]
push eax
call fcn.004392af
lea eax, [ebp - 0x130]
push eax
call fcn.00457520
add esp, 0x10
cmp eax, ebx
je 0x42302d
lea eax, [ebp + eax - 0x130]
cmp byte [eax - 1], 0x5c
je 0x42302d
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 0x423059
xor eax, eax
jmp 0x42305f
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, ebx
push edi
push ebx
push 0xffffffffffffffff
je 0x42309f
sub eax, 3
je 0x423095
sub eax, 0x10
mov ecx, esi
je 0x42308b
dec eax
dec eax
je 0x423081
push str.Unknown
jmp 0x423148
push str.NotReady
jmp 0x423148
push str.ReadOnly
jmp 0x423148
push str.Invalid
jmp 0x423146
push str.Ready
jmp 0x423146
mov eax, dword [ebp + 0xc]
cmp byte [eax], bl
jne 0x4230d8
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 0x42313b
push edi
push ebx
push 0xffffffffffffffff
push ebx
mov ecx, esi
jmp 0x42315c
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.0040a513
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 0x42312e
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 0x423138
mov ecx, dword [ebp - 4]
push edi
push ebx
push 0xffffffffffffffff
push ebx
jmp 0x42315c
mov esi, dword [ebp - 4]
lea eax, [ebp - 0x2b0]
push edi
push ebx
push 0xffffffffffffffff
push eax
mov ecx, esi
call fcn.0040187e
push edi
push ebx
push 0xffffffffffffffff
push 0x459724
mov ecx, dword [0x466b78]
call fcn.0040187e
pop ebx
pop edi
pop esi
leave
ret 8