Function at 0x50aaa0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x639ead
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x28
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.00409430
mov eax, dword [edi + 4]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], 0
mov eax, dword [edi + 0x18]
test al, 1
jne 0x50ad58
xor esi, esi
test al, 2
jne 0x50ac3c
mov eax, dword [ebx + 8]
xor edx, edx
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
xor eax, ecx
div dword [edi + 0x10]
mov eax, dword [edi + 0x14]
mov esi, dword [eax + edx*4]
lea eax, [eax + edx*4]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], eax
test esi, esi
je 0x50ac3a
mov eax, dword [ebp - 0x28]
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x24]
cmp dword [esi + 4], ecx
jne 0x50ab52
cmp dword [esi + 8], eax
je 0x50ab63
mov dword [ebp - 0x1c], esi
mov esi, dword [esi]
test esi, esi
jne 0x50ab48
mov esi, dword [ebp - 0x18]
jmp 0x50ac3c
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x50ab72
lea esi, [eax + 1]
jmp 0x50ad5d
sub eax, 2
je 0x50ab9d
sub eax, 0xc6
mov eax, dword [ebx + 0xc]
movups xmm0, xmmword [eax]
movups xmmword [esi + 0xc], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [esi + 0x1c], xmm0
mov eax, dword [eax + 0x18]
mov dword [esi + 0x24], eax
xor esi, esi
jmp 0x50ad5d
push ecx
lea ecx, [edi + 4]
push ecx
mov ecx, dword [ebp - 0x2c]
call fcn.0050d3d0
mov edx, eax
mov dword [ebp - 0x14], edx
test edx, edx
je 0x50ad58
mov ecx, dword [ebx + 8]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [ebx + 0xc]
mov dword [edx + 8], ecx
movups xmm0, xmmword [eax]
movups xmmword [edx + 0xc], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [edx + 0x1c], xmm0
mov eax, dword [eax + 0x18]
mov dword [edx + 0x24], eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [esi]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
test ecx, ecx
jne 0x50abf3
mov ecx, dword [ebp - 0x18]
add edi, 0x1c
mov dword [ecx], eax
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x14], esi
mov ecx, dword [edi]
cmp ecx, edi
je 0x50ac33
test ecx, ecx
je 0x50ac33
nop dword [eax + eax]
mov eax, dword [ecx]
cmp eax, edi
mov dword [ebp - 0x28], 0
cmove eax, dword [ebp - 0x28]
cmp dword [ecx + 8], 0
je 0x50ac2d
cmp dword [ecx + 0xc], esi
jne 0x50ac2d
mov dword [ecx + 0xc], edx
mov ecx, eax
test eax, eax
jne 0x50ac10
xor esi, esi
jmp 0x50ad5d
mov esi, eax
mov edx, dword [edi + 0xc]
mov eax, dword [edi + 8]
cmp edx, eax
jb 0x50ad43
mov esi, 2
lea ecx, [eax + eax]
cmp eax, esi
cmovb ecx, esi
cmp ecx, edx
jae 0x50ac65
mov esi, 3
jmp 0x50ad5d
push dword [edi + 0x18]
mov eax, dword [edi]
push edi
push ecx
mov ecx, edi
mov eax, dword [eax + 8]
call eax
mov edx, eax
mov dword [ebp - 0x18], edx
test edx, edx
je 0x50ad5d
mov cl, byte [edx + 0x18]
not cl
test cl, 1
je 0x50ad5d
cmp dword [edi + 0x14], 0
je 0x50ad1e
cmp dword [edi + 0x10], 0
mov dword [ebp - 0x20], 0
jbe 0x50ad1e
xor ecx, ecx
xor esi, esi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], esi
nop
mov eax, dword [edi + 0x14]
mov ecx, dword [ecx + eax]
mov dword [ebp - 0x1c], ecx
test ecx, ecx
je 0x50acf9
lea eax, [edx + 0x10]
mov dword [ebp - 0x30], eax
mov esi, dword [ecx]
xor edx, edx
dec dword [edi + 0xc]
mov eax, dword [ecx + 8]
xor eax, dword [ecx + 4]
mov ecx, dword [ebp - 0x30]
div dword [ecx]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 0x14]
lea ecx, [eax + edx*4]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ecx]
mov dword [ebp - 0x1c], esi
mov dword [edx], eax
mov dword [ecx], edx
mov ecx, esi
mov edx, dword [ebp - 0x18]
inc dword [edx + 0xc]
test esi, esi
jne 0x50acc3
mov esi, dword [ebp - 0x28]
mov eax, dword [edi + 0x14]
mov ecx, dword [ebp - 0x24]
add ecx, 4
mov dword [ebp - 0x24], ecx
mov dword [esi + eax], 0
add esi, 4
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], eax
cmp eax, dword [edi + 0x10]
jb 0x50acb0
mov eax, dword [edi]
mov ecx, edi
push edx
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
push 1
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [ebx + 8]
xor edx, edx
mov eax, dword [ecx + 4]
xor eax, dword [ecx]
div dword [edi + 0x10]
mov eax, dword [edi + 0x14]
lea esi, [eax + edx*4]
push ecx
lea ecx, [edi + 4]
push ecx
mov ecx, dword [ecx]
call fcn.0050d3d0
mov edx, eax
mov dword [ebp - 0x14], edx
test edx, edx
jne 0x50ad76
mov esi, 2
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x50ad72
push ecx
lea ecx, [ebp - 0x34]
push ecx
mov ecx, dword [ebp - 0x2c]
push eax
call fcn.0050d2c0
mov eax, esi
jmp 0x50adaf
mov ecx, dword [ebx + 8]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [edx + 4], eax
mov eax, dword [ebx + 0xc]
mov dword [edx + 8], ecx
movups xmm0, xmmword [eax]
movups xmmword [edx + 0xc], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [edx + 0x1c], xmm0
mov eax, dword [eax + 0x18]
mov dword [edx + 0x24], eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [esi]
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
mov dword [esi], eax
inc dword [edi + 0xc]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc