Function at 0x50a560
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [eax + 0x2c]
add eax, 4
push 1
push edi
mov dword [ebp - 8], edi
or dword [edi + 0x328], 0x20000000
mov dword [edi + 0x19c], 0xe
push dword [ebx + 2]
mov dword [ebp - 4], eax
push eax
call fcn.0050cce0
mov ecx, dword [ebx + 6]
add esp, 0x10
mov dword [edi + 0x1c], 0
test ecx, 0x7e000
je 0x50a5bb
shr ecx, 0xd
and ecx, 0x3f
mov dword [edi + 0x18], ecx
jmp 0x50a5d0
xor eax, eax
and ecx, 0x1f
cmp cl, 0xc
sete al
lea eax, [eax*4 + 4]
mov dword [edi + 0x18], eax
or dword [edi + 0x328], 8
mov eax, dword [ebx + 6]
shr eax, 6
xor eax, dword [edi + 0x1b8]
and eax, 0x10
xor dword [edi + 0x1b8], eax
mov eax, dword [edi + 0x1b8]
or dword [edi + 0x32c], 0x40000
mov ecx, dword [ebx + 6]
mov esi, dword [edi + 0x32c]
shr ecx, 6
or esi, 0x20000
xor ecx, eax
and ecx, 8
xor ecx, eax
mov dword [edi + 0x1b8], ecx
mov dword [edi + 0x32c], esi
or esi, 0x80000
mov eax, dword [ebx + 6]
shr eax, 6
xor eax, ecx
and eax, 0x20
xor eax, ecx
xor ecx, ecx
mov dword [edi + 0x1b8], eax
mov dword [edi + 0x32c], esi
or esi, 0x100000
mov edx, dword [ebx + 6]
shr edx, 6
xor edx, eax
and edx, 0x40
xor edx, eax
mov dword [edi + 0x1b8], edx
mov dword [edi + 0x32c], esi
mov eax, dword [ebx + 6]
or dword [edi + 0x33c], 0x200000
add eax, eax
xor eax, dword [edi + 0x1c0]
and eax, 0x100000
xor dword [edi + 0x1c0], eax
mov eax, dword [ebx + 6]
and al, 0xe0
cmp al, 0x20
setne cl
and edx, 0xffffdfff
dec ecx
or esi, 0x8000000
and ecx, 0x2000
or ecx, edx
mov dword [edi + 0x1b8], ecx
mov dword [edi + 0x32c], esi
mov eax, dword [ebx + 6]
xor ebx, ebx
and al, 0xe0
cmp al, 0x80
setne bl
and ecx, 0xffffbfff
dec ebx
or esi, 0x10000000
and ebx, 0x4000
xor edx, edx
or ebx, ecx
mov ecx, dword [ebp + 8]
mov dword [edi + 0x1b8], ebx
mov dword [edi + 0x32c], esi
mov eax, dword [ecx + 6]
and al, 0xe0
cmp al, 0x40
setne dl
and ebx, 0xffff7fff
dec edx
or esi, 0x20000000
and edx, 0x8000
or edx, ebx
mov dword [edi + 0x1b8], edx
mov dword [edi + 0x32c], esi
mov eax, dword [ecx + 6]
xor ecx, ecx
and eax, 0xe0
cmp al, 0x60
setne cl
dec ecx
and edx, 0xfffeffff
and ecx, 0x10000
or esi, 0x40000000
or ecx, edx
mov dword [edi + 0x1b8], ecx
mov dword [edi + 0x32c], esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 6]
and eax, 0xe0
cmp eax, 0x40
je 0x50a752
cmp eax, 0x60
jne 0x50a83c
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x24]
mov ecx, dword [eax + 0x8c]
mov eax, dword [ecx]
call dword [eax + 0x78]
test eax, eax
je 0x50a78d
mov eax, dword [ebx + 8]
xor ecx, ecx
cmp eax, 3
je 0x50a786
cmp eax, 6
je 0x50a786
cmp eax, 1
je 0x50a780
cmp eax, 2
jne 0x50a78a
movzx ecx, word [ebx + 0x12]
jmp 0x50a78a
movzx ecx, word [ebx + 0x14]
movzx eax, cx
mov ebx, dword [ebp - 4]
movzx eax, ax
mov dword [ebp + 0x10], eax
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp + 0x10]
push eax
push dword [esi + 0xa]
mov dword [ebp - 0x24], 1
push ebx
call fcn.0050a930
mov dword [ebp - 0x18], eax
lea esi, [ebp - 0x24]
mov ax, word [ebp + 0x10]
add edi, 0x64
mov word [ebp - 0x1a], ax
mov ecx, 7
mov eax, dword [ebp + 8]
add esp, 0xc
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 8]
or dword [edi + 0x328], 0x200
movzx eax, word [eax + 0xe]
dec eax
cmp eax, 6
ja case.0x50a7f0.4
jmp dword [eax*4 + 0x50a910]
or dword [edi + 0x1b8], 0x20000
or dword [edi + 0x32c], 0x80000000
mov esi, dword [ebp + 8]
jmp 0x50a83f
or dword [edi + 0x1b8], 0x40000
or dword [edi + 0x330], 1
mov esi, dword [ebp + 8]
jmp 0x50a83f
or dword [edi + 0x1b8], 0x80000
or dword [edi + 0x330], 2
mov esi, dword [ebp + 8]
jmp 0x50a83f
mov ebx, dword [ebp - 4]
mov eax, dword [esi + 6]
test al, 0xe0
jne 0x50a905
and al, 0x1f
cmp al, 4
jne 0x50a905
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], 0
push eax
mov ecx, edi
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x24], 0
call fcn.004dd820
or dword [edi + 0x1b8], 0x100000
mov ecx, ebx
or dword [edi + 0x330], 4
call fcn.004feef0
movzx ecx, ax
mov eax, dword [ebp - 0x24]
sub eax, 1
je 0x50a8c6
sub eax, 8
je 0x50a8c1
sub eax, 2
je 0x50a8c6
xor eax, eax
jmp 0x50a8c9
mov eax, dword [ebp - 0xc]
jmp 0x50a8c9
mov eax, dword [ebp - 0x18]
xor edx, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
lea esi, [ebp - 0x24]
mov dword [ebp - 0x1c], edx
add edi, 0x2d4
mov word [ebp - 0x1a], cx
mov ecx, 7
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x24], 0xb
rep movsd dword es:[edi], dword [esi]
or dword [eax + 0x33c], 0x4000
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret