Function at 0x527beb
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
mov eax, dword [0x59b000]
xor eax, esp
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x28]
push ebx
push ebp
push esi
mov ecx, dword [edx]
mov esi, dword [esp + 0x38]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
push edi
mov edi, dword [esp + 0x40]
cmp ecx, 0x60
ja case.0x527a58.1
movzx eax, byte [ecx + 0x527dfc]
jmp dword [eax*4 + 0x527de8]
push dword [esp + 0x44]
push edi
push esi
push edx
call fcn.005279b0
add esp, 0x10
jmp case.0x527a58.1
mov al, byte [edx + 0x14]
mov ebx, dword [edx + 0x10]
mov ebp, dword [esp + 0x44]
mov byte [esp + 0x13], al
test al, al
je 0x527ae0
cmp ebp, 8
jae 0x527aa4
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.0054a992
add esp, 0x24
ret 0x10
test esi, esi
je 0x527ae0
cmp esi, edi
jne 0x527ae0
cmp ecx, 0x20
je 0x527acb
cmp ecx, 0x30
jne case.0x527a58.1
push ebp
push esi
lea eax, [edx + 0x20]
push eax
push ebx
call fcn.005289f0
jmp case.0x527a58.1
push ebp
push esi
lea eax, [edx + 0x20]
push eax
push ebx
call fcn.005288b0
jmp case.0x527a58.1
cmp ebp, 0x10
jae 0x527af6
cmp ebp, 8
jb 0x527b7c
test al, al
jne 0x527b7c
mov eax, dword [edi]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 4]
add edi, 8
mov dword [esp + 0x24], eax
cmp ecx, 0x20
je 0x527b33
cmp ecx, 0x30
jne 0x527b5c
cmp byte [esp + 0x13], 0
lea eax, [esp + 0x20]
je 0x527b2a
push 8
push eax
lea eax, [edx + 0x20]
push eax
push ebx
call fcn.005289f0
jmp 0x527b54
push eax
push ebx
call fcn.005286b0
jmp 0x527b54
cmp byte [esp + 0x13], 0
lea eax, [esp + 0x20]
je 0x527b4d
push 8
push eax
lea eax, [edx + 0x20]
push eax
push ebx
call fcn.005288b0
jmp 0x527b54
push eax
push ebx
call fcn.00528610
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
test esi, esi
je 0x527b70
mov eax, dword [esp + 0x20]
mov dword [esi], eax
mov eax, dword [esp + 0x24]
mov dword [esi + 4], eax
add esi, 8
mov al, byte [esp + 0x13]
sub ebp, 8
jmp 0x527ae0
test ebp, ebp
je case.0x527a58.1
test al, al
je 0x527bef
push ebp
lea eax, [esp + 0x24]
push edi
push eax
call fcn.0054adf0
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp eax, 0x20
je 0x527bbb
cmp eax, 0x30
jne 0x527bcf
push ebp
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x1c]
add eax, 0x20
push eax
push ebx
call fcn.005289f0
jmp 0x527bcf
push ebp
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x1c]
add eax, 0x20
push eax
push ebx
call fcn.005288b0
test esi, esi
je case.0x527a58.1
push ebp
lea eax, [esp + 0x24]
push eax
push esi
call fcn.0054adf0
add esp, 0xc
jmp case.0x527a58.1
mov ebp, dword [esp + 0x44]
mov eax, dword [edx + 0x10]
mov dword [esp + 0x18], eax
test ebp, ebp
je case.0x527a58.1
mov edi, edi
push 8
lea eax, [esp + 0x24]
mov ebx, 8
push eax
push eax
cmp ebp, ebx
xorps xmm0, xmm0
push edx
cmovb ebx, ebp
movq qword [esp + 0x30], xmm0
call fcn.005279b0
add esp, 0x10
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x1c]
call fcn.005286b0
test esi, esi
je 0x527cc9
xor ecx, ecx
test ebx, ebx
je 0x527ccb
cmp ebx, 0x20
jb 0x527cb4
lea eax, [edi - 1]
lea edx, [esi - 1]
add eax, ebx
add edx, ebx
cmp esi, eax
ja 0x527c5b
cmp edx, edi
jae 0x527cb4
lea eax, [esp + ebx + 0x1f]
cmp esi, eax
ja 0x527c6b
lea eax, [esp + 0x20]
cmp edx, eax
jae 0x527cb4
mov eax, ebx
mov edx, ebx
and eax, 0x1f
sub edx, eax
lea eax, [esp + 0x30]
jmp 0x527c80
movdqu xmm0, xmmword [edi]
add ecx, 0x20
lea eax, [eax + 0x20]
movdqu xmm1, xmmword [eax - 0x30]
pxor xmm1, xmm0
movdqu xmmword [esi], xmm1
movdqu xmm0, xmmword [edi + 0x10]
add edi, 0x20
movdqu xmm1, xmmword [eax - 0x20]
pxor xmm1, xmm0
movdqu xmmword [esi + 0x10], xmm1
add esi, 0x20
cmp ecx, edx
jb 0x527c80
cmp ecx, ebx
jae 0x527ccb
mov al, byte [esp + ecx + 0x20]
inc ecx
xor al, byte [edi]
inc edi
mov byte [esi], al
inc esi
cmp ecx, ebx
jb 0x527cb8
jmp 0x527ccb
add edi, ebx
mov edx, dword [esp + 0x14]
sub ebp, ebx
jne 0x527c00
jmp case.0x527a58.1
mov eax, dword [edx + 4]
cmp ecx, 0x40
mov ebp, dword [esp + 0x44]
mov dword [esp + 0x18], eax
sete byte [esp + 0x13]
mov eax, dword [edx + 8]
dec eax
test ebp, eax
jne 0x527a8a
test esi, esi
je 0x527d12
cmp edi, esi
je 0x527d12
push ebp
push edi
push esi
call fcn.0054adf0
mov edx, dword [esp + 0x20]
add esp, 0xc
mov ecx, dword [esp + 0x18]
shr ebp, cl
cmp ebp, 2
jl case.0x527a58.1
mov eax, dword [edx + 0x18]
dec ebp
cmp byte [esp + 0x13], 0
mov ebx, 1
mov edx, dword [edx + 0x1c]
cmovne ebx, ebp
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
test ebp, ebp
jle case.0x527a58.1
lea eax, [ebx + 1]
mov dword [esp + 0x14], eax
lea esp, [esp]
mov edi, ebx
mov eax, edx
shl edi, cl
add edi, esi
test bl, 1
cmovne eax, dword [esp + 0x1c]
xor edx, edx
div dword [esp + 0x14]
shl edx, cl
add edx, esi
test esi, esi
je case.default.0x527d73
cmp ecx, 3
ja case.default.0x527d73
jmp dword [ecx*4 + 0x527e60]
mov al, byte [edx]
mov cl, byte [edi]
mov byte [edi], al
mov byte [edx], cl
jmp 0x527db0
mov ax, word [edx]
movzx ecx, word [edi]
mov word [edi], ax
mov word [edx], cx
jmp 0x527db0
mov ecx, dword [edi]
mov eax, dword [edx]
mov dword [edi], eax
mov dword [edx], ecx
jmp 0x527db0
mov ecx, dword [edi]
mov eax, dword [edx]
mov dword [edi], eax
mov eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edi + 4]
mov dword [edi + 4], eax
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x18]
cmp byte [esp + 0x13], 0
je 0x527dc2
dec ebx
dec dword [esp + 0x14]
jmp 0x527dc7
inc ebx
inc dword [esp + 0x14]
mov edx, dword [esp + 0x20]
dec ebp
test ebp, ebp
jg 0x527d50
mov ecx, dword [esp + 0x30]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0054a992
add esp, 0x24
ret 0x10