Function at 0x40bed0
Capabilities:
Get disk size

Disassembly:
sub esp, 0x38
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x40befc
mov eax, dword [ebp]
call dword [eax + 4]
test eax, eax
mov dword [ebp + 0x10], eax
jne 0x40befc
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
add esp, 0x38
ret 8
mov edi, dword [esp + 0x4c]
push 0
lea edx, [esp + 0x30]
push 0
mov cl, byte [edi]
lea eax, [esp + 0x30]
mov byte [esp + 0x38], cl
push edx
lea ecx, [esp + 0x3c]
mov bl, 0x3a
push eax
push ecx
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x4c], 0
mov byte [esp + 0x45], bl
mov byte [esp + 0x46], 0
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x40bf4e
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 8
mov esi, dword [esp + 0x28]
lea edx, [esp + 0x10]
imul esi, dword [esp + 0x2c]
lea eax, [esp + 0x20]
push edx
push eax
push esi
push edi
mov ecx, ebp
call fcn.0040bad0
test eax, eax
mov dword [esp + 0x24], eax
jne 0x40bf81
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
pop ebx
add esp, 0x38
ret 8
mov cl, byte [edi]
push 0
push 0
push 3
push 0
push 3
lea edx, [esp + 0x44]
mov al, 0x5c
push SysReAllocStringLen
push edx
mov byte [esp + 0x4c], al
mov byte [esp + 0x4d], al
mov byte [esp + 0x4e], 0x2e
mov byte [esp + 0x4f], al
mov byte [esp + 0x50], cl
mov byte [esp + 0x51], bl
mov byte [esp + 0x52], 0
call dword [ebp + 4]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40c107
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x200
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov edi, eax
lea eax, [esp + 0x18]
push 0
push eax
push 0x200
push edi
push ebx
call dword [ebp + 8]
cmp dword [edi + 3], 0x5346544e
je 0x40c01a
xor eax, eax
xor ecx, ecx
mov al, byte [edi + 0x10]
mov cx, word [edi + 0xe]
imul eax, dword [edi + 0x24]
xor edx, edx
add eax, ecx
mov dx, word [edi + 0xb]
imul eax, edx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x50]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push eax
call dword [ebp + 4]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x40c107
push esi
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [esp + 0x50], eax
test eax, eax
je 0x40c111
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], 0
test ecx, ecx
jbe 0x40c103
mov edi, dword [esp + 0x24]
mov ecx, dword [edi + 4]
mov edx, dword [edi]
xor eax, eax
push eax
push esi
push ecx
push edx
call fcn.0042a570
mov ecx, dword [esp + 0x38]
add eax, ecx
mov ecx, 0
adc edx, ecx
push ecx
lea ecx, [esp + 0x48]
mov dword [esp + 0x44], eax
push ecx
push eax
push ebx
mov dword [esp + 0x54], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x50]
lea edx, [esp + 0x18]
push 0
push edx
push esi
push eax
push ebx
call dword [ebp + 8]
mov eax, dword [esp + 0x10]
cmp eax, esi
mov dword [esp + 0x4c], eax
jb 0x40c0c0
mov dword [esp + 0x4c], esi
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
lea ecx, [esp + 0x18]
push 0
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push eax
push ecx
call dword [ebp + 0xc]
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
sub ecx, edx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x20]
inc eax
add edi, 8
cmp eax, ecx
mov dword [esp + 0x1c], eax
jb 0x40c06c
mov eax, dword [esp + 0x50]
xor edi, edi
jmp 0x40c116
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x40c124
mov edi, 0x7a
test eax, eax
je 0x40c124
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.MSVCRT.dll_free]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
cmp ebx, 0xffffffff
je 0x40c140
push ebx
call esi
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x40c14c
push eax
call esi
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 8