Function at 0x4f8dfe
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0xc]
xor ecx, ecx
cmp esi, ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edi
je 0x4f8e1f
mov ebx, dword [ebp + 8]
cmp ebx, ecx
jne 0x4f8e27
or eax, 0xffffffff
jmp 0x4f904b
mov eax, dword [esi]
imul edi, dword [ebp + 0x10]
and eax, 0xf
sub eax, ecx
je 0x4f8fa0
dec eax
je 0x4f8f77
dec eax
je 0x4f8f5f
dec eax
jne 0x4f8fba
mov eax, dword [esi + 0x14]
mov dword [ebp + 0x14], ecx
mov ecx, dword [esi + 0xc]
lea edx, [ecx + edi]
cmp edx, eax
jl 0x4f8e61
sub eax, ecx
mov edi, eax
test edi, edi
mov dword [ebp + 0xc], edi
je 0x4f8ec7
mov ebx, 0x800
mov eax, dword [ebp + 0xc]
cmp eax, ebx
mov edi, eax
jl 0x4f8edb
cdq
mov ecx, ebx
idiv ecx
mov ecx, dword [esi + 0x18]
shl eax, 0xb
test ecx, ecx
jne 0x4f8ecf
cmp dword [esi + 0x1c], ecx
jne 0x4f8e8e
mov edi, ebx
jmp 0x4f8edf
push dword [esi + 4]
mov ecx, dword [ebp - 4]
push eax
mov eax, dword [ebp + 8]
add ecx, eax
push 1
push ecx
call fcn.00642809
mov edi, eax
add esp, 0x10
test edi, edi
jge 0x4f8f46
mov dword [ebp + 0x14], 1
or dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x14], 0
jne 0x4f8fb7
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 4]
jmp 0x4f8fb2
mov edi, ebx
sub edi, ecx
cmp edi, dword [ebp + 0xc]
jle 0x4f8edb
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x4f8f05
cmp dword [esi + 0x1c], 0
je 0x4f8f05
push dword [esi + 4]
push ebx
push 1
push dword [esi + 8]
call fcn.00642809
and dword [esi + 0x1c], 0
add esp, 0x10
test eax, eax
jge 0x4f8f05
mov dword [ebp + 0x14], 1
mov eax, ebx
sub eax, dword [esi + 0x18]
cmp edi, eax
jle 0x4f8f10
mov edi, eax
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 4]
add eax, dword [esi + 0x18]
push edi
push eax
mov eax, dword [ebp + 8]
add ecx, eax
push ecx
call fcn.00645120
add dword [esi + 0x18], edi
add esp, 0xc
cmp dword [esi + 0x18], ebx
jl 0x4f8f3c
and dword [esi + 0x18], 0
mov dword [esi + 0x1c], 1
cmp dword [ebp + 0x14], 0
jne 0x4f8eb6
test edi, edi
je 0x4f8eb6
add dword [ebp - 4], edi
sub dword [ebp + 0xc], edi
jne 0x4f8e6d
jmp 0x4f8ec4
mov eax, dword [0x8df470]
cmp eax, ecx
je 0x4f8fba
push dword [esi + 0x10]
push edi
push ebx
call eax
add dword [esi + 0xc], edi
mov dword [ebp - 4], eax
jmp 0x4f8fba
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea edx, [ecx + edi]
cmp edx, eax
jl 0x4f8f88
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 8]
push edi
add eax, ecx
push eax
push ebx
call fcn.00645120
add esp, 0xc
add dword [esi + 0xc], edi
mov dword [ebp - 4], edi
jmp 0x4f8fba
push dword [esi + 4]
push edi
push 1
push ebx
call fcn.00642809
add esp, 0x10
mov dword [ebp - 4], eax
add dword [esi + 0xc], eax
jmp 0x4f8fba
mov ebx, dword [ebp + 8]
cmp dword [ebp - 8], 2
jne 0x4f8fec
mov eax, dword [ebp - 4]
xor edi, edi
cdq
sub eax, edx
sar eax, 1
test eax, eax
mov dword [ebp + 8], eax
jle 0x4f9037
test byte [esi], 0x10
je 0x4f8fe4
xor eax, eax
lea ecx, [ebx + edi*2]
mov al, byte [ebx + edi*2 + 1]
mov ah, byte [ecx]
mov word [ecx], ax
inc edi
cmp edi, dword [ebp + 8]
jl 0x4f8fd1
jmp 0x4f9037
cmp dword [ebp - 8], 4
jne 0x4f9037
mov eax, dword [ebp - 4]
push 4
cdq
pop ecx
xor edi, edi
idiv ecx
test eax, eax
mov dword [ebp + 0xc], eax
jle 0x4f9037
test byte [esi], 0x10
je 0x4f9031
lea edx, [ebx + edi*4]
mov ecx, dword [edx]
mov eax, ecx
mov dword [ebp + 8], ecx
shl eax, 0x10
and ecx, 0xff00
or eax, ecx
movzx ecx, byte [ebx + edi*4 + 3]
shl eax, 8
or eax, ecx
xor ecx, ecx
mov ch, byte [ebp + 0xa]
or eax, ecx
mov dword [edx], eax
inc edi
cmp edi, dword [ebp + 0xc]
jl 0x4f9004
mov eax, dword [ebp - 4]
test eax, eax
jge 0x4f9047
mov dword [esi + 0x2c], 1
jmp 0x4f904b
and dword [esi + 0x2c], 0
pop edi
pop esi
pop ebx
leave
ret