Function at 0x10099360
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1c
mov edx, dword [esp + 0x24]
push ebx
mov ebx, ecx
mov byte [esp + 5], 0
push ebp
push esi
mov esi, dword [esp + 0x34]
mov eax, dword [ebx + 0x8cd4]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x10]
push edi
mov dword [esp + 0x20], ebx
mov byte [esp + 0x12], 0
mov ecx, dword [eax]
mov dword [esp + 0x28], ecx
lea ecx, [ecx*8 + 8]
sub ecx, dword [eax + 4]
mov al, byte [eax + 8]
mov byte [esp + 0x13], al
xor eax, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
cmp esi, 1
jbe 0x1009945a
cmp edx, 0x400
jb 0x1009945a
mov ecx, dword [esp + 0x30]
mov edi, edx
shr edi, 1
nop word [eax + eax]
mov al, byte [edi + ecx - 1]
lea ebp, [edi + ecx]
cmp byte [ebp], al
je 0x100993e2
cmp al, byte [edi + ecx - 2]
jne 0x100993e9
cmp edi, edx
jae 0x1009945a
inc edi
jmp 0x100993d0
cmp edi, edx
jae 0x1009945a
dec esi
push esi
push edi
push ecx
mov ecx, ebx
call fcn.10099360
mov eax, dword [esp + 0x34]
mov ecx, ebx
push esi
sub eax, edi
push eax
push ebp
call fcn.10099360
mov edx, dword [ebx + 0x10]
mov eax, dword [edx]
mov cl, byte [edx + 8]
mov byte [esp + 0x12], cl
lea eax, [eax*8 + 8]
sub eax, dword [edx + 4]
mov ecx, eax
mov dword [esp + 0x14], eax
and ecx, 7
jbe 0x1009943d
mov eax, 8
sub eax, ecx
mov ecx, edx
push eax
push 0
call fcn.1009aa30
mov edx, dword [ebx + 0x10]
mov ecx, dword [esp + 0x18]
mov eax, 8
and ecx, 7
mov byte [esp + 0x11], 1
sub eax, ecx
mov dword [edx + 4], eax
mov al, byte [esp + 0x13]
mov byte [edx + 8], al
mov ecx, dword [ebx + 0x10]
push 8
push 0x31
mov eax, dword [ecx]
mov dword [esp + 0x40], eax
shl eax, 3
sub eax, dword [ecx + 4]
mov dword [esp + 0x2c], eax
call fcn.1009aa30
mov ecx, dword [ebx + 0x10]
push 8
push 0x41
call fcn.1009aa30
mov ecx, dword [ebx + 0x10]
push 8
push 0x59
call fcn.1009aa30
mov ecx, dword [ebx + 0x10]
push 8
push 0x26
call fcn.1009aa30
mov ecx, dword [ebx + 0x10]
push 8
push 0x53
call fcn.1009aa30
mov ecx, dword [ebx + 0x10]
push 8
push 0x59
call fcn.1009aa30
mov ebp, dword [esp + 0x30]
xor edi, edi
or esi, 0xffffffff
xor eax, eax
mov dword [esp + 0x30], eax
mov dh, byte [ebp]
lea ebx, [edi + 1]
mov dl, byte [eax + ebp]
cmp edi, 4
jne 0x100994f4
test dl, dl
je 0x100994f0
movzx ecx, dh
mov eax, esi
shl esi, 8
shr eax, 0x18
xor eax, ecx
xor esi, dword [eax*4 + 0x10113848]
add dl, 0xff
jne 0x100994d6
mov eax, dword [esp + 0x30]
xor edi, edi
jmp 0x1009951d
mov ecx, esi
movzx eax, dl
shr ecx, 0x18
inc edi
xor ecx, eax
shl esi, 8
movzx eax, dl
xor esi, dword [ecx*4 + 0x10113848]
cmp dh, dl
movzx ecx, dh
cmovne ecx, eax
cmovne edi, ebx
mov eax, dword [esp + 0x30]
mov dh, cl
inc eax
mov dword [esp + 0x30], eax
cmp eax, dword [esp + 0x34]
jb 0x100994c7
mov ebx, dword [esp + 0x20]
not esi
mov dword [esp + 0x30], esi
xor edi, edi
mov ecx, 3
mov eax, esi
sub ecx, edi
shl ecx, 3
shr eax, cl
mov ecx, dword [ebx + 0x10]
push 8
movzx eax, al
push eax
call fcn.1009aa30
inc edi
cmp edi, 4
jb 0x10099534
push dword [esp + 0x34]
mov ecx, ebx
push ebp
call fcn.10099890
mov edi, dword [ebx + 0x10]
mov edx, dword [edi]
lea ebp, [edx*8]
sub ebp, dword [edi + 4]
cmp byte [esp + 0x11], 0
je 0x100995cf
mov ecx, dword [esp + 0x14]
mov eax, ecx
sub ebp, dword [esp + 0x24]
sub eax, dword [esp + 0x18]
cmp ebp, eax
jae 0x100995f0
mov eax, dword [edi + 0xc]
sub edx, dword [esp + 0x38]
je 0x100995b5
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x38]
sub esi, edi
lea ecx, [eax + edi]
mov al, byte [esi + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
sub edx, 1
jne 0x100995a0
mov edi, dword [ebx + 0x10]
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x18]
add ecx, ebp
mov eax, ecx
and ecx, 7
shr eax, 3
mov dword [edi], eax
mov eax, 8
sub eax, ecx
mov dword [edi + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [ebx + 0x8cd4], eax
pop edi
mov dword [ebx + eax*4 + 0x7cd4], esi
inc dword [ebx + 0x8cd4]
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
mov eax, ecx
and ecx, 7
mov dword [esp + 0x14], ecx
mov ecx, 8
shr eax, 3
sub ecx, dword [esp + 0x14]
mov dword [edi + 4], ecx
mov dword [edi], eax
mov eax, dword [ebx + 0x10]
pop edi
pop esi
pop ebp
mov dword [eax + 4], ecx
mov cl, byte [esp + 6]
mov byte [eax + 8], cl
pop ebx
add esp, 0x1c
ret 0xc