Function at 0x40a820
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x844
mov eax, dword [0x444fe0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x80c], 0
mov dword [ebp - 0x830], 0
mov dword [ebp - 0x82c], 0
mov dword [ebp - 0x840], 0
mov dword [ebp - 0x83c], 0
lea eax, [ebp - 0x840]
push eax
lea ecx, [ebp - 0x830]
push ecx
lea edx, [ebp - 0x818]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, 0x44860c
call fcn.00427b50
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0xffffffff
jne 0x40a8ab
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x80c], 0
jmp 0x40a929
cmp dword [ebp - 0x80c], 0
jne 0x40a929
push 0x400
lea ecx, [ebp - 0x808]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00430470
add esp, 0xc
lea eax, [ebp - 0x840]
push eax
lea ecx, [ebp - 0x830]
push ecx
lea edx, [ebp - 0x818]
push edx
lea eax, [ebp - 0x808]
push eax
mov ecx, 0x44860c
call fcn.00427b50
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
jne 0x40a929
mov dword [ebp - 0x830], 0
mov dword [ebp - 0x82c], 0
mov dword [ebp - 0x840], 0
mov dword [ebp - 0x83c], 0
cmp dword [ebp - 0x80c], 0
je 0x40ab08
cmp dword [ebp + 0xc], 0
je 0x40ab08
lea ecx, [ebp - 0x834]
push ecx
lea edx, [ebp - 0x824]
push edx
lea eax, [ebp - 0x81c]
push eax
lea ecx, [ebp - 0x820]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
jne 0x40a9d0
push 0x400
lea eax, [ebp - 0x808]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00430470
add esp, 0xc
push 0x400
lea edx, [ebp - 0x808]
push edx
call fcn.0042c260
add esp, 8
lea eax, [ebp - 0x834]
push eax
lea ecx, [ebp - 0x824]
push ecx
lea edx, [ebp - 0x81c]
push edx
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x808]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
je 0x40aaff
mov edx, dword [ebp - 0x81c]
imul edx, dword [ebp - 0x820]
mov eax, dword [ebp + 0xc]
mov dword [eax], edx
cmp dword [ebp - 0x82c], 0
ja 0x40aa08
cmp dword [ebp - 0x830], 0x80000000
jbe 0x40aafd
call fcn.0042a750
movsx ecx, al
test ecx, ecx
jne 0x40aafd
call fcn.0040a7b0
test eax, eax
je 0x40aa72
lea edx, [ebp - 0x834]
push edx
lea eax, [ebp - 0x824]
push eax
lea ecx, [ebp - 0x81c]
push ecx
lea edx, [ebp - 0x820]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040a6d0
add esp, 0x14
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
je 0x40aa70
cmp dword [ebp + 0xc], 0
je 0x40aa70
mov ecx, dword [ebp - 0x81c]
imul ecx, dword [ebp - 0x820]
mov edx, dword [ebp + 0xc]
mov dword [edx], ecx
jmp 0x40aa7c
mov dword [ebp - 0x80c], 0
cmp dword [ebp - 0x80c], 0
jne 0x40aafd
mov dword [ebp - 0x844], 1
cmp dword [ebp - 0x82c], 2
ja 0x40aaaf
jb 0x40aaa3
cmp dword [ebp - 0x830], 0
jae 0x40aaaf
mov dword [ebp - 0x844], 3
jmp 0x40aacd
cmp dword [ebp - 0x82c], 4
ja 0x40aacd
jb 0x40aac3
cmp dword [ebp - 0x830], 0
jae 0x40aacd
mov dword [ebp - 0x844], 2
mov eax, dword [ebp - 0x820]
mov ecx, dword [ebp - 0x844]
shr eax, cl
mov dword [ebp - 0x820], eax
mov ecx, dword [ebp - 0x81c]
imul ecx, dword [ebp - 0x820]
mov edx, dword [ebp + 0xc]
mov dword [edx], ecx
mov dword [ebp - 0x80c], 1
jmp 0x40ab08
mov eax, dword [ebp + 0xc]
mov dword [eax], 0
cmp dword [ebp - 0x80c], 0
jne 0x40ac6e
push 0
call fcn.0042a330
add esp, 4
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0x4d3
jne 0x40ab40
mov dword [ebp - 0x80c], 0
jmp 0x40ac6e
lea ecx, [ebp - 0x834]
push ecx
lea edx, [ebp - 0x824]
push edx
lea eax, [ebp - 0x81c]
push eax
lea ecx, [ebp - 0x820]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
jne 0x40abd0
push 0x400
lea eax, [ebp - 0x808]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00430470
add esp, 0xc
push 0x400
lea edx, [ebp - 0x808]
push edx
call fcn.0042c260
add esp, 8
lea eax, [ebp - 0x834]
push eax
lea ecx, [ebp - 0x824]
push ecx
lea edx, [ebp - 0x81c]
push edx
lea eax, [ebp - 0x820]
push eax
lea ecx, [ebp - 0x808]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
mov dword [ebp - 0x80c], eax
cmp dword [ebp - 0x80c], 0
je 0x40ac37
cmp dword [ebp + 0xc], 0
je 0x40abf1
mov edx, dword [ebp - 0x81c]
imul edx, dword [ebp - 0x820]
mov eax, dword [ebp + 0xc]
mov dword [eax], edx
mov ecx, dword [ebp - 0x81c]
imul ecx, dword [ebp - 0x820]
imul ecx, dword [ebp - 0x824]
xor edx, edx
mov dword [ebp - 0x840], ecx
mov dword [ebp - 0x83c], edx
mov eax, dword [ebp - 0x81c]
imul eax, dword [ebp - 0x820]
imul eax, dword [ebp - 0x834]
xor ecx, ecx
mov dword [ebp - 0x830], eax
mov dword [ebp - 0x82c], ecx
jmp 0x40ac6e
cmp dword [ebp + 0xc], 0
je 0x40ac46
mov edx, dword [ebp + 0xc]
mov dword [edx], 0
mov dword [ebp - 0x840], 0
mov dword [ebp - 0x83c], 0
mov dword [ebp - 0x830], 0
mov dword [ebp - 0x82c], 0
cmp dword [ebp + 0x10], 0
je 0x40ac88
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x840]
mov dword [eax], ecx
mov edx, dword [ebp - 0x83c]
mov dword [eax + 4], edx
cmp dword [ebp + 0x14], 0
je 0x40aca2
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x830]
mov dword [eax], ecx
mov edx, dword [ebp - 0x82c]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x80c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041919a
mov esp, ebp
pop ebp
ret