Function at 0x522a22
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x260
mov eax, dword [ebp + 8]
add eax, 0x760
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xc0], 0
mov dword [ebp - 8], 2
jmp 0x522a55
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0x40
jae 0x522bed
mov eax, dword [ebp + 8]
add eax, dword [ebp - 8]
xor ecx, ecx
mov cl, byte [eax + 0x2cb0]
mov dword [ebp - 0x218], ecx
mov edx, dword [ebp - 0x218]
shr edx, 1
sub edx, 1
mov dword [ebp - 0x224], edx
mov eax, dword [ebp - 0x218]
and eax, 1
or al, 2
mov ecx, dword [ebp - 0x224]
shl eax, cl
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp - 0x22c]
shl ecx, 1
mov edx, dword [ebp + 8]
lea eax, [edx + ecx*2 + 0x23b0]
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x228], 1
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x210], ecx
mov edx, 1
mov ecx, dword [ebp - 0x224]
shl edx, cl
mov dword [ebp - 0x21c], edx
mov eax, dword [ebp - 0x22c]
add eax, dword [ebp - 8]
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x224], 0
je 0x522b81
mov ecx, dword [ebp - 0x210]
and ecx, 1
mov dword [ebp - 0x230], ecx
mov edx, dword [ebp - 0x210]
shr edx, 1
mov dword [ebp - 0x210], edx
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 0x214]
xor edx, edx
mov dx, word [ecx + eax*2]
mov eax, dword [ebp - 0x230]
neg eax
and eax, 0x7ff
xor edx, eax
shr edx, 4
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x220]
add eax, dword [ecx + edx*4]
mov dword [ebp - 0x220], eax
mov ecx, dword [ebp - 0x228]
mov edx, dword [ebp - 0x230]
lea eax, [edx + ecx*2]
mov dword [ebp - 0x228], eax
mov ecx, dword [ebp - 0x224]
sub ecx, 1
mov dword [ebp - 0x224], ecx
cmp dword [ebp - 0x224], 0
jne 0x522b01
mov edx, dword [ebp - 0x228]
mov eax, dword [ebp - 0x214]
xor ecx, ecx
mov cx, word [eax + edx*2]
mov dword [ebp - 0x234], ecx
mov edx, dword [ebp - 0x234]
shr edx, 4
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x220]
add ecx, dword [eax + edx*4]
mov edx, dword [ebp - 0x22c]
mov dword [ebp + edx*4 - 0x208], ecx
mov eax, dword [ebp - 0x234]
xor eax, 0x7ff
shr eax, 4
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x220]
add edx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x22c]
add eax, dword [ebp - 0x21c]
mov dword [ebp + eax*4 - 0x208], edx
jmp 0x522a4c
mov dword [ebp - 0x20c], 0
jmp 0x522c08
mov ecx, dword [ebp - 0x20c]
add ecx, 1
mov dword [ebp - 0x20c], ecx
cmp dword [ebp - 0x20c], 4
jae 0x523012
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc8]
add eax, 1
shr eax, 1
mov dword [ebp - 0x238], eax
mov ecx, dword [ebp - 0x20c]
shl ecx, 8
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x1230]
mov dword [ebp - 0x244], eax
mov ecx, dword [ebp - 0x20c]
shl ecx, 7
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x21b0]
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x240], 0
jmp 0x522c76
mov ecx, dword [ebp - 0x240]
add ecx, 1
mov dword [ebp - 0x240], ecx
mov edx, dword [ebp - 0x240]
cmp edx, dword [ebp - 0x238]
jae 0x522ea5
mov eax, dword [ebp - 0x240]
add eax, 0x20
mov dword [ebp - 0x24c], eax
mov ecx, dword [ebp - 0x24c]
and ecx, 1
mov dword [ebp - 0x254], ecx
mov edx, dword [ebp - 0x24c]
shr edx, 1
mov dword [ebp - 0x24c], edx
mov eax, dword [ebp - 0x24c]
mov ecx, dword [ebp - 0x23c]
xor edx, edx
mov dx, word [ecx + eax*2]
mov eax, dword [ebp - 0x254]
neg eax
and eax, 0x7ff
xor edx, eax
shr edx, 4
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + edx*4]
mov dword [ebp - 0x250], edx
mov eax, dword [ebp - 0x24c]
and eax, 1
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x24c]
shr ecx, 1
mov dword [ebp - 0x24c], ecx
mov edx, dword [ebp - 0x24c]
mov eax, dword [ebp - 0x23c]
xor ecx, ecx
mov cx, word [eax + edx*2]
mov edx, dword [ebp - 0x254]
neg edx
and edx, 0x7ff
xor ecx, edx
shr ecx, 4
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x250]
add edx, dword [eax + ecx*4]
mov dword [ebp - 0x250], edx
mov eax, dword [ebp - 0x24c]
and eax, 1
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x24c]
shr ecx, 1
mov dword [ebp - 0x24c], ecx
mov edx, dword [ebp - 0x24c]
mov eax, dword [ebp - 0x23c]
xor ecx, ecx
mov cx, word [eax + edx*2]
mov edx, dword [ebp - 0x254]
neg edx
and edx, 0x7ff
xor ecx, edx
shr ecx, 4
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x250]
add edx, dword [eax + ecx*4]
mov dword [ebp - 0x250], edx
mov eax, dword [ebp - 0x24c]
and eax, 1
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x24c]
shr ecx, 1
mov dword [ebp - 0x24c], ecx
mov edx, dword [ebp - 0x24c]
mov eax, dword [ebp - 0x23c]
xor ecx, ecx
mov cx, word [eax + edx*2]
mov edx, dword [ebp - 0x254]
neg edx
and edx, 0x7ff
xor ecx, edx
shr ecx, 4
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x250]
add edx, dword [eax + ecx*4]
mov dword [ebp - 0x250], edx
mov eax, dword [ebp - 0x24c]
and eax, 1
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x24c]
shr ecx, 1
mov dword [ebp - 0x24c], ecx
mov edx, dword [ebp - 0x24c]
mov eax, dword [ebp - 0x23c]
xor ecx, ecx
mov cx, word [eax + edx*2]
mov edx, dword [ebp - 0x254]
neg edx
and edx, 0x7ff
xor ecx, edx
shr ecx, 4
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x250]
add edx, dword [eax + ecx*4]
mov dword [ebp - 0x250], edx
mov eax, dword [ebp - 0x240]
mov ecx, dword [ebp - 0x23c]
xor edx, edx
mov dx, word [ecx + eax*2 + 0x40]
mov dword [ebp - 0x248], edx
mov eax, dword [ebp - 0x248]
shr eax, 4
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x250]
add edx, dword [ecx + eax*4]
mov eax, dword [ebp - 0x240]
shl eax, 1
mov ecx, dword [ebp - 0x244]
mov dword [ecx + eax*4], edx
mov edx, dword [ebp - 0x248]
xor edx, 0x7ff
shr edx, 4
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x250]
add ecx, dword [eax + edx*4]
mov edx, dword [ebp - 0x240]
shl edx, 1
mov eax, dword [ebp - 0x244]
mov dword [eax + edx*4 + 4], ecx
jmp 0x522c67
mov dword [ebp - 0x258], 0x20
mov dword [ebp - 0x240], 7
jmp 0x522eca
mov ecx, dword [ebp - 0x240]
add ecx, 1
mov dword [ebp - 0x240], ecx
mov edx, dword [ebp - 0x240]
cmp edx, dword [ebp - 0x238]
jae 0x522f3b
mov eax, dword [ebp - 0x240]
shl eax, 1
mov ecx, dword [ebp - 0x244]
mov edx, dword [ecx + eax*4]
add edx, dword [ebp - 0x258]
mov eax, dword [ebp - 0x240]
shl eax, 1
mov ecx, dword [ebp - 0x244]
mov dword [ecx + eax*4], edx
mov edx, dword [ebp - 0x240]
shl edx, 1
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + edx*4 + 4]
add ecx, dword [ebp - 0x258]
mov edx, dword [ebp - 0x240]
shl edx, 1
mov eax, dword [ebp - 0x244]
mov dword [eax + edx*4 + 4], ecx
mov ecx, dword [ebp - 0x258]
add ecx, 0x10
mov dword [ebp - 0x258], ecx
jmp 0x522ebb
mov edx, dword [ebp - 0x20c]
shl edx, 9
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 0x1630]
mov dword [ebp - 0x25c], ecx
mov edx, dword [ebp - 0x25c]
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax]
mov dword [edx], ecx
mov edx, dword [ebp - 0x25c]
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x25c]
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov edx, dword [ebp - 0x25c]
mov eax, dword [ebp - 0x244]
mov ecx, dword [eax + 0xc]
mov dword [edx + 0xc], ecx
mov dword [ebp - 8], 4
jmp 0x522fac
mov edx, dword [ebp - 8]
add edx, 2
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0x80
jae 0x52300d
mov eax, dword [ebp + 8]
add eax, dword [ebp - 8]
xor ecx, ecx
mov cl, byte [eax + 0x2cb0]
mov edx, dword [ebp - 0x244]
mov eax, dword [edx + ecx*4]
mov dword [ebp - 0x260], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x260]
add edx, dword [ebp + ecx*4 - 0x208]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x25c]
mov dword [ecx + eax*4], edx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x260]
add eax, dword [ebp + edx*4 - 0x204]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x25c]
mov dword [edx + ecx*4 + 4], eax
jmp 0x522fa3
jmp 0x522bf9
mov esp, ebp
pop ebp
ret