Function at 0x40c340
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x45e754]
xor eax, ebp
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x230], ecx
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.0040f520
cmp dword [ebp + 8], 0
je 0x40c3ca
push 0
push 0x104
mov eax, dword [ebp + 8]
push eax
call fcn.0040eef0
test eax, eax
jl 0x40c3ca
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x228]
push eax
call fcn.0040b390
add esp, 0xc
test eax, eax
jne 0x40c3c8
xor eax, eax
jmp 0x40c5b1
jmp 0x40c3f0
cmp dword [ebp + 0x10], 0
je 0x40c3e9
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 8], 3
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp + 0x10]
add ecx, 0x10
call fcn.0040f350
xor eax, eax
jmp 0x40c5b1
lea eax, [ebp - 0x228]
push eax
mov ecx, dword [ebp - 0x230]
add ecx, 0xc
call fcn.0040f350
mov dword [ebp - 8], 0
mov ecx, dword [ebp + 0xc]
and ecx, 3
mov dword [ebp - 0x234], ecx
je 0x40c42e
cmp dword [ebp - 0x234], 1
je 0x40c437
cmp dword [ebp - 0x234], 2
je 0x40c440
jmp 0x40c447
mov dword [ebp - 8], 0x80000000
jmp 0x40c447
mov dword [ebp - 8], 0x40000000
jmp 0x40c447
mov dword [ebp - 8], 0xc0000000
mov dword [ebp - 4], 0
mov edx, dword [ebp + 0xc]
and edx, 0x70
mov dword [ebp - 0x238], edx
cmp dword [ebp - 0x238], 0x40
ja case.0x40c470.0
mov eax, dword [ebp - 0x238]
movzx ecx, byte [eax + 0x40c5d8]
jmp dword [ecx*4 + 0x40c5c4]
mov dword [ebp - 4], 0
jmp 0x40c499
mov dword [ebp - 4], 1
jmp 0x40c499
mov dword [ebp - 4], 2
jmp 0x40c499
mov dword [ebp - 4], 3
mov dword [ebp - 0x18], 0xc
mov dword [ebp - 0x14], 0
mov edx, dword [ebp + 0xc]
and edx, 0x80
neg edx
sbb edx, edx
add edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp + 0xc]
and eax, 0x1000
je 0x40c4e1
mov ecx, dword [ebp + 0xc]
and ecx, 0x2000
je 0x40c4d8
mov dword [ebp - 0x1c], 4
jmp 0x40c4df
mov dword [ebp - 0x1c], 2
jmp 0x40c4e8
mov dword [ebp - 0x1c], 3
mov dword [ebp - 0x22c], 0x80
mov edx, dword [ebp + 0xc]
and edx, 0x10000
je 0x40c50e
mov eax, dword [ebp - 0x22c]
or eax, 0x20000000
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp + 0xc]
and ecx, 0x20000
je 0x40c52b
mov edx, dword [ebp - 0x22c]
or edx, 0x80000000
mov dword [ebp - 0x22c], edx
mov eax, dword [ebp + 0xc]
and eax, 0x40000
je 0x40c547
mov ecx, dword [ebp - 0x22c]
or ecx, 0x10000000
mov dword [ebp - 0x22c], ecx
mov edx, dword [ebp + 0xc]
and edx, 0x80000
je 0x40c563
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 [0x45309c]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x40c593
xor eax, eax
jmp 0x40c5b1
mov ecx, dword [ebp - 0x230]
mov edx, dword [ebp - 0xc]
mov dword [ecx + 4], edx
mov eax, dword [ebp - 0x230]
mov dword [eax + 8], 1
mov eax, 1
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.00435d49
mov esp, ebp
pop ebp
ret 0xc