Function at 0x404f8f
Capabilities:
Get disk size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x6068
call fcn.00405a40
mov eax, dword [0x40f070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov ebx, 0x2000
push ebx
mov dword [ebp - 0x6020], eax
lea eax, [ebp - 0x6004]
push 0
push eax
mov dword [ebp - 0x6018], 1
call sub.msvcrt.dll_memset
push ebx
lea eax, [ebp - 0x2004]
push 0
push eax
call sub.msvcrt.dll_memset
and dword [esi], 0
mov eax, dword [ebp - 0x6020]
mov ecx, dword [eax + 8]
mov dword [esi + 8], ecx
mov ecx, dword [eax + 0xc]
and dword [esi + 0x18], 0
add esp, 0x18
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], 6
mov dword [esi + 0x14], 0x6018
cmp dword [edi + 0xc], 1
jne 0x40502d
lea ecx, [ebp - 0x6004]
push ecx
push eax
push edi
call fcn.00403bf7
test eax, eax
je 0x405578
cmp dword [edi + 0xc], 3
jne 0x40504e
lea eax, [ebp - 0x6004]
push eax
push dword [ebp - 0x6020]
push edi
call fcn.00403c20
test eax, eax
je 0x405578
cmp dword [edi + 0xc], 4
jne 0x40506f
lea eax, [ebp - 0x6004]
push eax
push dword [ebp - 0x6020]
push edi
call fcn.00403bce
test eax, eax
je 0x405578
push dword [edi + 0x10]
add edi, 0x14
lea eax, [ebp - 0x6004]
push edi
push eax
call sub.msvcrt.dll_memcpy
mov edi, dword [sym.imp.msvcrt.dll__wcslwr]
lea eax, [ebp - 0x6004]
push eax
call edi
push str.DeviceGWDiskGWDisk
call edi
lea eax, [ebp - 0x6004]
push str.DeviceGWDiskGWDisk
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
add esp, 0x1c
test eax, eax
je 0x405234
lea eax, [ebp - 0x603c]
push eax
lea eax, [ebp - 0x6034]
push eax
lea eax, [ebp - 0x600c]
push eax
lea eax, [ebp - 0x6008]
push eax
mov edi, 0x40f030
push edi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
lea eax, [ebp - 0x6050]
push eax
lea eax, [ebp - 0x6030]
push eax
lea eax, [ebp - 0x6048]
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
call edi
lea eax, [ebp - 0x6028]
push eax
lea eax, [ebp - 0x6058]
push eax
lea eax, [ebp - 0x6014]
push eax
push 0x40f050
call edi
xor edi, edi
cmp dword [ebp - 0x6008], edi
je 0x40520e
cmp dword [ebp - 0x600c], edi
je 0x40520e
push edi
push dword [ebp - 0x600c]
xor ebx, ebx
push dword [ebp - 0x602c]
push dword [ebp - 0x6030]
call fcn.00405b10
push ebx
push dword [ebp - 0x6008]
push edx
push eax
call fcn.00405b10
mov ecx, dword [ebp - 0x6044]
cmp ecx, dword [ebp - 0x6010]
mov dword [ebp - 0x6038], eax
mov dword [ebp - 0x6034], edx
ja 0x405183
mov eax, dword [ebp - 0x6048]
jb 0x40518f
cmp eax, dword [ebp - 0x6014]
jb 0x40518f
mov eax, dword [ebp - 0x6014]
mov ecx, dword [ebp - 0x6010]
push edi
push dword [ebp - 0x600c]
push ecx
push eax
call fcn.00405b10
push ebx
push dword [ebp - 0x6008]
push edx
push eax
call fcn.00405b10
mov ecx, dword [ebp - 0x604c]
cmp ecx, dword [ebp - 0x6024]
mov dword [ebp - 0x6040], eax
mov dword [ebp - 0x603c], edx
ja 0x4051d5
mov eax, dword [ebp - 0x6050]
jb 0x4051e1
cmp eax, dword [ebp - 0x6028]
jb 0x4051e1
mov eax, dword [ebp - 0x6028]
mov ecx, dword [ebp - 0x6024]
push edi
push dword [ebp - 0x600c]
push ecx
push eax
call fcn.00405b10
push ebx
push dword [ebp - 0x6008]
push edx
push eax
call fcn.00405b10
mov dword [ebp - 0x6014], eax
mov dword [ebp - 0x6010], edx
jmp 0x4054c2
push dword [ebp - 0x600c]
push dword [ebp - 0x6008]
push 0x401b1c
push 4
call fcn.00402bda
add esp, 0x10
mov dword [ebp - 0x6018], edi
jmp 0x4054c2
push ebx
xor ebx, ebx
lea eax, [ebp - 0x4004]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x2004]
push eax
lea eax, [ebp - 0x6004]
push eax
call fcn.004031c0
test eax, eax
je 0x4054bc
lea eax, [ebp - 0x2004]
push eax
lea eax, [ebp - 0x4004]
push 0x1000
push eax
call fcn.00406065
lea eax, [ebp - 0x4004]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
mov word [eax + 2], bx
add esp, 0x14
lea eax, [ebp - 0x6034]
push eax
lea eax, [ebp - 0x603c]
push eax
lea eax, [ebp - 0x600c]
push eax
lea eax, [ebp - 0x6008]
push eax
lea eax, [ebp - 0x4004]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
mov edi, dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
lea eax, [ebp - 0x6060]
push eax
lea eax, [ebp - 0x6050]
push eax
lea eax, [ebp - 0x6048]
push eax
lea eax, [ebp - 0x2004]
push eax
call edi
lea eax, [ebp - 0x6014]
push eax
lea eax, [ebp - 0x6058]
push eax
lea eax, [ebp - 0x601c]
push eax
push 0x40f030
call edi
lea eax, [ebp - 0x6030]
push eax
lea eax, [ebp - 0x6068]
push eax
lea eax, [ebp - 0x6028]
push eax
push 0x40f050
call edi
cmp dword [ebp - 0x6008], ebx
je 0x4054a1
cmp dword [ebp - 0x600c], ebx
je 0x4054a1
xor eax, eax
push eax
push dword [ebp - 0x600c]
mov dword [ebp - 0x6054], ebx
push dword [ebp - 0x604c]
push dword [ebp - 0x6050]
call fcn.00405b10
push ebx
push dword [ebp - 0x6008]
push edx
push eax
call fcn.00405b10
mov ecx, dword [ebp - 0x6044]
mov ebx, dword [ebp - 0x6018]
cmp ecx, ebx
mov edi, dword [ebp - 0x6048]
mov dword [ebp - 0x6038], eax
mov dword [ebp - 0x6034], edx
ja 0x40538d
jb 0x405387
cmp edi, dword [ebp - 0x601c]
jae 0x40538d
mov eax, edi
mov edx, ecx
jmp 0x405395
mov eax, dword [ebp - 0x601c]
mov edx, ebx
cmp dword [ebp - 0x6024], edx
ja 0x4053b5
jb 0x4053a7
cmp dword [ebp - 0x6028], eax
jae 0x4053b5
mov eax, dword [ebp - 0x6028]
mov ecx, dword [ebp - 0x6024]
jmp 0x4053cf
cmp ecx, ebx
ja 0x4053c7
jb 0x4053c3
cmp edi, dword [ebp - 0x601c]
jae 0x4053c7
mov eax, edi
jmp 0x4053cf
mov eax, dword [ebp - 0x601c]
mov ecx, ebx
xor edx, edx
push edx
push dword [ebp - 0x600c]
push ecx
push eax
call fcn.00405b10
push dword [ebp - 0x6054]
push dword [ebp - 0x6008]
push edx
push eax
call fcn.00405b10
mov ecx, dword [ebp - 0x605c]
mov ebx, dword [ebp - 0x6010]
cmp ecx, ebx
mov edi, dword [ebp - 0x6060]
mov dword [ebp - 0x6040], eax
mov dword [ebp - 0x603c], edx
ja 0x405424
jb 0x40541e
cmp edi, dword [ebp - 0x6014]
jae 0x405424
mov eax, edi
mov edx, ecx
jmp 0x40542c
mov eax, dword [ebp - 0x6014]
mov edx, ebx
cmp dword [ebp - 0x602c], edx
ja 0x40544c
jb 0x40543e
cmp dword [ebp - 0x6030], eax
jae 0x40544c
mov eax, dword [ebp - 0x6030]
mov ecx, dword [ebp - 0x602c]
jmp 0x405466
cmp ecx, ebx
ja 0x40545e
jb 0x40545a
cmp edi, dword [ebp - 0x6014]
jae 0x40545e
mov eax, edi
jmp 0x405466
mov eax, dword [ebp - 0x6014]
mov ecx, ebx
xor edx, edx
push edx
push dword [ebp - 0x600c]
push ecx
push eax
call fcn.00405b10
push dword [ebp - 0x6054]
push dword [ebp - 0x6008]
push edx
push eax
call fcn.00405b10
mov dword [ebp - 0x6014], eax
mov dword [ebp - 0x6010], edx
mov dword [ebp - 0x6018], 1
jmp 0x4054c2
push dword [ebp - 0x600c]
push dword [ebp - 0x6008]
push 0x401ae8
push 4
call fcn.00402bda
add esp, 0x10
mov dword [ebp - 0x6018], ebx
mov eax, dword [ebp - 0x6020]
xor ecx, ecx
cmp dword [ebp - 0x6018], ecx
mov dword [esi], ecx
mov edx, dword [eax + 8]
mov dword [esi + 8], edx
mov eax, dword [eax + 0xc]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 6
mov dword [esi + 0x14], 0x6018
mov dword [esi + 0x18], ecx
je 0x4054f8
mov dword [esi + 0x18], 1
mov eax, dword [ebp - 0x6038]
mov dword [esi + 0x2028], eax
mov eax, dword [ebp - 0x6034]
mov dword [esi + 0x202c], eax
mov eax, dword [ebp - 0x6040]
mov dword [esi + 0x2030], eax
mov eax, dword [ebp - 0x603c]
mov dword [esi + 0x2034], eax
mov eax, dword [ebp - 0x6014]
mov dword [esi + 0x2038], eax
mov eax, dword [ebp - 0x6010]
mov dword [esi + 0x203c], eax
mov eax, dword [ebp - 0x6008]
mov dword [esi + 0x2040], eax
mov eax, dword [ebp - 0x600c]
mov dword [esi + 0x2044], eax
cmp dword [0x446a10], ecx
je 0x405578
push dword [esi + 0x18]
push dword [0x446a0c]
push 0x401ab0
push 5
call fcn.00402ca2
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405a18
leave
ret 0xc