Function at 0x10008535
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
xor edi, edi
lea edx, [ebp - 0x14]
mov esi, edi
mov dword [ebp - 0x14], edi
call fcn.1001175c
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
jne 0x1000855d
push 0xfffffffffffffffe
jmp 0x10008731
mov edx, edi
mov eax, dword [0x10020ef0]
mov ecx, edx
and ecx, 0x1f
mov al, byte [ecx + eax + 0x1858]
xor byte [edx + ebx], al
inc edx
cmp edx, 0x20
jb 0x1000855f
mov eax, dword [0x10020ef0]
cmp dword [eax + 0xa4], 1
jne 0x100085a4
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], edi
push eax
mov eax, dword [0x10020ec0]
push edi
push edi
push 0x100049ec
push edi
push edi
call dword [eax + 0x78]
jmp 0x10008732
lea ecx, [ebp - 4]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
call fcn.1000b128
mov edi, eax
mov dword [ebp - 0x1c], edi
test edi, edi
jne 0x100085c3
or esi, 0xffffffff
jmp 0x10008732
and dword [ebp - 0xc], esi
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x1000871a
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 8], 1
test ebx, ebx
jne 0x100086f0
push 0x10
lea eax, [ebp - 0x2c]
push ebx
push eax
call fcn.1000a140
mov eax, dword [0x10020ef0]
add esp, 0xc
test dword [eax + 0x1898], 0x200
je 0x1000860d
mov ecx, 0xa11
call fcn.1000f418
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x2c]
mov ecx, dword [edi + eax*4]
call fcn.1000d9fd
test eax, eax
js 0x100086b6
push dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x2c]
call fcn.1000d9a7
mov dword [0x10020fc4], eax
pop ecx
test eax, eax
jne 0x10008656
mov eax, dword [0x10020ec0]
push dword [ebp - 0x28]
call dword [eax + 0x34]
mov eax, dword [0x10020ec0]
push dword [ebp - 0x2c]
call dword [eax + 0x34]
push 0xfffffffffffffffe
pop esi
jmp 0x100086b6
mov eax, dword [0x10020ef0]
lea edx, [ebp - 0x2c]
push dword [ebp - 8]
mov ecx, 0x100078da
push dword [eax + 0x224]
call fcn.1000b3ec
pop ecx
pop ecx
test eax, eax
jne 0x10008691
mov eax, dword [0x10020ec0]
push dword [ebp - 0x28]
call dword [eax + 0x34]
mov eax, dword [0x10020ec0]
push dword [ebp - 0x2c]
call dword [eax + 0x34]
push 0xfffffffffffffffd
jmp 0x10008653
lea ecx, [ebp - 0x2c]
call fcn.1000b51b
test eax, eax
je 0x100086b6
push dword [ebp - 0x2c]
call fcn.100058f2
mov eax, dword [0x10020ec0]
pop ecx
push dword [ebp - 0x28]
call dword [eax + 0x34]
xor ebx, ebx
inc ebx
xor esi, esi
cmp dword [ebp - 0x2c], 0
je 0x100086e0
test ebx, ebx
jne 0x100086cf
mov eax, dword [0x10020ec0]
push ebx
push dword [ebp - 0x2c]
call dword [eax + 0x114]
cmp dword [ebp - 0x28], 0
je 0x100086e0
mov eax, dword [0x10020ec0]
push dword [ebp - 0x28]
call dword [eax + 0x34]
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
cmp eax, 2
jbe 0x100085db
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp - 4]
mov dword [ebp - 0xc], eax
cmp eax, ebx
jb 0x100085d1
push 0xfffffffffffffffe
push edi
call fcn.10009fbc
pop ecx
add edi, 4
pop ecx
sub ebx, 1
jne 0x10008705
mov ebx, dword [ebp - 4]
shl ebx, 2
lea eax, [ebp - 0x1c]
push ebx
push eax
call fcn.10009fbc
cmp dword [ebp - 0x10], 0
pop ecx
pop ecx
jne 0x10008732
push 0xfffffffffffffffb
pop esi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret