Function at 0x487460
Capabilities:
Get disk information

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffed8
mov dword [esp], edx
mov esi, eax
mov eax, dword [esp]
mov ebx, eax
mov eax, dword [ebx + 8]
cmp eax, 0xffffffff
je 0x4878cf
cmp esi, 0x64
jne 0x487504
mov edx, dword [0x4c2488]
mov dword [esp + 4], edx
mov edi, dword [0x4bea48]
mov edi, dword [edi]
imul eax, eax, 0x12c
add edi, eax
mov al, byte [edi + 0x100]
mov byte [esp + 8], al
cmp byte [esp + 8], 0
jne 0x4874df
mov eax, dword [0x4bedb0]
mov cx, 3
mov edx, edi
call fcn.004b81d8
mov eax, dword [0x4bedb0]
push eax
call sub.kernel32.dll_GetDriveTypeA
cmp eax, 2
je 0x4874db
mov eax, edi
call fcn.004873d4
mov ebp, eax
jmp 0x4874ea
xor ebp, ebp
jmp 0x4874ea
mov al, byte [esp + 8]
call fcn.0048740c
mov ebp, eax
mov edx, dword [0x4bea48]
mov edx, dword [edx]
imul eax, dword [ebx + 8], 0x12c
add edx, eax
lea eax, [esp + 0x26]
call fcn.004b81b0
cmp esi, 0x65
jne 0x48752b
mov eax, dword [0x4c248c]
mov dword [esp + 4], eax
lea eax, [esp + 0x26]
push eax
mov eax, dword [ebx + 8]
push eax
push 0x189
mov eax, dword [0x4c248c]
push eax
call sub.user32.dll_SendMessageA
cmp esi, 0x66
jne 0x487578
mov eax, dword [0x4c2490]
mov dword [esp + 4], eax
lea eax, [esp + 0x26]
push eax
mov eax, dword [ebx + 8]
push eax
push 0x189
mov eax, dword [0x4c2490]
push eax
call sub.user32.dll_SendMessageA
lea edx, [esp + 0x26]
mov eax, dword [0x4beb38]
call fcn.004b81b0
mov eax, dword [0x4beb38]
xor edx, edx
call fcn.004b1a60
mov eax, dword [0x4beb38]
call fcn.004873d4
mov ebp, eax
push 0x11
call sub.gdi32.dll_GetStockObject
mov edx, eax
mov cx, word [ebx + 0x24]
sub cx, word [ebx + 0x1c]
sub cx, 0x18
lea eax, [esp + 0x26]
call fcn.004aee8c
test byte [ebx + 0xc], 4
je 0x4875d7
test byte [ebx + 0x10], 0x10
jne 0x4875d7
push 0xff
mov eax, dword [0x4bedb0]
push eax
call sub.user32.dll_GetFocus
push eax
call sub.user32.dll_GetClassNameA
mov eax, dword [0x4be9a8]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [0x4bedb0]
push eax
call sub.kernel32.dll_lstrcmpA
test eax, eax
jne 0x4875d7
xor eax, eax
mov dword [0x4c24d4], eax
test byte [ebx + 0xc], 4
je 0x487637
test byte [ebx + 0x10], 0x10
je 0x487637
cmp dword [0x4c24d4], 0
jbe 0x48762e
mov eax, dword [0x4c24d4]
cmp eax, dword [esp + 4]
je 0x48762e
mov di, 0x64
movsx eax, di
cmp esi, eax
je 0x487627
push 0
push 0
movsx eax, di
push eax
mov eax, dword [0x4be8a8]
movzx eax, byte [eax]
mov eax, dword [eax*4 + 0x4c24c0]
mov eax, dword [eax]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_InvalidateRect
inc edi
cmp di, 0x67
jne 0x4875fb
mov eax, dword [esp + 4]
mov dword [0x4c24d4], eax
test byte [ebx + 0x10], 1
je 0x4876a0
mov eax, dword [0x4c24d4]
cmp eax, dword [esp + 4]
jne 0x487674
push 0xe
call sub.user32.dll_GetSysColor
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_SetTextColor
mov dword [esp + 0xc], eax
push 0xd
call sub.user32.dll_GetSysColor
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_SetBkColor
mov dword [esp + 0x10], eax
jmp 0x4876ca
push 8
call sub.user32.dll_GetSysColor
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_SetTextColor
mov dword [esp + 0xc], eax
mov eax, dword [0x4be678]
mov eax, dword [eax]
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_SetBkColor
mov dword [esp + 0x10], eax
jmp 0x4876ca
push 8
call sub.user32.dll_GetSysColor
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_SetTextColor
mov dword [esp + 0xc], eax
push 5
call sub.user32.dll_GetSysColor
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_SetBkColor
mov dword [esp + 0x10], eax
push 0
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_SetTextAlign
push 0
lea eax, [esp + 0x2a]
call fcn.004b8144
push eax
lea eax, [esp + 0x2e]
push eax
lea eax, [ebx + 0x1c]
push eax
push 6
mov eax, dword [0x4bedec]
mov al, byte [eax]
xor al, 1
and eax, 0x7f
add eax, eax
add eax, dword [ebx + 0x20]
push eax
cmp esi, 0x65
setne al
and eax, 0x7f
mov edx, eax
shl eax, 4
add eax, edx
mov edx, dword [ebx + 0x1c]
inc edx
add eax, edx
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_ExtTextOutA
cmp esi, 0x64
jne 0x48773f
push 3
push 0
push 0
push 0x10
push 0x10
push ebp
mov eax, dword [ebx + 0x20]
push eax
mov eax, dword [ebx + 0x1c]
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.user32.dll_DrawIconEx
cmp esi, 0x65
jne 0x48788c
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x2a]
call fcn.004b8144
push eax
lea eax, [esp + 0x2e]
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_GetTextExtentPoint32A
test eax, eax
je 0x48788c
push 0
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x20]
lea eax, [esp + 0x2e]
xor edx, edx
call fcn.004b1ae4
test al, al
je 0x487855
xor eax, eax
mov dword [esp + 0x14], eax
inc dword [esp + 0x14]
mov eax, dword [ebx + 0x1c]
add eax, dword [esp + 0x1c]
add eax, 6
mov edx, dword [esp + 0x14]
inc edx
shl edx, 4
add eax, edx
cmp eax, dword [ebx + 0x24]
jle 0x487791
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
call fcn.004aa570
mov dword [esp + 0x14], eax
mov ax, word [esp + 0x14]
test ax, ax
jle 0x48788c
mov word [esp + 0x24], ax
mov di, 1
mov eax, dword [0x4beb38]
push eax
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x20]
movsx edx, di
lea eax, [esp + 0x2e]
call fcn.004b1ae4
test al, al
je 0x48784b
cmp byte [esp + 8], 0
jne 0x48780a
mov eax, dword [0x4beb38]
call fcn.004873d4
mov ebp, eax
jmp 0x487815
mov al, byte [esp + 8]
call fcn.0048740c
mov ebp, eax
push 3
push 0
push 0
push 0x10
push 0x10
push ebp
mov eax, dword [ebx + 0x20]
push eax
movsx eax, di
mov edx, dword [esp + 0x30]
sub edx, eax
inc edx
mov eax, edx
shl eax, 4
mov edx, dword [ebx + 0x24]
sub edx, 2
sub edx, eax
push edx
mov eax, dword [ebx + 0x18]
push eax
call sub.user32.dll_DrawIconEx
push ebp
call sub.user32.dll_DestroyIcon
inc edi
dec word [esp + 0x24]
jne 0x4877d6
jmp 0x48788c
push 0xa
mov eax, dword [0x4bf704]
push eax
call sub.user32.dll_LoadIconA
mov ebp, eax
push 3
push 0
push 0
push 0x10
push 0x10
push ebp
mov eax, dword [ebx + 0x20]
push eax
mov eax, dword [ebx + 0x24]
sub eax, 2
sub eax, 0x10
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.user32.dll_DrawIconEx
push ebp
call sub.user32.dll_DestroyIcon
cmp esi, 0x66
jne 0x4878ad
push 3
push 0
push 0
push 0x10
push 0x10
push ebp
mov eax, dword [ebx + 0x20]
push eax
mov eax, dword [ebx + 0x1c]
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.user32.dll_DrawIconEx
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_SetTextColor
mov eax, dword [esp + 0x10]
push eax
mov eax, dword [ebx + 0x18]
push eax
call sub.gdi32.dll_SetBkColor
push ebp
call sub.user32.dll_DestroyIcon
add esp, 0x128
pop ebp
pop edi
pop esi
pop ebx
ret