Function at 0x10086750
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [0x1046f844], 0
push ebx
push esi
push edi
mov edi, ecx
jne 0x10086768
xor eax, eax
jmp 0x1008677b
lea eax, [ebp - 0xc]
push eax
push 3
push str.CFileReader::Read
call fcn.100b43d0
add esp, 0xc
cmp dword [edi], 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x10086792
push str.BIsOpen__
push 0x1565
jmp 0x10086859
mov esi, dword [ebp + 0xc]
mov ecx, SysReAllocString
sub ecx, dword [edi + 0x10]
mov dword [ebp - 8], ecx
cmp esi, ecx
jbe 0x10086816
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x100867b1
mov dword [eax], 0
xor edx, edx
mov dword [ebp + 0xc], edx
test esi, esi
je 0x100867fe
mov ebx, dword [ebp + 8]
lea ecx, [ecx]
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.10086750
test al, al
je 0x1008686b
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
test eax, eax
je 0x100867fb
mov ecx, dword [ebp - 8]
add edx, eax
add ebx, eax
mov dword [ebp + 0xc], edx
sub esi, eax
jne 0x100867c0
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x1008680d
test esi, esi
je 0x1008680f
xor bl, bl
jmp 0x10086a81
mov dword [eax], edx
mov bl, 1
jmp 0x10086a81
cmp esi, 0x7fffffff
jb 0x1008683a
push str.cubBytesToRead___INT32_MAX
push 0x1585
push str.C:_buildworker_steam_rel_client_win32_build_src_tier1_fileio.cpp
call fcn.100ad9f0
add esp, 0xc
test al, al
jne 0x1008683a
int3
cmp byte [edi + 0x2c], 0
je 0x100868db
xor edx, edx
mov eax, esi
div dword [edi + 0x30]
test edx, edx
je 0x10086872
push str.CFileReader::Read_must_be_called_with_a_cubData_value_that_is_a_multiple_of_the_sector_size_when_using_unbuffered_IO
push 0x158c
push str.C:_buildworker_steam_rel_client_win32_build_src_tier1_fileio.cpp
call fcn.100ad9f0
add esp, 0xc
test al, al
jne 0x1008686b
int3
xor bl, bl
jmp 0x10086a81
cmp byte [0x104254c5], 0
jne 0x100868a7
test dword [ebp + 8], 0xfff
je 0x100868a7
push str.Unbuffered_read_should_be_called_with_pvData_buffer_that_is_aligned_to_system_page_size__4kb_
push 0x1591
push str.C:_buildworker_steam_rel_client_win32_build_src_tier1_fileio.cpp
mov byte [0x104254c5], 1
call fcn.100ad9f0
add esp, 0xc
test al, al
jne 0x100868a7
int3
cmp byte [0x104254c6], 0
jne 0x100868db
test esi, 0xfff
je 0x100868db
push str.Unbuffered_read_should_be_called_with_cubData_length_that_is_aligned_to_system_page_size__4kb_
push 0x1592
push str.C:_buildworker_steam_rel_client_win32_build_src_tier1_fileio.cpp
mov byte [0x104254c6], 1
call fcn.100ad9f0
add esp, 0xc
test al, al
jne 0x100868db
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.10085710
mov edx, dword [edi + 8]
test al, al
je 0x10086956
mov ebx, dword [edi + 0x18]
mov ecx, ebx
mov eax, dword [edi + 0x1c]
sub ecx, edx
mov dword [ebp + 0xc], 0
sbb eax, dword [edi + 0xc]
add ecx, dword [edi + 0x20]
mov dword [ebp - 8], ebx
adc eax, dword [edi + 0x24]
cmp dword [ebp + 0xc], eax
ja 0x10086926
jb 0x1008691f
cmp esi, ecx
jae 0x10086926
mov ebx, esi
mov dword [ebp + 0xc], esi
jmp 0x1008692e
sub ebx, edx
add ebx, dword [edi + 0x20]
mov dword [ebp + 0xc], ebx
mov eax, dword [edi + 0x28]
sub eax, dword [ebp - 8]
push ebx
add eax, edx
push eax
push dword [ebp + 8]
call fcn.100c2f10
add esp, 0xc
mov eax, esi
add dword [edi + 8], ebx
mov edx, dword [edi + 8]
adc dword [edi + 0xc], 0
sub eax, ebx
mov dword [ebp - 4], eax
jmp 0x10086958
mov eax, esi
test eax, eax
jne 0x1008696c
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x10086965
mov dword [eax], esi
mov bl, 1
jmp 0x10086a81
cmp dword [edi + 0x28], 0
mov ecx, eax
je 0x10086984
cmp dword [edi + 0x14], 0
jb 0x10086984
ja 0x10086981
cmp dword [edi + 0x10], eax
jbe 0x10086984
mov ecx, dword [edi + 0x10]
mov eax, dword [edi + 0x10]
or eax, dword [edi + 0x14]
je 0x10086a05
xor eax, eax
cmp ecx, dword [edi + 0x10]
jne 0x10086a05
cmp eax, dword [edi + 0x14]
jne 0x10086a05
mov eax, dword [edi + 0xc]
push 0
mov dword [edi + 0x1c], eax
lea eax, [ebp - 8]
push eax
push ecx
push dword [edi + 0x28]
mov dword [edi + 0x18], edx
push dword [edi]
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100869d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
sete bl
xor ecx, ecx
mov dword [ebp - 8], ecx
test eax, eax
jne 0x10086a47
jmp 0x100869dc
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.100c2f10
mov ecx, dword [ebp - 8]
add esp, 0xc
jmp 0x10086a47
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
mov eax, dword [ebp + 8]
push ecx
add eax, ebx
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10086a2f
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
jmp 0x10086a34
mov ecx, dword [ebp - 8]
xor eax, eax
test eax, eax
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
sete bl
xor edx, edx
test bl, bl
cmovne edx, ecx
cmp dword [ebp - 4], edx
mov ecx, edx
cmovb ecx, dword [ebp - 4]
xor eax, eax
add dword [edi + 8], ecx
mov ecx, dword [ebp + 0x10]
adc eax, dword [edi + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [ebp + 0xc]
add eax, edx
test ecx, ecx
je 0x10086a77
cmp esi, eax
cmovb eax, esi
mov dword [ecx], eax
jmp 0x10086a81
xor ecx, ecx
movzx ebx, bl
cmp esi, eax
cmova ebx, ecx
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x10086a91
push ecx
call fcn.100b4390
add esp, 4
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 0xc