Function at 0x566d50
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 8]
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x38]
sar ecx, 1
xor eax, eax
cmp edx, 4
lea esi, [edi + ecx*4]
mov dword [esp + 0x38], esi
jl 0x566d79
sar edx, 1
add edx, 0x58c370
jmp 0x566d7e
mov edx, 0x58c778
lea ecx, [edx + 0x400]
mov dword [esp + 0x30], ecx
mov ecx, eax
sar ecx, 4
and ecx, 0xf
movzx ebx, byte [ecx + 0x5a6cf4]
mov ecx, eax
and ecx, 0xf
movzx ecx, byte [ecx + 0x5a6cf4]
shl ecx, 4
or ebx, ecx
shl ebx, 4
mov ecx, eax
sar ecx, 8
movzx ecx, byte [ecx + 0x5a6cf4]
or ebx, ecx
mov ecx, dword [esp + 0x40]
mov ebp, ebx
xor ebp, 0xfff
sar ebp, cl
mov ecx, dword [esp + 0x38]
sub esi, 0x10
inc eax
lea ebp, [ecx + ebp*4 - 4]
mov ecx, dword [esp + 0x40]
sar ebx, cl
mov ecx, dword [esp + 0x38]
lea ebx, [ecx + ebx*4]
mov ecx, dword [ebx]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], ebx
mov ebx, dword [ebp]
mov ebp, dword [ebp + 4]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], ebx
add ebx, ecx
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + 4]
mov dword [esp + 0x2c], ecx
sub ecx, ebp
movzx ebp, byte [edx + 1]
mov dword [esp + 0x20], ebp
sar ecx, 9
mov ebp, ebx
movzx ebx, byte [edx]
sar ebp, 9
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x20]
imul ebx, ebp
mov ebp, dword [esp + 0x10]
imul ebp, ecx
add ebx, ebp
mov ebp, dword [esp + 0x20]
imul ebp, ecx
mov ecx, dword [esp + 0x10]
imul ecx, dword [esp + 0x14]
mov dword [esp + 0x24], ebp
sub ebp, ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x14], ebp
add edx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x2c]
add ecx, ebp
mov ebp, dword [esp + 0x1c]
sar ecx, 1
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x18]
sub ecx, ebp
mov ebp, dword [esp + 0x10]
sar ecx, 1
add ebp, ebx
mov dword [edi], ebp
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
add ecx, ebp
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x10]
sub ecx, ebx
mov dword [esi + 8], ecx
sub ebp, dword [esp + 0x1c]
mov dword [esi + 0xc], ebp
mov ecx, eax
sar ecx, 4
and ecx, 0xf
movzx ebx, byte [ecx + 0x5a6cf4]
mov ecx, eax
and ecx, 0xf
movzx ecx, byte [ecx + 0x5a6cf4]
shl ecx, 4
or ebx, ecx
shl ebx, 4
mov ecx, eax
sar ecx, 8
movzx ecx, byte [ecx + 0x5a6cf4]
or ebx, ecx
mov ecx, dword [esp + 0x40]
mov ebp, ebx
xor ebp, 0xfff
sar ebp, cl
mov ecx, dword [esp + 0x38]
inc eax
lea ebp, [ecx + ebp*4 - 4]
mov ecx, dword [esp + 0x40]
sar ebx, cl
mov ecx, dword [esp + 0x38]
lea ebx, [ecx + ebx*4]
mov ecx, dword [ebx]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], ebx
mov ebx, dword [ebp]
mov ebp, dword [ebp + 4]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], ebx
add ebx, ecx
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + 4]
mov dword [esp + 0x24], ecx
sub ecx, ebp
movzx ebp, byte [edx + 1]
mov dword [esp + 0x20], ebp
sar ecx, 9
mov ebp, ebx
movzx ebx, byte [edx]
sar ebp, 9
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x20]
imul ebx, ebp
mov ebp, dword [esp + 0x10]
imul ebp, ecx
add ebx, ebp
mov ebp, dword [esp + 0x20]
imul ebp, ecx
mov ecx, dword [esp + 0x10]
imul ecx, dword [esp + 0x14]
mov dword [esp + 0x2c], ebp
sub ebp, ecx
add edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x24]
add ecx, ebp
mov ebp, dword [esp + 0x1c]
sar ecx, 1
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x18]
sub ecx, ebp
mov ebp, dword [esp + 0x10]
sar ecx, 1
add ebp, ebx
mov dword [edi + 8], ebp
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
add ecx, ebp
mov dword [edi + 0xc], ecx
mov ecx, dword [esp + 0x10]
sub ecx, ebx
mov dword [esi], ecx
sub ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
add edi, 0x10
cmp edx, ecx
mov dword [esi + 4], ebp
jb 0x566d88
mov ecx, eax
sar ecx, 4
and ecx, 0xf
movzx ebx, byte [ecx + 0x5a6cf4]
mov ecx, eax
and ecx, 0xf
movzx ecx, byte [ecx + 0x5a6cf4]
shl ecx, 4
or ebx, ecx
shl ebx, 4
mov ecx, eax
sar ecx, 8
movzx ecx, byte [ecx + 0x5a6cf4]
or ebx, ecx
mov ecx, dword [esp + 0x40]
mov ebp, ebx
xor ebp, 0xfff
sar ebp, cl
mov ecx, dword [esp + 0x38]
sub esi, 0x10
inc eax
lea ebp, [ecx + ebp*4 - 4]
mov ecx, dword [esp + 0x40]
sar ebx, cl
mov ecx, dword [esp + 0x38]
lea ebx, [ecx + ebx*4]
mov ecx, dword [ebx]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], ebx
mov ebx, dword [ebp]
mov ebp, dword [ebp + 4]
add ecx, ebx
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x1c]
mov ebx, dword [ebx + 4]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x2c], ebx
sub ebx, ebp
sub edx, dword [esp + 0x3c]
movzx ebp, byte [edx + 1]
mov dword [esp + 0x24], ebp
movzx ebp, byte [edx]
sar ecx, 9
mov dword [esp + 0x1c], ecx
imul ecx, ebp
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x24]
sar ebx, 9
imul ebp, ebx
imul ebx, dword [esp + 0x10]
add ecx, ebp
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x24]
imul ecx, dword [esp + 0x1c]
sub ebx, ecx
mov ecx, dword [esp + 0x30]
add ecx, ebp
mov ebp, dword [esp + 0x18]
sub ebp, dword [esp + 0x20]
sar ecx, 1
sar ebp, 1
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x14]
add ebp, ecx
mov dword [edi], ebp
mov ebp, dword [esp + 0x10]
add ebp, ebx
mov dword [edi + 4], ebp
sub ecx, dword [esp + 0x14]
mov dword [esi + 8], ecx
sub ebx, dword [esp + 0x10]
mov ecx, eax
sar ecx, 4
and ecx, 0xf
mov dword [esi + 0xc], ebx
movzx ebx, byte [ecx + 0x5a6cf4]
mov ecx, eax
and ecx, 0xf
movzx ecx, byte [ecx + 0x5a6cf4]
shl ecx, 4
or ebx, ecx
shl ebx, 4
mov ecx, eax
sar ecx, 8
movzx ecx, byte [ecx + 0x5a6cf4]
or ebx, ecx
mov ecx, dword [esp + 0x40]
mov ebp, ebx
xor ebp, 0xfff
sar ebp, cl
mov ecx, dword [esp + 0x38]
add edi, 0x10
inc eax
lea ebp, [ecx + ebp*4 - 4]
mov ecx, dword [esp + 0x40]
sar ebx, cl
mov ecx, dword [esp + 0x38]
lea ebx, [ecx + ebx*4]
mov ecx, dword [ebx]
mov dword [esp + 0x1c], ebx
mov ebx, dword [ebp]
mov ebp, dword [ebp + 4]
mov dword [esp + 0x20], ecx
add ecx, ebx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x1c]
mov ebx, dword [ebx + 4]
mov dword [esp + 0x2c], ebx
sub ebx, ebp
sub edx, dword [esp + 0x3c]
movzx ebp, byte [edx + 1]
mov dword [esp + 0x24], ebp
movzx ebp, byte [edx]
mov dword [esp + 0x10], ebp
sar ecx, 9
mov dword [esp + 0x1c], ecx
imul ecx, ebp
mov ebp, dword [esp + 0x24]
sar ebx, 9
imul ebp, ebx
imul ebx, dword [esp + 0x10]
add ecx, ebp
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x24]
imul ecx, dword [esp + 0x1c]
sub ebx, ecx
mov ecx, dword [esp + 0x30]
add ecx, ebp
mov ebp, dword [esp + 0x18]
sub ebp, dword [esp + 0x20]
sar ecx, 1
sar ebp, 1
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x14]
add ebp, ecx
mov dword [edi - 8], ebp
mov ebp, dword [esp + 0x10]
add ebp, ebx
mov dword [edi - 4], ebp
sub ecx, dword [esp + 0x14]
sub ebx, dword [esp + 0x10]
cmp edi, esi
mov dword [esi], ecx
mov dword [esi + 4], ebx
jb 0x566fa6
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret