Function at 0x406be0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x5c]
mov ecx, 0x17
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov eax, dword [0x41200c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
mov ecx, 0x4130f4
call fcn.00409670
cmp dword [ebp + 0x10], 0
jg 0x406c2b
jl 0x406c22
cmp dword [ebp + 0xc], 0
ja 0x406c2b
xor eax, eax
xor edx, edx
jmp 0x406d9e
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x38], 0
je 0x406c57
mov esi, esp
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
cmp esi, esp
call fcn.00409640
jmp 0x406d9e
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const]
cmp esi, esp
call fcn.00409640
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jbe 0x406ce4
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x18]
push ecx
call fcn.00401cd0
add esp, 8
mov edx, dword [eax]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
push eax
mov esi, esp
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const]
cmp esi, esp
call fcn.00409640
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00405460
add esp, 0xc
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x40]
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x40]
mov dword [ebp - 0x18], eax
mov esi, esp
mov eax, dword [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0xc]
call dword [sym.imp.MSVCP140D.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int_]
cmp esi, esp
call fcn.00409640
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x4c], 0
je 0x406d8f
mov ecx, dword [ebp - 0xc]
call fcn.00404c50
mov dword [ebp - 0x4c], 0xfff
cmp dword [ebp - 0x18], 0xfff
jbe 0x406d5e
mov esi, esp
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
push 0xfff
push 1
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00409640
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x58]
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x58]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x58], 0xfff
je 0x406d5c
xor eax, eax
mov ecx, dword [ebp - 0x28]
sub ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
sbb edx, eax
mov eax, ecx
jmp 0x406d9e
jmp 0x406d00
cmp dword [ebp - 0x18], 0
jbe 0x406d8f
mov esi, esp
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
push 1
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ucrtbased.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00409640
mov ecx, dword [ebp - 0x18]
sub ecx, eax
mov dword [ebp - 0x18], ecx
xor eax, eax
mov ecx, dword [ebp - 0x28]
sub ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
sbb edx, eax
mov eax, ecx
push edx
mov ecx, ebp
push eax
lea edx, [0x406dd0]
call fcn.004095e0
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004096b0
add esp, 0x11c
cmp ebp, esp
call fcn.00409640
mov esp, ebp
pop ebp
ret 0xc