Function at 0x5225bf
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x44], ecx
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cx, word [eax]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
xor edx, 0x7ff
shr edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx*4]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0xc]
shr edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx*4]
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 8]
xor eax, eax
mov ax, word [edx + 0x10]
sar eax, 4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 4]
add edx, dword [ecx + eax*4]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], 0
jmp 0x522624
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x48]
jae 0x522686
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x440
mov eax, dword [ebp - 0x44]
lea ecx, [eax + edx + 4]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x14]
shl edx, 4
mov eax, dword [ebp + 8]
lea ecx, [eax + edx*2]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.005227e1
add esp, 0x10
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0x20
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x18]
add eax, 0x10
push eax
call fcn.005227e1
add esp, 0x10
jmp 0x52261b
mov ecx, dword [ebp - 0x44]
mov edx, dword [ecx]
mov dword [ebp - 0x20], edx
cmp dword [ebp - 0x20], 0x10
jbe 0x5227db
mov eax, dword [ebp + 8]
add eax, 0x200
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x44]
add ecx, 0x44
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x20]
sub edx, 0xf
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
shr eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 8]
xor edx, edx
mov dx, word [ecx + 0x10]
xor edx, 0x7ff
sar edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
add ecx, dword [eax + edx*4]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x20]
sub edx, 1
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
add eax, 0x80
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x2c]
and edx, 1
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x2c]
shr eax, 1
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
xor eax, eax
mov ax, word [edx + ecx*2]
mov ecx, dword [ebp - 0x34]
neg ecx
and ecx, 0x7ff
xor eax, ecx
shr eax, 4
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x30]
add ecx, dword [edx + eax*4]
mov dword [ebp - 0x30], ecx
cmp dword [ebp - 0x2c], 2
jae 0x5226f5
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
xor ecx, ecx
mov cx, word [eax + edx*2 + 0x100]
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x38]
shr edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x30]
add ecx, dword [eax + edx*4]
mov edx, dword [ebp - 0x20]
shl edx, 1
mov eax, dword [ebp - 0x28]
mov dword [eax + edx*4], ecx
mov ecx, dword [ebp - 0x38]
xor ecx, 0x7ff
shr ecx, 4
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x30]
add eax, dword [edx + ecx*4]
mov ecx, dword [ebp - 0x20]
shl ecx, 1
mov edx, dword [ebp - 0x28]
mov dword [edx + ecx*4 + 4], eax
cmp dword [ebp - 0x20], 0
jne 0x5226db
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax]
lea edx, [ecx*4 - 0x40]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], 1
jmp 0x5227ad
mov eax, dword [ebp - 0x40]
add eax, 1
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
cmp ecx, dword [ebp - 0x48]
jae 0x5227db
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x44]
add eax, 0x44
push eax
mov ecx, dword [ebp - 0x40]
imul ecx, ecx, 0x440
mov edx, dword [ebp - 0x44]
lea eax, [edx + ecx + 0x44]
push eax
call fcn.004554d0
add esp, 0xc
jmp 0x5227a4
mov esp, ebp
pop ebp
ret 8