Function at 0x10008245
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
push edi
xor edi, edi
lea edx, [ebp - 0x10]
and dword [ebp - 0x10], edi
call fcn.1001105c
mov esi, eax
mov dword [ebp - 0x14], esi
test esi, esi
jne 0x1000826b
push 0xfffffffffffffffe
pop edi
jmp 0x100084bc
push ebx
mov ebx, dword [ebp - 0x10]
xor edx, edx
test ebx, ebx
je 0x1000828e
mov eax, dword [0x10020fc8]
mov ecx, edx
and ecx, 0x1f
mov al, byte [ecx + eax + 0x1858]
xor byte [edx + esi], al
inc edx
cmp edx, ebx
jb 0x10008275
mov eax, dword [0x10020fc8]
cmp dword [eax + 0xa4], 1
jne 0x10008323
push 8
call fcn.10009ca8
mov esi, eax
mov dword [ebp - 0x10], esi
pop ecx
test esi, esi
je 0x100084bb
push 4
push 0x3000
mov dword [esi + 4], ebx
mov eax, dword [0x10020f94]
push ebx
xor ebx, ebx
push ebx
call dword [eax + 0x5c]
mov dword [esi], eax
test eax, eax
je 0x10008312
mov dword [ebp - 0xc], ebx
push dword [esi + 4]
push dword [ebp - 0x14]
push eax
call fcn.10009d8b
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
mov eax, dword [0x10020f94]
push ebx
push esi
push 0x100075d0
push ebx
push ebx
call dword [eax + 0x78]
test eax, eax
jne 0x100084bb
mov eax, dword [0x10020f94]
push 0x8000
push dword [esi + 4]
push dword [esi]
call dword [eax + 0x60]
lea eax, [ebp - 0x10]
push ebx
push eax
call fcn.10009cc4
pop ecx
pop ecx
jmp 0x100084bb
and dword [ebp - 4], edi
lea ecx, [ebp - 4]
and dword [ebp - 8], edi
call fcn.1000ad8b
mov esi, eax
mov dword [ebp - 0x18], esi
test esi, esi
jne 0x10008342
or edi, 0xffffffff
jmp 0x100084bb
and dword [ebp - 0x10], edi
mov eax, dword [ebp - 4]
test eax, eax
je 0x100084a3
mov dword [ebp - 0xc], 1
cmp dword [ebp - 8], 0
jne 0x1000847a
push 0x10
lea eax, [ebp - 0x28]
push 0
push eax
call fcn.10009e2b
mov eax, dword [0x10020fc8]
add esp, 0xc
test dword [eax + 0x1898], 0x200
je 0x1000838c
mov ecx, 0x118b
call fcn.1000ed31
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x28]
mov ecx, dword [esi + eax*4]
call fcn.1000d202
test eax, eax
js 0x1000843d
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x28]
push ebx
call fcn.1000d1ac
mov dword [0x1002109c], eax
pop ecx
test eax, eax
jne 0x100083d3
mov eax, dword [0x10020f94]
push dword [ebp - 0x24]
call dword [eax + 0x34]
mov eax, dword [0x10020f94]
push dword [ebp - 0x28]
call dword [eax + 0x34]
push 0xfffffffffffffffe
pop edi
jmp 0x1000843d
mov eax, dword [0x10020fc8]
lea edx, [ebp - 0x28]
push dword [ebp - 0xc]
mov ecx, 0x1000756a
mov dword [0x100210a0], ebx
push dword [eax + 0x224]
call fcn.1000b04f
pop ecx
pop ecx
test eax, eax
jne 0x10008414
mov eax, dword [0x10020f94]
push dword [ebp - 0x24]
call dword [eax + 0x34]
mov eax, dword [0x10020f94]
push dword [ebp - 0x28]
call dword [eax + 0x34]
push 0xfffffffffffffffd
jmp 0x100083d0
lea ecx, [ebp - 0x28]
call fcn.1000b1af
test eax, eax
je 0x1000843d
push dword [ebp - 0x28]
call fcn.10005547
mov eax, dword [0x10020f94]
pop ecx
push dword [ebp - 0x24]
call dword [eax + 0x34]
mov dword [ebp - 8], 1
xor edi, edi
cmp dword [ebp - 0x28], 0
je 0x1000846a
cmp dword [ebp - 8], 0
jne 0x10008459
mov eax, dword [0x10020f94]
push 0
push dword [ebp - 0x28]
call dword [eax + 0x114]
cmp dword [ebp - 0x24], 0
je 0x1000846a
mov eax, dword [0x10020f94]
push dword [ebp - 0x24]
call dword [eax + 0x34]
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp eax, 2
jbe 0x10008357
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, eax
jb 0x10008350
mov ebx, eax
push 0xfffffffffffffffe
push esi
call fcn.10009cc4
pop ecx
add esi, 4
pop ecx
sub ebx, 1
jne 0x1000848e
mov eax, dword [ebp - 4]
shl eax, 2
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.10009cc4
cmp dword [ebp - 8], 0
pop ecx
pop ecx
jne 0x100084bb
push 0xfffffffffffffffb
pop edi
pop ebx
mov eax, edi
pop edi
pop esi
leave
ret