Function at 0x4caf40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x502204]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x14], 1
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp + 0xc]
mov esi, edx
push edi
mov dword [ebp - 0x30], esi
mov edi, eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x20], eax
jne 0x4cb167
mov ecx, dword [ebp + 8]
cmp ecx, 0x10
jb 0x4cb013
shr ecx, 4
mov dword [ebp - 0x1c], ecx
nop word [eax + eax]
lea eax, [ebx + 0xf]
cmp esi, eax
ja 0x4caf9e
lea eax, [esi + 0xf]
cmp eax, ebx
jae 0x4cafac
lea eax, [edi + 0xf]
cmp esi, eax
ja 0x4cafd7
lea eax, [esi + 0xf]
cmp eax, edi
jb 0x4cafd7
mov eax, esi
sub edi, ebx
sub eax, ebx
mov ecx, ebx
mov dword [ebp - 0x20], eax
mov edx, 0x10
mov esi, eax
nop
mov al, byte [edi + ecx]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
mov byte [esi + ecx - 1], al
sub edx, 1
jne 0x4cafc0
mov esi, dword [ebp - 0x30]
jmp 0x4cafe4
movups xmm1, xmmword [ebx]
movups xmm0, xmmword [edi]
pxor xmm1, xmm0
movups xmmword [esi], xmm1
push dword [ebp - 0x2c]
mov edx, esi
mov ecx, esi
call fcn.004c9450
mov ecx, dword [ebp + 8]
mov edi, esi
sub ecx, 0x10
add esi, 0x10
add esp, 4
mov dword [ebp + 8], ecx
add ebx, 0x10
mov dword [ebp - 0x30], esi
sub dword [ebp - 0x1c], 1
jne 0x4caf90
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], edi
test ecx, ecx
je 0x4cb15f
xor edx, edx
mov dword [ebp - 0x24], edx
test ecx, ecx
je 0x4cb12d
cmp ecx, 0x40
jb 0x4cb0f9
lea eax, [ebx - 1]
mov dword [ebp - 0x24], edx
add eax, ecx
cmp esi, eax
ja 0x4cb04a
lea eax, [esi - 1]
add eax, ecx
cmp eax, ebx
jae 0x4cb0f9
lea eax, [edi - 1]
add eax, ecx
cmp esi, eax
ja 0x4cb060
lea eax, [esi - 1]
add eax, ecx
cmp eax, edi
jae 0x4cb0f9
mov eax, ecx
mov ecx, edi
sub ecx, ebx
and eax, 0xffffffc0
mov dword [ebp - 0x38], ecx
mov ecx, esi
sub ecx, ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x3c], ecx
mov eax, ebx
mov ebx, dword [ebp - 0x38]
mov ecx, edi
sub ecx, esi
mov dword [ebp - 0x40], ecx
lea ecx, [edi + 0x30]
mov edi, dword [ebp - 0x3c]
mov dword [ebp - 0x34], ecx
lea ecx, [esi + 0x10]
nop
movups xmm0, xmmword [eax]
mov edx, dword [ebp - 0x40]
lea eax, [eax + 0x40]
movups xmm1, xmmword [eax + ebx - 0x40]
mov esi, dword [ebp - 0x34]
lea ecx, [ecx + 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [eax - 0x30]
movups xmmword [eax + edi - 0x40], xmm1
movups xmm1, xmmword [edx + ecx - 0x40]
mov edx, dword [ebp - 0x24]
pxor xmm1, xmm0
movups xmm0, xmmword [eax - 0x20]
movups xmmword [ecx - 0x40], xmm1
movups xmm1, xmmword [esi + edx - 0x10]
pxor xmm1, xmm0
movups xmm0, xmmword [eax - 0x10]
movups xmmword [ecx - 0x30], xmm1
movups xmm1, xmmword [esi + edx]
mov esi, dword [ebp - 0x30]
add edx, 0x40
mov dword [ebp - 0x24], edx
pxor xmm1, xmm0
movups xmmword [ecx - 0x20], xmm1
cmp edx, dword [ebp - 0x18]
jb 0x4cb090
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
cmp edx, ecx
jae 0x4cb12d
sub esi, ebx
mov eax, edi
sub eax, ebx
mov dword [ebp - 0x34], esi
add edx, ebx
mov dword [ebp - 0x18], eax
mov ebx, ecx
mov esi, eax
sub ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x34]
mov al, byte [edx + esi]
lea edx, [edx + 1]
xor al, byte [edx - 1]
mov byte [edx + ecx - 1], al
sub ebx, 1
jne 0x4cb115
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp + 8]
cmp ecx, 0x10
jae 0x4cb14e
mov ebx, 0x10
lea edx, [esi + ecx]
sub edi, esi
sub ebx, ecx
nop
mov al, byte [edx + edi]
lea edx, [edx + 1]
mov byte [edx - 1], al
sub ebx, 1
jne 0x4cb140
push dword [ebp - 0x2c]
mov edx, esi
mov ecx, esi
call fcn.004c9450
add esp, 4
mov edi, esi
movups xmm0, xmmword [edi]
jmp 0x4cb467
cmp ebx, esi
je 0x4cb2e4
mov eax, dword [ebp + 8]
cmp eax, 0x10
jb 0x4cb1de
shr eax, 4
mov dword [ebp - 0x20], eax
nop dword [eax]
push ecx
mov edx, esi
mov ecx, ebx
call fcn.004c8f30
lea eax, [edi + 0xf]
add esp, 4
cmp esi, eax
ja 0x4cb1b4
lea eax, [esi + 0xf]
cmp eax, edi
jb 0x4cb1b4
mov ecx, esi
sub edi, esi
mov edx, 0x10
mov al, byte [ecx + edi]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
sub edx, 1
jne 0x4cb1a4
jmp 0x4cb1c1
movups xmm1, xmmword [esi]
movups xmm0, xmmword [edi]
pxor xmm1, xmm0
movups xmmword [esi], xmm1
mov eax, dword [ebp + 8]
mov edi, ebx
mov ecx, dword [ebp - 0x2c]
sub eax, 0x10
add ebx, 0x10
mov dword [ebp + 8], eax
add esi, 0x10
sub dword [ebp - 0x20], 1
jne 0x4cb180
mov dword [ebp - 0x1c], ebx
test eax, eax
je 0x4cb2dc
push ecx
lea edx, [ebp - 0x14]
mov ecx, ebx
call fcn.004c8f30
mov edx, dword [ebp + 8]
xor ecx, ecx
add esp, 4
mov dword [ebp - 0x24], ecx
test edx, edx
je 0x4cb2da
cmp edx, 0x40
jb 0x4cb2b8
lea eax, [ebp + edx - 0x15]
mov dword [ebp - 0x24], ecx
cmp esi, eax
ja 0x4cb22c
lea eax, [ebp - 0x14]
mov dword [ebp - 0x18], eax
lea eax, [edx - 1]
add eax, esi
cmp eax, dword [ebp - 0x18]
jae 0x4cb2b8
lea eax, [edx - 1]
add eax, edi
cmp esi, eax
ja 0x4cb23e
lea eax, [edx - 1]
add eax, esi
cmp eax, edi
jae 0x4cb2b8
mov eax, edx
mov edx, edi
and eax, 0xffffffc0
sub edx, esi
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 8]
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x34], eax
lea eax, [esi + 0x10]
nop word [eax + eax]
movups xmm0, xmmword [ebp + ecx - 0x14]
lea eax, [eax + 0x40]
movups xmm1, xmmword [edi + ecx]
pxor xmm1, xmm0
movups xmm0, xmmword [ebp + ecx - 4]
movups xmmword [esi + ecx], xmm1
movups xmm1, xmmword [eax + ebx - 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [ebp + ecx + 0xc]
movups xmmword [eax - 0x40], xmm1
movups xmm1, xmmword [edi + ecx + 0x20]
pxor xmm1, xmm0
movups xmm0, xmmword [ebp + ecx + 0x1c]
movups xmmword [eax - 0x30], xmm1
movups xmm1, xmmword [edi + ecx + 0x30]
add ecx, 0x40
pxor xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
cmp ecx, dword [ebp - 0x34]
jb 0x4cb260
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x24], ecx
cmp ecx, edx
jae 0x4cb2da
lea eax, [ebp - 0x14]
sub edi, eax
sub esi, eax
lea ecx, [ebp + ecx - 0x14]
mov al, byte [edi + ecx]
xor al, byte [ecx]
mov byte [esi + ecx], al
mov ecx, dword [ebp - 0x24]
inc ecx
mov dword [ebp - 0x24], ecx
cmp ecx, edx
jb 0x4cb2c3
mov edi, ebx
movups xmm0, xmmword [edi]
jmp 0x4cb467
mov edi, dword [ebp + 8]
cmp edi, 0x10
jb 0x4cb375
lea edx, [eax + 0xf]
sub eax, esi
mov dword [ebp - 0x1c], eax
mov eax, edi
shr eax, 4
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x20], eax
movups xmm2, xmmword [ebx]
push ecx
mov edx, esi
mov ecx, ebx
call fcn.004c8f30
add esp, 4
cmp esi, dword [ebp - 0x18]
ja 0x4cb346
lea eax, [esi + 0xf]
cmp eax, dword [ebp - 0x28]
jb 0x4cb346
mov edi, dword [ebp - 0x1c]
mov ecx, esi
mov edx, 0x10
nop word [eax + eax]
mov al, byte [edi + ecx]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
sub edx, 1
jne 0x4cb330
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x28]
jmp 0x4cb356
mov eax, dword [ebp - 0x28]
movups xmm0, xmmword [esi]
movups xmm1, xmmword [eax]
pxor xmm1, xmm0
movups xmmword [esi], xmm1
sub dword [ebp - 0x1c], 0x10
sub edi, 0x10
mov ecx, dword [ebp - 0x2c]
add ebx, 0x10
add esi, 0x10
mov dword [ebp + 8], edi
sub dword [ebp - 0x20], 1
movups xmmword [eax], xmm2
jne 0x4cb303
mov dword [ebp - 0x30], esi
test edi, edi
je 0x4cb46d
movups xmm0, xmmword [ebx]
push ecx
mov edx, esi
lea ecx, [ebp - 0x14]
movups xmmword [ebp - 0x50], xmm0
movups xmmword [ebp - 0x14], xmm0
call fcn.004c8f30
add esp, 4
xor edx, edx
test edi, edi
je 0x4cb444
mov ebx, dword [ebp - 0x28]
cmp edi, 0x40
jb 0x4cb420
lea eax, [ebx - 1]
lea ecx, [esi - 1]
add eax, edi
add ecx, edi
cmp esi, eax
ja 0x4cb3ba
cmp ecx, ebx
jae 0x4cb420
mov ecx, edi
mov eax, esi
mov edi, ebx
and ecx, 0xffffffc0
sub edi, esi
mov dword [ebp - 0x18], edi
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0x18]
nop
movups xmm0, xmmword [eax]
lea eax, [eax + 0x40]
movups xmm1, xmmword [eax + esi - 0x40]
pxor xmm1, xmm0
movups xmmword [eax - 0x40], xmm1
movups xmm0, xmmword [eax - 0x30]
movups xmm1, xmmword [ebx + edx + 0x10]
pxor xmm1, xmm0
movups xmmword [eax - 0x30], xmm1
movups xmm0, xmmword [eax - 0x20]
movups xmm1, xmmword [ebx + edx + 0x20]
pxor xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
movups xmm0, xmmword [eax - 0x10]
movups xmm1, xmmword [ebx + edx + 0x30]
add edx, 0x40
pxor xmm1, xmm0
movups xmmword [eax - 0x10], xmm1
cmp edx, ecx
jb 0x4cb3d0
mov esi, dword [ebp - 0x30]
cmp edx, edi
jae 0x4cb444
sub ebx, esi
lea ecx, [esi + edx]
mov dword [ebp - 0x18], ebx
mov ebx, edi
mov edi, dword [ebp - 0x18]
sub ebx, edx
mov al, byte [ecx + edi]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
sub ebx, 1
jne 0x4cb433
mov edi, dword [ebp + 8]
cmp edi, 0x10
jae 0x4cb463
mov eax, 0x10
lea ecx, [ebp - 0x14]
sub eax, edi
lea edx, [esi + edi]
push eax
add ecx, edi
push ecx
push edx
call fcn.0044e3e0
add esp, 0xc
movups xmm0, xmmword [ebp - 0x50]
mov ecx, dword [ebp - 0x28]
movups xmmword [ecx], xmm0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044c8c5
mov esp, ebp
pop ebp
ret