Function at 0x4fefd0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [edi]
sub esp, 0x24
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push esi
lea eax, [ebp - 8]
push eax
push 4
lea ecx, [ebp + 8]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 8]
sub dword [edi + 0xc], eax
sbb dword [edi + 0x10], esi
cmp eax, 4
jne 0x4ff1e3
lea eax, [ebp - 0x24]
mov dword [ebx + 0x1c], esi
mov ecx, dword [edi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4ff01c
mov dword [ebp - 0x18], esi
jmp 0x4ff025
mov edx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x18], edx
push 1
lea edx, [ebp - 0x1c]
push edx
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x4ff043
mov dword [ebp - 0x20], eax
jmp 0x4ff04c
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ecx
sub esi, eax
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp + 8]
mov edx, ecx
or edx, 0xff000000
cmp edx, 0xff334449
jne 0x4ff141
mov edx, dword [edi]
push 0
lea eax, [ebp - 8]
push eax
push 6
lea ecx, [ebp - 0x24]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 8]
sub dword [edi + 0xc], eax
sbb dword [edi + 0x10], 0
cmp eax, 6
jne 0x4ff1e3
add dword [ebx + 0x1c], eax
cmp byte [ebp - 0x24], 0xff
jae 0x4ff13e
cmp byte [ebp - 0x23], 0xff
jae 0x4ff13e
mov dl, byte [ebp - 0x22]
cmp dl, 0x80
jae 0x4ff13e
cmp byte [ebp - 0x21], 0x80
jae 0x4ff13e
mov cl, byte [ebp - 0x20]
cmp cl, 0x80
jae 0x4ff13e
mov al, byte [ebp - 0x1f]
cmp al, 0x80
jae 0x4ff13e
movzx esi, dl
movzx edx, byte [ebp - 0x21]
shl esi, 7
add esi, edx
movzx ecx, cl
shl esi, 7
movzx edx, al
push 1
xor eax, eax
add esi, ecx
push eax
push eax
mov eax, dword [edi]
shl esi, 7
add esi, edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [edi]
push 0
lea ecx, [ebp - 0xc]
push ecx
push 4
lea edx, [ebp + 8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0xc]
sub dword [edi + 0xc], eax
sbb dword [edi + 0x10], 0
cmp eax, 4
jne 0x4ff1e3
mov ecx, dword [ebp + 8]
add esi, eax
add dword [ebx + 0x1c], esi
mov edx, ecx
or edx, 0xff000000
cmp edx, 0xff334449
je 0x4ff068
jmp 0x4ff141
mov ecx, dword [ebp + 8]
cmp cl, 0xff
jne 0x4ff1aa
cmp ch, 0xe0
jb 0x4ff1aa
movzx esi, ch
mov eax, esi
shr eax, 3
and eax, 3
mov eax, dword [eax*4 + 0x5b688c]
cmp eax, 4
mov dword [ebx], eax
jge 0x4ff1aa
mov dl, ch
and dl, 6
cmp dl, 2
jne 0x4ff1aa
xor edx, edx
mov eax, esi
and eax, 1
cmp dword [ebx], edx
mov dword [ebx + 4], eax
setne dl
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp + 0xa]
mov esi, eax
shr esi, 4
shl edx, 4
add edx, esi
mov edx, dword [edx*4 + 0x5b68a0]
test edx, edx
mov dword [ebx + 8], edx
je 0x4ff1aa
shr eax, 2
and eax, 3
cmp eax, 3
mov dword [ebx + 0xc], eax
jl 0x4ff1ed
mov edx, dword [edi]
push 0
shr ecx, 8
lea eax, [ebp - 0x10]
push eax
mov dword [ebp + 8], ecx
push 1
lea ecx, [ebp + 0xb]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x10]
sub dword [edi + 0xc], eax
sbb dword [edi + 0x10], 0
cmp eax, 1
jne 0x4ff1e3
add dword [ebx + 0x1c], eax
mov eax, dword [ebp - 0x14]
cmp dword [ebx + 0x1c], eax
jl 0x4ff051
xor al, al
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
movzx eax, byte [ebp + 0xa]
shr eax, 1
and eax, 1
mov dword [ebx + 0x10], eax
movzx eax, byte [ebp + 0xb]
mov ecx, eax
shr eax, 4
shr ecx, 6
and eax, 3
cmp dword [ebp - 0x18], 0
mov dword [ebx + 0x14], ecx
mov dword [ebx + 0x18], eax
jne 0x4ff233
mov ecx, dword [edi]
push 0
lea edx, [ebp - 0x18]
push edx
push 2
lea eax, [ebp + 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x18]
sub dword [edi + 0xc], edx
sbb dword [edi + 0x10], 0
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4