Function at 0x40d33d
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
and byte [ebp - 0x1c], 0
push ebx
push esi
push edi
xor eax, eax
lea edi, [ebp - 0x1b]
stosd dword es:[edi], eax
and byte [ebp - 0x120], 0
push 0x40
stosd dword es:[edi], eax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x11f]
and byte [ebp - 0x224], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x223]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
cmp dword [ebp + 8], eax
je 0x40d561
cmp dword [ebp + 0xc], eax
je 0x40d561
cmp dword [ebp + 8], 0xffffffff
je 0x40d561
cmp dword [0x41264c], eax
je 0x40d561
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov eax, 0x212
push eax
push 8
mov dword [ebp - 8], eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call edi
mov ebx, eax
test ebx, ebx
je 0x40d561
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push ebx
push 1
push dword [ebp + 8]
call dword [0x41264c]
test eax, eax
jne 0x40d555
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x40d555
mov ax, word [ebx]
test ax, ax
je 0x40d555
movzx eax, ax
or dword [ebp - 0x10], 0xffffffff
shr eax, 1
push eax
lea eax, [ebp - 0x120]
push ecx
push eax
call fcn.0040f1cf
add esp, 0xc
push ebx
push 0
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call ebx
and byte [ebp + 0xb], 0
push 0x6a
pop eax
push eax
push 8
mov dword [ebp - 8], eax
call esi
push eax
call edi
push eax
mov dword [ebp - 0xc], eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
test al, al
mov byte [ebp - 1], al
jbe 0x40d537
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0xa
lea eax, [ebp - 0x1c]
push 0
push eax
call fcn.0040f4d4
push 0x104
lea eax, [ebp - 0x224]
push 0
push eax
call fcn.0040f4d4
movzx eax, byte [ebp + 0xb]
add eax, dword [ebp - 0xc]
push 2
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0040f4ac
add esp, 0x24
lea eax, [ebp - 0x224]
push 0x104
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
je 0x40d4d1
lea eax, [ebp - 0x224]
push eax
call edi
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x120]
push eax
call fcn.0040f50d
add esp, 0xc
test eax, eax
je 0x40d4df
add byte [ebp + 0xb], 4
mov al, byte [ebp + 0xb]
cmp al, byte [ebp - 1]
jb 0x40d45d
jmp 0x40d537
lea eax, [ebp - 0x224]
push eax
call edi
lea eax, [ebp + eax - 0x120]
push eax
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x120]
push eax
call edi
mov al, byte [ebp + eax - 0x121]
sub al, 0x5c
neg al
sbb eax, eax
and eax, 0x5c
push eax
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0x403d18
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
and dword [ebp - 0x10], 0
cmp dword [ebp - 0xc], 0
je 0x40d547
push dword [ebp - 0xc]
push 0
call esi
push eax
call ebx
mov eax, dword [ebp - 0x10]
neg eax
sbb eax, eax
not eax
and eax, dword [ebp + 0xc]
jmp 0x40d563
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret