Function at 0x52a1c0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov ecx, dword [ebx + 0xc]
push edi
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], ecx
cmp ecx, eax
jae 0x52a22b
cmp dword [ebp + 0x14], 0
je 0x52a1ee
push eax
push ebx
call fcn.00529b40
add esp, 8
mov ebx, eax
jmp 0x52a22b
mov eax, dword [ebp + 4]
mov edi, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov esi, dword [ebx + 0x2c]
mov ecx, dword [ebx + 0x30]
mov dword [ebx + 4], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebx + 0x2c], eax
mov eax, dword [ebp + 0x30]
mov dword [ebx + 0x30], eax
mov eax, dword [esp + 0x14]
mov dword [ebp + 4], edi
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x2c], esi
mov dword [ebp + 0x30], ecx
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [esp + 0x14], esi
test esi, esi
jle 0x52a2e9
nop dword [eax]
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax + edi*4]
mov edx, dword [eax + 4]
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax + edi*4]
mov ecx, dword [eax + 4]
lea eax, [edx + 0x7fff]
lea esi, [ecx + 0x7fff]
cmp ecx, eax
ja 0x52a280
cmp esi, edx
jb 0x52a280
sub edx, ecx
mov esi, 0x8000
nop dword [eax]
mov al, byte [ecx + edx]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
sub esi, 1
jne 0x52a270
jmp 0x52a2dc
lea eax, [edx + 0x20]
mov esi, 0x200
sub edx, ecx
nop word [eax + eax]
lea ecx, [ecx + 0x40]
lea eax, [eax + 0x40]
movups xmm0, xmmword [ecx - 0x40]
movups xmm1, xmmword [edx + ecx - 0x40]
pxor xmm1, xmm0
movups xmmword [ecx - 0x40], xmm1
movups xmm0, xmmword [ecx - 0x30]
movups xmm1, xmmword [eax - 0x50]
pxor xmm1, xmm0
movups xmm0, xmmword [eax - 0x40]
movups xmmword [ecx - 0x30], xmm1
movups xmm1, xmmword [ecx - 0x20]
pxor xmm1, xmm0
movups xmmword [ecx - 0x20], xmm1
movups xmm0, xmmword [ecx - 0x10]
movups xmm1, xmmword [eax - 0x30]
pxor xmm1, xmm0
movups xmmword [ecx - 0x10], xmm1
sub esi, 1
jne 0x52a290
mov esi, dword [esp + 0x14]
inc edi
cmp edi, esi
jl 0x52a240
mov ecx, dword [ebp + 0x30]
test ecx, ecx
je 0x52a3d7
cmp dword [ebx + 0x30], 0
jne 0x52a325
cmp dword [ebp + 0x14], 0
jne 0x52a317
mov eax, dword [ebp + 8]
cmp eax, dword [ebx + 8]
jne 0x52a317
mov dword [ebx + 0x30], ecx
mov dword [ebp + 0x30], 0
jmp 0x52a3d7
push dword [ebx + 8]
call fcn.00528fe0
add esp, 4
mov dword [ebx + 0x30], eax
xor edi, edi
test esi, esi
jle 0x52a3d7
nop
mov eax, dword [ebp + 0x30]
mov eax, dword [eax + edi*4]
mov edx, dword [eax + 4]
mov eax, dword [ebx + 0x30]
lea ecx, [edx + 0x7fff]
mov eax, dword [eax + edi*4]
mov eax, dword [eax + 4]
lea esi, [eax + 0x7fff]
cmp eax, ecx
ja 0x52a370
cmp esi, edx
jb 0x52a370
sub edx, eax
mov esi, 0x8000
nop dword [eax]
mov cl, byte [eax + edx]
lea eax, [eax + 1]
or byte [eax - 1], cl
sub esi, 1
jne 0x52a360
jmp 0x52a3cc
lea ecx, [edx + 0x20]
mov esi, 0x200
sub edx, eax
nop word [eax + eax]
lea eax, [eax + 0x40]
lea ecx, [ecx + 0x40]
movups xmm0, xmmword [eax - 0x40]
movups xmm1, xmmword [edx + eax - 0x40]
por xmm1, xmm0
movups xmmword [eax - 0x40], xmm1
movups xmm0, xmmword [eax - 0x30]
movups xmm1, xmmword [ecx - 0x50]
por xmm1, xmm0
movups xmm0, xmmword [ecx - 0x40]
movups xmmword [eax - 0x30], xmm1
movups xmm1, xmmword [eax - 0x20]
por xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
movups xmm0, xmmword [eax - 0x10]
movups xmm1, xmmword [ecx - 0x30]
por xmm1, xmm0
movups xmmword [eax - 0x10], xmm1
sub esi, 1
jne 0x52a380
inc edi
cmp edi, dword [esp + 0x14]
jl 0x52a330
mov eax, dword [ebp + 0x20]
cmp eax, 2
jne 0x52a3eb
cmp dword [ebx + 0x20], eax
lea esi, [ebx + 0x20]
jne 0x52a3f2
mov dword [esi], eax
jmp 0x52a408
test eax, eax
je 0x52a3ff
lea esi, [ebx + 0x20]
cmp dword [esi], 0
je 0x52a3ff
mov dword [esi], 1
jmp 0x52a408
lea esi, [ebx + 0x20]
mov dword [esi], 0
cmp dword [ebp + 0x14], 0
jne 0x52a417
push ebp
call fcn.00528810
add esp, 4
mov ecx, dword [ebx + 0xc]
mov ebp, 0x8000
test ecx, ecx
je 0x52a462
mov eax, dword [ebx + 0x2c]
dec ecx
mov edx, ecx
mov edi, ecx
shr edx, 0x12
and ecx, 7
shr edi, 3
inc ecx
and edi, 0x7fff
mov eax, dword [eax + edx*4]
mov edx, dword [eax + 4]
mov al, 1
shl al, cl
dec al
and byte [edx + edi], al
inc edi
cmp edi, ebp
jae 0x52a462
mov eax, ebp
sub eax, edi
push eax
lea eax, [edx + edi]
push 0
push eax
call fcn.0050abb0
add esp, 0xc
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x52a4aa
mov edi, dword [ebx + 0x30]
test edi, edi
je 0x52a4aa
dec ecx
mov eax, ecx
mov edx, ecx
shr eax, 0x12
and ecx, 7
shr edx, 3
inc ecx
and edx, 0x7fff
mov eax, dword [edi + eax*4]
mov edi, dword [eax + 4]
mov al, 1
shl al, cl
dec al
and byte [edi + edx], al
inc edx
cmp edx, ebp
jae 0x52a4aa
sub ebp, edx
lea eax, [edi + edx]
push ebp
push 0
push eax
call fcn.0050abb0
add esp, 0xc
push 0
push ebx
call fcn.00529350
add esp, 8
test eax, eax
jne 0x52a4d9
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x52a4d3
push dword [ebx + 8]
push eax
call fcn.00528f90
add esp, 8
mov dword [ebx + 0x30], 0
mov dword [esi], 2
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
ret