Function at 0x10042a90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov dword [ebp - 8], ecx
cmp dword [ebp + 0x10], 0
jg 0x10042ab0
jl 0x10042aa7
cmp dword [ebp + 0xc], 0
ja 0x10042ab0
xor eax, eax
xor edx, edx
jmp 0x10042c80
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 0
je 0x10042ad3
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 0x10042c80
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x1c]
cmp dword [edx], 0
je 0x10042afd
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x2c]
mov edx, dword [ecx]
mov dword [ebp - 0x20], edx
jmp 0x10042b04
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x20]
cdq
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jbe 0x10042bd0
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0xc]
jae 0x10042b25
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x24], ecx
jmp 0x10042b2b
lea edx, [ebp - 0xc]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [edx]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x1c]
mov eax, dword [edx]
mov dword [ebp - 0x28], eax
mov byte [ebp - 1], 0
movzx ecx, byte [ebp - 1]
test ecx, ecx
je 0x10042b84
mov dword [ebp - 0x14], 0
jmp 0x10042b68
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
jae 0x10042b82
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 0x14]
mov al, byte [edx]
mov byte [ecx], al
jmp 0x10042b5f
jmp 0x10042b98
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp + 8]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x10]
mov dword [ebp + 8], ecx
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 0x10]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x2c]
mov edx, dword [ecx]
sub edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x2c]
mov dword [ecx], edx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x1c]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x1c]
mov dword [eax], ecx
mov ecx, dword [ebp - 8]
cmp dword [ecx + 0x4c], 0
je 0x10042c71
mov ecx, dword [ebp - 8]
call fcn.10044140
mov dword [ebp - 0x3c], 0xfff
cmp dword [ebp - 0xc], 0xfff
jbe 0x10042c3f
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x4c]
push eax
push 0xfff
push 1
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x1c]
mov dword [ebp + 8], edx
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x1c], 0xfff
je 0x10042c3d
xor ecx, ecx
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x40]
sbb edx, ecx
jmp 0x10042c80
jmp 0x10042bec
cmp dword [ebp - 0xc], 0
jbe 0x10042c71
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp - 0xc]
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 - 0x38], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
sub ecx, dword [ebp - 0x38]
mov dword [ebp - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x40]
sbb ecx, edx
mov edx, ecx
mov esp, ebp
pop ebp
ret 0xc