Function at 0x10004540
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 8]
mov ecx, ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
or ecx, esi
push edi
or ecx, eax
xor edi, edi
test cl, 3
jne 0x10004663
shr eax, 2
test eax, eax
je 0x1000475e
cmp eax, 2
jb 0x10004645
lea ecx, [esi - 4]
lea ecx, [ecx + eax*4]
lea edx, [ebx - 4]
lea edx, [edx + eax*4]
cmp ebx, ecx
ja 0x1000458d
cmp edx, esi
jae 0x10004645
cmp eax, 0x10
jb 0x10004609
mov ecx, eax
lea ebp, [esi + 0x30]
and ecx, 0xf
mov edx, eax
sub edx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
lea ecx, [ebx + 0x10]
mov edx, esi
sub edx, ebx
nop dword [eax]
movups xmm0, xmmword [ecx - 0x10]
add edi, 0x10
lea ecx, [ecx + 0x40]
lea ebp, [ebp + 0x40]
movups xmm1, xmmword [ebp - 0x70]
pxor xmm1, xmm0
movups xmmword [ecx - 0x50], xmm1
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 [ebp - 0x50]
pxor xmm1, xmm0
movups xmmword [ecx - 0x30], xmm1
movups xmm0, xmmword [ecx - 0x20]
movups xmm1, xmmword [ebp - 0x40]
pxor xmm1, xmm0
movups xmmword [ecx - 0x20], xmm1
cmp edi, dword [esp + 0x18]
jb 0x100045b0
cmp dword [esp + 0x14], 2
jb 0x1000463d
jmp 0x1000460d
mov edx, esi
sub edx, ebx
mov ebp, eax
lea ecx, [ebx + edi*4]
and ebp, 0xfffffffe
nop word [eax + eax]
movq xmm0, qword [ecx]
lea ecx, [ecx + 8]
movq xmm1, qword [edx + ecx - 8]
add edi, 2
pxor xmm1, xmm0
movq qword [ecx - 8], xmm1
cmp edi, ebp
jb 0x10004620
cmp edi, eax
jae 0x1000475e
sub esi, ebx
lea edx, [ebx + edi*4]
sub eax, edi
nop dword [eax]
mov ecx, dword [edx + esi]
lea edx, [edx + 4]
xor dword [edx - 4], ecx
sub eax, 1
jne 0x10004650
pop edi
pop esi
pop ebp
pop ebx
ret
test eax, eax
je 0x1000475e
cmp eax, 8
jb 0x10004741
lea ecx, [eax - 1]
xor edi, edi
lea edx, [eax - 1]
add ecx, esi
add edx, ebx
cmp ebx, ecx
ja 0x1000468c
cmp edx, esi
jae 0x10004741
cmp eax, 0x40
jb 0x10004709
mov ecx, eax
lea ebp, [esi + 0x30]
and ecx, 0x3f
mov edx, eax
sub edx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
lea ecx, [ebx + 0x10]
mov edx, esi
sub edx, ebx
nop dword [eax]
movups xmm0, xmmword [ecx - 0x10]
add edi, 0x40
lea ebp, [ebp + 0x40]
lea ecx, [ecx + 0x40]
movups xmm1, xmmword [ebp - 0x70]
pxor xmm1, xmm0
movups xmmword [ecx - 0x50], xmm1
movups xmm0, xmmword [ecx - 0x40]
movups xmm1, xmmword [ecx + edx - 0x40]
pxor xmm1, xmm0
movups xmmword [ecx - 0x40], xmm1
movups xmm0, xmmword [ecx - 0x30]
movups xmm1, xmmword [ebp - 0x50]
pxor xmm1, xmm0
movups xmmword [ecx - 0x30], xmm1
movups xmm0, xmmword [ecx - 0x20]
movups xmm1, xmmword [ebp - 0x40]
pxor xmm1, xmm0
movups xmmword [ecx - 0x20], xmm1
cmp edi, dword [esp + 0x18]
jb 0x100046b0
cmp dword [esp + 0x14], 8
jb 0x1000473d
jmp 0x1000470d
mov edx, esi
sub edx, ebx
mov ebp, eax
lea ecx, [edi + ebx]
and ebp, 0xfffffff8
nop word [eax + eax]
movq xmm0, qword [ecx]
lea ecx, [ecx + 8]
movq xmm1, qword [edx + ecx - 8]
add edi, 8
pxor xmm1, xmm0
movq qword [ecx - 8], xmm1
cmp edi, ebp
jb 0x10004720
cmp edi, eax
jae 0x1000475e
sub esi, ebx
lea edx, [edi + ebx]
sub eax, edi
nop dword [eax + eax]
mov cl, byte [edx + esi]
lea edx, [edx + 1]
xor byte [edx - 1], cl
sub eax, 1
jne 0x10004750
pop edi
pop esi
pop ebp
pop ebx
ret