Function at 0x501260
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x6de5c0]
xor eax, ebp
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x230], ecx
push 0x88
push 0x608614
mov eax, dword [ebp - 0x230]
push eax
call fcn.004c3b10
push 0xffffffffffffffff
mov ecx, dword [ebp + 8]
push ecx
call fcn.004c69b0
test eax, eax
jne 0x5012b2
push 0x89
push 0x60864c
call fcn.004c6b20
test eax, eax
je 0x5012b2
int3
cmp dword [ebp + 0x10], 0
je 0x5012dd
push 1
push 0x18
mov eax, dword [ebp + 0x10]
push eax
call fcn.004c69f0
test eax, eax
jne 0x5012dd
push 0x8c
push 0x608684
call fcn.004c6b20
test eax, eax
je 0x5012dd
int3
mov edx, dword [ebp + 0xc]
and edx, 0x4000
je 0x5012fc
push 0x8d
push 0x6086bc
call fcn.004c6b20
test eax, eax
je 0x5012fc
int3
mov ecx, dword [ebp - 0x230]
cmp dword [ecx + 4], 0xffffffff
je 0x50131c
push 0x90
push 0x6086f4
call fcn.004c6b20
test eax, eax
je 0x50131c
int3
mov eax, dword [ebp + 0xc]
and eax, 0xffff7fff
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp - 0x230]
mov dword [ecx + 8], 0
mov edx, dword [ebp - 0x230]
mov dword [edx + 4], 0xffffffff
mov ecx, dword [ebp - 0x230]
add ecx, 0xc
call fcn.0040f8e0
cmp dword [ebp + 8], 0
je 0x50138a
push 0
push 0x104
mov eax, dword [ebp + 8]
push eax
call fcn.00502bd0
test eax, eax
jl 0x50138a
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x228]
push eax
call fcn.005022d0
test eax, eax
jne 0x501388
xor eax, eax
jmp 0x5015d3
jmp 0x5013b0
cmp dword [ebp + 0x10], 0
je 0x5013a9
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 0xc], 3
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp + 0x10]
add ecx, 0x14
call fcn.0040f6f0
xor eax, eax
jmp 0x5015d3
lea eax, [ebp - 0x228]
push eax
mov ecx, dword [ebp - 0x230]
add ecx, 0xc
call fcn.0040f6f0
mov dword [ebp - 8], 0
mov ecx, dword [ebp + 0xc]
and ecx, 3
mov dword [ebp - 0x234], ecx
je 0x5013ee
cmp dword [ebp - 0x234], 1
je 0x5013f7
cmp dword [ebp - 0x234], 2
je 0x501400
jmp 0x501409
mov dword [ebp - 8], 0x80000000
jmp 0x501421
mov dword [ebp - 8], 0x40000000
jmp 0x501421
mov dword [ebp - 8], 0xc0000000
jmp 0x501421
xor edx, edx
jne 0x501421
push 0xbd
push 0x60872c
call fcn.004c6b20
test eax, eax
je 0x501421
int3
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
and ecx, 0x70
mov dword [ebp - 0x238], ecx
cmp dword [ebp - 0x238], 0x40
ja case.0x50144a.1
mov edx, dword [ebp - 0x238]
movzx eax, byte [edx + 0x5015f8]
jmp dword [eax*4 + 0x5015e4]
xor ecx, ecx
jne case.0x50144a.0
push 0xc5
push 0x608764
call fcn.004c6b20
test eax, eax
je case.0x50144a.0
int3
mov dword [ebp - 4], 0
jmp 0x50148b
mov dword [ebp - 4], 1
jmp 0x50148b
mov dword [ebp - 4], 2
jmp 0x50148b
mov dword [ebp - 4], 3
mov dword [ebp - 0x18], 0xc
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 0xc]
and eax, 0x80
neg eax
sbb eax, eax
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 0xc]
and ecx, 0x1000
je 0x5014d3
mov edx, dword [ebp + 0xc]
and edx, 0x2000
je 0x5014ca
mov dword [ebp - 0x1c], 4
jmp 0x5014d1
mov dword [ebp - 0x1c], 2
jmp 0x5014da
mov dword [ebp - 0x1c], 3
mov eax, dword [ebp + 0xc]
and eax, 0xc0000
cmp eax, 0xc0000
jne 0x5014fd
push 0xed
push 0x60879c
call fcn.004c6b20
test eax, eax
je 0x5014fd
int3
mov dword [ebp - 0x22c], 0x80
mov edx, dword [ebp + 0xc]
and edx, 0x10000
je 0x501523
mov eax, dword [ebp - 0x22c]
or eax, 0x20000000
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp + 0xc]
and ecx, 0x20000
je 0x501540
mov edx, dword [ebp - 0x22c]
or edx, 0x80000000
mov dword [ebp - 0x22c], edx
mov eax, dword [ebp + 0xc]
and eax, 0x40000
je 0x50155c
mov ecx, dword [ebp - 0x22c]
or ecx, 0x10000000
mov dword [ebp - 0x22c], ecx
mov edx, dword [ebp + 0xc]
and edx, 0x80000
je 0x501578
mov eax, dword [ebp - 0x22c]
or eax, 0x8000000
mov dword [ebp - 0x22c], eax
push 0
mov ecx, dword [ebp - 0x22c]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [0x6dffa4]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x5015b5
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call fcn.00500d20
xor eax, eax
jmp 0x5015d3
mov eax, dword [ebp - 0x230]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x230]
mov dword [edx + 8], 1
mov eax, 1
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.00523400
mov esp, ebp
pop ebp
ret 0xc