Function at 0x1015a150
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
push esi
mov esi, ecx
push edi
mov edi, edx
mov dword [esp + 0x18], edi
mov ebx, dword [esi + 0x10df0]
cmp dword [esi + 0x10dec], ebx
je 0x1015a19a
mov eax, dword [esp + 0x34]
imul edx, ebx, 0x2c
mov edi, dword [edx + esi + 0x10e08]
mov ecx, edi
sub ecx, ebx
mov dword [eax], ecx
mov ecx, dword [edx + esi + 0x10e0c]
mov eax, dword [esp + 0x30]
mov dword [esi + 0x10df0], edi
pop edi
pop esi
mov dword [eax], ecx
pop ebx
add esp, 0x20
ret
cmp dword [edi + 0x18], 0
push ebp
jne 0x1015a24a
cmp dword [esi + 0x10da4], 0x80
jb 0x1015a1b6
call fcn.10159ab0
cmp dword [esi + 0x10de8], 0x10
jb 0x1015a24a
xor eax, eax
lea ecx, [esi + 0x10da8]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov edi, eax
mov dword [esp + 0x10], 4
xor ebp, ebp
mov ebx, 1
nop dword [eax]
nop dword [eax + eax]
movzx ecx, word [esi + ebx*2 + 0x70f0]
mov edx, edi
and edx, 1
shr ecx, 4
mov eax, edx
shr edi, 1
neg eax
shr eax, 4
and eax, 0x7f
lea ebx, [edx + ebx*2]
xor ecx, eax
movzx eax, byte [ecx + 0x10192d20]
add ebp, eax
sub dword [esp + 0x10], 1
jne 0x1015a1f0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
mov dword [ecx], ebp
add ecx, 4
mov dword [esp + 0x18], ecx
cmp eax, 0x10
jb 0x1015a1d3
mov edi, dword [esp + 0x1c]
mov dword [esi + 0x10de8], 0
push dword [esp + 0x3c]
mov edx, edi
mov ecx, esi
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call fcn.101592f0
add esp, 0xc
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
je 0x1015a3ae
movups xmm0, xmmword [esi + 0x1f4]
mov ebx, 1
movups xmmword [esp + 0x20], xmm0
cmp eax, ebx
jbe 0x1015a2fb
lea eax, [esi + 0x204]
lea ecx, [esi + 0xa94]
mov edx, ecx
mov ecx, edi
push eax
call fcn.1015b3e0
mov ebp, dword [edi + 0x48]
add esp, 4
mov dword [esi + 0xa98], eax
cmp eax, ebp
jae 0x1015a2fb
mov ecx, dword [edi + 0x14]
mov eax, 0xfff
mov edx, dword [edi + 0x20]
sub eax, ebx
mov edi, dword [edi]
sub edx, ecx
inc edx
dec edi
cmp edx, eax
cmovae edx, eax
mov eax, dword [esp + 0x3c]
push edx
push ebp
push ebx
add eax, ebx
lea edx, [esp + 0x2c]
push eax
push dword [esp + 0x28]
lea eax, [edi + ecx]
mov ecx, esi
push eax
call fcn.101585f0
mov edi, dword [esp + 0x34]
lea ecx, [esi + 0xa94]
inc ebx
mov dword [esp + 0x30], eax
add esp, 0x18
cmp ebx, eax
lea eax, [esi + 0x204]
jb 0x1015a290
imul eax, ebx, 0x2c
mov dword [esi + 0x10dec], ebx
mov edi, dword [eax + esi + 0x10e08]
mov ebp, dword [eax + esi + 0x10e0c]
imul edx, ebx, 0x2c
add edx, esi
cmp byte [edx + 0x10df8], 0
je 0x1015a367
imul ecx, edi, 0x2c
lea eax, [edi - 1]
add ecx, esi
mov dword [ecx + 0x10e0c], 0xffffffff
mov byte [ecx + 0x10df8], 0
mov dword [ecx + 0x10e08], eax
cmp byte [edx + 0x10df9], 0
je 0x1015a367
mov byte [ecx + 0x10dcc], 0
mov eax, dword [edx + 0x10dfc]
mov dword [ecx + 0x10ddc], eax
mov eax, dword [edx + 0x10e00]
mov dword [ecx + 0x10de0], eax
imul eax, edi, 0x2c
mov edx, edi
mov ecx, ebp
mov edi, dword [eax + esi + 0x10e08]
mov ebp, dword [eax + esi + 0x10e0c]
mov dword [eax + esi + 0x10e08], ebx
mov ebx, edx
mov dword [eax + esi + 0x10e0c], ecx
test edx, edx
jne 0x1015a312
mov ecx, dword [esp + 0x38]
mov eax, dword [esi + 0x10e08]
mov dword [esi + 0x10df0], eax
mov dword [ecx], eax
mov ecx, dword [esp + 0x34]
mov eax, dword [esi + 0x10e0c]
mov dword [ecx], eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x20
ret