Function at 0x528ab2
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1fe4
call fcn.005747d0
mov ecx, dword [ebp + 0x18]
push ebx
push esi
push edi
test ch, 0xc
jne 0x528c72
mov edx, dword [ebp + 0x14]
mov eax, 0x400000
test eax, edx
jne 0x528c06
test eax, ecx
je 0x528c06
mov eax, dword [ebp + 0x10]
push 0x40
cdq
sub eax, edx
pop ecx
sar eax, 1
mov ebx, dword [ebp + 0x1c]
lea eax, [eax + eax*8]
shl eax, 2
cdq
idiv ecx
lea ecx, [ebx + ebx*8]
shl ecx, 2
mov dword [ebp + 0x10], eax
cdq
idiv ecx
cmp ebx, 1
jne 0x528b26
push ebx
push 0x40
push ecx
push eax
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00537ac4
add esp, 0x18
jmp 0x528cab
cmp ebx, 2
jne 0x528b42
push 0x40
push ecx
push eax
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00537bdb
add esp, 0x14
jmp 0x528cab
test ebx, ebx
jle 0x528cab
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
cdq
idiv ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
sub eax, ecx
mov dword [ebp - 0x18], eax
jmp 0x528b6c
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
add eax, ecx
mov dword [ebp - 4], ecx
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov ecx, 0xfe4
cmp eax, ecx
jle 0x528b88
mov eax, ecx
push 0x24
cdq
pop ecx
idiv ecx
lea edi, [eax + eax*8]
shl edi, 2
mov eax, edi
cdq
idiv ecx
mov esi, eax
lea eax, [ebp - 0x1fe4]
test esi, esi
jle 0x528bca
lea ecx, [ebx + ebx]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 0x12
mov edx, dword [ebp + 0x1c]
add dword [ebp + 0x1c], ecx
mov dx, word [edx]
mov word [eax], dx
inc eax
inc eax
dec dword [ebp - 0x10]
jne 0x528bb2
dec dword [ebp - 0xc]
jne 0x528bab
push ebx
push 0x40
push 0x24
push esi
push dword [ebp - 4]
lea eax, [ebp - 0x1fe4]
push eax
call fcn.00537ac4
imul esi, ebx
sub dword [ebp + 0xc], edi
add esp, 0x18
shl esi, 7
add dword [ebp - 4], esi
cmp dword [ebp + 0xc], 0x24
jge 0x528b7a
add dword [ebp - 8], 2
dec dword [ebp - 0x14]
jne 0x528b66
jmp 0x528cab
mov edi, edx
and edi, 0x10
je 0x528c12
test cl, 8
jne 0x528c1c
test dl, 8
je 0x528c5f
test cl, 0x10
je 0x528c5f
test dl, 8
je 0x528c3c
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
sar ecx, 1
test ecx, ecx
jle 0x528c3c
lea eax, [edx + 1]
mov esi, ecx
mov cl, byte [eax]
mov byte [edx], cl
inc edx
inc eax
inc eax
dec esi
jne 0x528c32
test edi, edi
je 0x528cab
mov ecx, dword [ebp + 8]
xor eax, eax
cmp dword [ebp + 0x10], eax
jle 0x528cab
mov esi, dword [ebp + 8]
xor edx, edx
mov dh, byte [eax + esi]
mov word [ecx], dx
inc ecx
inc ecx
inc eax
cmp eax, dword [ebp + 0x10]
jl 0x528c4a
jmp 0x528cab
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00576e70
add esp, 0xc
jmp 0x528cab
test cl, 8
je 0x528c8e
shr ecx, 0xb
and cl, 1
push ecx
push dword [ebp + 0x10]
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.005377fd
jmp 0x528ca8
test cl, 0x10
je 0x528cab
shr ecx, 0xb
and cl, 1
push ecx
push dword [ebp + 0x10]
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00537934
add esp, 0x10
test byte [ebp + 0x19], 2
je 0x528cf5
xor edx, edx
test byte [ebp + 0x14], 8
je 0x528cd2
mov esi, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
test esi, esi
jle 0x528cf5
movzx eax, byte [ecx]
add eax, edx
mov byte [ecx], al
inc ecx
dec esi
mov edx, eax
jne 0x528cc3
jmp 0x528cf5
test byte [ebp + 0x14], 0x10
je 0x528cf5
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
sar eax, 1
test eax, eax
jle 0x528cf5
mov esi, eax
movzx eax, word [ecx]
add eax, edx
mov word [ecx], ax
inc ecx
inc ecx
dec esi
mov edx, eax
jne 0x528ce6
mov edx, dword [ebp + 0x14]
mov eax, 0x100
pop edi
pop esi
test eax, edx
pop ebx
je 0x528d0a
test byte [ebp + 0x18], 0x80
jne 0x528d13
test dl, dl
jns 0x528d44
test dword [ebp + 0x18], eax
je 0x528d44
test dl, 8
je 0x528d29
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
test ecx, ecx
jle 0x528d29
xor byte [eax], 0x80
inc eax
dec ecx
jne 0x528d22
test dl, 0x10
je 0x528d44
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
sar ecx, 1
test ecx, ecx
jle 0x528d44
xor word [eax], 0x8000
inc eax
inc eax
dec ecx
jne 0x528d3a
mov al, 1
leave
ret