Function at 0x561550
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x14
call fcn.005cf470
push ebx
mov ebx, dword [esp + 0x1c]
xor ecx, ecx
push edi
mov edi, dword [esp + 0x2c]
mov eax, dword [ebx + 0x174]
mov dword [esp + 0x14], eax
mov eax, edi
add eax, dword [ebx + 0x38]
adc ecx, dword [ebx + 0x3c]
cmp ecx, 0xf
ja 0x5617bb
jb 0x56158c
cmp eax, 0xffffffe0
ja 0x5617bb
cmp dword [ebx + 0x16c], 0
mov dword [ebx + 0x38], eax
lea eax, [ebx + 0x60]
mov dword [ebx + 0x3c], ecx
lea ecx, [ebx + 0x40]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
je 0x5615bf
push eax
push ecx
call fcn.00562020
add esp, 8
mov dword [ebx + 0x16c], 0
jmp 0x5615c7
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
movzx ecx, byte [ebx + 0xc]
movzx eax, byte [ebx + 0xd]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0xf]
shl ecx, 8
or ecx, eax
push ebp
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x30], ecx
mov ecx, dword [ebx + 0x168]
mov dword [esp + 0x24], ecx
push esi
mov esi, dword [esp + 0x30]
test ecx, ecx
je 0x56164e
test edi, edi
je 0x56163e
mov al, byte [ecx + ebx + 0x10]
dec edi
xor al, byte [ebp]
inc ebp
mov byte [esi], al
inc esi
xor byte [ecx + ebx + 0x40], al
inc ecx
and ecx, 0xf
mov dword [esp + 0x10], esi
mov dword [esp + 0x28], ecx
jne 0x561602
lea eax, [ebx + 0x60]
lea ecx, [ebx + 0x40]
push eax
push ecx
call fcn.00562020
mov eax, dword [esp + 0x30]
add esp, 8
mov dword [esp + 0x28], eax
jmp 0x561652
pop esi
pop ebp
pop edi
mov dword [ebx + 0x168], ecx
xor eax, eax
pop ebx
add esp, 0x14
ret
mov dword [esp + 0x10], esi
mov ecx, dword [esp + 0x38]
cmp edi, 0xc00
jb 0x5616de
mov eax, 0xaaaaaaab
mul edi
shr edx, 0xb
mov dword [esp + 0x10], edx
push ebx
push dword [esp + 0x20]
push 0xc0
push esi
push ebp
call ecx
mov ecx, dword [esp + 0x48]
add ecx, 0xc0
mov eax, ecx
mov dword [esp + 0x48], ecx
shr eax, 0x18
mov byte [ebx + 0xc], al
mov eax, ecx
push 0xc00
shr eax, 0x10
push esi
push dword [esp + 0x30]
mov byte [ebx + 0xd], al
mov eax, ecx
push dword [esp + 0x38]
shr eax, 8
mov byte [ebx + 0xe], al
mov byte [ebx + 0xf], cl
call fcn.00561df0
mov ecx, dword [esp + 0x5c]
add esp, 0x24
add esi, 0xc00
add ebp, 0xc00
sub edi, 0xc00
sub dword [esp + 0x10], 1
jne 0x561670
mov dword [esp + 0x10], esi
mov eax, edi
and eax, 0xfffffff0
mov dword [esp + 0x20], eax
je 0x561742
push ebx
push dword [esp + 0x20]
mov esi, eax
shr esi, 4
push esi
push dword [esp + 0x1c]
push ebp
call ecx
mov ecx, dword [esp + 0x48]
add ecx, esi
mov esi, dword [esp + 0x24]
mov eax, ecx
mov dword [esp + 0x48], ecx
shr eax, 0x18
mov byte [ebx + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [ebx + 0xe], al
mov eax, dword [esp + 0x34]
add ebp, eax
push eax
push esi
push dword [esp + 0x30]
mov byte [ebx + 0xf], cl
sub edi, eax
push dword [esp + 0x38]
call fcn.00561df0
add esp, 0x24
add esi, dword [esp + 0x20]
test edi, edi
je 0x5617a7
push dword [esp + 0x1c]
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 0x170]
push ebx
call eax
mov ecx, dword [esp + 0x40]
add esp, 0xc
inc ecx
sub ebp, esi
mov eax, ecx
mov byte [ebx + 0xf], cl
shr eax, 0x18
mov byte [ebx + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 0xd], al
mov eax, ecx
shr eax, 8
lea ecx, [ebx + 0x40]
mov byte [ebx + 0xe], al
mov eax, dword [esp + 0x28]
add ecx, eax
lea edx, [eax + esi]
add eax, edi
mov dword [esp + 0x28], eax
nop
mov al, byte [edx + ebp]
lea edx, [edx + 1]
xor al, byte [ecx - 0x30]
lea ecx, [ecx + 1]
mov byte [edx - 1], al
xor byte [ecx - 1], al
sub edi, 1
jne 0x561790
mov eax, dword [esp + 0x28]
pop esi
pop ebp
mov dword [ebx + 0x168], eax
xor eax, eax
pop edi
pop ebx
add esp, 0x14
ret
pop edi
or eax, 0xffffffff
pop ebx
add esp, 0x14
ret