Function at 0x40e918
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
call fcn.004520f0
mov dword [ebp - 8], eax
call fcn.004520fa
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 0x40e94e
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
and eax, 2
test eax, eax
je 0x40e956
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 0x40e96e
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 0xa]
cmp edx, 8
jge 0x40e990
mov eax, dword [0x4c383c]
sub eax, dword [ebp - 4]
mov dword [0x4c383c], eax
cmp dword [0x4c383c], 0
jge 0x40e98e
mov dword [0x4c383c], 0
jmp 0x40e9da
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
and edx, 2
test edx, edx
jne 0x40e9ad
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0xa]
mov edx, dword [ebp - 0xc]
sub edx, 8
cmp ecx, edx
jl 0x40e9da
mov eax, dword [0x4c383c]
add eax, dword [ebp - 4]
mov dword [0x4c383c], eax
mov ecx, dword [0x4c383c]
add ecx, dword [ebp - 0xc]
cmp ecx, dword [0x4c35e4]
jle 0x40e9da
mov edx, dword [0x4c35e4]
sub edx, dword [ebp - 0xc]
mov dword [0x4c383c], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
and ecx, 4
test ecx, ecx
jne 0x40e9f2
mov edx, dword [ebp + 8]
movsx eax, word [edx + 8]
cmp eax, 8
jge 0x40ea16
mov ecx, dword [0x4c3838]
sub ecx, dword [ebp - 4]
mov dword [0x4c3838], ecx
cmp dword [0x4c3838], 0
jge 0x40ea14
mov dword [0x4c3838], 0
jmp 0x40ea60
mov edx, dword [ebp + 8]
mov eax, dword [edx]
and eax, 8
test eax, eax
jne 0x40ea33
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 8]
mov eax, dword [ebp - 8]
sub eax, 8
cmp edx, eax
jl 0x40ea60
mov ecx, dword [0x4c3838]
add ecx, dword [ebp - 4]
mov dword [0x4c3838], ecx
mov edx, dword [0x4c3838]
add edx, dword [ebp - 8]
cmp edx, dword [0x4c39e8]
jle 0x40ea60
mov eax, dword [0x4c39e8]
sub eax, dword [ebp - 8]
mov dword [0x4c3838], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
and edx, 0x100000
test edx, edx
jne 0x40ea83
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
and ecx, 0x10000
test ecx, ecx
je 0x40eb77
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.0040e2d0
add esp, 8
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0040e716
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40eb34
push str.dd
call fcn.0041d299
add esp, 4
mov ecx, dword [ebp + 8]
movsx edx, word [ecx + 8]
cmp edx, 0x1d2
jge 0x40eae8
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 8]
mov dword [ebp - 0x1c], ecx
jmp 0x40eaef
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 0x40eb10
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0xa]
mov dword [ebp - 0x20], eax
jmp 0x40eb17
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.0041c8e5
add esp, 0xc
jmp 0x40eb77
cmp dword [ebp - 0x10], 1
jne 0x40eb4b
call fcn.0040592f
mov dword [0x4c3830], eax
call fcn.0040efae
jmp 0x40eb77
cmp dword [ebp - 0x10], 2
jne 0x40eb62
mov dword [0x4c3830], 0
call fcn.00418d8e
jmp 0x40eb77
cmp dword [ebp - 0x10], 3
jne 0x40eb77
call fcn.0040592f
mov dword [0x4c3830], eax
call fcn.00418d8e
mov ecx, dword [0x4a8168]
and ecx, 0x80
test ecx, ecx
je 0x40ec1b
mov edx, dword [0x4a6f04]
and edx, 0x8000000
test edx, edx
je 0x40ebaa
mov eax, dword [0x487b60]
xor eax, 1
mov dword [0x487b60], eax
jmp 0x40ec1b
mov ecx, dword [0x4a6f04]
and ecx, 0x10000000
test ecx, ecx
je 0x40ebc6
mov dword [0x4c3840], 0xa
jmp 0x40ec1b
mov edx, dword [0x4a6f04]
and edx, 0x20000000
test edx, edx
je 0x40ebdd
call fcn.0040e762
jmp 0x40ec1b
mov eax, dword [0x4a6f04]
and eax, 0x40000000
test eax, eax
je 0x40ebf2
call fcn.0040e79e
jmp 0x40ec1b
mov ecx, dword [0x4a6f04]
and ecx, 0x80000000
test ecx, ecx
je 0x40ec09
call fcn.0040e7d4
jmp 0x40ec1b
mov edx, dword [0x4a6f08]
and edx, 1
test edx, edx
je 0x40ec1b
call fcn.0040e87a
mov eax, dword [0x4a8168]
and eax, 1
test eax, eax
je 0x40ec65
mov ecx, dword [0x4a6f08]
and ecx, 0x1000000
test ecx, ecx
je 0x40ec48
mov edx, dword [0x4a8168]
or edx, 0x40
mov dword [0x4a8168], edx
jmp 0x40ec65
mov eax, dword [0x4a6f08]
and eax, 0x800000
test eax, eax
je 0x40ec65
mov ecx, dword [0x4a8168]
or ch, 8
mov dword [0x4a8168], ecx
mov esp, ebp
pop ebp
ret