Function at 0x40ddc8
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
call fcn.00451ee0
mov dword [ebp - 8], eax
call fcn.00451eea
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], 0x10
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
and ecx, 0x40
test ecx, ecx
jne 0x40ddfe
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
and eax, 2
test eax, eax
je 0x40de06
mov ecx, dword [ebp - 4]
shl ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
and eax, 1
test eax, eax
jne 0x40de1e
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0xa]
cmp edx, 8
jge 0x40de40
mov eax, dword [0x4c10fc]
sub eax, dword [ebp - 4]
mov dword [0x4c10fc], eax
cmp dword [0x4c10fc], 0
jge 0x40de3e
mov dword [0x4c10fc], 0
jmp 0x40de8a
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
and edx, 2
test edx, edx
jne 0x40de5d
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0xa]
mov edx, dword [ebp - 0xc]
sub edx, 8
cmp ecx, edx
jl 0x40de8a
mov eax, dword [0x4c10fc]
add eax, dword [ebp - 4]
mov dword [0x4c10fc], eax
mov ecx, dword [0x4c10fc]
add ecx, dword [ebp - 0xc]
cmp ecx, dword [0x4c0ea4]
jle 0x40de8a
mov edx, dword [0x4c0ea4]
sub edx, dword [ebp - 0xc]
mov dword [0x4c10fc], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
and ecx, 4
test ecx, ecx
jne 0x40dea2
mov edx, dword [ebp + 8]
movsx eax, word [edx + 8]
cmp eax, 8
jge 0x40dec6
mov ecx, dword [0x4c10f8]
sub ecx, dword [ebp - 4]
mov dword [0x4c10f8], ecx
cmp dword [0x4c10f8], 0
jge 0x40dec4
mov dword [0x4c10f8], 0
jmp 0x40df10
mov edx, dword [ebp + 8]
mov eax, dword [edx]
and eax, 8
test eax, eax
jne 0x40dee3
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 8]
mov eax, dword [ebp - 8]
sub eax, 8
cmp edx, eax
jl 0x40df10
mov ecx, dword [0x4c10f8]
add ecx, dword [ebp - 4]
mov dword [0x4c10f8], ecx
mov edx, dword [0x4c10f8]
add edx, dword [ebp - 8]
cmp edx, dword [0x4c12a8]
jle 0x40df10
mov eax, dword [0x4c12a8]
sub eax, dword [ebp - 8]
mov dword [0x4c10f8], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
and edx, 0x100000
test edx, edx
jne 0x40df33
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
and ecx, 0x10000
test ecx, ecx
je 0x40e027
mov edx, dword [ebp + 8]
movsx eax, word [edx + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0xa]
mov dword [ebp - 0x18], edx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
push ecx
call fcn.0040d780
add esp, 8
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0040dbc6
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40dfe4
push str.dd
call fcn.0041ca89
add esp, 4
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 8]
cmp edx, 0x1d2
jge 0x40df98
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 8]
mov dword [ebp - 0x1c], ecx
jmp 0x40df9f
mov dword [ebp - 0x1c], 0x1d2
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0xa]
cmp ecx, 0xfe
jge 0x40dfc0
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0xa]
mov dword [ebp - 0x20], eax
jmp 0x40dfc7
mov dword [ebp - 0x20], 0xfe
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x14]
push eax
push str.dd
call fcn.0041c0d5
add esp, 0xc
jmp 0x40e027
cmp dword [ebp - 0x10], 1
jne 0x40dffb
call fcn.0040592f
mov dword [0x4c10f0], eax
call fcn.0040e45e
jmp 0x40e027
cmp dword [ebp - 0x10], 2
jne 0x40e012
mov dword [0x4c10f0], 0
call fcn.00418685
jmp 0x40e027
cmp dword [ebp - 0x10], 3
jne 0x40e027
call fcn.0040592f
mov dword [0x4c10f0], eax
call fcn.00418685
mov ecx, dword [0x4a58e8]
and ecx, 0x80
test ecx, ecx
je 0x40e0cb
mov edx, dword [0x4a4684]
and edx, 0x8000000
test edx, edx
je 0x40e05a
mov eax, dword [0x4852f0]
xor eax, 1
mov dword [0x4852f0], eax
jmp 0x40e0cb
mov ecx, dword [0x4a4684]
and ecx, 0x10000000
test ecx, ecx
je 0x40e076
mov dword [0x4c1100], 0xa
jmp 0x40e0cb
mov edx, dword [0x4a4684]
and edx, 0x20000000
test edx, edx
je 0x40e08d
call fcn.0040dc12
jmp 0x40e0cb
mov eax, dword [0x4a4684]
and eax, 0x40000000
test eax, eax
je 0x40e0a2
call fcn.0040dc4e
jmp 0x40e0cb
mov ecx, dword [0x4a4684]
and ecx, 0x80000000
test ecx, ecx
je 0x40e0b9
call fcn.0040dc84
jmp 0x40e0cb
mov edx, dword [0x4a4688]
and edx, 1
test edx, edx
je 0x40e0cb
call fcn.0040dd2a
mov eax, dword [0x4a58e8]
and eax, 1
test eax, eax
je 0x40e115
mov ecx, dword [0x4a4688]
and ecx, 0x1000000
test ecx, ecx
je 0x40e0f8
mov edx, dword [0x4a58e8]
or edx, 0x40
mov dword [0x4a58e8], edx
jmp 0x40e115
mov eax, dword [0x4a4688]
and eax, 0x800000
test eax, eax
je 0x40e115
mov ecx, dword [0x4a58e8]
or ch, 8
mov dword [0x4a58e8], ecx
mov esp, ebp
pop ebp
ret