Function at 0x4ca940
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x48
mov eax, dword [0x502c60]
xor eax, esp
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x54]
push ebx
mov ebx, dword [esp + 0x5c]
push ebp
mov ebp, dword [esp + 0x54]
mov dword [esp + 0x18], ebp
mov dword [esp + 8], eax
mov dword [esp + 0x10], ebx
push edi
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x10], edi
test ebp, ebp
je 0x4cab5c
test edi, edi
je 0x4cab5c
test ebx, ebx
je 0x4cab5c
test eax, eax
je 0x4cab5c
push esi
cmp eax, 0x10
jae 0x4ca9cf
mov esi, 0x10
sub esi, eax
add eax, 0x28
add eax, ebp
push esi
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.004d1c60
push dword [esp + 0x1c]
lea eax, [esp + 0x54]
add eax, esi
push edi
push eax
call fcn.004d1c60
movdqu xmm0, xmmword [esp + 0x5c]
mov eax, dword [esp + 0x28]
add esp, 0x18
jmp 0x4ca9d5
movdqu xmm0, xmmword [eax + edi - 0x10]
mov esi, eax
shr esi, 4
movdqu xmmword [esp + 0x34], xmm0
test esi, esi
je 0x4caa3d
lea eax, [ebp + 0x28]
lea ecx, [esp + 0x44]
push ecx
push eax
mov eax, dword [ebp + 0x10]
push ebp
call eax
movdqu xmm0, xmmword [edi]
add esp, 0xc
movdqu xmmword [ebp + 0x28], xmm0
mov eax, dword [edi]
xor eax, dword [esp + 0x44]
mov dword [ebx], eax
mov eax, dword [edi + 4]
xor eax, dword [esp + 0x48]
mov dword [ebx + 4], eax
mov eax, dword [edi + 8]
xor eax, dword [esp + 0x4c]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
add edi, 0x10
xor eax, dword [esp + 0x50]
mov dword [ebx + 0xc], eax
add ebx, 0x10
lea eax, [ebp + 0x28]
dec esi
jne 0x4ca9e7
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], edi
mov esi, eax
and esi, 0xf
mov dword [esp + 0x28], esi
je 0x4cab3e
lea eax, [esp + 0x44]
push eax
lea eax, [ebp + 0x28]
push eax
mov eax, dword [ebp + 0x10]
push ebp
call eax
add esp, 0xc
xor edx, edx
test esi, esi
je 0x4cab3a
cmp esi, 0x20
jb 0x4cab1b
lea ecx, [ebx - 1]
lea eax, [esp + esi + 0x43]
add ecx, esi
cmp ebx, eax
ja 0x4caa8a
lea eax, [esp + 0x44]
cmp ecx, eax
jae 0x4cab1b
lea eax, [edi - 1]
add eax, esi
cmp ebx, eax
ja 0x4caa9b
cmp ecx, edi
jae 0x4cab1b
mov ebp, ebx
mov eax, esi
sub ebp, edi
and eax, 0x1f
mov dword [esp + 0x30], ebp
mov ecx, esi
mov esi, dword [esp + 0x30]
lea ebp, [esp + 0x44]
sub ebp, edi
sub ecx, eax
mov dword [esp + 0x24], ebp
mov eax, edi
lea ebp, [esp + 0x54]
sub ebp, edi
mov dword [esp + 0x1c], ebp
lea ebp, [ebx + 0x10]
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x2c], ebp
movdqu xmm0, xmmword [eax]
mov ebp, dword [esp + 0x2c]
lea eax, [eax + 0x20]
movdqu xmm1, xmmword [ebx + eax - 0x20]
pxor xmm1, xmm0
movdqu xmmword [esi + eax - 0x20], xmm1
movdqu xmm0, xmmword [eax - 0x10]
movdqu xmm1, xmmword [edi + eax - 0x20]
pxor xmm1, xmm0
movdqu xmmword [edx + ebp], xmm1
mov ebp, dword [esp + 0x20]
add edx, 0x20
cmp edx, ecx
jb 0x4caad5
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x28]
cmp edx, esi
jae 0x4cab3a
lea eax, [esp + 0x44]
sub edi, eax
sub ebx, eax
lea ecx, [esp + 0x44]
add ecx, edx
inc edx
mov al, byte [edi + ecx]
xor al, byte [ecx]
mov byte [ebx + ecx], al
cmp edx, esi
jb 0x4cab27
mov eax, dword [esp + 0x10]
movdqu xmm0, xmmword [esp + 0x34]
pop esi
pop edi
movdqu xmmword [ebp + 0x28], xmm0
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.004d17f4
add esp, 0x48
ret
mov ecx, dword [esp + 0x50]
xor eax, eax
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.004d17f4
add esp, 0x48
ret