Function at 0x415c90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x415cb0
or eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [ebx + 0x10], 0x1c4f
jne 0x415ca0
mov eax, dword [ebx + 0x5c]
test eax, eax
je 0x415cc5
cmp eax, 0xfffffffb
jne 0x415ca0
cmp dword [ebp + 0x10], 0
jl 0x415ffd
je 0x415fba
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x415d37
mov eax, dword [ebx + 0x50]
mov edx, dword [ebx + 0x54]
mov dword [ebx + 0x58], 0
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], eax
or edx, eax
je 0x415d37
mov ecx, dword [ebx]
test ecx, ecx
je 0x415e72
xor edx, edx
mov eax, ecx
cmp edx, dword [ebp - 0x1c]
jg 0x415dcc
jl 0x415d15
cmp ecx, dword [ebp - 0x20]
ja 0x415dcc
xor esi, esi
mov edi, dword [ebx + 4]
mov dword [ebx], esi
add edi, ecx
add dword [ebx + 8], eax
adc dword [ebx + 0xc], edx
mov dword [ebx + 4], edi
sub dword [ebp - 0x20], eax
mov ecx, esi
sbb dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x1c]
or edx, dword [ebp - 0x20]
jne 0x415cf5
mov eax, dword [ebx]
mov dword [ebp - 0x24], 0
test eax, eax
jne 0x415f60
mov edi, dword [ebx + 0x40]
test edi, edi
je 0x415d5a
mov esi, dword [ebx + 0x68]
test esi, esi
je 0x415fab
mov edx, dword [ebx + 0x30]
test edx, edx
je 0x415ddd
mov eax, dword [ebx + 0x1c]
add eax, eax
cmp dword [ebp + 0x10], eax
jb 0x415ddd
dec edx
jne 0x415fd6
xor esi, esi
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
sub eax, esi
add edi, esi
mov dword [ebp - 0x14], eax
push edx
push eax
push edi
mov eax, dword [ebx + 0x14]
push eax
call sub.msvcrt.dll__read
add esp, 0x10
cmp eax, 0
jle 0x415fc1
add esi, eax
cmp dword [ebp + 0x10], esi
ja 0x415d74
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
sub edx, esi
mov dword [ebp - 0x14], edx
lea edi, [eax + esi]
mov ecx, dword [ebp - 0x24]
mov dword [ebp + 0xc], edi
add ecx, esi
xor edx, edx
mov dword [ebp - 0x24], ecx
add dword [ebx + 8], esi
adc dword [ebx + 0xc], edx
mov edx, dword [ebp - 0x14]
mov dword [ebp + 0x10], edx
jmp 0x415e60
mov esi, ecx
mov eax, dword [ebp - 0x20]
sub esi, eax
xor edx, edx
mov ecx, dword [ebp - 0x20]
jmp 0x415d17
cmp edx, 1
je 0x415e20
cmp edx, 2
je 0x415f38
test edx, edx
jne 0x415e04
mov eax, ebx
call fcn.00415500
inc eax
je 0x415ca0
mov ecx, dword [ebx + 0x30]
test ecx, ecx
je 0x415e60
mov edi, dword [ebx]
test edi, edi
jne 0x415e60
mov esi, dword [ebx + 0x40]
test esi, esi
je 0x415e18
mov ecx, dword [ebx + 0x68]
test ecx, ecx
je 0x415e60
mov edx, dword [ebx + 0x30]
cmp edx, 1
jne 0x415de2
mov eax, dword [ebx + 0x1c]
mov edi, dword [ebx + 0x28]
mov dword [ebx], 0
lea esi, [eax + eax]
mov eax, dword [ebx]
push edx
mov edx, esi
sub edx, eax
lea eax, [edi + eax]
push edx
push eax
mov ecx, dword [ebx + 0x14]
push ecx
call sub.msvcrt.dll__read
add esp, 0x10
cmp eax, 0
jle 0x415f9d
mov edx, dword [ebx]
add eax, edx
mov dword [ebx], eax
cmp esi, eax
ja 0x415e2f
mov eax, dword [ebx + 0x28]
mov dword [ebx + 4], eax
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x415fb2
mov eax, dword [ebx]
jmp 0x415d40
mov edi, dword [ebx + 0x40]
test edi, edi
je 0x415e84
mov esi, dword [ebx + 0x68]
test esi, esi
je 0x415fcf
mov eax, dword [ebx + 0x30]
cmp eax, 1
je 0x415f00
cmp eax, 2
je 0x415ee1
test eax, eax
jne 0x415eaa
mov eax, ebx
call fcn.00415500
inc eax
je 0x415ca0
mov ecx, dword [ebx + 0x30]
test ecx, ecx
je 0x415eda
mov ecx, dword [ebx]
test ecx, ecx
jne 0x415d2f
mov edx, dword [ebx + 0x40]
test edx, edx
je 0x415e84
mov eax, dword [ebx + 0x68]
test eax, eax
jne 0x415e84
jmp 0x415d2f
jne 0x416016
mov dword [ebx + 0x40], 1
mov eax, dword [ebx + 0x28]
mov dword [ebx + 4], eax
mov ecx, dword [ebx]
jmp 0x415d2f
mov eax, dword [ebx + 0x1c]
add eax, eax
mov dword [ebx + 0x74], eax
mov eax, dword [ebx + 0x28]
mov dword [ebx + 0x70], eax
mov eax, ebx
call fcn.00415340
inc eax
jne 0x415eaa
jmp 0x415ca0
mov eax, dword [ebx + 0x1c]
mov edi, dword [ebx + 0x28]
mov dword [ebx], 0
lea esi, [eax + eax]
mov eax, dword [ebx]
push edx
mov edx, esi
sub edx, eax
lea eax, [edi + eax]
push edx
push eax
mov eax, dword [ebx + 0x14]
push eax
call sub.msvcrt.dll__read
add esp, 0x10
cmp eax, 0
jle 0x415ec7
mov ecx, dword [ebx]
add eax, ecx
mov dword [ebx], eax
cmp esi, eax
ja 0x415f0f
jmp 0x415ed4
mov eax, dword [ebx + 0x1c]
add eax, eax
mov dword [ebx + 0x74], eax
mov eax, dword [ebx + 0x28]
mov dword [ebx + 0x70], eax
mov eax, ebx
call fcn.00415340
inc eax
jne 0x415e04
jmp 0x415ca0
mov esi, eax
cmp eax, dword [ebp + 0x10]
jbe 0x415f6a
mov esi, dword [ebp + 0x10]
push eax
push esi
mov eax, dword [ebx + 4]
push eax
mov eax, dword [ebp + 0xc]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebx + 4]
add esp, 0x10
add eax, esi
mov dword [ebx + 4], eax
mov eax, dword [ebx]
sub eax, esi
mov dword [ebx], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
sub eax, esi
lea edi, [edx + esi]
mov dword [ebp - 0x14], eax
jmp 0x415dae
jne 0x416016
mov dword [ebx + 0x40], 1
jmp 0x415e5a
mov dword [ebx + 0x44], 1
mov eax, dword [ebp - 0x24]
jmp 0x415ca3
xor eax, eax
jmp 0x415ca3
jne 0x416016
mov dword [ebx + 0x40], 1
jmp 0x415dae
xor eax, eax
jmp 0x415d39
mov edx, dword [ebp + 0x10]
mov dword [ebx + 0x74], edx
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x70], eax
mov eax, ebx
call fcn.00415340
inc eax
je 0x415ca0
mov esi, dword [ebx]
mov dword [ebx], 0
jmp 0x415da0
push eax
push str.requested_length_does_not_fit_in_int
push 0xfffffffffffffffd
push ebx
call fcn.0040bcd0
or eax, 0xffffffff
add esp, 0x10
jmp 0x415ca3
call sub.msvcrt.dll__errno
sub esp, 0xc
mov esi, dword [eax]
push esi
call sub.msvcrt.dll_strerror
add esp, 0xc
push eax
push 0xffffffffffffffff
push ebx
call fcn.0040bcd0
or eax, 0xffffffff
add esp, 0x10
jmp 0x415ca3