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

Disassembly:
sub esp, 0x34
push esi
mov esi, ecx
cmp byte [esi + 4], 0
je 0x47b7bb
mov eax, dword [esi + 0x3cc]
cmp eax, 0x10
jne 0x47b515
push dword [esp + 0x40]
push dword [esp + 0x40]
call fcn.004a3ad5
jmp 0x47b7b4
cdq
xor ecx, ecx
and edx, 3
push ebx
push ebp
push edi
lea edi, [edx + eax]
sar edi, 2
lea ebx, [esi + 0x454]
cmp edi, 6
mov dword [esp + 0x30], edi
mov dword [esp + 0x1c], ebx
mov ebp, ebx
setne cl
xor eax, eax
inc ecx
cmp edi, 4
cmove ecx, eax
shl ecx, 5
mov eax, dword [ecx + 0x4c14c8]
mov edx, dword [ecx + 0x4c14d0]
mov ecx, dword [ecx + 0x4c14d8]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
test edi, edi
jle 0x47b5c5
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x20], edi
lea edi, [esi + 8]
movzx eax, byte [ebx]
mov edx, ebp
shl eax, 0x18
lea ebx, [ebx + 4]
mov dword [ebp], eax
movzx ecx, byte [ebx - 3]
shl ecx, 0x10
or ecx, eax
mov dword [ebp], ecx
movzx eax, byte [ebx - 2]
shl eax, 8
or eax, ecx
mov dword [ebp], eax
movzx ecx, byte [ebx - 1]
or ecx, eax
mov dword [ebp], ecx
add ebp, 4
mov eax, dword [edi]
lea edi, [edi + 4]
xor eax, ecx
sub dword [esp + 0x20], 1
mov dword [edx], eax
jne 0x47b573
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
xor ebx, ebx
inc ebx
mov dword [esp + 0x2c], ebx
cmp dword [esi + 0x3d0], ebx
jle 0x47b6d0
lea ebp, [esi + 0x28]
mov dword [esp + 0x30], ebp
test edi, edi
jle 0x47b690
lea ebx, [esi + 0x434]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebx
mov ebx, edx
sub ebx, eax
mov dword [esp + 0x48], eax
sub ecx, eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x34], ecx
mov ebp, ecx
add eax, ebx
cdq
idiv edi
mov eax, dword [esi + edx*4 + 0x454]
sar eax, 8
movzx ecx, al
mov eax, dword [esp + 0x48]
add eax, ebp
cdq
idiv edi
mov ecx, dword [ecx*4 + 0x4beca0]
movzx eax, byte [esi + edx*4 + 0x454]
xor ecx, dword [eax*4 + 0x4bf0a0]
mov eax, dword [esp + 0x48]
cdq
idiv edi
movsx eax, word [esi + edx*4 + 0x456]
mov edx, dword [esp + 0x24]
movzx eax, al
xor ecx, dword [eax*4 + 0x4be8a0]
movzx eax, byte [edx + 0x23]
xor ecx, dword [eax*4 + 0x4be4a0]
mov eax, dword [esp + 0x20]
xor ecx, dword [eax]
add eax, 4
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x48]
mov dword [edx], ecx
add edx, 4
inc eax
mov dword [esp + 0x24], edx
sub dword [esp + 0x28], 1
mov dword [esp + 0x48], eax
jne 0x47b609
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x30]
mov eax, edi
shl eax, 2
push eax
lea eax, [esi + 0x434]
push eax
lea eax, [esi + 0x454]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
inc ebx
mov ecx, dword [esp + 0x14]
add ebp, 0x20
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebp
cmp ebx, dword [esi + 0x3d0]
jl 0x47b5df
xor ecx, ecx
mov dword [esp + 0x30], ecx
test edi, edi
jle 0x47b7b1
mov ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub ebp, edx
mov eax, dword [esp + 0x4c]
sub dword [esp + 0x14], edx
mov dword [esp + 0x48], eax
mov eax, dword [esi + 0x3d0]
lea eax, [ecx + eax*8]
mov ebx, dword [esi + eax*4 + 8]
mov ecx, ebx
mov eax, dword [esp + 0x1c]
sar ecx, 0x18
add dword [esp + 0x1c], 4
movzx eax, byte [eax + 3]
xor cl, byte [eax + str.cw]
mov eax, dword [esp + 0x48]
mov byte [eax], cl
inc eax
mov dword [esp + 0x48], eax
mov ecx, ebx
lea eax, [edx + ebp]
sar ecx, 0x10
cdq
idiv edi
movsx eax, word [esi + edx*4 + 0x456]
movzx eax, al
xor cl, byte [eax + str.cw]
mov eax, dword [esp + 0x48]
mov byte [eax], cl
inc eax
mov dword [esp + 0x48], eax
mov ecx, ebx
mov eax, dword [esp + 0x10]
cdq
idiv edi
sar ecx, 8
mov eax, dword [esi + edx*4 + 0x454]
sar eax, 8
movzx eax, al
xor cl, byte [eax + str.cw]
mov eax, dword [esp + 0x48]
mov byte [eax], cl
mov ecx, eax
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x14]
cdq
idiv edi
movzx eax, byte [esi + edx*4 + 0x454]
mov edx, dword [esp + 0x10]
mov al, byte [eax + str.cw]
xor al, bl
mov byte [ecx + 1], al
add ecx, 2
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x30]
inc ecx
inc edx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x10], edx
cmp ecx, edi
jl 0x47b6f4
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x34
ret 8
push dword [0x4f27c0]
lea ecx, [esp + 0x30]
call fcn.00425f85
push 0x4dff50
lea eax, [esp + 0x30]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3