Function at 0x49ac40
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.0049ab80
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 0x49ac85
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 0x49ac7a
cmp cl, byte [edx + 5]
jbe 0x49acaa
push eax
mov edi, edx
mov byte [edx + 5], cl
call fcn.004f3f9b
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
cmp dword [ecx], 0
je 0x49ac7a
test eax, eax
mov dword [ebp - 0x1c], 0
jbe 0x49b0d6
movzx edx, bl
mov dword [ebp - 0x30], edx
jmp 0x49acd6
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 0x49ad0d
sub eax, 1
jne 0x49ad3d
push 5
lea eax, [ebp - 0x10]
push eax
push esi
mov eax, edi
call fcn.0049ab80
mov al, byte [ebp - 0x10]
and al, 0x1f
cmp al, 0x1f
mov byte [ebp - 5], al
jne 0x49ad3d
push 5
lea ecx, [ebp - 0x10]
push ecx
jmp 0x49ad2d
push 4
lea edx, [ebp - 0x10]
push edx
push esi
mov eax, edi
call fcn.0049ab80
mov al, byte [ebp - 0x10]
and al, 0xf
cmp al, 0xf
mov byte [ebp - 5], al
jne 0x49ad3d
push 5
lea eax, [ebp - 0x10]
push eax
push esi
mov eax, edi
call fcn.0049ab80
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 0x49ad64
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 0x49ad93
mov esi, 1
shl esi, cl
cdq
idiv esi
cmp dword [ebp - 0x1c], 0
je 0x49ad7b
mov dword [ebp - 0x18], eax
mov edi, eax
jmp 0x49ad93
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 0x49b07f
cmp edi, 0x20
jbe 0x49adc0
lea eax, [edi - 0x20]
mov dword [ebp - 0x20], eax
jmp 0x49adca
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x20]
test eax, eax
mov dword [ebp - 0x28], 0
jbe 0x49af91
mov dword [ebp - 0x14], 0
test bl, bl
jne 0x49ae94
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
mov dword [ebp - 0xc], 0
call fcn.0043002e
cmp eax, 0x20
mov edi, dword [ebp + 0x18]
jae 0x49ae77
mov edx, dword [edi]
lea ecx, [ebp - 0x3c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x49ae19
xor esi, esi
mov dword [ebp - 0x48], esi
jmp 0x49ae22
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 0x49ae40
mov dword [ebp - 0x48], eax
jmp 0x49ae49
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], ecx
sub esi, eax
cmp esi, 0x7fff
jbe 0x49ae58
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.004e552d
push 0x20
lea eax, [ebp - 0xc]
push eax
push edi
mov eax, ebx
call fcn.0049ab80
test al, al
je 0x49ac7a
mov esi, dword [ebp - 0xc]
mov bl, 0x20
jmp 0x49ae97
mov edi, dword [ebp + 0x18]
test esi, esi
js 0x49aec1
test esi, 0x40000000
jne 0x49aec8
test esi, 0x20000000
jne 0x49aed5
test esi, 0x10000000
jne 0x49aee4
add dword [ebp - 0x14], 1
add esi, esi
add bl, 0xff
jmp 0x49ade0
add esi, esi
add bl, 0xff
jmp 0x49aeee
add dword [ebp - 0x14], 1
add esi, esi
add esi, esi
add bl, 0xfe
jmp 0x49aeee
add dword [ebp - 0x14], 2
add esi, esi
add esi, esi
add esi, esi
add bl, 0xfd
jmp 0x49aeee
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 0x49af45
cmp bl, dl
jb 0x49af14
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 0x49af42
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.0049ab80
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 0x49add9
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
cmp eax, edi
mov dword [ebp - 0x20], eax
jae 0x49b0c4
xor edi, edi
mov edi, edi
test bl, bl
jne 0x49afcb
mov ecx, dword [ebp + 0x18]
push 1
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 0xc]
push ecx
call fcn.0049ab80
test al, al
je 0x49ac7a
mov esi, dword [ebp - 0xc]
cmp esi, 1
je 0x49afe4
add edi, 1
jmp 0x49afa0
test esi, esi
js 0x49afdc
add esi, esi
add edi, 1
mov dword [ebp - 0xc], esi
add bl, 0xff
jmp 0x49afa0
add esi, esi
mov dword [ebp - 0xc], esi
add bl, 0xff
mov dl, byte [ebp - 5]
xor eax, eax
test dl, dl
je 0x49b03c
cmp bl, dl
jb 0x49b008
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 0x49b039
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.0049ab80
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 0x49af9c
jmp 0x49b0c4
test edi, edi
jbe 0x49b0c4
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.0049ab80
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 0x49b090
mov eax, dword [ebp - 0x1c]
add eax, 1
cmp eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
jb 0x49acd0
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x14