Function at 0x405560
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x60
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov esi, dword [0x410340]
xor esi, ebp
mov dword [esp + 0x5c], esi
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
xor eax, eax
neg edx
sbb eax, ecx
jl 0x4055c2
jmp 0x4055ad
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
jmp 0x40579f
mov eax, dword [esp + 0x20]
cmp dword [eax + 0x38], 0
je 0x405600
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x44]
mov edx, dword [ebp + 8]
mov eax, esp
mov dword [eax + 8], edi
mov dword [eax + 4], esi
mov dword [eax], edx
mov eax, 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__]
call eax
sub esp, 0xc
mov dword [esp + 0x4c], edx
mov dword [esp + 0x48], eax
jmp 0x40579f
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x58], eax
movsd xmm0, qword [esp + 0x40]
movsd qword [esp + 0x30], xmm0
mov eax, dword [sym.imp.MSVCP140D.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const]
call eax
mov dword [esp + 0x54], eax
xor eax, eax
cmp eax, dword [esp + 0x54]
jae 0x4056a0
lea ecx, [esp + 0x58]
lea eax, [esp + 0x54]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00403eb0
mov ecx, dword [esp + 0x20]
mov eax, dword [eax]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const]
mov ecx, eax
mov eax, dword [esp + 0x1c]
mov edx, dword [ebp + 8]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.00403cf0
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
add eax, dword [ebp + 8]
mov dword [ebp + 8], eax
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x58]
sub eax, edx
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call dword [sym.imp.MSVCP140D.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int_]
sub esp, 4
mov eax, dword [esp + 0x20]
cmp dword [eax + 0x4c], 0
je 0x405786
mov ecx, dword [esp + 0x20]
call fcn.00404ba0
mov dword [esp + 0x28], 0xfff
mov eax, 0xfff
cmp eax, dword [esp + 0x58]
jae 0x405742
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x4c]
mov ecx, dword [ebp + 8]
mov dword [esp], ecx
mov dword [esp + 4], 1
mov dword [esp + 8], 0xfff
mov dword [esp + 0xc], eax
call dword [sym.imp.ucrtbased.dll_fread]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
add eax, dword [ebp + 8]
mov dword [ebp + 8], eax
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x58]
sub eax, ecx
mov dword [esp + 0x58], eax
cmp dword [esp + 0x24], 0xfff
je 0x40573d
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x58]
sub ecx, edx
sbb eax, 0
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], eax
jmp 0x40579f
jmp 0x4056bf
xor eax, eax
cmp eax, dword [esp + 0x58]
jae 0x405781
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x4c]
mov ecx, dword [esp + 0x58]
mov edx, dword [ebp + 8]
mov dword [esp], edx
mov dword [esp + 4], 1
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
call dword [sym.imp.ucrtbased.dll_fread]
mov ecx, eax
mov eax, dword [esp + 0x58]
sub eax, ecx
mov dword [esp + 0x58], eax
jmp 0x405786
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x58]
sub ecx, edx
sbb eax, 0
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x5c]
xor ecx, ebp
call fcn.00409640
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret 0xc