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

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
mov edx, dword [eax + 4]
mov dword [esp + 0x18], edi
mov dword [edi + 0x100], 0xe
lea esi, [edi + 0x10]
call edx
push eax
mov eax, dword [edi + 4]
push eax
push esi
call fcn.00468d50
mov eax, esi
mov edx, dword [eax + 0x1c]
mov ecx, edx
and ecx, 0xff
movzx ecx, byte [ecx + 0x51d310]
mov esi, edx
shr esi, 0x18
movzx esi, byte [esi + 0x51d310]
shl ecx, 8
xor ecx, esi
mov esi, edx
shr esi, 0x10
shl ecx, 8
shr edx, 8
and esi, 0xff
movzx esi, byte [esi + 0x51d310]
xor ecx, esi
and edx, 0xff
movzx edx, byte [edx + 0x51d310]
shl ecx, 8
xor ecx, edx
xor ecx, dword [edi + 0x104]
mov edx, dword [eax + 4]
xor ecx, dword [eax]
add esp, 0xc
xor edx, ecx
mov dword [eax + 0x20], ecx
mov ecx, dword [eax + 8]
xor ecx, edx
mov dword [eax + 0x24], edx
mov edx, dword [eax + 0xc]
xor edx, ecx
mov dword [eax + 0x28], ecx
mov dword [eax + 0x2c], edx
lea esi, [edi + 0x108]
mov ebx, 6
mov edi, edi
mov edx, dword [eax + 0x2c]
mov ecx, edx
shr ecx, 0x10
and ecx, 0xff
movzx ecx, byte [ecx + 0x51d310]
mov ebp, edx
shr ebp, 0x18
movzx ebp, byte [ebp + 0x51d310]
shl ebp, 8
xor ecx, ebp
mov ebp, edx
shl ecx, 8
shr ebp, 8
and edx, 0xff
movzx edx, byte [edx + 0x51d310]
and ebp, 0xff
movzx ebp, byte [ebp + 0x51d310]
xor ecx, ebp
shl ecx, 8
xor ecx, edx
xor ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x14]
xor edx, ecx
mov dword [eax + 0x30], ecx
mov ecx, dword [eax + 0x18]
xor ecx, edx
mov dword [eax + 0x34], edx
mov edx, dword [eax + 0x1c]
xor edx, ecx
mov dword [eax + 0x38], ecx
mov dword [eax + 0x3c], edx
mov edx, dword [eax + 0x3c]
add eax, 0x20
mov ecx, edx
and ecx, 0xff
movzx ecx, byte [ecx + 0x51d310]
mov ebp, edx
shl ecx, 8
shr ebp, 0x18
movzx ebp, byte [ebp + 0x51d310]
xor ecx, ebp
mov ebp, edx
shr ebp, 0x10
shr edx, 8
shl ecx, 8
and ebp, 0xff
movzx ebp, byte [ebp + 0x51d310]
and edx, 0xff
movzx edx, byte [edx + 0x51d310]
xor ecx, ebp
shl ecx, 8
xor ecx, edx
xor ecx, dword [esi]
add esi, 4
xor ecx, dword [eax]
mov dword [eax + 0x20], ecx
mov edx, dword [eax + 4]
xor edx, ecx
mov dword [eax + 0x24], edx
mov ecx, dword [eax + 8]
xor ecx, edx
mov dword [eax + 0x28], ecx
mov edx, dword [eax + 0xc]
xor edx, ecx
sub ebx, 1
mov dword [eax + 0x2c], edx
jne 0x402110
cmp dword [esp + 0x20], ebx
jne 0x402361
mov esi, dword [edi + 0x100]
add esi, esi
add esi, esi
lea edx, [edi + 0x10]
test esi, esi
jle 0x40227c
lea ecx, [edx + esi*4 + 8]
lea eax, [edx + 8]
lea esp, [esp]
mov ebp, dword [eax - 8]
mov dword [esp + 0x20], ebp
mov ebp, dword [ecx - 8]
mov dword [eax - 8], ebp
mov ebp, dword [esp + 0x20]
mov dword [ecx - 8], ebp
mov ebp, dword [eax - 4]
mov dword [esp + 0x20], ebp
mov ebp, dword [ecx - 4]
mov dword [eax - 4], ebp
mov ebp, dword [esp + 0x20]
mov dword [ecx - 4], ebp
mov ebp, dword [eax]
mov dword [esp + 0x20], ebp
mov ebp, dword [ecx]
mov dword [eax], ebp
mov ebp, dword [esp + 0x20]
mov dword [ecx], ebp
mov ebp, dword [eax + 4]
mov dword [esp + 0x20], ebp
mov ebp, dword [ecx + 4]
mov dword [eax + 4], ebp
mov ebp, dword [esp + 0x20]
mov dword [ecx + 4], ebp
add ebx, 4
sub esi, 4
add eax, 0x10
sub ecx, 0x10
cmp ebx, esi
jl 0x402220
mov eax, 1
cmp dword [edi + 0x100], eax
mov dword [esp + 0x20], eax
jle 0x402361
add edx, 0x10
mov dword [esp + 0x14], edx
xor ebx, ebx
lea ebx, [ebx]
mov edi, dword [edx + ebx*4]
mov eax, edi
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov edx, edi
and edx, 0xff7f7f7f
add edx, edx
xor eax, edx
mov edx, eax
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov ecx, edx
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov esi, eax
and eax, 0x80808080
mov ecx, eax
shr ecx, 7
sub eax, ecx
and eax, 0x1b1b1b1b
mov ecx, esi
and ecx, 0xff7f7f7f
add ecx, ecx
xor eax, ecx
mov ecx, eax
xor ecx, edi
mov dword [esp + 0x10], eax
mov edi, ecx
xor edi, esi
mov ebp, ecx
shr ebp, 8
xor ebp, edi
shr ebp, 8
mov eax, ecx
xor eax, edx
xor ebp, eax
shl eax, 8
xor eax, edi
shl eax, 8
shr ebp, 8
xor eax, ecx
shl eax, 8
xor ebp, eax
xor ebp, dword [esp + 0x10]
inc ebx
xor ebp, esi
xor ebp, edx
cmp ebx, 4
mov edx, dword [esp + 0x14]
mov dword [edx + ebx*4 - 4], ebp
jl 0x4022a0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, dword [ecx + 0x100]
mov dword [esp + 0x20], eax
jl 0x402291
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4