Function at 0x4175d0
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 ksa
Reference aes constants

Disassembly:
sub esp, 0x28
cmp byte [esi + 4], 0
je 0x41788f
mov eax, dword [esi + 0x3cc]
cmp eax, 0x10
jne 0x4175fb
mov eax, dword [esp + 0x2c]
push eax
push esi
mov eax, ecx
call fcn.004171f0
add esp, 0x28
ret 4
cdq
and edx, 3
push edi
lea edi, [edx + eax]
sar edi, 2
xor eax, eax
cmp edi, 4
je 0x417614
cmp edi, 6
setne al
inc eax
shl eax, 5
mov edx, dword [eax + 0x6213c4]
push ebx
push ebp
mov ebp, dword [eax + 0x6213cc]
mov eax, dword [eax + 0x6213d4]
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], ebp
lea eax, [esi + 0x454]
test edi, edi
jle 0x417690
lea ebx, [esi + 0x1e8]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], edi
nop
movzx ebx, byte [ecx]
shl ebx, 0x18
mov dword [eax], ebx
movzx ebx, byte [ecx + 1]
shl ebx, 0x10
or dword [eax], ebx
movzx ebx, byte [ecx + 2]
shl ebx, 8
or dword [eax], ebx
movzx ebp, byte [ecx + 3]
or dword [eax], ebp
mov ebp, dword [esp + 0xc]
mov ebp, dword [ebp]
add dword [esp + 0xc], 4
mov ebx, eax
xor dword [ebx], ebp
add ecx, 4
add eax, 4
dec dword [esp + 0x10]
jne 0x417650
mov ebp, dword [esp + 0x18]
mov eax, 1
mov dword [esp + 0x1c], eax
cmp dword [esi + 0x3d0], eax
jle 0x4177a8
lea ecx, [esi + 0x208]
lea ebx, [esi + 0x434]
mov dword [esp + 0xc], ecx
test edi, edi
jle 0x41776c
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], eax
mov eax, ebp
mov ebp, dword [esp + 0x24]
sub eax, edx
sub ebp, edx
mov ecx, edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], edi
jmp 0x4176e8
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
add eax, ecx
cdq
idiv edi
add ebx, 4
mov eax, dword [esi + edx*4 + 0x454]
sar eax, 8
and eax, 0xff
mov dword [esp + 0x30], eax
lea eax, [ecx + ebp]
cdq
idiv edi
mov eax, dword [esp + 0x30]
mov ebp, dword [eax*4 + 0x61fb98]
mov eax, ecx
inc ecx
mov edx, dword [esi + edx*4 + 0x454]
and edx, 0xff
xor ebp, dword [edx*4 + 0x61ff98]
cdq
idiv edi
movsx eax, word [esi + edx*4 + 0x456]
movzx edx, byte [ebx + 0x1f]
and eax, 0xff
xor ebp, dword [eax*4 + 0x61f798]
mov eax, dword [esp + 0x10]
xor ebp, dword [edx*4 + 0x61f398]
add eax, 4
xor ebp, dword [eax - 4]
dec dword [esp + 0x14]
mov dword [ebx - 4], ebp
mov dword [esp + 0x10], eax
jne 0x4176e0
mov ebp, dword [esp + 0x18]
lea eax, [edi*4]
push eax
lea ebx, [esi + 0x434]
lea eax, [esi + 0x454]
push ebx
push eax
call fcn.005bcfd0
mov eax, dword [esp + 0x28]
add dword [esp + 0x18], 0x20
mov edx, dword [esp + 0x2c]
inc eax
add esp, 0xc
mov dword [esp + 0x1c], eax
cmp eax, dword [esi + 0x3d0]
jl 0x4176b5
mov dword [esp + 0xc], 0
test edi, edi
jle 0x41788c
mov ecx, dword [esp + 0x38]
lea eax, [esi + 0x454]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x24]
sub edx, ebp
sub eax, ebp
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
jmp 0x4177e0
mov eax, dword [esi + 0x3d0]
mov edx, dword [esp + 0xc]
lea eax, [edx + eax*8]
mov ebx, dword [esi + eax*4 + 0x1e8]
mov edx, dword [esp + 0x38]
movzx eax, byte [edx + 3]
mov edx, ebx
sar edx, 0x18
xor dl, byte [eax + 0x61e298]
mov eax, dword [esp + 0x30]
add eax, ebp
mov byte [ecx], dl
cdq
idiv edi
mov eax, ebx
sar eax, 0x10
add dword [esp + 0x38], 4
add ecx, 4
movsx edx, word [esi + edx*4 + 0x456]
and edx, 0xff
xor al, byte [edx + 0x61e298]
mov byte [ecx - 3], al
mov eax, ebp
cdq
idiv edi
mov eax, ebx
sar eax, 8
mov edx, dword [esi + edx*4 + 0x454]
sar edx, 8
and edx, 0xff
xor al, byte [edx + 0x61e298]
mov byte [ecx - 2], al
mov eax, dword [esp + 0x2c]
lea eax, [eax + ebp]
cdq
idiv edi
inc ebp
mov eax, dword [esi + edx*4 + 0x454]
and eax, 0xff
mov dl, byte [eax + 0x61e298]
mov eax, dword [esp + 0xc]
xor dl, bl
inc eax
mov byte [ecx - 1], dl
mov dword [esp + 0xc], eax
cmp eax, edi
jl 0x4177e0
pop ebp
pop ebx
pop edi
add esp, 0x28
ret 4