Function at 0x1009d8e3
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
mov eax, dword [esi + 0x2cb8]
mov dword [esi + 0x2cb0], edi
cmp eax, 2
jne 0x1009d923
push 1
call fcn.1009e990
test eax, eax
je 0x1009d91d
mov eax, dword [esi + 0x80]
mov ecx, dword [esi + 0x7c]
push eax
push ecx
mov ecx, esi
call fcn.1009d730
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [esi + 0x2cb8], edi
mov eax, dword [esi + 0x38]
mov ecx, 8
sub ecx, eax
mov eax, dword [esi + 0x3c]
shr eax, cl
mov ecx, dword [esi + 0x2ca0]
shr eax, 0x10
and eax, 0xff
cmp ecx, 0x25
mov ecx, dword [esi + 0x2cac]
jae 0x1009d960
cmp ecx, edi
mov ebx, 0x100d53f4
jne 0x1009d959
mov ebx, 0x100d53e4
mov edx, 0x100d5424
jmp 0x1009d973
cmp ecx, edi
mov ebx, 0x100d5414
jne 0x1009d96e
mov ebx, 0x100d5404
mov edx, 0x100d5460
mov cl, byte [ebx]
mov ebp, 0xff
sar ebp, cl
mov ecx, dword [edx]
xor ecx, eax
not ebp
test ecx, ebp
je 0x1009d99f
mov cl, byte [edi + ebx + 1]
inc edi
mov ebp, 0xff
add edx, 4
sar ebp, cl
mov ecx, eax
xor ecx, dword [edx]
not ebp
test ecx, ebp
jne 0x1009d986
mov ecx, dword [esi + 0x38]
xor edx, edx
mov dl, byte [edi + ebx]
add ecx, edx
mov eax, ecx
mov dword [esi + 0x38], ecx
cmp eax, 8
jb 0x1009d9fd
lea ebx, [esi + 0x40]
mov ebp, 0xfffffff8
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
cmp eax, ecx
jb 0x1009d9d1
mov ecx, ebx
call fcn.10006517
mov byte [esp + 0x10], al
jmp 0x1009d9da
mov cl, byte [eax]
inc eax
mov byte [esp + 0x10], cl
mov dword [ebx], eax
mov edx, dword [esi + 0x3c]
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x38]
and eax, 0xff
shl edx, 8
add ecx, ebp
or edx, eax
mov eax, ecx
mov dword [esi + 0x3c], edx
cmp eax, 8
mov dword [esi + 0x38], ecx
jae 0x1009d9bb
cmp edi, 9
jb 0x1009dace
jne 0x1009da2d
mov edi, dword [esi + 0x2cb8]
mov ecx, dword [esi + 0x80]
mov edx, dword [esi + 0x7c]
inc edi
push ecx
push edx
mov ecx, esi
mov dword [esi + 0x2cb8], edi
call fcn.1009d730
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
cmp edi, 0xe
mov dword [esi + 0x2cb8], 0
jne 0x1009da73
push 0x100d52a0
mov ecx, esi
call fcn.1009d810
mov edi, eax
push 0xf
mov ecx, esi
add edi, 5
call fcn.1009e990
add eax, 0x7fff
push edi
push eax
mov ecx, esi
mov dword [esi + 0x80], edi
mov dword [esi + 0x7c], eax
call fcn.1009d730
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov eax, dword [esi + 0x78]
push 0x100d5268
sub eax, edi
mov ecx, esi
inc eax
mov ebp, edi
and eax, 3
mov ebx, dword [esi + eax*4 + 0x68]
call fcn.1009d810
add eax, 2
mov edi, eax
cmp edi, 0x101
jne 0x1009dab7
cmp ebp, 0xa
jne 0x1009dab7
mov eax, dword [esi + 0x2cac]
pop edi
xor eax, 1
mov dword [esi + 0x2cac], eax
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
cmp ebx, 0x100
jb 0x1009dac0
inc edi
mov ecx, dword [esi + 0x2cc8]
dec ecx
cmp ebx, ecx
jb 0x1009db42
inc edi
jmp 0x1009db42
mov edx, dword [esi + 0x2ca0]
push 0x100d5348
mov dword [esi + 0x2cb8], 0
lea eax, [edx + edi]
mov ecx, eax
shr ecx, 4
sub eax, ecx
mov ecx, esi
mov dword [esi + 0x2ca0], eax
call fcn.1009d810
and eax, 0xff
mov ebx, dword [esi + eax*4 + 0x494]
dec eax
cmp eax, 0xffffffff
je 0x1009db3f
mov ebp, dword [esi + ebx*4 + 0x1494]
dec ebp
mov dword [esi + ebx*4 + 0x1494], ebp
mov ecx, dword [esi + eax*4 + 0x494]
mov edx, dword [esi + ecx*4 + 0x1494]
inc edx
mov dword [esi + ecx*4 + 0x1494], edx
mov dword [esi + eax*4 + 0x498], ecx
mov dword [esi + eax*4 + 0x494], ebx
add edi, 2
mov edx, dword [esi + 0x78]
push edi
push ebx
mov ecx, esi
mov dword [esi + edx*4 + 0x68], ebx
mov eax, dword [esi + 0x78]
inc eax
mov dword [esi + 0x80], edi
and eax, 3
mov dword [esi + 0x7c], ebx
mov dword [esi + 0x78], eax
call fcn.1009d730
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret