Function at 0x1a22055
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
test byte [ebp + 0xc], 3
mov eax, ecx
push ebx
mov ebx, edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], ebx
jne 0x1a5974a
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov dword [ebp - 0xc], eax
lea eax, [ecx + 0x1007]
and eax, 0xfffff000
mov dword [edx], ebx
add eax, 0x1000
lea edi, [edx + 0x101f]
mov dword [ebp - 8], eax
and edi, 0xfffff000
mov eax, dword [ebp + 0x14]
add eax, edx
xor edx, edx
and eax, 0xfffff000
sub eax, edi
div dword [ebp - 8]
mov edx, eax
lea eax, [ecx + 8]
mov ecx, dword [ebp - 0xc]
shr eax, 3
mov word [ebx + 0x14], ax
mov eax, dword [ebp + 0x18]
mov word [ebx + 0x18], dx
mov dword [ebx], ecx
mov ecx, ebx
mov dword [ebp - 4], edx
mov edx, edi
mov al, byte [eax + 2]
mov byte [ebx + 0x1a], al
mov ax, word [ebp + 0xc]
mov word [ebx + 0x16], ax
mov eax, dword [ebp - 8]
mov word [ebp - 0xe], ax
call fcn.019d3386
mov edx, dword [ebp + 8]
mov edi, eax
mov ecx, dword [0x1ac8774]
sub edi, edx
mov eax, dword [ebp - 4]
mov word [ebp - 0x10], di
xor ecx, dword [ebp - 0x10]
xor ecx, dword [ebp - 0x14]
xor ecx, edx
mov dword [edx + 0x10], ecx
lea ecx, [edx + 0x14]
mov dword [ecx], eax
lea eax, [edx + 0x1c]
mov dword [ecx + 4], eax
call fcn.01a93ad4
mov edx, dword [ebp + 8]
and dword [ebp - 0x10], 0
mov ecx, dword [ebp - 4]
movzx edi, di
add edi, edx
test ecx, ecx
jne 0x1a59781
mov esi, dword [ebp - 0xc]
mov dword [ebx + 4], edx
and dword [ebx + 8], 0
and dword [ebx + 0xc], 0
add esi, 0x50
jmp 0x1a59796
mov ecx, dword [ebp - 0x14]
mov eax, edi
shr eax, 3
mov edx, edi
xor eax, esi
xor eax, dword [ecx + 0xc]
xor eax, dword [0x1ac8774]
mov dword [edi], eax
mov eax, dword [ebp - 0x10]
movzx ecx, ax
mov eax, dword [edi + 4]
shl ecx, 8
and eax, 0xff0000ff
or ecx, eax
mov dword [edi + 4], ecx
mov ecx, ebx
mov byte [edi + 7], 0x80
call fcn.01a1c393
mov eax, dword [ebp - 0x10]
add edi, dword [ebp - 8]
add esi, dword [ebp - 0x18]
inc eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x10], eax
cmp eax, ecx
jb 0x1a2214b
mov edx, dword [ebp + 8]
jmp 0x1a22135
mov eax, dword [ebp - 0xc]
xor ebx, ebx
mov edi, dword [ebp - 0x1c]
inc ebx
and dword [ebp - 0x10], 0
mov ecx, dword [eax]
lea edx, [edi + 0x10]
inc dword [ecx + 0x10]
mov ecx, dword [ecx + 0x10]
mov dword [eax + 0x58], ecx
mov eax, dword [ebp - 4]
mov word [ebp - 0x10], ax
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x20]
mov dword [edi + 0x1c], ebx
lock cmpxchg dword [edx], ecx
call fcn.019f1a00
test eax, eax
je 0x1a2221f
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0x50]
add eax, 0x226
cmp byte [eax], 0
je 0x1a22216
mov eax, dword fs:[0x30]
test byte [eax + 0x240], 1
je 0x1a22216
mov ax, word [edi + 0x14]
movzx ecx, word [edi + 0x18]
movzx edx, ax
movzx eax, byte [edi + 0x1b]
push eax
mov eax, dword [ebp - 0x14]
push ecx
push edx
mov edx, dword [edi + 4]
mov ecx, dword [eax + 0xc]
call fcn.01a9335e
pop edi
mov eax, ebx
pop esi
jmp 0x1a22074
mov eax, 0x7ffe0380
jmp 0x1a221e2
mov edx, dword [ebp + 0x18]
push esi
mov esi, dword [ebx + 0x10]
movzx ecx, byte [ebx + 0x1b]
movzx edx, byte [edx + 2]
mov dword [ebp - 0x20], esi
push edi
test ecx, ecx
jne 0x1a5976d
mov eax, dword [eax + edx*4 + 0x3c0]
jmp 0x1a2207b
mov eax, dword [eax + edx*4 + 0x5c4]
imul ecx, ecx, 0x68
add eax, 0xffffff98
add eax, ecx
jmp 0x1a2207b
mov eax, dword [ebp - 8]
mov esi, edi
shl eax, 0xd
sub esi, edx
mov dword [ebp - 0x18], eax
shl esi, 0xd
jmp 0x1a2214b
mov eax, dword [esi]
test ecx, ecx
mov edi, dword [esi + 4]
mov dword [ebp - 0x18], eax
lea ebx, [eax + ecx]
lea ecx, [edi + 1]
jg 0x1a597ab
lea ecx, [edi - 1]
mov edx, edi
lock cmpxchg8b qword [esi]
mov ecx, dword [ebp - 4]
cmp eax, dword [ebp - 0x18]
jne 0x1a59796
cmp edx, edi
jne 0x1a59796
jmp 0x1a2219c