Function at 0x40a850
Capabilities:
Get disk information

Disassembly:
sub esp, 0x460
mov eax, dword [0x49e280]
xor eax, esp
mov dword [esp + 0x45c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x46c]
push esi
xor esi, esi
push edi
mov dword [esp + 0x18], esi
cmp ebp, esi
jne 0x40a880
xor eax, eax
jmp 0x40ab45
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.CDRomUtl.dll_CDRomUtl_GetTotalCDRomDrives]
add esp, 4
test eax, eax
je 0x40ab30
mov eax, dword [esp + 0x18]
cmp ax, si
je 0x40ab30
cmp ax, 1
jne 0x40a8dd
lea ecx, [esp + 0x14]
push ecx
push 1
call dword [sym.imp.CDRomUtl.dll_CDRomUtl_GetCDRomDrive]
add esp, 8
test eax, eax
je 0x40a879
mov edx, dword [esp + 0x14]
add edx, 0xffffa028
push esi
movzx eax, dx
push eax
push 0x111
push ebp
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x40ab40
push 0x1fe
lea edx, [esp + 0x6e]
xor ecx, ecx
push esi
push edx
mov word [esp + 0x74], cx
call fcn.0045acf0
push 0x36
lea ecx, [esp + 0x42]
xor eax, eax
push esi
push ecx
mov word [esp + 0x48], ax
call fcn.0045acf0
push 0x1fe
lea eax, [esp + 0x286]
xor edx, edx
push esi
push eax
mov word [esp + 0x28c], dx
call fcn.0045acf0
add esp, 0x24
push ebp
call dword [sym.imp.USER32.dll_GetDC]
mov dword [esp + 0x1c], eax
mov dword [0x4a3940], esi
mov dword [0x4a3944], esi
call dword [sym.imp.USER32.dll_CreatePopupMenu]
mov ebx, eax
xor ecx, ecx
xor eax, eax
cmp cx, word [esp + 0x18]
jae 0x40aa8b
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
lea esp, [esp]
lea edx, [esp + 0x14]
lea edi, [eax + 1]
push edx
push edi
call dword [sym.imp.CDRomUtl.dll_CDRomUtl_GetCDRomDrive]
add esp, 8
test eax, eax
je 0x40a879
movzx eax, word [esp + 0x14]
add eax, 0x41
push eax
lea ecx, [esp + 0x34]
push 0x48cfd0
push ecx
call esi
add esp, 0xc
push 0
push 0
push 0
push 0
push 0
push 0x100
lea edx, [esp + 0x280]
push edx
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x40a9ec
lea ecx, [esp + 0x268]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x40a9ec
movzx eax, word [esp + 0x14]
lea edx, [esp + 0x268]
push edx
add eax, 0x41
push eax
lea ecx, [esp + 0x70]
push str.__c:___s
push ecx
call esi
add esp, 0x10
jmp 0x40aa04
movzx edx, word [esp + 0x14]
add edx, 0x41
push edx
lea eax, [esp + 0x6c]
push str.__c:_
push eax
call esi
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x20]
push eax
lea eax, [esp + 0x70]
push eax
push ecx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
test eax, eax
je 0x40aa62
mov edx, dword [0x4a3940]
cmp edx, dword [esp + 0x20]
lea eax, [esp + 0x20]
jl 0x40aa3e
mov eax, 0x4a3940
mov eax, dword [eax]
mov ecx, dword [0x4a3944]
cmp ecx, dword [esp + 0x24]
mov dword [0x4a3940], eax
lea eax, [esp + 0x24]
jl 0x40aa5a
mov eax, 0x4a3944
mov edx, dword [eax]
mov dword [0x4a3944], edx
movzx eax, word [esp + 0x14]
lea ecx, [eax + 2]
push ecx
add eax, 0xa028
push eax
push 0x100
push ebx
call dword [sym.imp.USER32.dll_AppendMenuW]
movzx eax, di
cmp ax, word [esp + 0x18]
jb 0x40a960
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0xb
call edi
mov edx, dword [0x4a3940]
mov esi, dword [0x4a3944]
lea eax, [edx + eax + 0xc]
push 0xc
mov dword [0x4a3940], eax
mov dword [esp + 0x30], esi
call edi
mov dword [esp + 0x28], eax
cmp eax, esi
lea eax, [esp + 0x2c]
jl 0x40aac2
lea eax, [esp + 0x28]
mov edx, dword [esp + 0x1c]
mov ecx, dword [eax]
push edx
add ecx, 8
push ebp
mov dword [0x4a3944], ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.ComFnUtl.dll_ComFnUtl_SetWindowToForeground]
add esp, 4
push 0
mov dword [0x49fcc4], 1
call edi
sub eax, dword [0x4a3940]
push 1
cdq
sub eax, edx
mov esi, eax
sar esi, 1
call edi
sub eax, dword [0x4a3944]
push 0
cdq
push ebp
push 0
sub eax, edx
sar eax, 1
push eax
push esi
push 0
push ebx
call dword [sym.imp.USER32.dll_TrackPopupMenu]
push ebx
call dword [sym.imp.USER32.dll_DestroyMenu]
mov dword [0x49fcc4], 0
jmp 0x40ab40
push esi
push esi
push esi
push 1
push 0x10
call dword [sym.imp.ComFnUtl.dll_ComFnUtl_IssueWindowsAPPCommand]
add esp, 0x14
mov eax, 1
mov ecx, dword [esp + 0x46c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00457c10
add esp, 0x460
ret