Function at 0x65c730
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [ebp + 8]
test eax, eax
je 0x65c784
mov esi, dword [ebp + 0xc]
mov ecx, dword [eax]
test ecx, ecx
je 0x65c78b
mov edi, 0x100
and edi, dword [eax + 4]
mov ebx, dword [eax + 8]
mov al, byte [ebx]
xor esi, esi
test al, al
mov edx, edi
cmove edx, esi
sets byte [ebp - 0x14]
cmp ecx, 1
cmovne edx, edi
test edx, edx
sete ah
je 0x65c7a4
mov edi, 1
cmp al, 0x80
jbe 0x65c838
mov al, 0xff
mov dword [ebp - 0x10], eax
jmp 0x65c7b1
xor eax, eax
jmp 0x65cab0
test esi, esi
je 0x65c892
mov ebx, dword [esi]
mov dword [ebp - 0x14], 1
mov byte [ebx], 0
jmp 0x65caab
mov dword [ebp - 0x10], 0
and ah, byte [ebp - 0x14]
movzx edi, ah
mov esi, dword [ebp + 0xc]
lea eax, [edi + ecx]
test esi, esi
je 0x65cab0
mov dword [ebp - 0x14], eax
mov ebx, dword [esi]
test edi, edi
je 0x65c87f
mov eax, dword [ebp - 0x10]
mov byte [ebx], al
add ebx, 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
test ecx, ecx
je 0x65c88a
mov esi, dword [eax + 8]
test edx, edx
je 0x65c89c
lea edi, [esi + ecx]
lea eax, [ecx + ebx]
add eax, 0xffffffff
mov dl, byte [esi + ecx - 1]
test dl, dl
jne 0x65c8af
cmp ecx, 2
jl 0x65c8af
nop word [eax + eax]
mov byte [ebx + ecx - 1], 0
lea eax, [ecx - 1]
movzx edx, byte [esi + ecx - 2]
test dl, dl
jne 0x65c828
cmp ecx, 2
mov ecx, eax
ja 0x65c810
add esi, eax
lea ecx, [ebx + eax]
add ecx, 0xffffffff
mov dword [ebp - 0x10], ecx
jmp 0x65c8b6
xor edi, edi
cmp al, 0x80
jne 0x65c8e2
mov dword [ebp - 0x10], 0
cmp ecx, 2
mov esi, dword [ebp + 0xc]
jl 0x65c7b4
mov edi, 1
mov eax, 1
nop
cmp byte [ebx + eax], 0
jne 0x65c77d
add eax, 1
cmp ecx, eax
jne 0x65c860
xor edi, edi
mov dword [ebp - 0x10], 0
jmp 0x65c7b1
mov eax, dword [ebp + 8]
test ecx, ecx
jne 0x65c7e1
mov byte [ebx], 0
jmp 0x65caab
mov eax, 1
jmp 0x65cab0
push ecx
push esi
push ebx
call fcn.006cca40
mov esi, dword [ebp + 0xc]
add esp, 0xc
jmp 0x65caab
mov dword [ebp - 0x10], eax
mov eax, ecx
mov esi, edi
neg dl
mov byte [ebx + eax - 1], dl
cmp eax, 2
jl 0x65caa8
lea ecx, [esi - 2]
xor edx, edx
mov edi, eax
sub edi, 2
cmovb edi, edx
add edi, 1
cmp edi, 4
jae 0x65c8ee
mov edi, dword [ebp - 0x10]
jmp 0x65ca81
mov dword [ebp - 0x10], 0
jmp 0x65c7b1
mov dword [ebp - 0x1c], edi
cmp eax, 2
mov dword [ebp - 0x20], esi
mov esi, 2
cmovb esi, eax
mov edi, eax
not edi
add edi, esi
add edi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x20]
add ebx, 0xffffffff
cmp edi, ebx
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x10]
jae 0x65c927
sub esi, eax
add esi, ebx
add esi, 0xfffffffe
cmp esi, edi
jb 0x65ca81
mov ebx, 0
cmp dword [ebp - 0x1c], 0x10
jb 0x65ca15
mov ebx, dword [ebp - 0x1c]
and ebx, 0xfffffff0
lea esi, [ebx - 0x10]
mov dword [ebp - 0x18], esi
shr esi, 4
add esi, 1
mov edi, esi
and edi, 3
mov dword [ebp - 0x2c], edi
xor edi, edi
cmp dword [ebp - 0x18], 0x30
mov dword [ebp - 0x24], ecx
jb 0x65c9ba
and esi, 0xfffffffc
xor edi, edi
pcmpeqd xmm0, xmm0
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x18], esi
mov esi, dword [ebp - 0x20]
movdqu xmm1, xmmword [esi + edi - 0x11]
pxor xmm1, xmm0
movdqu xmmword [ecx + edi - 0x10], xmm1
movdqu xmm1, xmmword [esi + edi - 0x21]
pxor xmm1, xmm0
movdqu xmmword [ecx + edi - 0x20], xmm1
movdqu xmm1, xmmword [esi + edi - 0x31]
pxor xmm1, xmm0
movdqu xmmword [ecx + edi - 0x30], xmm1
movdqu xmm1, xmmword [esi + edi - 0x41]
mov esi, dword [ebp - 0x18]
pxor xmm1, xmm0
movdqu xmmword [ecx + edi - 0x40], xmm1
add edi, 0xffffffc0
add esi, 0xfffffffc
jne 0x65c967
neg edi
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x65c9ff
mov ecx, dword [ebp - 0x20]
sub ecx, edi
add ecx, 0xffffffef
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x10]
sub ecx, edi
add ecx, 0xfffffff0
mov dword [ebp - 0x28], ecx
shl esi, 4
xor edi, edi
pcmpeqd xmm0, xmm0
mov ecx, dword [ebp - 0x18]
movdqu xmm1, xmmword [ecx + edi]
pxor xmm1, xmm0
mov ecx, dword [ebp - 0x28]
movdqu xmmword [ecx + edi], xmm1
add edi, 0xfffffff0
mov ecx, esi
add esi, edi
mov esi, ecx
jne 0x65c9e0
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
je 0x65caa8
test cl, 0xc
je 0x65ca75
mov edi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x10], edi
mov esi, eax
sub esi, 2
mov edi, 0
cmovb esi, edi
add esi, 1
mov dword [ebp - 0x18], esi
and esi, 0xfffffffc
mov edi, dword [ebp - 0x10]
sub edi, esi
sub ecx, esi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], esi
sub eax, esi
neg ebx
mov ecx, dword [ebp - 0x1c]
and ecx, 0xfffffffc
neg ecx
mov dword [ebp - 0x1c], ecx
nop word [eax + eax]
mov ecx, dword [ebp - 0x20]
mov esi, dword [ecx + ebx - 5]
not esi
mov ecx, dword [ebp - 0x10]
mov dword [ecx + ebx - 4], esi
add ebx, 0xfffffffc
cmp dword [ebp - 0x1c], ebx
jne 0x65ca50
mov ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x24]
jne 0x65ca81
jmp 0x65caa8
sub eax, ebx
mov ecx, dword [ebp - 0x24]
sub ecx, ebx
mov edi, dword [ebp - 0x10]
sub edi, ebx
add eax, 1
nop word cs:[eax + eax]
nop
movzx ebx, byte [ecx + edx]
not bl
mov byte [edi + edx - 1], bl
lea esi, [eax + edx]
add esi, 0xffffffff
add edx, 0xffffffff
cmp esi, 2
ja 0x65ca90
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
add dword [esi], eax
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret