Function at 0x40c930
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push esi
push edi
push ecx
lea edi, [ebp - 0x30]
push 0xc
pop ecx
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov dword [ebp - 4], ecx
cmp dword [ebp + 0x10], 0
jg 0x40c961
jl 0x40c958
cmp dword [ebp + 0xc], 0
ja 0x40c961
xor eax, eax
xor edx, edx
jmp 0x40cac8
mov eax, dword [ebp - 4]
cmp dword [eax + 0x38], 0
je 0x40c98a
mov esi, esp
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
mov ecx, dword [ebp - 4]
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__]
cmp esi, esp
call fcn.00411bb8
jmp 0x40cac8
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x14], eax
mov esi, esp
mov ecx, dword [ebp - 4]
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const]
cmp esi, esp
call fcn.00411bb8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jbe 0x40ca13
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00403bf8
pop ecx
pop ecx
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x28]
mov esi, esp
mov ecx, dword [ebp - 4]
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const]
cmp esi, esp
call fcn.00411bb8
push eax
push dword [ebp + 8]
call fcn.0040b577
add esp, 0xc
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x28]
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x28]
mov dword [ebp - 0xc], eax
mov esi, esp
push dword [ebp - 0x28]
mov ecx, dword [ebp - 4]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int_]
cmp esi, esp
call fcn.00411bb8
mov eax, dword [ebp - 4]
cmp dword [eax + 0x4c], 0
je 0x40cab9
mov ecx, dword [ebp - 4]
call fcn.0040add5
mov dword [ebp - 0x2c], 0xfff
cmp dword [ebp - 0xc], 0xfff
jbe 0x40ca8b
mov esi, esp
mov eax, dword [ebp - 4]
push dword [eax + 0x4c]
push 0xfff
push 1
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00411bb8
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x30]
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x30]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x30], 0xfff
je 0x40ca89
xor eax, eax
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
sbb edx, eax
mov eax, ecx
jmp 0x40cac8
jmp 0x40ca2f
cmp dword [ebp - 0xc], 0
jbe 0x40cab9
mov esi, esp
mov eax, dword [ebp - 4]
push dword [eax + 0x4c]
push dword [ebp - 0xc]
push 1
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp esi, esp
call fcn.00411bb8
mov ecx, dword [ebp - 0xc]
sub ecx, eax
mov dword [ebp - 0xc], ecx
xor eax, eax
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
sbb edx, eax
mov eax, ecx
push edx
mov ecx, ebp
push eax
lea edx, [0x40caec]
call fcn.00411b62
pop eax
pop edx
pop edi
pop esi
add esp, 0x30
cmp ebp, esp
call fcn.00411bb8
leave
ret 0xc