Function at 0x405055
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
sub esp, 0x18
mov eax, dword [ecx + 0x1c]
mov edx, dword [ecx + 0x24]
push ebx
mov ebx, dword [ecx + 0x28]
push ebp
push esi
push edi
mov edi, dword [esp + 0x30]
mov dword [esp + 0x18], ecx
xor eax, dword [edi]
xor ebx, dword [edi + 0xc]
xor edx, dword [edi + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ecx + 0x20]
mov ecx, ebx
xor eax, dword [edi + 4]
mov dword [esp + 0x14], eax
mov eax, edx
shr eax, 0x10
movzx eax, al
shr ecx, 0x18
mov ecx, dword [ecx*4 + 0x45fd20]
xor ecx, dword [eax*4 + 0x45f920]
mov eax, dword [esp + 0x14]
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x45f520]
mov eax, dword [esp + 0x10]
movzx eax, al
xor ecx, dword [eax*4 + 0x45f120]
mov eax, ebx
shr eax, 0x10
mov dword [edi], ecx
mov dword [esp + 0x24], ecx
movzx ecx, al
mov eax, edx
shr eax, 8
movzx eax, al
mov ebp, dword [ecx*4 + 0x45f920]
mov ecx, dword [esp + 0x14]
xor ebp, dword [eax*4 + 0x45f520]
mov eax, dword [esp + 0x10]
shr eax, 0x18
xor ebp, dword [eax*4 + 0x45fd20]
movzx eax, cl
shr ecx, 0x18
xor ebp, dword [eax*4 + 0x45f120]
mov eax, ebx
shr eax, 8
movzx eax, al
mov dword [edi + 4], ebp
mov esi, dword [eax*4 + 0x45f520]
xor esi, dword [ecx*4 + 0x45fd20]
mov ecx, dword [esp + 0x10]
mov eax, ecx
shr eax, 0x10
movzx eax, al
shr ecx, 8
xor esi, dword [eax*4 + 0x45f920]
movzx eax, dl
shr edx, 0x18
xor esi, dword [eax*4 + 0x45f120]
mov eax, dword [esp + 0x14]
shr eax, 0x10
movzx eax, al
mov dword [edi + 8], esi
mov edi, dword [edx*4 + 0x45fd20]
xor edi, dword [eax*4 + 0x45f920]
movzx eax, cl
mov ecx, dword [esp + 0x30]
xor edi, dword [eax*4 + 0x45f520]
movzx eax, bl
xor edi, dword [eax*4 + 0x45f120]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], edi
mov dword [ecx + 0xc], edi
lea ebx, [eax - 1]
cmp ebx, 1
jle 0x4052c6
mov edx, dword [esp + 0x18]
add edx, 0x30
dec ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0x20], ebx
mov eax, dword [edx - 4]
xor eax, dword [ecx]
mov ebx, dword [edx]
mov edx, dword [edx + 4]
xor ebx, ebp
mov dword [esp + 0x14], eax
xor edx, esi
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 8]
xor eax, edi
mov edi, dword [esp + 0x30]
mov ecx, eax
mov dword [esp + 0x1c], eax
shr ecx, 0x18
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x45fd20]
xor ecx, dword [eax*4 + 0x45f920]
mov eax, ebx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x45f520]
mov eax, dword [esp + 0x14]
movzx eax, al
xor ecx, dword [eax*4 + 0x45f120]
mov eax, dword [esp + 0x1c]
shr eax, 0x10
mov dword [edi], ecx
mov dword [esp + 0x24], ecx
movzx ecx, al
mov eax, edx
shr eax, 8
movzx eax, al
mov ebp, dword [ecx*4 + 0x45f920]
mov ecx, ebx
shr ecx, 0x18
xor ebp, dword [eax*4 + 0x45f520]
mov eax, dword [esp + 0x14]
shr eax, 0x18
xor ebp, dword [eax*4 + 0x45fd20]
movzx eax, bl
shr ebx, 0x10
xor ebp, dword [eax*4 + 0x45f120]
mov eax, dword [esp + 0x1c]
shr eax, 8
movzx eax, al
mov dword [edi + 4], ebp
mov esi, dword [eax*4 + 0x45f520]
xor esi, dword [ecx*4 + 0x45fd20]
mov ecx, dword [esp + 0x14]
mov eax, ecx
shr eax, 0x10
movzx eax, al
shr ecx, 8
xor esi, dword [eax*4 + 0x45f920]
movzx eax, dl
shr edx, 0x18
xor esi, dword [eax*4 + 0x45f120]
mov dword [edi + 8], esi
mov edi, dword [edx*4 + 0x45fd20]
mov edx, dword [esp + 0x10]
movzx eax, bl
add edx, 0x10
mov dword [esp + 0x10], edx
xor edi, dword [eax*4 + 0x45f920]
movzx eax, cl
mov ecx, dword [esp + 0x30]
xor edi, dword [eax*4 + 0x45f520]
mov eax, dword [esp + 0x1c]
movzx eax, al
xor edi, dword [eax*4 + 0x45f120]
sub dword [esp + 0x20], 1
mov dword [ecx + 0xc], edi
jne 0x405196
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], edi
mov edi, eax
mov ecx, dword [esp + 0x18]
add edi, edi
mov eax, dword [ecx + edi*8 + 0x14]
mov edx, dword [ecx + edi*8 + 0xc]
xor eax, esi
mov ebx, dword [ecx + edi*8 + 0x10]
mov dword [esp + 0x14], eax
xor ebx, ebp
mov ebp, dword [esp + 0x30]
mov ecx, dword [ecx + edi*8 + 0x18]
xor edx, dword [esp + 0x24]
xor ecx, dword [esp + 0x20]
movzx eax, dl
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp], al
mov eax, ebx
shr eax, 8
movzx eax, al
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 1], al
mov eax, dword [esp + 0x14]
shr eax, 0x10
movzx eax, al
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 2], al
mov eax, ecx
shr eax, 0x18
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 3], al
movzx eax, bl
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 4], al
mov eax, dword [esp + 0x14]
shr eax, 8
movzx eax, al
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 5], al
mov eax, ecx
shr eax, 0x10
movzx eax, al
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 6], al
mov eax, edx
shr eax, 0x18
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 7], al
mov eax, dword [esp + 0x14]
movzx eax, al
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 8], al
mov eax, ecx
shr eax, 8
movzx eax, al
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 9], al
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 0xa], al
mov eax, ebx
shr eax, 0x18
shr ebx, 0x10
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 0xb], al
movzx eax, cl
mov ecx, dword [esp + 0x18]
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 0xc], al
movzx eax, dl
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 0xd], al
movzx eax, bl
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 0xe], al
mov eax, dword [esp + 0x14]
shr eax, 0x18
mov al, byte [eax*4 + 0x45f121]
mov byte [ebp + 0xf], al
mov eax, dword [ecx + edi*8 + 0x1c]
xor dword [ebp], eax
mov eax, dword [esp + 0x2c]
add eax, 2
add eax, eax
mov eax, dword [ecx + eax*8]
xor dword [ebp + 4], eax
mov eax, dword [ecx + edi*8 + 0x24]
xor dword [ebp + 8], eax
mov eax, dword [ecx + edi*8 + 0x28]
xor dword [ebp + 0xc], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8