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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x80], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor ebx, ebx
mov esi, ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
push edi
test esi, esi
jne 0x40c60e
push str.file
push str.expr__s_:_assert_failed_n
push str.os_local_file_size_win
push 0x36b
push str.e:work_netbar_smcli_srcliblibpaloswindows_os_file2.h
push 0x432f04
push 3
push ebx
call fcn.0040f171
add esp, 0x20
call fcn.00408ece
xor eax, eax
xor edx, edx
jmp 0x40c7ee
cmp edx, 1
jne 0x40c6a7
add eax, 4
push eax
push 0x4343dc
lea eax, [esp + 0x74]
push 0x20
push eax
call fcn.00408bf1
add esp, 0x10
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x40c688
lea eax, [esp + 0x6c]
push eax
push str.GetDiskFreeSpaceA___s__error:
push str.os_local_file_size_win
push 0x376
push str.e:work_netbar_smcli_srcliblibpaloswindows_os_file2.h
push 0x432f04
push 0x108
push ebx
call fcn.0040f171
add esp, 0x20
or edx, 0xffffffff
mov eax, edx
jmp 0x40c7ee
mov eax, dword [esp + 0x18]
mul dword [esp + 0x1c]
mov ecx, eax
mov eax, edx
mul dword [esp + 0xc]
mov esi, eax
mov eax, ecx
mul dword [esp + 0xc]
add edx, esi
jmp 0x40c7ee
cmp edx, 2
je 0x40c6b5
cmp edx, 3
jne 0x40c7c0
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [esp + 0xc]
push ebx
push eax
push 8
lea eax, [esp + 0x2c]
push eax
push ebx
push ebx
push 0x7405c
push esi
call edi
test eax, eax
je 0x40c6e3
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
jmp 0x40c7ee
push str.IOCTL_DISK_GET_LENGTH_INFO_error:
push str.os_local_file_size_win
push 0x385
push str.e:work_netbar_smcli_srcliblibpaloswindows_os_file2.h
push 0x432f04
push 0x108
push ebx
call fcn.0040f171
add esp, 0x1c
lea eax, [esp + 0xc]
push ebx
push eax
push 0x28
lea eax, [esp + 0x4c]
push eax
push ebx
push ebx
push 0x700a0
push esi
call edi
test eax, eax
je 0x40c732
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
jmp 0x40c7ee
push str.IOCTL_DISK_GET_DRIVE_GEOMETRY_EX_error:
push str.os_local_file_size_win
push 0x38a
push str.e:work_netbar_smcli_srcliblibpaloswindows_os_file2.h
push 0x432f04
push 0x108
push ebx
call fcn.0040f171
add esp, 0x1c
lea eax, [esp + 0xc]
push ebx
push eax
push 0x18
lea eax, [esp + 0x34]
push eax
push ebx
push ebx
push 0x70000
push esi
call edi
test eax, eax
je 0x40c799
mov eax, dword [esp + 0x3c]
mul dword [esp + 0x38]
push ebx
push dword [esp + 0x38]
push edx
push eax
call fcn.0042b3f0
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push edx
push eax
call fcn.0042b3f0
jmp 0x40c7ee
push str.IOCTL_DISK_GET_DRIVE_GEOMETRY_error:
push str.os_local_file_size_win
push 0x38f
push str.e:work_netbar_smcli_srcliblibpaloswindows_os_file2.h
push 0x432f04
push 0x108
push ebx
call fcn.0040f171
add esp, 0x1c
call fcn.00409ccc
mov eax, dword [eax + 4]
test eax, eax
je 0x40c7de
lea ecx, [esp + 0x10]
push ecx
push esi
call eax
test eax, eax
je 0x40c7de
mov eax, dword [esp + 0x10]
jmp 0x40c7ea
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00410199
mov esp, ebp
pop ebp
ret