Function at 0x405784
Capabilities:
Inspect section memory permissions

Disassembly:
sub esp, 0x18
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi + 0x258]
xor ebx, ebx
test ecx, 0x20000000
je 0x4057aa
mov eax, dword [esp + 0x24]
cmp dword [eax + 4], ebx
jne 0x4057c5
pop esi
xor eax, eax
pop ebx
add esp, 0x18
ret 4
test ecx, 0x40000000
je 0x4057c5
mov edx, dword [esp + 0x24]
cmp dword [edx + 8], ebx
jne 0x4057c5
pop esi
xor eax, eax
pop ebx
add esp, 0x18
ret 4
push ebp
push edi
mov edi, dword [esi + 0x270]
inc edi
and ecx, 0x80000000
mov dword [esi + 0x270], edi
mov eax, edi
mov dword [esp + 0x10], ecx
je 0x405837
mov ecx, dword [esi + 0x28c]
cmp ecx, ebx
jg 0x4057f1
mov ecx, 1
cdq
idiv ecx
mov eax, edx
shl eax, 0xa
cdq
idiv ecx
mov ecx, dword [esi + 0x2b4]
mov edx, dword [esi + 0x2bc]
imul ecx, dword [eax*4 + 0x476920]
add ecx, edx
mov edx, dword [esi + 0x2b8]
mov dword [esi + 0x2ac], ecx
imul edx, dword [eax*4 + 0x476920]
add edx, dword [esi + 0x2c0]
mov dword [esi + 0x2b0], edx
jmp 0x405947
mov edx, dword [esi + 0x2c0]
mov edi, dword [esi + 0x2b0]
mov ecx, dword [esi + 0x2bc]
mov ebp, dword [esi + 0x2ac]
mov eax, dword [esi + 0x2cc]
add edi, edx
add ebp, ecx
mov dword [esi + 0x2b0], edi
mov edi, dword [esi + 0x2d0]
add ecx, eax
add edx, edi
cmp eax, ebx
mov dword [esi + 0x2ac], ebp
mov dword [esi + 0x2bc], ecx
mov dword [esi + 0x2c0], edx
jle 0x405891
mov ecx, dword [esi + 0x2d4]
cmp ecx, ebx
je 0x40588f
cmp eax, ecx
jle 0x4058a7
jmp 0x4058a1
cmp eax, ebx
jge 0x4058a7
mov ecx, dword [esi + 0x2d4]
cmp ecx, ebx
je 0x4058a7
cmp eax, ecx
jge 0x4058a7
mov dword [esi + 0x2cc], ecx
cmp edi, ebx
jle 0x4058bd
mov eax, dword [esi + 0x2d8]
cmp eax, ebx
je 0x4058bb
cmp edi, eax
jle 0x4058d3
jmp 0x4058cd
cmp edi, ebx
jge 0x4058d3
mov eax, dword [esi + 0x2d8]
cmp eax, ebx
je 0x4058d3
cmp edi, eax
jge 0x4058d3
mov dword [esi + 0x2d0], eax
mov ecx, dword [esi + 0x2cc]
cmp ecx, ebx
jle 0x4058f3
mov eax, dword [esi + 0x2c4]
cmp eax, ebx
je 0x4058f1
cmp dword [esi + 0x2bc], eax
jle 0x40590d
jmp 0x405907
cmp ecx, ebx
jge 0x40590d
mov eax, dword [esi + 0x2c4]
cmp eax, ebx
je 0x40590d
cmp dword [esi + 0x2bc], eax
jge 0x40590d
mov dword [esi + 0x2bc], eax
mov ecx, dword [esi + 0x2d0]
cmp ecx, ebx
jle 0x40592d
mov eax, dword [esi + 0x2c8]
cmp eax, ebx
je 0x40592b
cmp dword [esi + 0x2c0], eax
jle 0x405947
jmp 0x405941
cmp ecx, ebx
jge 0x405947
mov eax, dword [esi + 0x2c8]
cmp eax, ebx
je 0x405947
cmp dword [esi + 0x2c0], eax
jge 0x405947
mov dword [esi + 0x2c0], eax
mov edx, dword [esp + 0x10]
mov ecx, dword [esi + 0x2ac]
mov ebp, dword [esi + 0x2b0]
xor eax, eax
cmp edx, ebx
mov dword [esp + 0x14], eax
je 0x40597d
mov edx, dword [esp + 0x2c]
cmp dword [edx + 0x10], 1
jne 0x405a01
mov ecx, dword [esi + 0x2bc]
mov ebp, dword [esi + 0x2c0]
jmp 0x4059f8
test dword [esi + 0x258], 0x10000000
je 0x4059de
mov edx, dword [esi + 0x2bc]
cmp edx, ebx
mov edi, 1
jle 0x4059a2
cmp dword [esi + 0x2b4], ecx
jle 0x4059ae
jmp 0x4059ac
jge 0x4059ae
cmp dword [esi + 0x2b4], ecx
jge 0x4059ae
xor edi, edi
mov edx, dword [esi + 0x2c0]
cmp edx, ebx
jle 0x4059c2
cmp dword [esi + 0x2b8], ebp
jg 0x405a01
jmp 0x4059cc
jge 0x4059cc
cmp dword [esi + 0x2b8], ebp
jl 0x405a01
cmp edi, ebx
je 0x405a01
mov ecx, dword [esi + 0x2b4]
mov ebp, dword [esi + 0x2b8]
jmp 0x4059ec
mov edx, dword [esi + 0x270]
cmp edx, dword [esi + 0x280]
jl 0x405a01
mov dword [esi + 0x250], ebx
mov dword [esi + 0x254], ebx
mov eax, 1
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x2c]
mov edi, dword [edx]
mov edx, dword [esi + 0x1c]
mov ebx, dword [esi + 0x258]
or edi, eax
test bl, 2
mov eax, dword [esi + 0x18]
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], edx
lea eax, [esi + 8]
mov edx, eax
mov eax, dword [edx]
mov dword [esp + 0x18], eax
mov eax, dword [edx + 4]
mov dword [esp + 0x1c], eax
mov eax, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x24], edx
je 0x405a4f
mov ebx, ecx
sar ebx, 0x10
sub eax, ebx
sub eax, dword [esp + 0x18]
add dword [esp + 0x10], eax
jmp 0x405a73
test bl, 4
je 0x405a73
sub eax, dword [esp + 0x18]
cdq
sub eax, edx
mov ebx, eax
mov eax, ecx
sar eax, 0x10
cdq
sub eax, edx
mov edx, dword [esp + 0x24]
sar eax, 1
sar ebx, 1
sub ebx, eax
add dword [esp + 0x10], ebx
mov eax, dword [esi + 0x258]
test al, 0x20
je 0x405a92
mov ebx, dword [esp + 0x1c]
mov eax, ebp
sar eax, 0x10
sub edx, eax
mov eax, dword [esp + 0x2c]
sub edx, ebx
add eax, edx
jmp 0x405ab5
test al, 0x40
je 0x405ab9
mov eax, edx
sub eax, dword [esp + 0x1c]
cdq
sub eax, edx
mov ebx, eax
mov eax, ebp
sar eax, 0x10
cdq
sub eax, edx
sar eax, 1
sar ebx, 1
sub ebx, eax
mov eax, dword [esp + 0x2c]
add eax, ebx
mov dword [esp + 0x2c], eax
mov edx, dword [esi]
xor eax, eax
sar ecx, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x2c]
push edi
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x14]
push eax
push ecx
sar ebp, 0x10
mov ecx, esi
mov dword [esp + 0x30], ebp
call dword [edx + 0xc]
mov edx, dword [esi]
push edi
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
call dword [edx + 0x1c]
mov eax, dword [esp + 0x14]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x18
ret 4