Function at 0x40a518
Capabilities:
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x432378], edi
je 0x40a651
mov eax, dword [0x42b618]
push 0x68
mov dword [ebp - 0x1c], eax
mov eax, dword [0x42b61c]
push edi
push 0x44acd0
mov dword [ebp - 0x18], eax
call fcn.0040e9b0
add esp, 0xc
mov dword [0x451680], edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov dword [ebp - 4], eax
mov esi, 0x44ad40
or ebx, 0xffffffff
mov eax, dword [ebp - 4]
and dword [esi], 0
and dword [esi + 4], 0
mov ecx, edi
shr eax, cl
test al, 1
je 0x40a633
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 2
je 0x40a595
cmp eax, 3
je 0x40a595
mov dword [esi], ebx
mov dword [esi + 4], ebx
cmp eax, 5
jne 0x40a5b0
mov ecx, dword [0x451680]
inc dword [0x451680]
lea eax, [edi + 1]
mov dword [ecx*4 + 0x44acd0], eax
cmp dword [0x432160], 0x20102
jl 0x40a5fc
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x40a5fc
push str.GetDiskFreeSpaceExW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40a5fc
lea ecx, [ebp - 0x2c]
push 0
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
call eax
test eax, eax
je 0x40a633
mov eax, dword [ebp - 0x24]
mov dword [esi], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 4], eax
jmp 0x40a638
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x40a633
mov eax, dword [ebp - 8]
push 0
mul dword [ebp - 0xc]
push dword [ebp - 0x10]
push edx
push eax
call fcn.0040f6a0
mov dword [esi], eax
mov dword [esi + 4], edx
jmp 0x40a638
mov dword [esi], ebx
mov dword [esi + 4], ebx
inc edi
add esi, 8
inc word [ebp - 0x1c]
cmp esi, 0x44ae10
jl 0x40a566
jmp 0x40a765
mov eax, dword [0x42b4d8]
push 0x68
push edi
push 0x44acd0
mov dword [ebp - 4], eax
call fcn.0040e9b0
add esp, 0xc
mov dword [0x451680], edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov dword [ebp - 0x10], eax
mov esi, 0x44ad40
or ebx, 0xffffffff
mov eax, dword [ebp - 0x10]
and dword [esi], 0
and dword [esi + 4], 0
mov ecx, edi
shr eax, cl
test al, 1
je 0x40a74d
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
je 0x40a6af
cmp eax, 3
je 0x40a6af
mov dword [esi], ebx
mov dword [esi + 4], ebx
cmp eax, 5
jne 0x40a6ca
mov ecx, dword [0x451680]
inc dword [0x451680]
lea eax, [edi + 1]
mov dword [ecx*4 + 0x44acd0], eax
cmp dword [0x432160], 0x20102
jl 0x40a716
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x40a716
push str.GetDiskFreeSpaceExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40a716
lea ecx, [ebp - 0x2c]
push 0
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 4]
push ecx
call eax
test eax, eax
je 0x40a74d
mov eax, dword [ebp - 0x24]
mov dword [esi], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 4], eax
jmp 0x40a752
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x40a74d
mov eax, dword [ebp - 0xc]
push 0
mul dword [ebp - 8]
push dword [ebp - 0x14]
push edx
push eax
call fcn.0040f6a0
mov dword [esi], eax
mov dword [esi + 4], edx
jmp 0x40a752
mov dword [esi], ebx
mov dword [esi + 4], ebx
inc edi
add esi, 8
inc byte [ebp - 4]
cmp esi, 0x44ae10
jl 0x40a680
pop edi
pop esi
pop ebx
leave
ret