Function at 0x1008b510
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x18
call fcn.100ba4f0
push esi
mov esi, dword [esp + 0x20]
mov eax, dword [esi + 0x170]
mov ecx, dword [esi + 0x174]
mov edx, dword [esi + 0x160]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x164]
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x18], eax
xor eax, eax
add ecx, dword [esi + 0x38]
mov dword [esp + 0x20], edx
adc eax, dword [esi + 0x3c]
cmp eax, 0xf
ja 0x1008b77e
jb 0x1008b567
cmp ecx, 0xffffffe0
ja 0x1008b77e
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
je 0x1008b58d
lea ecx, [esi + 0x60]
push ecx
lea eax, [esi + 0x40]
push eax
call edx
add esp, 8
mov dword [esi + 0x16c], 0
push ebx
mov ebx, dword [esi + 0xc]
push ebp
mov ebp, dword [esi + 0x168]
push edi
mov edi, dword [esp + 0x34]
bswap ebx
mov dword [esp + 0x10], ebp
test ebp, ebp
je 0x1008b5f1
cmp dword [esp + 0x38], 0
je 0x1008b5d6
mov ecx, dword [esp + 0x30]
mov al, byte [ecx]
dec dword [esp + 0x38]
inc ecx
mov dword [esp + 0x30], ecx
mov cl, byte [esi + ebp + 0x10]
xor cl, al
mov byte [edi], cl
xor byte [esi + ebp + 0x40], al
inc ebp
inc edi
and ebp, 0xf
jne 0x1008b5a7
mov dword [esp + 0x10], ebp
jmp 0x1008b5e2
mov dword [esp + 0x10], ebp
test ebp, ebp
jne 0x1008b76e
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
call dword [esp + 0x34]
add esp, 8
mov ecx, dword [esp + 0x38]
cmp ecx, 0xc00
jb 0x1008b68e
mov eax, 0xaaaaaaab
mul ecx
shr edx, 0xb
lea ebp, [esi + 0x10]
mov dword [esp + 0x20], edx
mov ecx, dword [esp + 0x30]
push 0xc00
push ecx
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call dword [esp + 0x34]
add esp, 0x10
mov dword [esp + 0x1c], 0xc0
mov edx, dword [esp + 0x14]
push edx
push ebp
push esi
call dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
inc ebx
mov dword [esp + 0x38], ebx
bswap ebx
add esp, 0xc
xor eax, eax
mov dword [esi + 0xc], ebx
mov ecx, edi
sub edx, edi
mov ebx, dword [edx + ecx]
xor ebx, dword [eax + ebp]
add eax, 4
mov dword [ecx], ebx
add ecx, 4
cmp eax, 0x10
jb 0x1008b655
add dword [esp + 0x30], 0x10
mov ebx, dword [esp + 0x2c]
add edi, 0x10
sub dword [esp + 0x1c], 1
jne 0x1008b633
sub dword [esp + 0x38], 0xc00
sub dword [esp + 0x20], 1
jne 0x1008b612
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
and eax, 0xfffffff0
je 0x1008b726
push eax
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esi + 0x60]
push ecx
lea edx, [esi + 0x40]
push edx
call dword [esp + 0x34]
add esp, 0x10
cmp dword [esp + 0x38], 0x10
jb 0x1008b726
mov eax, dword [esp + 0x38]
shr eax, 4
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x14]
push eax
lea eax, [esi + 0x10]
push eax
push esi
call dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
inc ebx
mov ecx, ebx
bswap ecx
add esp, 0xc
mov dword [esi + 0xc], ecx
xor eax, eax
mov ecx, edi
sub edx, edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x20], edx
jmp 0x1008b6f4
mov edx, dword [esp + 0x20]
mov edx, dword [ecx + edx]
xor edx, dword [esi + eax + 0x10]
mov ecx, dword [esp + 0x2c]
mov dword [ecx], edx
add eax, 4
add ecx, 4
mov dword [esp + 0x2c], ecx
cmp eax, 0x10
jb 0x1008b6f0
mov eax, 0x10
add dword [esp + 0x30], eax
sub dword [esp + 0x38], eax
add edi, eax
sub dword [esp + 0x24], 1
jne 0x1008b6c2
cmp dword [esp + 0x38], 0
je 0x1008b76e
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esi + 0x10]
push ecx
push esi
call dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
inc ebx
bswap ebx
add esp, 0xc
mov dword [esi + 0xc], ebx
lea eax, [edi + ebp]
sub edx, edi
lea ecx, [ecx]
mov cl, byte [eax + edx]
mov bl, byte [esi + ebp + 0x10]
mov edi, dword [esp + 0x38]
xor byte [esi + ebp + 0x40], cl
xor bl, cl
dec edi
mov byte [eax], bl
inc ebp
inc eax
mov dword [esp + 0x38], edi
test edi, edi
jne 0x1008b750
pop edi
mov dword [esi + 0x168], ebp
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x18
ret
or eax, 0xffffffff
pop esi
add esp, 0x18
ret