Function at 0x51ce60
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x44
call fcn.0065d180
mov eax, dword [0x746694]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0x34], ebx
push edi
mov edi, edx
mov dword [ebp - 0x2c], esi
mov dl, byte [esi]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
mov byte [ebp - 0x19], dl
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
test dl, 0x40
jne 0x51ceb3
push eax
lea eax, [esi + 0x10]
push eax
push esi
call ecx
mov dl, byte [ebp - 0x19]
add esp, 0xc
add dword [esi + 0x20], 1
adc dword [esi + 0x24], 0
movzx eax, dl
xor ecx, ecx
and eax, 7
mov edx, 0xf
sub edx, eax
mov byte [esi], al
mov dword [ebp - 0x44], edx
cmp edx, 0xf
jae 0x51cee3
nop dword [eax]
movzx eax, byte [esi + edx]
or ecx, eax
mov byte [esi + edx], 0
inc edx
shl ecx, 8
cmp edx, 0xf
jb 0x51ced0
movzx eax, byte [esi + 0xf]
mov edx, dword [ebp + 0xc]
or ecx, eax
mov byte [esi + 0xf], 1
cmp ecx, edx
je 0x51cf08
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0065d16a
mov esp, ebp
pop ebp
ret
lea eax, [edx + 0xf]
or eax, 8
shr eax, 3
add dword [esi + 0x20], eax
adc dword [esi + 0x24], 0
cmp dword [esi + 0x24], 0x20000000
jb 0x51cf3f
ja 0x51cf29
cmp dword [esi + 0x20], 0
jbe 0x51cf3f
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0065d16a
mov esp, ebp
pop ebp
ret
cmp edx, 0x10
jb 0x51cfcb
shr edx, 4
lea ecx, [esi + 0x10]
mov dword [ebp - 0x20], edx
mov eax, dword [edi]
xor dword [ecx], eax
mov eax, dword [edi + 4]
xor dword [ecx + 4], eax
push dword [ebp - 0x24]
mov eax, dword [edi + 8]
xor dword [esi + 0x18], eax
mov eax, dword [edi + 0xc]
xor dword [esi + 0x1c], eax
push ecx
push ecx
call dword [ebp - 0x28]
push dword [ebp - 0x24]
lea eax, [ebp - 0x18]
push eax
push esi
call dword [ebp - 0x28]
add esp, 0x18
mov eax, 8
dec eax
add byte [eax + esi + 8], 1
jne 0x51cf8e
test eax, eax
jne 0x51cf82
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x18]
xor ecx, dword [edi]
xor eax, dword [ebp - 0x14]
mov edx, dword [ebp + 0xc]
mov dword [ebx], ecx
sub edx, 0x10
mov ecx, dword [ebp - 0x10]
mov dword [ebx + 4], eax
xor ecx, dword [edi + 8]
mov eax, dword [ebp - 0xc]
xor eax, dword [edi + 0xc]
add edi, 0x10
mov dword [ebx + 8], ecx
lea ecx, [esi + 0x10]
mov dword [ebx + 0xc], eax
add ebx, 0x10
sub dword [ebp - 0x20], 1
mov dword [ebp + 0xc], edx
jne 0x51cf51
mov dword [ebp - 0x34], ebx
test edx, edx
je 0x51d10b
lea ecx, [esi + 0x10]
mov esi, edi
mov al, byte [esi]
lea esi, [esi + 1]
xor byte [ecx], al
lea ecx, [ecx + 1]
sub edx, 1
jne 0x51cfd8
mov esi, dword [ebp - 0x2c]
push dword [ebp - 0x24]
lea eax, [esi + 0x10]
push eax
push eax
call dword [ebp - 0x28]
push dword [ebp - 0x24]
lea eax, [ebp - 0x18]
push eax
push esi
call dword [ebp - 0x28]
mov ecx, dword [ebp + 0xc]
add esp, 0x18
xor edx, edx
test ecx, ecx
je 0x51d10b
cmp ecx, 0x40
jb 0x51d0ec
lea eax, [ebp + ecx - 0x19]
cmp ebx, eax
ja 0x51d035
lea eax, [ebp - 0x18]
mov dword [ebp - 0x20], eax
lea eax, [ecx - 1]
add eax, ebx
cmp eax, dword [ebp - 0x20]
jae 0x51d0ec
lea eax, [ecx - 1]
add eax, edi
cmp ebx, eax
ja 0x51d04b
lea eax, [ecx - 1]
add eax, ebx
cmp eax, edi
jae 0x51d0ec
mov eax, ecx
mov esi, edi
lea ecx, [ebp - 0x18]
sub esi, ebx
sub ecx, ebx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x20], ecx
lea esi, [edi + 0x30]
lea ecx, [ebp - 8]
and eax, 0xffffffc0
sub ecx, ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], ecx
lea eax, [ebx + 0x10]
lea ecx, [ebp + 8]
sub ecx, ebx
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0x38]
nop
movups xmm0, xmmword [esi - 0x30]
lea esi, [esi + 0x40]
movups xmm1, xmmword [ebp + edx - 0x18]
add edx, 0x40
lea eax, [eax + 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [ecx + eax - 0x40]
movups xmmword [eax - 0x50], xmm1
movups xmm1, xmmword [ebx + eax - 0x40]
mov ebx, dword [ebp - 0x3c]
pxor xmm1, xmm0
movups xmm0, xmmword [esi - 0x50]
movups xmmword [eax - 0x40], xmm1
movups xmm1, xmmword [ebx + eax - 0x40]
mov ebx, dword [ebp - 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [esi - 0x40]
movups xmmword [eax - 0x30], xmm1
movups xmm1, xmmword [ebx + eax - 0x40]
mov ebx, dword [ebp - 0x20]
pxor xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
cmp edx, dword [ebp - 0x30]
jb 0x51d080
mov esi, dword [ebp - 0x2c]
mov eax, edx
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 0x30], edx
cmp eax, dword [ebp + 0xc]
jae 0x51d10b
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x18]
sub edi, eax
sub ebx, eax
lea ecx, [ebp - 0x18]
add ecx, edx
inc edx
mov al, byte [ecx + edi]
xor al, byte [ecx]
mov byte [ecx + ebx], al
cmp edx, esi
jb 0x51d0f6
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x44]
cmp ecx, 0x10
jae 0x51d129
mov eax, 0x10
sub eax, ecx
push eax
lea eax, [ecx + esi]
push 0
push eax
call fcn.006607e0
add esp, 0xc
push dword [ebp - 0x24]
lea eax, [ebp - 0x18]
push eax
push esi
call dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
add esp, 0xc
xor dword [esi + 0x10], eax
mov eax, dword [ebp - 0x14]
xor dword [esi + 0x14], eax
mov eax, dword [ebp - 0x10]
xor dword [esi + 0x18], eax
mov eax, dword [ebp - 0xc]
xor dword [esi + 0x1c], eax
mov al, byte [ebp - 0x19]
mov ecx, dword [ebp - 4]
pop edi
mov byte [esi], al
xor ecx, ebp
pop esi
xor eax, eax
pop ebx
call fcn.0065d16a
mov esp, ebp
pop ebp
ret