Function at 0x413c11
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
mov esi, ecx
cmp byte [esi + 4], 0
je 0x413e9a
mov eax, dword [esi + 0x3cc]
cmp eax, 0x10
jne 0x413c3f
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0041362a
jmp 0x413e9a
cdq
and edx, 3
push ebx
lea ebx, [edx + eax]
xor ecx, ecx
sar ebx, 2
cmp ebx, 6
setne cl
lea eax, [ebx - 4]
push edi
inc ecx
neg eax
sbb eax, eax
and eax, ecx
shl eax, 5
mov ecx, dword [eax + 0x5e5c24]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [eax + 0x5e5c2c]
mov eax, dword [eax + 0x5e5c34]
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], ecx
lea eax, [esi + 0x454]
test ebx, ebx
jle 0x413ccc
lea ecx, [esi + 0x1e8]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x10], ebx
movzx edx, byte [ecx]
shl edx, 0x18
mov dword [eax], edx
movzx edx, byte [ecx + 1]
shl edx, 0x10
or dword [eax], edx
movzx edx, byte [ecx + 2]
shl edx, 8
or dword [eax], edx
movzx edi, byte [ecx + 3]
or dword [eax], edi
mov edi, dword [ebp - 8]
mov edi, dword [edi]
add dword [ebp - 8], 4
mov edx, eax
xor dword [edx], edi
add ecx, 4
add eax, 4
dec dword [ebp - 0x10]
jne 0x413c94
xor eax, eax
inc eax
mov dword [ebp - 0x10], eax
mov edi, 0xff
cmp dword [esi + 0x3d0], eax
jle 0x413dc9
lea eax, [esi + 0x208]
mov dword [ebp - 0xc], eax
test ebx, ebx
jle 0x413d97
mov ecx, dword [ebp - 0x1c]
lea eax, [esi + 0x434]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
sub eax, ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
sub eax, ecx
mov dword [ebp + 8], ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], ebx
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x24]
add eax, ecx
cdq
idiv ebx
mov eax, dword [esi + edx*4 + 0x454]
mov edx, dword [ebp - 0x28]
sar eax, 8
and eax, edi
mov dword [ebp - 0x2c], eax
lea eax, [edx + ecx]
cdq
idiv ebx
mov ecx, dword [ebp - 0x2c]
mov ecx, dword [ecx*4 + 0x5e43f8]
mov eax, dword [esi + edx*4 + 0x454]
and eax, edi
xor ecx, dword [eax*4 + 0x5e47f8]
mov eax, dword [ebp + 8]
cdq
idiv ebx
movsx eax, word [esi + edx*4 + 0x456]
and eax, edi
xor ecx, dword [eax*4 + 0x5e3ff8]
mov eax, dword [ebp - 0x14]
movzx edx, byte [eax + 0x23]
xor ecx, dword [edx*4 + 0x5e3bf8]
mov edx, dword [ebp - 8]
xor ecx, dword [edx]
add dword [ebp - 8], 4
mov dword [eax], ecx
add eax, 4
inc dword [ebp + 8]
dec dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
jne 0x413d1c
mov eax, ebx
shl eax, 2
push eax
lea eax, [esi + 0x434]
push eax
lea eax, [esi + 0x454]
push eax
call fcn.005a5f50
add dword [ebp - 0xc], 0x20
add esp, 0xc
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0x3d0]
jl 0x413cec
and dword [ebp - 8], 0
test ebx, ebx
jle 0x413e98
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov dword [ebp + 8], eax
lea eax, [esi + 0x454]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 4]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 4]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x3d0]
mov edx, dword [ebp - 8]
lea eax, [edx + eax*8]
mov eax, dword [esi + eax*4 + 0x1e8]
mov edx, dword [ebp - 0x10]
movzx edx, byte [edx + 3]
mov dword [ebp + 0xc], eax
sar eax, 0x18
xor al, byte [edx + 0x5e2af8]
add dword [ebp - 0x10], 4
mov byte [ecx], al
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp + 8]
cdq
idiv ebx
movsx eax, word [esi + edx*4 + 0x456]
mov edx, dword [ebp + 0xc]
and eax, edi
sar edx, 0x10
xor dl, byte [eax + 0x5e2af8]
mov eax, dword [ebp + 8]
mov byte [ecx + 1], dl
cdq
idiv ebx
mov eax, dword [esi + edx*4 + 0x454]
mov edx, dword [ebp + 0xc]
sar eax, 8
and eax, edi
sar edx, 8
xor dl, byte [eax + 0x5e2af8]
mov eax, dword [ebp - 0x28]
add eax, dword [ebp + 8]
mov byte [ecx + 2], dl
cdq
idiv ebx
mov eax, dword [esi + edx*4 + 0x454]
and eax, edi
mov al, byte [eax + 0x5e2af8]
xor al, byte [ebp + 0xc]
add ecx, 4
inc dword [ebp - 8]
inc dword [ebp + 8]
mov byte [ecx - 1], al
cmp dword [ebp - 8], ebx
jl 0x413df9
pop edi
pop ebx
pop esi
leave
ret 8