Function at 0x477fc0
Capabilities:
Get disk size
Get file size

Disassembly:
sub esp, 0x40
mov eax, dword [0x589758]
xor eax, esp
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x44]
mov cl, byte [eax]
push ebp
mov ebp, dword [esp + 0x50]
push esi
xor esi, esi
push edi
mov edi, dword [esp + 0x54]
mov dword [esp + 0x41], esi
mov dword [esp + 0xc], ebp
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x2c], esi
mov byte [esp + 0x40], cl
mov byte [esp + 0x41], 0x3a
mov byte [esp + 0x42], 0x5c
mov byte [esp + 0x43], 0
cmp edi, esi
je 0x4781cd
cmp ebp, esi
je 0x4781cd
push ebx
push esi
push esi
push 3
push esi
push 7
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x478050
mov dword [ebp], esi
mov dword [ebp + 4], esi
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004f6592
add esp, 0x40
ret 0x14
push esi
push esi
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
lea edx, [esp + 0x28]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x20]
imul ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x28]
push esi
push ecx
push edx
push eax
mov dword [esp + 0x34], eax
call fcn.004f8300
mov ebp, eax
add ebp, 2
shl ebp, 4
cmp ebp, 0x100000
jbe 0x4780a2
mov ebp, 0x100000
push ebp
call fcn.00496dbd
mov esi, eax
add esp, 4
mov dword [esp + 0x2c], esi
test esi, esi
jne 0x4780ca
mov eax, dword [esp + 0x10]
push ebx
mov dword [eax], esi
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x478039
push ebp
push 0
push esi
call fcn.004f67e0
add esp, 0xc
xor eax, eax
push eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
lea eax, [esp + 0x34]
push eax
push ebp
push esi
push 8
lea ecx, [esp + 0x50]
push ecx
push 0x90073
push ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push ebx
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
jne 0x478116
push esi
call fcn.00496dc8
add esp, 4
jmp 0x478039
mov eax, dword [esi]
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
test eax, eax
jbe 0x47819a
mov ebp, dword [esp + 0x20]
xor ebx, ebx
add esi, 0x10
mov dword [esp + 0x14], eax
jmp 0x478140
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ecx
push eax
push ebx
push ebp
call fcn.004f81e0
add eax, dword [esp + 0x60]
push ebx
adc edx, dword [esp + 0x68]
mov dword [edi], eax
mov dword [edi + 4], edx
mov edx, dword [esi]
sub edx, dword [esp + 0x1c]
mov eax, dword [esi + 4]
sbb eax, dword [esp + 0x20]
push ebp
push eax
push edx
call fcn.004f81e0
mov dword [edi + 8], eax
mov dword [edi + 0xc], edx
mov ecx, dword [esi]
mov edx, dword [esi + 4]
add edi, 0x10
add esi, 0x10
sub dword [esp + 0x14], 1
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jne 0x478140
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x10]
shl eax, 4
push esi
mov dword [ecx], eax
mov dword [ecx + 4], 0
call fcn.00496dc8
add esp, 4
pop ebx
pop edi
pop esi
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.004f6592
add esp, 0x40
ret 0x14
mov ecx, dword [esp + 0x48]
pop edi
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.004f6592
add esp, 0x40
ret 0x14