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

Disassembly:
sub esp, 0x18
push ebx
push ebp
mov ebp, dword [esp + 0x28]
mov ebx, ebp
push esi
mov esi, ecx
shr ebx, 2
push edi
mov dword [esp + 0x10], esi
lea eax, [ebx + 6]
mov dword [esi + 0x10], eax
lea ecx, [esi + 0x18]
lea eax, [eax*4 + 4]
push eax
call fcn.00474db0
mov esi, dword [esi + 0x11c]
lea edi, [ebx*4]
push ebp
push dword [esp + 0x30]
mov dword [esp + 0x1c], ebp
push edi
push esi
mov dword [esp + 0x40], 4
call fcn.0065cbcf
sub edi, ebp
lea eax, [esi + ebp]
push edi
push 0
push eax
call fcn.006593c0
lea edx, [esp + 0x4c]
lea ecx, [esp + 0x30]
call fcn.0046bda0
push eax
mov edx, esi
mov ecx, esi
call fcn.0046dfe0
lea eax, [ebx*4]
mov dword [esp + 0x4c], 0x711a04
mov ecx, dword [eax + esi - 4]
lea edi, [eax + esi]
mov dword [esp + 0x50], eax
add esp, 0x20
mov eax, ecx
shr eax, 0x10
movzx eax, al
movzx edx, byte [eax + 0x711b30]
mov eax, ecx
shr eax, 8
xor edx, 1
movzx eax, al
shl edx, 8
movzx eax, byte [eax + 0x711b30]
xor edx, eax
movzx eax, cl
shl edx, 8
shr ecx, 0x18
movzx eax, byte [eax + 0x711b30]
xor edx, eax
movzx eax, byte [ecx + 0x711b30]
shl edx, 8
xor edx, eax
xor edx, dword [esi]
mov dword [edi], edx
mov eax, dword [esi + 4]
xor eax, edx
lea edx, [ebx*4 + 0xc]
mov dword [edi + 4], eax
mov ecx, dword [esi + 8]
xor ecx, eax
mov dword [esp + 0x20], edx
lea eax, [ebx*4 + 8]
mov dword [eax + esi], ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0xc]
xor eax, ecx
mov dword [edx + esi], eax
lea edx, [ebx*4 + 0x10]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x24], edx
mov ecx, dword [ebx + 0x118]
mov eax, dword [ebx + 0x11c]
lea ecx, [eax + ecx*4]
lea eax, [edx + esi]
cmp eax, ecx
je 0x4742d7
mov edx, dword [esp + 0x30]
lea eax, [edx - 4]
mov dword [esp + 0x14], eax
lea eax, [edx + 4]
mov dword [esp + 0x18], eax
cmp ebp, 0x18
jne 0x4741cc
mov ecx, dword [esi + 0x24]
xor ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
xor eax, ecx
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], eax
jmp 0x474235
cmp ebp, 0x20
jne 0x474235
mov ecx, dword [esi + 0x2c]
mov eax, ecx
shr eax, 0x18
movzx edx, byte [eax + 0x711b30]
mov eax, ecx
shr eax, 0x10
movzx eax, al
shl edx, 8
movzx eax, byte [eax + 0x711b30]
xor edx, eax
mov eax, ecx
shr eax, 8
movzx eax, al
shl edx, 8
movzx eax, byte [eax + 0x711b30]
xor edx, eax
movzx eax, cl
mov ecx, dword [esi + 0x18]
shl edx, 8
movzx eax, byte [eax + 0x711b30]
xor edx, eax
mov eax, dword [esi + 0x14]
xor edx, dword [esi + 0x10]
xor eax, edx
mov dword [esi + 0x30], edx
xor ecx, eax
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x1c]
xor eax, ecx
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov edx, dword [esp + 0x14]
mov esi, edi
mov edi, dword [esp + 0x30]
add edi, esi
mov edx, dword [edx + esi]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x711b30]
xor ecx, eax
movzx eax, dl
shl ecx, 8
shr edx, 0x18
movzx eax, byte [eax + 0x711b30]
xor ecx, eax
movzx eax, byte [edx + 0x711b30]
shl ecx, 8
xor ecx, eax
mov eax, dword [esp + 0x2c]
xor ecx, dword [eax]
add eax, 4
xor ecx, dword [esi]
mov dword [edi], ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 4]
xor eax, ecx
mov ecx, dword [esp + 0x18]
mov dword [ecx + esi], eax
mov ecx, dword [esi + 8]
xor ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [eax + esi], ecx
mov eax, dword [esi + 0xc]
xor eax, ecx
mov ecx, dword [esp + 0x20]
mov dword [ecx + esi], eax
mov eax, dword [ebx + 0x11c]
mov ecx, dword [ebx + 0x118]
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x24]
add eax, esi
cmp eax, ecx
jne 0x4741b4
mov eax, dword [ebx + 4]
lea ecx, [ebx + 4]
mov edi, dword [ebx + 0x11c]
mov dword [esp + 0x24], edi
mov eax, dword [eax + 0x1c]
call eax
test al, al
je 0x474327
cmp byte [0x819c95], 0
jne 0x4742fe
call fcn.00473eb0
push 0x10
mov edx, edi
mov ecx, edi
call fcn.0046dfe0
mov ecx, dword [ebx + 0x10]
shl ecx, 4
add ecx, edi
push 0x10
mov edx, ecx
call fcn.0046dfe0
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
cmp byte [0x819c94], 0
jne 0x474335
call fcn.00473f10
mov eax, dword [ebx + 0x10]
mov esi, 4
mov dword [esp + 0x30], esi
lea ebp, [eax*4 - 4]
cmp ebp, esi
jbe 0x47462b
lea ebx, [edi + 8]
lea eax, [edi + 0x18]
lea ebx, [ebx + ebp*4]
mov edi, eax
jmp 0x474360
mov edx, dword [edi - 8]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov esi, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c1]
movzx eax, dl
mov edx, dword [ebx - 8]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c2]
movzx eax, byte [edi - 8]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c3]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c1]
movzx eax, dl
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c2]
movzx eax, byte [ebx - 8]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c3]
mov dword [edi - 8], ecx
mov dword [ebx - 8], esi
mov edx, dword [edi - 4]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov esi, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c1]
movzx eax, dl
mov edx, dword [ebx - 4]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c2]
movzx eax, byte [edi - 4]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c3]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c1]
movzx eax, dl
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c2]
movzx eax, byte [ebx - 4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c3]
mov dword [edi - 4], ecx
mov dword [ebx - 4], esi
mov edx, dword [edi]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov esi, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c1]
lea edi, [edi + 0x10]
shr edx, 8
lea ebx, [ebx - 0x10]
movzx eax, dl
sub ebp, 4
mov edx, dword [ebx + 0x10]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c2]
movzx eax, byte [edi - 0x10]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c3]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c1]
movzx eax, dl
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c2]
movzx eax, byte [ebx + 0x10]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c3]
mov dword [edi - 0x10], ecx
mov dword [ebx + 0x10], esi
mov edx, dword [edi - 0xc]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov esi, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c1]
movzx eax, dl
mov edx, dword [ebx + 0x14]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c2]
movzx eax, byte [edi - 0xc]
movzx eax, byte [eax + 0x711b30]
xor esi, dword [eax*8 + 0x81a4c3]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c1]
movzx eax, dl
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c2]
movzx eax, byte [ebx + 0x14]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c3]
mov dword [edi - 0xc], ecx
mov dword [ebx + 0x14], esi
mov esi, dword [esp + 0x30]
add esi, 4
mov dword [esp + 0x30], esi
cmp esi, ebp
jb 0x474360
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x10]
mov edx, dword [edi + esi*4]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c1]
movzx eax, dl
mov edx, dword [edi + esi*4 + 4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c2]
movzx eax, byte [edi + esi*4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c3]
mov eax, edx
shr eax, 0x18
mov dword [edi + esi*4], ecx
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c1]
movzx eax, dl
mov edx, dword [edi + esi*4 + 8]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c2]
movzx eax, byte [edi + esi*4 + 4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c3]
mov eax, edx
shr eax, 0x18
mov dword [edi + esi*4 + 4], ecx
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c1]
movzx eax, dl
mov edx, dword [edi + esi*4 + 0xc]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c2]
movzx eax, byte [edi + esi*4 + 8]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c3]
mov eax, edx
shr eax, 0x18
mov dword [edi + esi*4 + 8], ecx
movzx ecx, byte [eax + 0x711b30]
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov ecx, dword [ecx*8 + 0x81a4c4]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c1]
movzx eax, dl
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c2]
movzx eax, byte [edi + esi*4 + 0xc]
movzx eax, byte [eax + 0x711b30]
xor ecx, dword [eax*8 + 0x81a4c3]
mov dword [edi + esi*4 + 0xc], ecx
mov eax, dword [ebx + 0x10]
mov ecx, dword [edi]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8]
bswap eax
mov dword [edi], eax
mov eax, dword [ebx + 0x10]
add eax, eax
mov dword [edi + eax*8], ecx
mov eax, dword [ebx + 0x10]
mov ecx, dword [edi + 4]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8 + 4]
bswap eax
mov dword [edi + 4], eax
mov eax, dword [ebx + 0x10]
add eax, eax
mov dword [edi + eax*8 + 4], ecx
mov eax, dword [ebx + 0x10]
mov ecx, dword [edi + 8]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8 + 8]
bswap eax
mov dword [edi + 8], eax
mov eax, dword [ebx + 0x10]
add eax, eax
mov dword [edi + eax*8 + 8], ecx
mov eax, dword [ebx + 0x10]
mov ecx, dword [edi + 0xc]
add eax, eax
bswap ecx
mov eax, dword [edi + eax*8 + 0xc]
bswap eax
mov dword [edi + 0xc], eax
mov eax, dword [ebx + 0x10]
add eax, eax
mov dword [edi + eax*8 + 0xc], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc