Function at 0x411d30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 8], ecx
cmp dword [ebp + 0x10], 0
jg 0x411d50
jl 0x411d47
cmp dword [ebp + 0xc], 0
ja 0x411d50
xor eax, eax
xor edx, edx
jmp 0x411eb2
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 0
je 0x411d73
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
jmp 0x411eb2
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jbe 0x411e00
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 4]
jae 0x411da7
lea edx, [ebp - 0x10]
mov dword [ebp - 0x18], edx
jmp 0x411dad
lea eax, [ebp - 4]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0xc]
mov dword [ebp + 8], edx
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0xc]
push ecx
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int_]
mov edx, dword [ebp - 8]
cmp dword [edx + 0x4c], 0
je 0x411ea3
mov ecx, dword [ebp - 8]
call fcn.00410900
mov dword [ebp - 0x30], 0xfff
cmp dword [ebp - 4], 0xfff
jbe 0x411e71
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x4c]
push ecx
push 0xfff
push 1
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x14]
mov dword [ebp + 8], eax
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp - 0x14]
mov dword [ebp - 4], ecx
cmp dword [ebp - 0x14], 0xfff
je 0x411e6f
xor edx, edx
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x34]
sbb ecx, edx
mov edx, ecx
jmp 0x411eb2
jmp 0x411e1c
cmp dword [ebp - 4], 0
jbe 0x411ea3
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp - 4]
push ecx
push 1
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
sub ecx, dword [ebp - 0x2c]
mov dword [ebp - 4], ecx
xor edx, edx
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x34]
sbb ecx, edx
mov edx, ecx
mov esp, ebp
pop ebp
ret 0xc