Function at 0x497570
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push esi
mov esi, ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0xc], esi
test ecx, ecx
je 0x497a1d
shr ecx, 4
cmp byte [esi], 0
mov dword [esp + 0x30], ecx
je 0x4975a9
push dword [esp + 0x34]
push ecx
push dword [esp + 0x34]
mov ecx, esi
call fcn.00497a30
pop esi
add esp, 0x24
ret 0xc
lea edx, [esi + 8]
mov dword [esp + 0x24], edx
push edi
mov edi, edx
test ecx, ecx
je 0x497a06
mov eax, dword [esp + 0x30]
push ebx
push ebp
mov ebp, dword [esp + 0x40]
add ebp, 2
add eax, 8
mov dword [esp + 0x10], ebp
mov dword [esp + 0x2c], eax
cmp byte [esi + 1], 0
mov ecx, dword [eax - 8]
mov ebx, dword [eax - 4]
je 0x4975f7
mov edx, dword [edi + 8]
xor edx, dword [eax]
xor ecx, dword [edi]
xor ebx, dword [edi + 4]
mov eax, dword [eax + 4]
xor eax, dword [edi + 0xc]
mov edi, edx
mov dword [esp + 0x28], edx
jmp 0x4975fc
mov edi, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x18]
xor eax, ecx
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x14], eax
xor edx, ebx
mov eax, dword [esi + 0x24]
xor eax, dword [esp + 0x20]
mov ebx, dword [esi + 0x20]
mov ecx, eax
mov dword [esp + 0x1c], eax
xor ebx, edi
shr ecx, 0x18
lea edi, [ebp - 2]
mov eax, ebx
mov dword [esp + 0x24], edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x591578]
mov dword [esp + 0x28], edi
xor ecx, dword [eax*4 + 0x591178]
mov eax, edx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x590d78]
mov eax, dword [esp + 0x14]
movzx eax, al
xor ecx, dword [eax*4 + 0x590978]
mov eax, dword [esp + 0x1c]
mov dword [edi], ecx
shr eax, 0x10
movzx ecx, al
mov eax, ebx
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x591178]
xor ecx, dword [eax*4 + 0x590d78]
mov eax, dword [esp + 0x14]
shr eax, 0x18
xor ecx, dword [eax*4 + 0x591578]
movzx eax, dl
xor ecx, dword [eax*4 + 0x590978]
mov eax, dword [esp + 0x1c]
mov dword [ebp + 2], ecx
mov ecx, edx
shr eax, 8
movzx eax, al
shr ecx, 0x18
mov edx, dword [eax*4 + 0x590d78]
xor edx, dword [ecx*4 + 0x591578]
mov eax, dword [esp + 0x14]
shr eax, 0x10
movzx eax, al
xor edx, dword [eax*4 + 0x591178]
movzx eax, bl
shr ebx, 0x18
xor edx, dword [eax*4 + 0x590978]
mov eax, dword [esp + 0x24]
shr eax, 0x10
movzx ecx, al
mov dword [ebp + 6], edx
mov eax, dword [ebx*4 + 0x591578]
mov dword [esp + 0x24], 1
xor eax, dword [ecx*4 + 0x591178]
mov ecx, dword [esp + 0x14]
shr ecx, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x590d78]
mov ecx, dword [esp + 0x1c]
movzx ecx, cl
xor eax, dword [ecx*4 + 0x590978]
mov dword [ebp + 0xa], eax
mov ecx, dword [esi + 4]
dec ecx
cmp ecx, 1
jle 0x497886
mov esi, dword [edi]
mov edi, dword [ebp + 2]
mov ebp, edx
mov edx, dword [esp + 0x18]
add edx, 0x30
mov dword [esp + 0x20], edx
lea ecx, [ecx]
mov ecx, dword [edx - 8]
mov ebx, dword [edx - 4]
xor ecx, esi
mov edx, dword [edx]
xor ebx, edi
mov dword [esp + 0x14], ecx
xor edx, ebp
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx + 4]
xor ecx, eax
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [esp + 0x1c], ecx
shr ecx, 0x18
mov esi, dword [ecx*4 + 0x591578]
xor esi, dword [eax*4 + 0x591178]
mov eax, ebx
shr eax, 8
movzx eax, al
xor esi, dword [eax*4 + 0x590d78]
mov eax, dword [esp + 0x14]
movzx eax, al
xor esi, dword [eax*4 + 0x590978]
mov eax, dword [esp + 0x28]
mov dword [eax], esi
mov eax, dword [esp + 0x1c]
shr eax, 0x10
movzx ecx, al
mov eax, edx
shr eax, 8
movzx eax, al
mov edi, dword [ecx*4 + 0x591178]
mov ecx, ebx
shr ecx, 0x18
xor edi, dword [eax*4 + 0x590d78]
mov eax, dword [esp + 0x14]
shr eax, 0x18
xor edi, dword [eax*4 + 0x591578]
movzx eax, bl
shr ebx, 0x10
xor edi, dword [eax*4 + 0x590978]
mov eax, dword [esp + 0x10]
mov dword [eax + 2], edi
mov eax, dword [esp + 0x1c]
shr eax, 8
movzx eax, al
mov ebp, dword [eax*4 + 0x590d78]
xor ebp, dword [ecx*4 + 0x591578]
mov eax, dword [esp + 0x14]
shr eax, 0x10
movzx eax, al
movzx ecx, bl
mov ebx, dword [esp + 0x24]
inc ebx
xor ebp, dword [eax*4 + 0x591178]
movzx eax, dl
shr edx, 0x18
mov dword [esp + 0x24], ebx
xor ebp, dword [eax*4 + 0x590978]
mov eax, dword [esp + 0x10]
mov dword [eax + 6], ebp
mov eax, dword [edx*4 + 0x591578]
xor eax, dword [ecx*4 + 0x591178]
mov ecx, dword [esp + 0x14]
shr ecx, 8
mov edx, dword [esp + 0x20]
movzx ecx, cl
add edx, 0x10
mov dword [esp + 0x20], edx
xor eax, dword [ecx*4 + 0x590d78]
mov ecx, dword [esp + 0x1c]
movzx ecx, cl
xor eax, dword [ecx*4 + 0x590978]
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0xa], eax
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + 4]
dec ecx
cmp ebx, ecx
jl 0x497740
mov ebp, dword [esp + 0x10]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 4]
add eax, eax
mov ecx, dword [esi + eax*8 + 0x10]
mov edx, dword [esi + eax*8 + 8]
mov ebx, dword [esi + eax*8 + 0xc]
xor ecx, dword [ebp + 6]
xor edx, dword [edi]
xor ebx, dword [ebp + 2]
mov dword [esp + 0x20], ecx
mov ecx, dword [esi + eax*8 + 0x14]
xor ecx, dword [ebp + 0xa]
movzx eax, dl
mov esi, dword [esp + 0x18]
movzx eax, byte [eax*4 + 0x590979]
mov byte [edi], al
mov eax, ebx
shr eax, 8
movzx eax, al
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp - 1], al
mov eax, dword [esp + 0x20]
shr eax, 0x10
movzx eax, al
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp], al
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 1], al
movzx eax, bl
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 2], al
mov eax, dword [esp + 0x20]
shr eax, 8
movzx eax, al
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 3], al
mov eax, ecx
shr eax, 0x10
movzx eax, al
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 4], al
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 5], al
mov eax, dword [esp + 0x20]
movzx eax, al
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 6], al
mov eax, ecx
shr eax, 8
movzx eax, al
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 7], al
mov eax, edx
shr eax, 0x10
movzx eax, al
shr edx, 8
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 8], al
mov eax, ebx
shr eax, 0x18
shr ebx, 0x10
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 9], al
movzx eax, cl
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 0xa], al
movzx eax, dl
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 0xb], al
movzx eax, bl
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 0xc], al
mov eax, dword [esp + 0x20]
shr eax, 0x18
movzx eax, byte [eax*4 + 0x590979]
mov byte [ebp + 0xd], al
mov ecx, dword [esi + 4]
shl ecx, 4
mov eax, dword [ecx + esi + 0x18]
add ecx, esi
xor dword [edi], eax
mov eax, dword [ecx + 0x1c]
xor dword [ebp + 2], eax
mov eax, dword [ecx + 0x20]
xor dword [ebp + 6], eax
mov eax, dword [ecx + 0x24]
xor dword [ebp + 0xa], eax
add ebp, 0x10
mov eax, dword [esp + 0x2c]
add eax, 0x10
mov dword [esp + 0x10], ebp
sub dword [esp + 0x3c], 1
mov dword [esp + 0x2c], eax
jne 0x4975d3
mov edx, dword [esp + 0x30]
pop ebp
pop ebx
mov eax, dword [edi]
mov dword [edx], eax
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov eax, dword [edi + 8]
mov dword [edx + 8], eax
mov eax, dword [edi + 0xc]
mov dword [edx + 0xc], eax
pop edi
pop esi
add esp, 0x24
ret 0xc