Function at 0x4f4f50
Capabilities:
Get file size
Inspect section memory permissions
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0xc]
push 6
lea eax, [ebp - 0x10]
push eax
push esi
mov eax, edi
mov dword [ebp - 0x10], 0
call fcn.004f4e90
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
mov ebx, ecx
and cl, 0xf
shr ebx, 4
cmp cl, 8
mov byte [edx + 4], cl
jbe 0x4f4f95
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, 1
shl eax, cl
cmp eax, dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
ja 0x4f4f8a
cmp cl, byte [edx + 5]
jbe 0x4f4fba
push eax
mov edi, edx
mov byte [edx + 5], cl
call fcn.0055cba2
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
cmp dword [ecx], 0
je 0x4f4f8a
test eax, eax
mov dword [ebp - 0x1c], 0
jbe 0x4f53e6
movzx edx, bl
mov dword [ebp - 0x30], edx
jmp 0x4f4fe6
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x30]
sub eax, 0
mov byte [ebp - 0x24], 0
mov byte [ebp - 5], 0
je 0x4f501d
sub eax, 1
jne 0x4f504d
push 5
lea eax, [ebp - 0x10]
push eax
push esi
mov eax, edi
call fcn.004f4e90
mov al, byte [ebp - 0x10]
and al, 0x1f
cmp al, 0x1f
mov byte [ebp - 5], al
jne 0x4f504d
push 5
lea ecx, [ebp - 0x10]
push ecx
jmp 0x4f503d
push 4
lea edx, [ebp - 0x10]
push edx
push esi
mov eax, edi
call fcn.004f4e90
mov al, byte [ebp - 0x10]
and al, 0xf
cmp al, 0xf
mov byte [ebp - 5], al
jne 0x4f504d
push 5
lea eax, [ebp - 0x10]
push eax
push esi
mov eax, edi
call fcn.004f4e90
mov al, byte [ebp - 0x10]
and al, 0x1f
mov byte [ebp - 0x24], al
mov ecx, dword [ebp + 8]
mov cl, byte [ecx + 4]
test cl, cl
mov eax, dword [ebp + 0x10]
jne 0x4f5074
movzx edx, byte [ebp + 0x14]
sub eax, edx
mov ecx, 0
sets cl
sub ecx, 1
and ecx, eax
mov edi, ecx
mov dword [ebp - 0x18], edi
jmp 0x4f50a3
mov esi, 1
shl esi, cl
cdq
idiv esi
cmp dword [ebp - 0x1c], 0
je 0x4f508b
mov dword [ebp - 0x18], eax
mov edi, eax
jmp 0x4f50a3
movzx edx, byte [ebp + 0x14]
sub eax, edx
mov ecx, 0
sets cl
sub ecx, 1
and ecx, eax
mov dword [ebp - 0x18], ecx
mov edi, ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1c]
mov dl, byte [ebp - 0x24]
shl ecx, 0x12
xor esi, esi
xor bl, bl
test dl, dl
mov dword [ecx + eax], edi
mov dword [ebp - 0xc], esi
jne 0x4f538f
cmp edi, 0x20
jbe 0x4f50d0
lea eax, [edi - 0x20]
mov dword [ebp - 0x20], eax
jmp 0x4f50da
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x20]
test eax, eax
mov dword [ebp - 0x28], 0
jbe 0x4f52a1
mov dword [ebp - 0x14], 0
test bl, bl
jne 0x4f51a4
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
mov dword [ebp - 0xc], 0
call fcn.00451ed4
cmp eax, 0x20
mov edi, dword [ebp + 0x18]
jae 0x4f5187
mov edx, dword [edi]
lea ecx, [ebp - 0x3c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4f5129
xor esi, esi
mov dword [ebp - 0x48], esi
jmp 0x4f5132
mov eax, dword [ebp - 0x38]
mov esi, dword [ebp - 0x3c]
mov dword [ebp - 0x48], eax
push 1
lea edx, [ebp - 0x44]
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 0x4f5150
mov dword [ebp - 0x48], eax
jmp 0x4f5159
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], ecx
sub esi, eax
cmp esi, 0x7fff
jbe 0x4f5168
mov esi, 0x7fff
mov eax, dword [ebx]
mov ecx, dword [edi]
push 0
lea edx, [ebp - 0x34]
push edx
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebx]
push esi
push edx
lea esi, [ebx + 4]
call fcn.0055ca1c
push 0x20
lea eax, [ebp - 0xc]
push eax
push edi
mov eax, ebx
call fcn.004f4e90
test al, al
je 0x4f4f8a
mov esi, dword [ebp - 0xc]
mov bl, 0x20
jmp 0x4f51a7
mov edi, dword [ebp + 0x18]
test esi, esi
js 0x4f51d1
test esi, 0x40000000
jne 0x4f51d8
test esi, 0x20000000
jne 0x4f51e5
test esi, 0x10000000
jne 0x4f51f4
add dword [ebp - 0x14], 1
add esi, esi
add bl, 0xff
jmp 0x4f50f0
add esi, esi
add bl, 0xff
jmp 0x4f51fe
add dword [ebp - 0x14], 1
add esi, esi
add esi, esi
add bl, 0xfe
jmp 0x4f51fe
add dword [ebp - 0x14], 2
add esi, esi
add esi, esi
add esi, esi
add bl, 0xfd
jmp 0x4f51fe
add dword [ebp - 0x14], 3
shl esi, 4
add bl, 0xfc
mov dl, byte [ebp - 5]
xor eax, eax
test dl, dl
mov dword [ebp - 0xc], esi
je 0x4f5255
cmp bl, dl
jb 0x4f5224
movzx edi, dl
mov ecx, 0x20
sub ecx, edi
mov eax, esi
shr eax, cl
mov ecx, edi
sub bl, dl
shl esi, cl
jmp 0x4f5252
sub dl, bl
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
push edx
push ecx
push edi
call fcn.004f4e90
movzx edx, byte [ebp - 5]
mov eax, dword [ebp - 0xc]
mov ecx, 0x20
sub ecx, edx
mov dl, byte [ebp - 5]
shl eax, cl
or esi, eax
mov eax, esi
shr eax, cl
xor bl, bl
mov dword [ebp - 0xc], esi
mov cl, dl
mov edx, dword [ebp - 0x14]
shl edx, cl
xor ecx, ecx
or edx, eax
mov eax, edx
mov edx, dword [ebp - 0x1c]
mov edi, eax
and edi, 1
shr eax, 1
add eax, edi
cmp edi, 1
mov edi, dword [ebp + 8]
mov edi, dword [edi]
setne cl
shl edx, 0x10
lea ecx, [ecx + ecx - 1]
imul eax, ecx
mov ecx, dword [ebp - 0x28]
add edx, ecx
add ecx, 1
cmp ecx, dword [ebp - 0x20]
mov dword [edi + edx*4 + 4], eax
mov dword [ebp - 0x28], ecx
jb 0x4f50e9
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
cmp eax, edi
mov dword [ebp - 0x20], eax
jae 0x4f53d4
xor edi, edi
mov edi, edi
test bl, bl
jne 0x4f52db
mov ecx, dword [ebp + 0x18]
push 1
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 0xc]
push ecx
call fcn.004f4e90
test al, al
je 0x4f4f8a
mov esi, dword [ebp - 0xc]
cmp esi, 1
je 0x4f52f4
add edi, 1
jmp 0x4f52b0
test esi, esi
js 0x4f52ec
add esi, esi
add edi, 1
mov dword [ebp - 0xc], esi
add bl, 0xff
jmp 0x4f52b0
add esi, esi
mov dword [ebp - 0xc], esi
add bl, 0xff
mov dl, byte [ebp - 5]
xor eax, eax
test dl, dl
je 0x4f534c
cmp bl, dl
jb 0x4f5318
movzx eax, dl
mov ecx, 0x20
sub ecx, eax
mov eax, esi
shr eax, cl
movzx ecx, dl
sub bl, dl
shl esi, cl
jmp 0x4f5349
sub dl, bl
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x18]
push edx
lea edx, [ebp - 0x28]
push edx
push eax
mov eax, dword [ebp + 0xc]
call fcn.004f4e90
movzx edx, byte [ebp - 5]
mov eax, dword [ebp - 0x28]
mov ecx, 0x20
sub ecx, edx
mov dl, byte [ebp - 5]
shl eax, cl
or esi, eax
mov eax, esi
shr eax, cl
xor bl, bl
mov dword [ebp - 0xc], esi
mov cl, dl
shl edi, cl
mov edx, dword [ebp - 0x1c]
xor ecx, ecx
or edi, eax
mov eax, edi
and edi, 1
shr eax, 1
add eax, edi
cmp edi, 1
mov edi, dword [ebp + 8]
mov edi, dword [edi]
setne cl
shl edx, 0x10
lea ecx, [ecx + ecx - 1]
imul eax, ecx
mov ecx, dword [ebp - 0x20]
add edx, ecx
add ecx, 1
cmp ecx, dword [ebp - 0x18]
mov dword [edi + edx*4 + 4], eax
mov dword [ebp - 0x20], ecx
jb 0x4f52ac
jmp 0x4f53d4
test edi, edi
jbe 0x4f53d4
mov al, 0x20
sub al, dl
movzx ebx, al
mov esi, ecx
lea esp, [esp]
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp + 0x18]
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x28]
push ecx
push edx
mov dword [ebp - 0x28], 0
call fcn.004f4e90
mov eax, dword [ebp - 0x28]
mov ecx, ebx
shl eax, cl
add esi, 4
sar eax, cl
sub edi, 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov dword [esi + edx], eax
jne 0x4f53a0
mov eax, dword [ebp - 0x1c]
add eax, 1
cmp eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
jb 0x4f4fe0
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x14