Function at 0x3f61acf0
Capabilities:
Get disk size
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x1c]
push ebx
push esi
push edi
push eax
push eax
call fcn.3f61cf10
push 0
push dword [ebp + 8]
lea ecx, [ebp - 0x5c]
mov byte [ebp - 0x14], 0
mov dword [ebp - 0x40], 0xffffffff
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x5c], 0x3f6418dc
mov dword [ebp - 0x54], 0
call fcn.3f61aac0
mov eax, dword [ebp - 0x40]
mov esi, dword [ebp - 0x58]
mov ebx, dword [ebp + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], 0
cmp eax, 0xffffffff
je 0x3f61ad6c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x3f61ad6c
call edi
mov eax, ebx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
and eax, 0xffffffb3
je 0x3f61adbe
push eax
push str.unsupported_flags_0x_x_passed_to_CFileReader::BOpenFile
push 0x138c
push str.c:_buildslave_steam_rel_client_win32_build_src_tier1_fileio.cpp
call dword [sym.imp.tier0_s.dll_public:_static_bool___cdecl_AssertMsgHelper_0_::AssertFailed_char_const___unsigned_int__char_const__]
add esp, 0x10
test al, al
jne 0x3f61adbb
int3
and ebx, 0x4c
cmp byte [ebp - 0x14], 0
je 0x3f61aeca
xor edi, edi
mov dword [ebp - 0x50], 0x3f6418dc
push edi
push esi
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x48], edi
call fcn.3f61aac0
push 0x3a
push dword [ebp - 0x4c]
call fcn.3f61f7b0
add esp, 8
test eax, eax
je 0x3f61ae47
mov ecx, dword [ebp - 0x4c]
mov edx, 0x100
sub eax, ecx
lea edi, [eax + 2]
mov eax, 0xff
cmp edi, eax
cmova edi, eax
cmp edi, edx
mov eax, edi
cmova eax, edx
push eax
push ecx
lea eax, [ebp - 0x15c]
push eax
call sym.vstdlib_s.dll_V_strncpy
add esp, 0xc
mov byte [ebp + edi - 0x15c], 0
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp + 0x24]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
xor edi, edi
jmp 0x3f61ae5f
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp + 0x24]
push eax
lea eax, [ebp - 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
mov dword [ebp - 0x50], 0x3f6418dc
mov eax, dword [ebp - 0x48]
cmovne edi, dword [ebp + 0x24]
test eax, eax
je 0x3f61ae83
push eax
call fcn.3f607530
add esp, 4
mov dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x3f61ae9a
push eax
call fcn.3f607530
add esp, 4
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x10], edi
test edi, edi
je 0x3f61aea6
or ebx, 2
jmp 0x3f61aec4
push esi
push str.Failed_to_get_sector_size_for_drive_file__s_is_on__not_using_unbuffered_IO
push 0x139b
push str.c:_buildslave_steam_rel_client_win32_build_src_tier1_fileio.cpp
call dword [sym.imp.tier0_s.dll_public:_static_bool___cdecl_AssertMsgHelper_0_::AssertFailed_char_const___unsigned_int__char_const__]
add esp, 0x10
test al, al
jne 0x3f61aec4
int3
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x40]
test bl, 0x40
push eax
push ebx
mov ecx, 0
mov eax, 3
push 0
cmovne eax, ecx
push eax
push 1
push esi
call fcn.3f61a820
add esp, 0x18
test eax, eax
jne 0x3f61aefb
cmp dword [ebp - 0x40], 0xffffffff
je 0x3f61aefb
xor bl, bl
jmp 0x3f61aefd
mov bl, 1
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x5c], 0x3f6418dc
test eax, eax
je 0x3f61af1b
push eax
call fcn.3f607530
add esp, 4
mov dword [ebp - 0x54], 0
test esi, esi
je 0x3f61af2f
push esi
call fcn.3f607530
add esp, 4
mov dword [ebp - 0x58], 0
test bl, bl
jne 0x3f61b3f9
lea eax, [ebp - 0x4c]
xor ebx, ebx
push eax
push dword [ebp - 0x40]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x3f61af57
call edi
test eax, eax
je 0x3f61af5d
mov dword [ebp - 0x48], ebx
jmp 0x3f61af60
mov ebx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x48]
mov dword [ebp - 0x48], esi
mov edi, dword [ebp + 0x10]
test edi, edi
ja 0x3f61b3f9
mov esi, dword [ebp + 0xc]
jb 0x3f61af78
cmp esi, ebx
ja 0x3f61b3f9
mov eax, esi
or eax, edi
je 0x3f61b044
cmp dword [ebp - 0x40], 0xffffffff
jne 0x3f61af97
push str.BIsOpen__
push 0x1455
jmp 0x3f61b3e6
cmp byte [ebp - 0x14], 0
je 0x3f61afc1
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x3f61afc1
push 0
push eax
push edi
push esi
call fcn.3f61e630
or eax, edx
je 0x3f61afc1
push str.Seeking_to_a_position_which_is_not_sector_aligned_will_break_unbuffered_io
push 0x145d
jmp 0x3f61b3e6
cmp dword [ebp - 0x18], 0
je 0x3f61b001
mov edx, dword [ebp - 0x24]
cmp edi, edx
jb 0x3f61aff3
mov eax, dword [ebp - 0x28]
ja 0x3f61afd7
cmp esi, eax
jb 0x3f61aff3
mov ecx, dword [ebp - 0x20]
add ecx, eax
mov eax, dword [ebp - 0x1c]
adc eax, edx
cmp edi, eax
ja 0x3f61aff3
jb 0x3f61afeb
cmp esi, ecx
jae 0x3f61aff3
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], edi
jmp 0x3f61b044
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
push 0
lea eax, [ebp + 0x24]
mov dword [ebp + 0x24], edi
push eax
push esi
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x3f61b035
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x3f61b035
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x3f61b044
jmp 0x3f61b3f9
mov eax, dword [ebp + 0x24]
xor ecx, ecx
or ecx, dword [ebp - 4]
cdq
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x18]
sub ebx, esi
mov ecx, 0
sbb ecx, edi
cmp eax, ecx
ja 0x3f61b05d
mov esi, dword [ebp + 0x14]
jb 0x3f61b061
cmp esi, ebx
jb 0x3f61b061
mov esi, ebx
mov eax, ecx
test eax, eax
ja 0x3f61b3f9
jb 0x3f61b3dc
cmp esi, 0x7ffffffe
ja 0x3f61b3f9
test eax, eax
jne 0x3f61b3dc
cmp esi, 0x40000000
ja 0x3f61b3dc
mov edi, dword [ebp + 0x1c]
mov ecx, edi
call fcn.3f61a800
mov eax, dword [ebp + 0x20]
mov ecx, edi
movzx ebx, al
xor ebx, 1
add ebx, esi
push ebx
mov dword [ebp - 0x48], ebx
call fcn.3f61c970
test ebx, ebx
je 0x3f61b3d8
push ebx
mov ecx, edi
call fcn.3f61c8e0
test al, al
je 0x3f61b3f9
mov eax, dword [ebp + 0x1c]
mov edi, dword [edi + 0x14]
add edi, dword [eax + 4]
mov dword [ebp - 8], edi
je 0x3f61b3f9
cmp dword [ebp - 0x40], 0xffffffff
mov ebx, edi
jne 0x3f61b0f0
push str.BIsOpen__
push 0x13d3
jmp 0x3f61b3e6
mov ecx, 0x7fffffff
sub ecx, dword [ebp - 0x30]
mov dword [ebp - 4], ecx
cmp esi, ecx
jbe 0x3f61b14f
xor edi, edi
test esi, esi
je 0x3f61b39e
lea esp, [esp]
lea eax, [ebp + 0x24]
mov dword [ebp + 0x24], 0
push eax
cmp ecx, esi
mov eax, esi
cmovb eax, ecx
lea ecx, [ebp - 0x40]
push eax
push ebx
call fcn.3f61b470
test al, al
je 0x3f61b3f9
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x3f61b39e
mov ecx, dword [ebp - 4]
add edi, eax
add ebx, eax
sub esi, eax
jne 0x3f61b110
jmp 0x3f61b39e
mov ebx, dword [sym.imp.tier0_s.dll_public:_static_bool___cdecl_AssertMsgHelper_1_::AssertFailed_char_const___unsigned_int__char_const__]
cmp esi, 0x7fffffff
jb 0x3f61b176
push str.cubBytesToRead___INT32_MAX
push 0x13f3
push str.c:_buildslave_steam_rel_client_win32_build_src_tier1_fileio.cpp
call ebx
add esp, 0xc
test al, al
jne 0x3f61b176
int3
cmp byte [ebp - 0x14], 0
je 0x3f61b203
xor edx, edx
mov eax, esi
div dword [ebp - 0x10]
test edx, edx
je 0x3f61b1a1
push str.CFileReader::Read_must_be_called_with_a_cubData_value_that_is_a_multiple_of_the_sector_size_when_using_unbuffered_IO
push 0x13fa
push str.c:_buildslave_steam_rel_client_win32_build_src_tier1_fileio.cpp
call ebx
jmp 0x3f61b3f1
cmp byte [0x3f680f75], 0
jne 0x3f61b1d2
test edi, 0xfff
je 0x3f61b1d2
push str.Unbuffered_read_should_be_called_with_pvData_buffer_that_is_aligned_to_system_page_size__4kb_
push 0x13ff
push str.c:_buildslave_steam_rel_client_win32_build_src_tier1_fileio.cpp
mov byte [0x3f680f75], 1
call ebx
add esp, 0xc
test al, al
jne 0x3f61b1d2
int3
cmp byte [0x3f680f76], 0
jne 0x3f61b203
test esi, 0xfff
je 0x3f61b203
push str.Unbuffered_read_should_be_called_with_cubData_length_that_is_aligned_to_system_page_size__4kb_
push 0x1400
push str.c:_buildslave_steam_rel_client_win32_build_src_tier1_fileio.cpp
mov byte [0x3f680f76], 1
call ebx
add esp, 0xc
test al, al
jne 0x3f61b203
int3
mov eax, dword [ebp - 0x18]
mov edx, esi
mov ebx, dword [ebp - 0x34]
xor edi, edi
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x44], edx
test eax, eax
je 0x3f61b29b
cmp ebx, dword [ebp - 0x24]
jb 0x3f61b29b
mov eax, dword [ebp - 0x28]
ja 0x3f61b229
cmp ecx, eax
jb 0x3f61b298
mov edx, dword [ebp - 0x20]
mov dword [ebp + 0x24], edx
mov edx, esi
add dword [ebp + 0x24], eax
mov eax, dword [ebp - 0x1c]
adc eax, dword [ebp - 0x24]
cmp ebx, eax
ja 0x3f61b298
jb 0x3f61b245
cmp ecx, dword [ebp + 0x24]
jae 0x3f61b298
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x1c]
sub edx, ecx
mov eax, dword [ebp - 0x28]
sbb edi, ebx
add edx, eax
adc edi, dword [ebp - 0x24]
xor ebx, ebx
cmp ebx, edi
ja 0x3f61b267
jb 0x3f61b263
cmp esi, edx
jae 0x3f61b267
mov edi, esi
jmp 0x3f61b26e
mov edi, dword [ebp - 0x20]
sub edi, ecx
add edi, eax
sub ecx, eax
add ecx, dword [ebp - 0x18]
push edi
push ecx
push dword [ebp - 8]
call fcn.3f61f010
mov ecx, dword [ebp - 0x38]
add esp, 0xc
mov ebx, dword [ebp - 0x34]
add ecx, edi
mov edx, esi
mov dword [ebp - 0x38], ecx
adc ebx, 0
sub edx, edi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x18]
test edx, edx
jne 0x3f61b2a6
mov edi, esi
jmp 0x3f61b39e
mov dword [ebp + 0x24], edx
test eax, eax
je 0x3f61b2bf
cmp dword [ebp - 0x2c], 0
jb 0x3f61b2bf
ja 0x3f61b2ba
cmp dword [ebp - 0x30], edx
jbe 0x3f61b2bf
mov edx, dword [ebp - 0x30]
jmp 0x3f61b2c2
mov edx, dword [ebp + 0x24]
mov eax, dword [ebp - 0x30]
or eax, dword [ebp - 0x2c]
je 0x3f61b335
xor eax, eax
cmp edx, dword [ebp - 0x30]
jne 0x3f61b335
cmp eax, dword [ebp - 0x2c]
jne 0x3f61b335
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push edx
push dword [ebp - 0x18]
mov dword [ebp - 0x28], ecx
push dword [ebp - 0x40]
mov dword [ebp - 0x24], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x3f61b309
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
sete byte [ebp + 0x27]
xor ebx, ebx
test eax, eax
jne 0x3f61b379
jmp 0x3f61b310
mov ebx, dword [ebp - 4]
mov byte [ebp + 0x27], 1
mov eax, ebx
cdq
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x44]
cmp ebx, eax
mov dword [ebp - 0x1c], edx
cmovb eax, ebx
push eax
push dword [ebp - 0x18]
mov eax, dword [ebp - 8]
add eax, edi
push eax
call fcn.3f61f010
add esp, 0xc
jmp 0x3f61b379
push 0
lea eax, [ebp + 0x24]
mov dword [ebp + 0x24], 0
push eax
mov eax, dword [ebp - 8]
push edx
add eax, edi
push eax
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x3f61b360
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
jmp 0x3f61b365
mov ebx, dword [ebp + 0x24]
xor eax, eax
test eax, eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
sete byte [ebp + 0x27]
xor ecx, ecx
cmp byte [ebp + 0x27], cl
cmovne ecx, ebx
cmp dword [ebp - 0x44], ecx
mov eax, ecx
cmovb eax, dword [ebp - 0x44]
add dword [ebp - 0x38], eax
adc dword [ebp - 0x34], 0
add edi, ecx
cmp esi, edi
cmovb edi, esi
cmp byte [ebp + 0x27], 0
je 0x3f61b3f9
cmp byte [ebp + 0x20], 0
jne 0x3f61b3cd
cmp edi, dword [ebp - 0x48]
jb 0x3f61b3c6
push str.cbActual____uint32_nBufSizeWithTerminator
push 0x948
push str.c:_buildslave_steam_rel_client_win32_build_src_tier1_fileio.cpp
call dword [sym.imp.tier0_s.dll_public:_static_bool___cdecl_AssertMsgHelper_1_::AssertFailed_char_const___unsigned_int__char_const__]
add esp, 0xc
test al, al
jne 0x3f61b3c6
int3
mov eax, dword [ebp - 8]
mov byte [eax + edi], 0
mov ecx, dword [ebp + 0x1c]
push edi
push 0
call fcn.3f61ce20
mov bl, 1
jmp 0x3f61b3fb
push str.cbToRead___1024__1024__1024
push 0x928
push str.c:_buildslave_steam_rel_client_win32_build_src_tier1_fileio.cpp
call dword [sym.imp.tier0_s.dll_public:_static_bool___cdecl_AssertMsgHelper_1_::AssertFailed_char_const___unsigned_int__char_const__]
add esp, 0xc
test al, al
jne 0x3f61b3f9
int3
xor bl, bl
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x10], 0
cmp eax, 0xffffffff
je 0x3f61b422
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x3f61b41b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40], 0xffffffff
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
test eax, eax
je 0x3f61b45c
push eax
call fcn.3f607530
add esp, 4
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret