Function at 0x508680
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [eax + 0x24]
mov ecx, ebx
mov eax, dword [eax + 0x14]
push edi
push eax
mov dword [ebp - 0x10], ebx
mov dword [ebp + 0x10], eax
call fcn.004bd690
mov edi, eax
test edi, edi
je 0x508cef
mov dword [ebp - 8], 0
mov ecx, dword [edi + 0x18c]
shr ecx, 3
test cl, 1
jne 0x5086e5
mov ecx, dword [ebx + 0x8c]
mov eax, dword [ecx]
call dword [eax + 0x78]
test eax, eax
je 0x5086e5
lea eax, [ebp - 8]
mov ecx, edi
push eax
push esi
call fcn.004b7240
test al, al
je 0x508cef
cmp byte [ebx + 0x160], 0
je 0x508702
mov ecx, dword [edi + 0x188]
test ecx, ecx
je 0x508702
push esi
call fcn.004f9c90
test eax, eax
jne 0x508717
push dword [ebp - 8]
mov ecx, ebx
push dword [ebp + 0x10]
call fcn.004bd7a0
test eax, eax
je 0x508cef
lea edx, [ebp - 0x20]
xor ecx, ecx
cmp edx, eax
je 0x508722
mov ecx, dword [eax]
mov eax, 0x112c
cmp word [esi + 2], ax
jne 0x508737
movzx ecx, word [esi]
lea eax, [esi + 2]
add eax, ecx
jmp 0x50873f
mov eax, dword [esi + 8]
add eax, ecx
movzx ecx, word [esi]
add esi, 2
movzx ecx, cx
add esi, ecx
cmp esi, eax
jae 0x508ce6
mov edi, dword [ebp + 0xc]
mov ebx, 0x1012
mov edx, 0x115c
mov dword [ebp + 0x10], 0x117c
movzx ecx, word [esi + 2]
cmp cx, bx
je 0x508831
cmp cx, dx
jne 0x5087c7
mov ecx, dword [esi + 4]
or dword [edi + 0x33c], 0x40000000
mov dword [edi + 0x1c8], ecx
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
or dword [edi + 0x340], 1
mov dword [edi + 0x1d4], edx
mov edx, dword [edi + 0x340]
mov dword [edi + 0x1d0], ecx
or edx, 2
mov ecx, dword [esi + 0x10]
mov dword [edi + 0x340], edx
or edx, 4
mov dword [edi + 0x1d8], ecx
mov ecx, dword [esi + 0x14]
mov dword [edi + 0x1dc], ecx
jmp 0x50880d
cmp cx, word [ebp + 0x10]
jne 0x508818
mov cx, word [esi + 4]
or dword [edi + 0x340], 0x10000
mov edx, dword [edi + 0x340]
mov word [edi + 0x2fe], cx
or edx, 0x20000
movzx ecx, word [esi + 0xa]
mov dword [edi + 0x340], edx
or edx, 0x40000
mov dword [edi + 0x300], ecx
mov ecx, dword [esi + 6]
mov dword [edi + 0x304], ecx
mov dword [edi + 0x340], edx
mov edx, 0x115c
movzx ecx, word [esi]
add esi, 2
add esi, ecx
cmp esi, eax
jb 0x508763
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
or dword [edi + 0x33c], 0x8000
mov ecx, dword [edi + 0x33c]
mov dword [edi + 0x2f0], eax
or ecx, 0x10000
movzx eax, word [esi + 0x18]
mov dword [edi + 0x33c], ecx
or ecx, 0x20000
mov dword [edi + 0x2f4], eax
mov eax, dword [esi + 0x14]
mov dword [edi + 0x33c], ecx
mov dword [edi + 0x2f8], eax
mov eax, dword [esi + 8]
or dword [edi + 0x340], 0x200000
mov dword [edi + 0x318], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + 0x340]
mov dword [edi + 0x31c], eax
or ecx, 0x400000
mov dword [edi + 0x340], ecx
mov eax, dword [esi + 0x1a]
shl eax, 0x16
xor eax, dword [edi + 0x1bc]
and eax, 0x400000
mov dword [ebp - 4], ecx
xor dword [edi + 0x1bc], eax
mov eax, dword [edi + 0x1bc]
or dword [edi + 0x334], 0x2000000
mov ecx, dword [esi + 0x1a]
mov edx, dword [edi + 0x334]
shl ecx, 0x16
or edx, 0x4000000
xor ecx, eax
and ecx, 0x800000
xor ecx, eax
mov dword [edi + 0x1bc], ecx
mov dword [edi + 0x334], edx
or edx, 0x8000000
mov eax, dword [esi + 0x1a]
shl eax, 0x16
xor eax, ecx
and eax, 0x1000000
xor eax, ecx
mov dword [edi + 0x1bc], eax
mov dword [edi + 0x334], edx
or edx, 0x10000000
mov ecx, dword [esi + 0x1a]
shl ecx, 0x16
xor ecx, eax
and ecx, 0x2000000
xor ecx, eax
mov dword [edi + 0x1bc], ecx
mov dword [edi + 0x334], edx
or edx, 0x20000000
mov eax, dword [esi + 0x1a]
shl eax, 0x16
xor eax, ecx
and eax, 0x4000000
xor eax, ecx
mov dword [edi + 0x1bc], eax
mov dword [edi + 0x334], edx
or edx, 0x40000000
mov ecx, dword [esi + 0x1a]
shl ecx, 0x15
xor ecx, eax
and ecx, 0x8000000
xor ecx, eax
mov dword [edi + 0x1bc], ecx
mov dword [edi + 0x334], edx
or edx, 0x80000000
mov eax, dword [esi + 0x1a]
shl eax, 0x13
xor eax, ecx
mov dword [ebp + 0x10], edx
and eax, 0x10000000
xor eax, ecx
mov dword [edi + 0x1bc], eax
mov dword [edi + 0x334], edx
mov ecx, dword [esi + 0x1a]
shl ecx, 0x16
xor ecx, eax
and ecx, 0x20000000
xor ecx, eax
mov dword [edi + 0x1bc], ecx
or dword [edi + 0x338], 1
mov eax, dword [esi + 0x1a]
mov ebx, dword [edi + 0x338]
shr eax, 2
or ebx, 0x80
xor eax, dword [edi + 0x1c0]
and eax, 8
xor dword [edi + 0x1c0], eax
mov eax, dword [edi + 0x1c0]
mov dword [edi + 0x338], ebx
or ebx, 0x40
mov edx, dword [esi + 0x1a]
shr edx, 8
xor edx, eax
and edx, 4
xor edx, eax
mov dword [edi + 0x1c0], edx
mov dword [edi + 0x338], ebx
or ebx, 2
mov eax, dword [esi + 0x1a]
shl eax, 0xc
xor eax, ecx
and eax, 0x100000
xor eax, ecx
mov ecx, dword [ebp + 0x10]
mov dword [edi + 0x1bc], eax
or ecx, 0x400000
mov dword [edi + 0x334], ecx
mov dword [ebp + 0x10], ecx
mov ecx, dword [esi + 0x1a]
shl ecx, 8
xor ecx, eax
and ecx, 0x200000
xor ecx, eax
mov eax, dword [ebp + 0x10]
mov dword [edi + 0x1bc], ecx
or eax, 0x800000
mov dword [edi + 0x334], eax
mov eax, dword [esi + 0x1a]
shl eax, 0x13
xor eax, ecx
and eax, 0x40000000
xor eax, ecx
mov dword [edi + 0x1bc], eax
mov dword [edi + 0x338], ebx
or ebx, 4
mov ecx, dword [esi + 0x1a]
shl ecx, 0x13
xor ecx, eax
mov eax, dword [esi + 0x1a]
and ecx, 0x7fffffff
shl eax, 0x13
xor ecx, eax
mov dword [edi + 0x338], ebx
mov ebx, dword [ebp - 0xc]
mov dword [edi + 0x1bc], ecx
or ebx, 0x10000000
mov eax, dword [esi + 0x1a]
mov ecx, dword [ebp - 4]
add eax, eax
xor eax, edx
or ecx, 8
and eax, 0x80000
mov dword [ebp - 4], ecx
xor eax, edx
mov dword [edi + 0x1c0], eax
mov dword [edi + 0x340], ecx
mov ecx, dword [esi + 0x1a]
shl ecx, 8
xor ecx, eax
and ecx, 0x8000000
xor ecx, eax
mov dword [edi + 0x1c0], ecx
mov dword [edi + 0x33c], ebx
mov edx, dword [esi + 0x1a]
shl edx, 8
xor edx, ecx
and edx, 0x10000000
or ebx, 0x20000000
xor edx, ecx
mov dword [edi + 0x1c0], edx
mov dword [edi + 0x33c], ebx
mov eax, dword [esi + 0x1a]
shl eax, 8
xor eax, edx
and eax, 0x20000000
xor eax, edx
mov edx, dword [ebp - 4]
mov dword [edi + 0x1c0], eax
or edx, 0x10
mov dword [edi + 0x340], edx
or edx, 0x200
mov eax, dword [esi + 0x1a]
shr eax, 0x16
xor eax, dword [edi + 0x1c4]
and eax, 2
xor dword [edi + 0x1c4], eax
mov eax, dword [edi + 0x1c4]
mov dword [edi + 0x340], edx
or edx, 0x1000
mov ecx, dword [esi + 0x1a]
shr ecx, 0x14
xor ecx, eax
and ecx, 0x10
xor ecx, eax
mov dword [edi + 0x1c4], ecx
mov dword [edi + 0x340], edx
or edx, 0x8000
mov eax, dword [esi + 0x1a]
shr eax, 0x19
and eax, 7
mov dword [edi + 0x340], edx
mov word [edi + 0x2fc], ax
or edx, 0x800000
mov eax, dword [esi + 0x1a]
shr eax, 0x15
xor eax, ecx
mov dword [edi + 0x340], edx
and eax, 0x80
xor eax, ecx
mov dword [edi + 0x1c4], eax
test dword [esi + 0x1a], 0x40000
je 0x508c20
test ebx, 0x40000000
jne 0x508c20
cmp byte [edi + 4], 0
je 0x508bd9
mov eax, dword [edi]
mov ecx, edi
mov byte [edi + 4], 0
call dword [eax]
mov ebx, dword [edi + 0x33c]
test ebx, 0x40000000
jne 0x508c20
mov edx, dword [edi + 0x340]
or ebx, 0x40000000
mov dword [edi + 0x1c8], 0
mov dword [edi + 0x33c], ebx
or edx, 7
mov dword [edi + 0x1d0], 0
mov dword [edi + 0x1d4], 0
mov dword [edi + 0x1d8], 0
mov dword [edi + 0x1dc], 0
mov dword [edi + 0x340], edx
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x90]
mov eax, dword [ecx]
call dword [eax + 0xac]
movzx eax, ax
cmp eax, 0x14c
jne 0x508c42
mov ebx, 7
jmp 0x508c86
cmp eax, 0x8664
jne 0x508c50
mov ebx, 0xd0
jmp 0x508c86
cmp eax, 0xaa64
jne 0x508c5e
mov ebx, 0xf6
jmp 0x508c86
cmp eax, 0xa64e
jne 0x508c6c
mov ebx, 0xf9
jmp 0x508c86
cmp eax, 0x1c4
jne 0x508c7a
mov ebx, 0xf4
jmp 0x508c86
cmp eax, 0x3a64
jne 0x508ce6
mov ebx, 0xf7
mov eax, dword [esi + 0x1a]
mov dword [ebp + 0x10], eax
shr eax, 0x10
and eax, 3
push eax
push ebx
call fcn.004fec00
movzx eax, ax
add esp, 8
test ax, ax
je 0x508cba
or dword [edi + 0x338], 0x80000
mov word [edi + 0x28c], ax
mov eax, dword [esi + 0x1a]
jmp 0x508cbd
mov eax, dword [ebp + 0x10]
shr eax, 0xe
and eax, 3
push eax
push ebx
call fcn.004fec00
movzx eax, ax
add esp, 8
test ax, ax
je 0x508ce6
or dword [edi + 0x338], 0x100000
mov word [edi + 0x28e], ax
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret