Function at 0x541e89
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, ecx
mov ebx, dword [esi + 0xb0]
add ebx, ebx
mov dword [ebp - 4], ebx
imul ebx, dword [ebp + 0xc]
add ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
and byte [edi + 3], 0x2f
mov edx, dword [esi + 0x528]
mov ecx, dword [edi]
lea eax, [ebx + ebx]
cmp word [eax + edx], 0x4000
mov dword [ebp + 0x10], eax
jne 0x541edd
and ecx, 0xf000ffff
or ecx, 0x20000000
mov dword [edi], ecx
and word [edi], 0
xor eax, eax
inc eax
jmp 0x5420b2
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
push dword [ebp + 0x14]
mov ecx, esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0056ad0c
mov ecx, dword [edi]
and ecx, 0x3fffffff
shl eax, 0x1e
or ecx, eax
test ecx, 0xc0000000
mov dword [ebp - 0xc], ecx
mov dword [edi], ecx
je 0x542016
mov eax, dword [esi + 0x528]
mov ecx, dword [ebp + 0x10]
lea edx, [eax + ecx]
mov dword [ebp - 0x10], edx
mov dx, word [edx - 2]
cmp dx, 0x4000
jne 0x541f33
and dword [ebp - 8], 0
jmp 0x541f39
movsx edx, dx
mov dword [ebp - 8], edx
sub ebx, dword [ebp - 4]
lea edx, [ebx + ebx]
mov ax, word [edx + eax]
cmp ax, 0x4000
mov dword [ebp - 0x18], edx
jne 0x541f52
and dword [ebp + 0x14], 0
jmp 0x541f58
movsx eax, ax
mov dword [ebp + 0x14], eax
mov eax, dword [esi + 0x52c]
lea ebx, [eax + ecx]
movsx eax, word [eax + edx]
movsx ecx, word [ebx]
mov dword [ebp - 4], ecx
sub eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
movsx ecx, word [ecx]
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x10]
add ecx, eax
movsx eax, word [ebx - 2]
sub eax, dword [ebp - 4]
cdq
mov ebx, eax
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x14]
xor ebx, edx
sub ebx, edx
cdq
xor eax, edx
sub eax, edx
add ebx, eax
mov eax, dword [ebp - 0xc]
and eax, 0x3fffffff
cmp ebx, ecx
jge 0x541fdd
or eax, 0x40000000
mov dword [edi], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [esi + 0x528]
movsx ecx, word [ecx + eax - 2]
mov edx, dword [esi + 0x52c]
mov dword [ebp + 8], ecx
movsx edx, word [edx + eax - 2]
mov dword [ebp + 0xc], edx
jmp 0x542004
or eax, 0x80000000
mov dword [edi], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [esi + 0x528]
movsx ecx, word [ecx + eax]
mov edx, dword [esi + 0x52c]
mov dword [ebp + 8], ecx
movsx eax, word [edx + eax]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x10]
cmp ecx, 0x4000
jne 0x542019
and dword [ebp + 0xc], 0
and dword [ebp + 8], 0
jmp 0x542019
mov eax, dword [ebp + 0x10]
mov edx, dword [esi + 0x528]
mov dx, word [edx + eax]
sub dx, word [ebp + 8]
mov cx, word [esi + 0x54c]
add edx, ecx
and dx, word [esi + 0x554]
sub edx, ecx
mov word [edi], dx
mov edx, dword [esi + 0x52c]
movsx eax, word [edx + eax]
sub eax, dword [ebp + 0xc]
mov ecx, dword [esi + 0x550]
mov edx, dword [esi + 0x558]
add eax, ecx
shl eax, 0x10
shl edx, 0x10
and eax, edx
shl ecx, 0x10
sub eax, ecx
mov ecx, dword [edi]
mov edx, 0xfff0000
and ecx, 0xd000ffff
and eax, edx
or eax, ecx
mov cx, ax
test cx, cx
mov dword [edi], eax
jne 0x542087
test edx, eax
jne 0x542087
xor eax, eax
jmp 0x54208a
xor eax, eax
inc eax
mov esi, dword [esi + 0x3e8]
cmp esi, 2
je 0x54209a
cmp esi, 3
jne 0x5420b2
sar cx, 1
mov word [edi], cx
mov ecx, dword [edi]
mov esi, ecx
shl esi, 4
sar esi, 5
xor esi, ecx
and esi, edx
xor esi, ecx
mov dword [edi], esi
pop edi
pop esi
pop ebx
leave
ret 0x10