Function at 0x10108380
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x18
call fcn.101cf170
push esi
mov esi, dword [esp + 0x20]
mov eax, dword [esi + 0x170]
mov edx, dword [esi + 0x164]
mov ecx, dword [esi + 0x174]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
xor ecx, ecx
mov edx, eax
add edx, dword [esi + 0x38]
adc ecx, dword [esi + 0x3c]
cmp ecx, 0xf
ja 0x1010868c
jb 0x101083cf
cmp edx, 0xffffffe0
ja 0x1010868c
mov dword [esi + 0x38], edx
mov dword [esi + 0x3c], ecx
mov ecx, dword [esi + 0x168]
xor edx, edx
mov dword [esp + 0x20], ecx
cmp dword [esi + 0x16c], edx
je 0x10108453
cmp eax, edx
jne 0x10108411
mov edx, dword [esi + 0x160]
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call edx
add esp, 8
mov dword [esi + 0x16c], 0
xor eax, eax
pop esi
add esp, 0x18
ret
mov ecx, dword [esi + 0x40]
mov dword [esi + 0x178], ecx
mov ecx, dword [esi + 0x44]
mov dword [esi + 0x17c], ecx
mov ecx, dword [esi + 0x48]
mov dword [esi + 0x180], ecx
mov ecx, dword [esi + 0x4c]
mov dword [esp + 0x20], 0x10
mov dword [esi + 0x184], ecx
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x40], edx
mov dword [esi + 0x44], edx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], edx
mov dword [esi + 0x16c], edx
push ebx
mov ebx, dword [esp + 0x28]
push ebp
mov ebp, dword [esi + 0xc]
mov edx, ecx
and edx, 0xf
push edi
mov edi, dword [esp + 0x34]
bswap ebp
mov dword [esp + 0x1c], edx
je 0x101084cd
jmp 0x10108478
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
test eax, eax
je 0x1010849e
mov al, byte [edx + esi + 0x10]
xor al, byte [ebx]
dec dword [esp + 0x38]
mov byte [edi], al
mov byte [ecx + esi + 0x178], al
inc edx
inc ecx
inc edi
inc ebx
and edx, 0xf
mov dword [esp + 0x1c], edx
jne 0x10108470
jmp 0x101084a6
test edx, edx
jne 0x1010867c
push ecx
lea edx, [esi + 0x178]
push edx
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call dword [esp + 0x20]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x3c], 0
mov ecx, dword [esp + 0x3c]
add esp, 0x10
cmp eax, 0x10
jb 0x101084fd
test ecx, ecx
je 0x101084fd
push ecx
lea edx, [esi + 0x178]
push edx
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call dword [esp + 0x20]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x3c], 0
mov ecx, dword [esp + 0x3c]
add esp, 0x10
cmp eax, 0xc00
jb 0x101085a0
mov eax, 0xaaaaaaab
mul dword [esp + 0x38]
shr edx, 0xb
mov dword [esp + 0x24], edx
jmp 0x10108520
mov dword [esp + 0x20], 0xc0
mov edx, dword [esp + 0x14]
push edx
lea eax, [esi + 0x10]
push eax
push esi
call dword [esp + 0x24]
inc ebp
mov eax, ebp
bswap eax
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0x10]
xor ecx, dword [ebx]
add esp, 0xc
mov dword [edi], ecx
mov edx, dword [ebx + 4]
xor edx, dword [esi + 0x14]
add edi, 0x10
mov dword [edi - 0xc], edx
mov eax, dword [ebx + 8]
xor eax, dword [esi + 0x18]
add ebx, 0x10
mov dword [edi - 8], eax
mov ecx, dword [ebx - 4]
xor ecx, dword [esi + 0x1c]
dec dword [esp + 0x20]
mov dword [edi - 4], ecx
jne 0x10108528
push 0xc00
lea edx, [edi - 0xc00]
push edx
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call dword [esp + 0x20]
sub dword [esp + 0x48], 0xc00
add esp, 0x10
dec dword [esp + 0x24]
jne 0x10108520
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
mov edx, eax
and edx, 0xfffffff0
mov dword [esp + 0x20], edx
je 0x10108624
cmp eax, 0x10
jb 0x10108607
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]
inc ebp
sub dword [esp + 0x44], 0x10
mov ecx, ebp
bswap ecx
mov dword [esi + 0xc], ecx
mov edx, dword [esi + 0x10]
xor edx, dword [ebx]
add esp, 0xc
mov dword [edi], edx
mov eax, dword [ebx + 4]
xor eax, dword [esi + 0x14]
add edi, 0x10
mov dword [edi - 0xc], eax
mov ecx, dword [ebx + 8]
xor ecx, dword [esi + 0x18]
add ebx, 0x10
mov dword [edi - 8], ecx
mov edx, dword [ebx - 4]
xor edx, dword [esi + 0x1c]
dec dword [esp + 0x24]
mov dword [edi - 4], edx
jne 0x101085b7
mov edx, dword [esp + 0x20]
push edx
mov eax, edi
sub eax, edx
push eax
lea ecx, [esi + 0x60]
push ecx
lea edx, [esi + 0x40]
push edx
call dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x48]
add esp, 0x10
test eax, eax
je 0x1010867c
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esi + 0x10]
push ecx
push esi
call dword [esp + 0x24]
mov edx, dword [esp + 0x28]
inc ebp
bswap ebp
add esp, 0xc
lea ecx, [edx + edi]
mov dword [esi + 0xc], ebp
lea edx, [edx + esi + 0x10]
sub ebx, edi
lea esp, [esp]
movzx ebp, byte [edx]
movzx eax, byte [ebx + ecx]
mov edi, dword [esp + 0x38]
xor eax, ebp
mov ebp, dword [esp + 0x2c]
mov byte [ecx], al
dec edi
mov byte [esi + ebp + 0x178], al
inc ebp
inc edx
inc ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x2c], ebp
test edi, edi
jne 0x10108650
mov ecx, ebp
pop edi
pop ebp
pop ebx
mov dword [esi + 0x168], ecx
xor eax, eax
pop esi
add esp, 0x18
ret
or eax, 0xffffffff
pop esi
add esp, 0x18
ret