Function at 0x4cac20
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
mov esi, dword [ecx]
test esi, esi
setne dl
test eax, eax
setne cl
and cl, dl
cmp dword [esp + 0x30], 0
mov ebp, dword [esp + 0x18]
je 0x4cad72
test cl, cl
je 0x4caeab
nop word cs:[eax + eax]
mov edx, dword [esp + 0x28]
movzx ecx, byte [edx + esi]
xor cl, byte [ebp]
inc ebp
mov byte [edx + esi], cl
mov byte [ebx], cl
inc ebx
lea ecx, [eax - 1]
inc esi
and esi, 0xf
je 0x4cac82
cmp eax, 1
mov eax, ecx
jne 0x4cac60
cmp ecx, 0x10
jb 0x4caeb6
mov dword [esp], ecx
push dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
push eax
push eax
call fcn.004c5df0
add esp, 0xc
cmp esi, 0xf
ja 0x4cacf5
mov eax, dword [ebp + esi]
mov ecx, dword [esp + 0x28]
xor eax, dword [ecx + esi]
mov dword [ecx + esi], eax
mov dword [ebx + esi], eax
cmp esi, 0xb
ja 0x4cacf5
mov eax, dword [ebp + esi + 4]
xor eax, dword [ecx + esi + 4]
mov dword [ecx + esi + 4], eax
mov dword [ebx + esi + 4], eax
cmp esi, 7
ja 0x4cacf5
mov eax, dword [ebp + esi + 8]
xor eax, dword [ecx + esi + 8]
mov dword [ecx + esi + 8], eax
mov dword [ebx + esi + 8], eax
cmp esi, 3
ja 0x4cacf5
mov eax, dword [ebp + esi + 0xc]
xor eax, dword [ecx + esi + 0xc]
mov dword [ecx + esi + 0xc], eax
mov dword [ebx + esi + 0xc], eax
mov ecx, dword [esp]
add ecx, 0xfffffff0
add ebx, 0x10
add ebp, 0x10
xor esi, esi
cmp ecx, 0x10
mov eax, dword [esp + 0x24]
jb 0x4cad65
nop dword [eax]
mov dword [esp], ecx
push eax
mov edi, dword [esp + 0x2c]
push edi
push edi
call fcn.004c5df0
mov ecx, dword [esp + 0xc]
add esp, 0xc
mov eax, dword [ebp]
xor eax, dword [edi]
mov dword [edi], eax
mov dword [ebx], eax
mov eax, dword [ebp + 4]
xor eax, dword [edi + 4]
mov dword [edi + 4], eax
mov dword [ebx + 4], eax
mov eax, dword [ebp + 8]
xor eax, dword [edi + 8]
mov dword [edi + 8], eax
mov dword [ebx + 8], eax
mov eax, dword [ebp + 0xc]
xor eax, dword [edi + 0xc]
mov dword [edi + 0xc], eax
mov dword [ebx + 0xc], eax
mov eax, dword [esp + 0x24]
add ecx, 0xfffffff0
add ebx, 0x10
add ebp, 0x10
cmp ecx, 0xf
ja 0x4cad10
test ecx, ecx
jne 0x4caec2
jmp 0x4caf7a
test cl, cl
je 0x4caf42
nop word [eax + eax]
movzx ecx, byte [ebp]
inc ebp
mov edi, dword [esp + 0x28]
movzx edx, byte [edi + esi]
xor dl, cl
mov byte [ebx], dl
inc ebx
mov byte [edi + esi], cl
lea edx, [eax - 1]
inc esi
and esi, 0xf
je 0x4cada5
cmp eax, 1
mov eax, edx
jne 0x4cad80
cmp edx, 0x10
jb 0x4caf4d
mov dword [esp], edx
push dword [esp + 0x24]
mov eax, dword [esp + 0x2c]
push eax
push eax
call fcn.004c5df0
add esp, 0xc
cmp esi, 0xf
ja 0x4cae20
mov eax, dword [ebp + esi]
mov edx, dword [esp + 0x28]
mov ecx, dword [edx + esi]
xor ecx, eax
mov dword [ebx + esi], ecx
mov dword [edx + esi], eax
cmp esi, 0xb
ja 0x4cae20
mov eax, dword [ebp + esi + 4]
mov ecx, dword [edx + esi + 4]
xor ecx, eax
mov dword [ebx + esi + 4], ecx
mov dword [edx + esi + 4], eax
cmp esi, 7
ja 0x4cae20
mov eax, dword [ebp + esi + 8]
mov ecx, dword [edx + esi + 8]
xor ecx, eax
mov dword [ebx + esi + 8], ecx
mov dword [edx + esi + 8], eax
cmp esi, 3
ja 0x4cae20
mov eax, dword [ebp + esi + 0xc]
mov ecx, dword [edx + esi + 0xc]
xor ecx, eax
mov dword [ebx + esi + 0xc], ecx
mov dword [edx + esi + 0xc], eax
mov edx, dword [esp]
add edx, 0xfffffff0
add ebx, 0x10
add ebp, 0x10
xor esi, esi
cmp edx, 0x10
mov eax, dword [esp + 0x24]
jb 0x4cae9e
nop word [eax + eax]
push eax
mov eax, dword [esp + 0x2c]
push eax
push eax
mov edi, edx
call fcn.004c5df0
mov edx, edi
mov edi, dword [esp + 0x34]
add esp, 0xc
mov eax, dword [ebp]
mov ecx, dword [edi]
xor ecx, eax
mov dword [ebx], ecx
mov dword [edi], eax
mov eax, dword [ebp + 4]
mov ecx, dword [edi + 4]
xor ecx, eax
mov dword [ebx + 4], ecx
mov dword [edi + 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [edi + 8]
xor ecx, eax
mov dword [ebx + 8], ecx
mov dword [edi + 8], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [edi + 0xc]
xor ecx, eax
mov dword [ebx + 0xc], ecx
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x24]
add edx, 0xfffffff0
add ebx, 0x10
add ebp, 0x10
cmp edx, 0xf
ja 0x4cae40
test edx, edx
jne 0x4caf55
jmp 0x4caf7a
mov ecx, eax
cmp ecx, 0x10
jae 0x4cac8b
mov eax, dword [esp + 0x24]
test ecx, ecx
je 0x4caf7a
push eax
mov eax, dword [esp + 0x2c]
push eax
push eax
mov edi, ecx
call fcn.004c5df0
mov edx, edi
add esp, 0xc
test dl, 1
jne 0x4caee6
mov ecx, edx
cmp edx, 1
jne 0x4caf10
jmp 0x4cafe2
lea ecx, [edx - 1]
mov edi, dword [esp + 0x28]
movzx eax, byte [edi + esi]
xor al, byte [ebp + esi]
mov byte [edi + esi], al
mov byte [ebx + esi], al
inc esi
mov eax, esi
cmp edx, 1
je 0x4cafe2
nop word [eax + eax]
mov edi, dword [esp + 0x28]
movzx eax, byte [edi + esi]
xor al, byte [ebp + esi]
mov byte [edi + esi], al
mov byte [ebx + esi], al
movzx edx, byte [edi + esi + 1]
xor dl, byte [ebp + esi + 1]
lea eax, [esi + 2]
mov byte [edi + esi + 1], dl
mov byte [ebx + esi + 1], dl
mov esi, eax
add ecx, 0xfffffffe
jne 0x4caf10
jmp 0x4cafe2
mov edx, eax
cmp edx, 0x10
jae 0x4cadae
mov eax, dword [esp + 0x24]
test edx, edx
je 0x4caf7a
push eax
mov eax, dword [esp + 0x2c]
push eax
push eax
mov dword [esp + 0xc], edx
call fcn.004c5df0
mov edx, dword [esp + 0xc]
add esp, 0xc
test dl, 1
jne 0x4caf7e
mov ecx, edx
cmp edx, 1
jne 0x4cafb0
jmp 0x4cafe2
mov eax, esi
jmp 0x4cafe2
lea ecx, [edx - 1]
movzx eax, byte [ebp + esi]
mov edi, dword [esp + 0x28]
movzx edx, byte [edi + esi]
xor dl, al
mov byte [ebx + esi], dl
mov edx, dword [esp]
mov byte [edi + esi], al
inc esi
mov eax, esi
cmp edx, 1
je 0x4cafe2
nop word cs:[eax + eax]
movzx eax, byte [ebp + esi]
mov edi, dword [esp + 0x28]
movzx edx, byte [edi + esi]
xor dl, al
mov byte [ebx + esi], dl
mov byte [edi + esi], al
movzx edx, byte [ebp + esi + 1]
mov dh, byte [edi + esi + 1]
xor dh, dl
lea eax, [esi + 2]
mov byte [ebx + esi + 1], dh
mov byte [edi + esi + 1], dl
mov esi, eax
add ecx, 0xfffffffe
jne 0x4cafb0
mov ecx, dword [esp + 0x2c]
mov dword [ecx], eax
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret