Function at 0x474e20
Capabilities:
Get disk size

Disassembly:
sub esp, 0x2c0
push ebx
push ebp
push esi
push edi
mov edi, ecx
push str.SAVE
mov dword [esp + 0x18], edi
call fcn.00470f10
push eax
mov eax, dword [esp + 0x2dc]
push eax
mov ecx, edi
call fcn.00479730
push str.SAVE
mov ecx, edi
mov esi, eax
call fcn.00470f10
mov ecx, dword [esp + 0x2d4]
push eax
push ecx
mov ecx, edi
call fcn.004795f0
test esi, esi
mov ebx, eax
je 0x4752ab
test ebx, ebx
je 0x4752ab
lea edx, [esi + 0x77c]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x10], edx
je 0x4752ab
mov ax, word [ebx + 0x7e8]
test ax, ax
jbe 0x474ea7
lea ebp, [eax - 1]
jmp 0x474eae
mov bp, word [ebx + 0x78a]
xor eax, eax
mov ax, word [ebx + 0x78a]
dec eax
test eax, eax
jle 0x474f00
mov esi, 1
jmp 0x474ec7
mov edx, dword [esp + 0x10]
mov eax, dword [ebx + 0x790]
mov ecx, esi
and ecx, 0xffff
mov ecx, dword [eax + ecx*4]
push ecx
push edx
call fcn.004bcb20
add esp, 8
test eax, eax
jne 0x474ee8
mov ebp, esi
inc esi
xor eax, eax
mov ax, word [ebx + 0x78a]
lea edx, [esi - 1]
and edx, 0xffff
dec eax
cmp edx, eax
jl 0x474ec3
mov eax, dword [ebx + 0x7f4]
test eax, eax
je 0x474f10
add ebp, 0xffff
lea ecx, [esp + 0x24]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x24]
push edx
lea ecx, [esp + 0x24]
push eax
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x474f42
push str.GetDiskFreeSpace___error
push str.UISaveGame__
call fcn.0042b590
add esp, 8
mov esi, ebp
lea edx, [esp + 0x28]
and esi, 0xffff
xor edi, edi
push esi
push str.GameSaveS_d.SAV
push edx
call fcn.004b0670
mov eax, dword [0x797e34]
mov ebp, 1
add esp, 0xc
cmp eax, ebp
jne 0x474f80
push esi
lea eax, [esp + 0x2c]
push str.GameSaveP_d.SAV
push eax
call fcn.004b0670
add esp, 0xc
lea ecx, [esp + 0x1b8]
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.004b22b0
add esp, 8
cmp eax, 0xffffffff
je 0x474faa
mov edi, dword [esp + 0x1c8]
push eax
call fcn.004b2500
add esp, 4
mov eax, dword [0x4dfb08]
mov ecx, dword [esp + 0x20]
cmp eax, 2
jne 0x474fdc
imul ecx, dword [esp + 0x1c]
mov eax, 0x190000
xor edx, edx
div ecx
cmp eax, dword [esp + 0x18]
sbb eax, eax
neg eax
test al, al
jne 0x475008
cmp edi, 0x190000
jb 0x475000
jmp 0x474ffe
imul ecx, dword [esp + 0x1c]
mov eax, 0x200
xor edx, edx
div ecx
cmp eax, dword [esp + 0x18]
sbb eax, eax
neg eax
test al, al
jne 0x475008
cmp edi, 0x200
jb 0x475000
mov al, 1
test al, al
je 0x475296
xor eax, eax
lea edx, [esi + 1]
mov ax, word [ebx + 0x78a]
cmp edx, eax
jne 0x4750e1
lea esi, [eax - 2]
test esi, esi
jl 0x4751d4
lea edi, [esi + 1]
mov eax, dword [0x797e34]
push esi
cmp eax, ebp
jne 0x475040
lea eax, [esp + 0x2c]
push str.GameSaveP_d.SAV
push eax
jmp 0x47504a
lea ecx, [esp + 0x2c]
push str.GameSaveS_d.SAV
push ecx
call fcn.004b0670
add esp, 0xc
lea edx, [esp + 0x28]
push 0x4f0f18
push 0x4df3d0
push edx
call fcn.0042ba50
add esp, 0xc
test eax, eax
je 0x4750bb
push eax
call fcn.0042bb40
mov eax, dword [0x797e34]
add esp, 4
cmp eax, ebp
push edi
jne 0x47508f
lea eax, [esp + 0xf4]
push str.GameSaveP_d.SAV
push eax
jmp 0x47509c
lea ecx, [esp + 0xf4]
push str.GameSaveS_d.SAV
push ecx
call fcn.004b0670
add esp, 0xc
lea edx, [esp + 0xf0]
lea eax, [esp + 0x28]
push edx
push eax
call fcn.004b25e0
add esp, 8
jmp 0x4750d2
lea ecx, [esp + 0x28]
push ecx
push str.Save_file__s_missing
push str.UISaveGame
call fcn.0042b590
add esp, 0xc
dec esi
dec edi
test esi, esi
jge 0x47502a
jmp 0x4751d4
mov eax, dword [0x797e34]
push esi
cmp eax, ebp
jne 0x4750f7
lea edx, [esp + 0x2c]
push str.GameSaveP_d.SAV
push edx
jmp 0x475101
lea eax, [esp + 0x2c]
push str.GameSaveS_d.SAV
push eax
call fcn.004b0670
add esp, 0xc
lea ecx, [esp + 0x28]
push ecx
call fcn.004b25b0
add esp, 4
dec esi
test esi, esi
jl 0x4751d4
lea edi, [esi + 1]
mov eax, dword [0x797e34]
push esi
cmp eax, ebp
jne 0x475138
lea edx, [esp + 0x2c]
push str.GameSaveP_d.SAV
push edx
jmp 0x475142
lea eax, [esp + 0x2c]
push str.GameSaveS_d.SAV
push eax
call fcn.004b0670
add esp, 0xc
lea ecx, [esp + 0x28]
push 0x4f0f18
push 0x4df3d0
push ecx
call fcn.0042ba50
add esp, 0xc
test eax, eax
je 0x4751b3
push eax
call fcn.0042bb40
mov eax, dword [0x797e34]
add esp, 4
cmp eax, ebp
push edi
jne 0x475187
lea edx, [esp + 0xf4]
push str.GameSaveP_d.SAV
push edx
jmp 0x475194
lea eax, [esp + 0xf4]
push str.GameSaveS_d.SAV
push eax
call fcn.004b0670
add esp, 0xc
lea ecx, [esp + 0xf0]
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.004b25e0
add esp, 8
jmp 0x4751ca
lea eax, [esp + 0x28]
push eax
push str.Save_file__s_missing
push str.UISaveGame
call fcn.0042b590
add esp, 0xc
dec esi
dec edi
test esi, esi
jge 0x475122
mov eax, dword [0x797e34]
push 0
cmp eax, ebp
jne 0x4751eb
lea ecx, [esp + 0x2c]
push str.GameSaveP_d.SAV
push ecx
jmp 0x4751f5
lea edx, [esp + 0x2c]
push str.GameSaveS_d.SAV
push edx
call fcn.004b0670
mov eax, dword [0x4dfb08]
add esp, 0xc
cmp eax, 2
push 0
jne 0x475216
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x2c]
push eax
push ebp
push ecx
jmp 0x475222
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x2c]
push edx
push 0
push eax
call fcn.004414d0
mov ecx, dword [esp + 0x20]
add esp, 0x10
push 0
push 0
push ecx
mov ecx, ebx
call fcn.00486d20
push 0
push 0
push ebp
push str.H_GAMESAVED
call fcn.0048dd90
add esp, 4
push eax
push str.O_GAMESAVED
call fcn.0048dd90
add esp, 4
push eax
push str.S_GAMESAVED
call fcn.0048dd90
add esp, 4
push eax
call fcn.0046f900
mov al, byte [esp + 0x2f4]
add esp, 0x18
test al, al
push 0
je 0x47528a
push 0x4dfa14
push 0xde
jmp 0x4752a2
push 0x4f0f18
push 0xdd
jmp 0x4752a2
push 0
push str.NO_FREE_SPACE
push 0xe0
mov ecx, dword [esp + 0x20]
call fcn.00473840
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c0
ret 0xc