Function at 0x3f61b470
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi], 0xffffffff
jne 0x3f61b49a
push str.BIsOpen__
push 0x13d3
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__]
jmp 0x3f61b574
mov esi, dword [ebp + 0xc]
mov ecx, 0x7fffffff
sub ecx, dword [edi + 0x10]
mov dword [ebp - 8], ecx
cmp esi, ecx
jbe 0x3f61b527
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x3f61b4b9
mov dword [eax], 0
xor edx, edx
mov dword [ebp + 0xc], edx
test esi, esi
je 0x3f61b503
mov ebx, dword [ebp + 8]
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
cmp ecx, esi
mov eax, esi
cmovb eax, ecx
mov ecx, edi
push eax
push ebx
call fcn.3f61b470
test al, al
je 0x3f61b57c
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
test eax, eax
je 0x3f61b500
mov ecx, dword [ebp - 8]
add edx, eax
add ebx, eax
mov dword [ebp + 0xc], edx
sub esi, eax
jne 0x3f61b4c5
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x3f61b51a
test esi, esi
je 0x3f61b672
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc
pop edi
pop esi
mov dword [eax], edx
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
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 0x3f61b54e
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 0x3f61b54e
int3
cmp byte [edi + 0x2c], 0
je 0x3f61b5ea
xor edx, edx
mov eax, esi
div dword [edi + 0x30]
test edx, edx
je 0x3f61b587
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
add esp, 0xc
test al, al
jne 0x3f61b57c
int3
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp byte [0x3f680f75], 0
jne 0x3f61b5b9
test dword [ebp + 8], 0xfff
je 0x3f61b5b9
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 0x3f61b5b9
int3
cmp byte [0x3f680f76], 0
jne 0x3f61b5ea
test esi, 0xfff
je 0x3f61b5ea
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 0x3f61b5ea
int3
push dword [edi + 0xc]
xor ebx, ebx
mov dword [ebp - 4], esi
push dword [edi + 8]
mov ecx, edi
mov dword [ebp + 0xc], ebx
call fcn.3f61a7b0
mov ecx, dword [edi + 8]
test al, al
je 0x3f61b663
mov edx, dword [edi + 0x18]
mov ebx, edx
mov eax, dword [edi + 0x1c]
sub ebx, ecx
mov dword [ebp + 0xc], 0
sbb eax, dword [edi + 0xc]
add ebx, dword [edi + 0x20]
adc eax, dword [edi + 0x24]
cmp dword [ebp + 0xc], eax
ja 0x3f61b632
jb 0x3f61b62b
cmp esi, ebx
jae 0x3f61b632
mov ebx, esi
mov dword [ebp + 0xc], esi
jmp 0x3f61b63c
mov ebx, edx
sub ebx, ecx
add ebx, dword [edi + 0x20]
mov dword [ebp + 0xc], ebx
mov eax, dword [edi + 0x28]
sub eax, edx
push ebx
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.3f61f010
add esp, 0xc
mov eax, esi
add dword [edi + 8], ebx
mov ecx, dword [edi + 8]
adc dword [edi + 0xc], 0
sub eax, ebx
mov dword [ebp - 4], eax
jmp 0x3f61b665
mov eax, esi
test eax, eax
jne 0x3f61b67d
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x3f61b672
mov dword [eax], esi
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [edi + 0x28], 0
mov edx, eax
je 0x3f61b695
cmp dword [edi + 0x14], 0
jb 0x3f61b695
ja 0x3f61b692
cmp dword [edi + 0x10], eax
jbe 0x3f61b695
mov edx, dword [edi + 0x10]
mov eax, dword [edi + 0x10]
or eax, dword [edi + 0x14]
je 0x3f61b75b
xor eax, eax
cmp edx, dword [edi + 0x10]
jne 0x3f61b75b
cmp eax, dword [edi + 0x14]
jne 0x3f61b75b
mov eax, dword [edi + 0xc]
push 0
mov dword [edi + 0x1c], eax
lea eax, [ebp - 8]
push eax
push edx
push dword [edi + 0x28]
mov dword [edi + 0x18], ecx
push dword [edi]
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x3f61b72a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
sete bl
xor ecx, ecx
mov dword [ebp - 8], ecx
test eax, eax
je 0x3f61b732
xor edx, edx
xor ecx, ecx
test bl, bl
cmovne ecx, edx
cmp dword [ebp - 4], ecx
mov eax, ecx
cmovb eax, dword [ebp - 4]
add dword [edi + 8], eax
mov eax, dword [ebp + 0xc]
adc dword [edi + 0xc], 0
add eax, ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x3f61b7a2
cmp esi, eax
pop edi
cmovb eax, esi
mov dword [ecx], eax
mov al, bl
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 8]
mov bl, 1
mov dword [ebp - 8], ecx
mov eax, ecx
cdq
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 4]
cmp ecx, eax
mov dword [edi + 0x24], edx
cmovb eax, ecx
push eax
push dword [edi + 0x28]
mov eax, dword [ebp + 0xc]
add eax, dword [ebp + 8]
push eax
call fcn.3f61f010
mov edx, dword [ebp - 8]
add esp, 0xc
jmp 0x3f61b6f1
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
mov eax, dword [ebp + 8]
push edx
add eax, ebx
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x3f61b785
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
jmp 0x3f61b78a
mov edx, dword [ebp - 8]
xor eax, eax
test eax, eax
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
sete bl
jmp 0x3f61b6f1
xor ecx, ecx
movzx ebx, bl
cmp esi, eax
pop edi
cmova ebx, ecx
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 0xc