Function at 0x405b18
Capabilities:
Encrypt data using chaskey
Inspect section memory permissions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x3fe4209c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
inc ebx
push ebx
mov dword [ebp - 0x30], eax
push 0x3fe3491c
xor eax, eax
push edi
mov word [ebp - 0x24], ax
call fcn.00402744
movzx eax, al
xor eax, dword [esi]
push ebx
push 0x3fe348f4
and eax, ebx
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
add eax, eax
xor eax, dword [esi]
push ebx
push 0x3fe348c8
and eax, 2
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 2
xor eax, dword [esi]
push ebx
push 0x3fe34898
and eax, 4
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 3
xor eax, dword [esi]
xor ebx, ebx
push ebx
push 0x3fe34874
and eax, 8
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 4
xor eax, dword [esi]
push 1
push 0x3fe34844
and eax, 0x10
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 5
xor eax, dword [esi]
push 1
push 0x3fe34824
and eax, 0x20
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 6
xor eax, dword [esi]
push 1
push 0x3fe347f4
and eax, 0x40
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 7
xor eax, dword [esi]
push 1
push 0x3fe347b8
and eax, 0x80
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 8
xor eax, dword [esi]
push 1
push 0x3fe34790
and eax, 0x100
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 9
xor eax, dword [esi]
push 1
push 0x3fe34768
and eax, 0x200
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0xa
xor eax, dword [esi]
push ebx
push 0x3fe34744
and eax, 0x400
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0xb
xor eax, dword [esi]
push 1
push 0x3fe3471c
and eax, 0x800
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 8
xor eax, dword [esi + 4]
push ebx
push 0x3fe316bc
and eax, 0x100
xor dword [esi + 4], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0xc
xor eax, dword [esi]
push ebx
push 0x3fe316a0
and eax, 0x1000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0xd
xor eax, dword [esi]
push ebx
push 0x3fe31680
and eax, 0x2000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0xe
xor eax, dword [esi]
push ebx
push 0x3fe346fc
and eax, 0x4000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0xf
xor eax, dword [esi]
push 1
push 0x3fe346d8
and eax, 0x8000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0x11
xor eax, dword [esi]
push 1
push 0x3fe346b8
and eax, 0x20000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0x12
xor eax, dword [esi]
push 1
push 0x3fe31658
and eax, 0x40000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0x13
xor eax, dword [esi]
push 1
push 0x3fe34690
and eax, 0x80000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0x15
xor eax, dword [esi]
push ebx
push 0x3fe34664
and eax, 0x200000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0x17
xor eax, dword [esi]
push ebx
push 0x3fe34644
and eax, 0x800000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0x18
xor eax, dword [esi]
push ebx
push 0x3fe31640
and eax, 0x1000000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0x1d
xor eax, dword [esi]
push ebx
push 0x3fe31628
and eax, 0x20000000
xor dword [esi], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 0x1e
xor eax, dword [esi]
push ebx
push 0x3fe31610
and eax, 0x40000000
xor dword [esi], eax
push edi
call fcn.00402744
mov ecx, dword [esi]
movzx eax, al
shl eax, 0x1f
push ebx
and ecx, 0x7fffffff
push 0x3fe315f8
or eax, ecx
push edi
mov dword [esi], eax
call fcn.00402744
movzx eax, al
xor eax, dword [esi + 4]
push ebx
push 0x3fe315dc
and eax, 1
xor dword [esi + 4], eax
push edi
call fcn.00402744
movzx eax, al
add eax, eax
xor eax, dword [esi + 4]
push ebx
push 0x3fe3462c
and eax, 2
xor dword [esi + 4], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 2
xor eax, dword [esi + 4]
push ebx
push 0x3fe315c4
and eax, 4
xor dword [esi + 4], eax
push edi
call fcn.00402744
movzx eax, al
shl eax, 3
xor eax, dword [esi + 4]
push 0x15
and eax, 8
xor dword [esi + 4], eax
lea eax, [esi + 8]
push eax
push ebx
push 0x3fe34618
push edi
call fcn.0040277e
push 0x12
lea eax, [esi + 0x32]
push eax
push ebx
push 0x3fe34608
push edi
call fcn.0040277e
mov eax, dword [ebp - 0x30]
cmp eax, ebx
je 0x405efc
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x405e95
sub eax, edx
sar eax, 1
add eax, 0x2b
mov dword [ebp - 0x2c], eax
add eax, eax
push eax
push 0x40
mov dword [ebp - 0x34], eax
call dword [0x3fe31114]
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x405efc
push 0x3fe353b0
push dword [ebp - 0x2c]
push eax
call fcn.00403673
push dword [ebp - 0x30]
push dword [ebp - 0x2c]
push dword [ebp - 0x28]
call fcn.00405833
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x34]
xor ecx, ecx
mov word [edx + eax - 2], cx
push 0x10
lea ecx, [ebp - 0x24]
push ecx
push eax
call fcn.004061d9
push dword [ebp - 0x28]
call dword [0x3fe31110]
lea eax, [ebp - 0x24]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x405f02
sub eax, edx
sar eax, 1
jne 0x4063df
xor eax, eax
mov word [esi + 0x56], ax
push 0x101
lea eax, [esi + 0x74]
push eax
push ebx
push 0x3fe31494
push edi
call fcn.0040277e
push 0x101
lea eax, [esi + 0x276]
push eax
push ebx
push 0x3fe31424
push edi
call fcn.0040277e
push ebx
push 0x3fe31770
push edi
call fcn.00402744
test al, al
jne 0x406412
push 0x33
lea eax, [esi + 0x478]
push eax
push ebx
push 0x3fe3457c
push edi
call fcn.0040277e
push ebx
push 0x3fe345bc
push edi
call fcn.00402744
push 1
push 0x3fe31540
push edi
mov dword [esi + 0x4e0], eax
call fcn.00402744
push ebx
push 0x3fe3151c
push edi
mov dword [esi + 0x4e4], eax
call fcn.00402744
push ebx
push 0x3fe314f0
push edi
mov dword [esi + 0x4e8], eax
call fcn.00402744
push ebx
push 0x3fe314d8
push edi
mov dword [esi + 0x4ec], eax
call fcn.00402744
push ebx
push 0x3fe3459c
push edi
mov dword [esi + 0x4f0], eax
call fcn.00402744
push 1
push 0x3fe314b0
push edi
mov dword [esi + 0x4f4], eax
call fcn.00402744
push edi
mov byte [esi + 0x4f8], al
call fcn.0040576d
movzx eax, al
shl eax, 0x10
xor eax, dword [esi]
push edi
and eax, 0x10000
xor dword [esi], eax
call fcn.0040610d
movzx eax, al
shl eax, 0x19
xor eax, dword [esi]
push 0x30
and eax, 0x2000000
xor dword [esi], eax
lea eax, [esi + 0x4fa]
push eax
push ebx
push 0x3fe35408
push edi
call fcn.0040277e
push 4
lea eax, [esi + 0x9e0]
push eax
push ebx
push 0x3fe31460
push edi
call fcn.0040277e
push 1
push 0x3fe315ac
push edi
call fcn.00402744
shl eax, 5
xor eax, dword [esi + 4]
push ebx
and eax, 0xe0
xor dword [esi + 4], eax
push 0x3fe3174c
push edi
call fcn.00402744
mov ecx, dword [ebp - 4]
movzx eax, al
shl eax, 0xb
xor eax, dword [esi + 4]
pop edi
and eax, 0x800
xor dword [esi + 4], eax
pop esi
xor ecx, ebp
pop ebx
call fcn.00404395
leave
ret 0xc
lea eax, [ebp - 0x22]
push eax
lea eax, [ebp - 0x3c]
push eax
call dword [0x3fe3105c]
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x24]
call dword [0x3fe31068]
push 0x1e
lea eax, [ebp - 0x22]
push eax
lea eax, [esi + 0x56]
push eax
call dword [0x3fe31014]
add esp, 0xc
jmp 0x405f1c
push 0x202
lea eax, [esi + 0x276]
push ebx
push eax
call fcn.004026f8
push 0x202
lea eax, [esi + 0x74]
push ebx
push eax
call fcn.004026f8
add esp, 0x18
and dword [esi], 0xfffffff7
jmp 0x405f5d