Function at 0x100d14e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
cmp dword [esi + 0xb4], 2
mov dword [esi + 0xb0], 0
jne 0x100d1523
push 1
call fcn.100d13f0
test eax, eax
je 0x100d1519
push dword [esi + 0x74]
mov ecx, esi
push dword [esi + 0x70]
call fcn.100d0b50
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0xb4], 0
mov eax, dword [esi + 0x3c]
mov ecx, 8
sub ecx, dword [esi + 0x38]
shr eax, cl
shr eax, 0x10
cmp dword [esi + 0xa0], 0x25
movzx ecx, al
mov eax, 0x10134824
push ebx
mov ebx, 0x101347f4
mov dword [ebp - 8], ecx
cmovae ebx, eax
mov eax, dword [esi + 0xac]
add eax, 0x10
add eax, ebx
mov dword [ebp - 4], eax
movzx edx, byte [ebx]
xor edx, ecx
mov ecx, 8
movzx eax, byte [eax]
sub ecx, eax
push edi
shr edx, cl
xor edi, edi
test edx, edx
je 0x100d159c
mov edx, dword [ebp - 4]
sub edx, ebx
nop dword [eax]
movzx eax, byte [edx + ebx + 1]
lea ebx, [ebx + 1]
mov ecx, 8
inc edi
sub ecx, eax
movzx eax, byte [ebx]
xor eax, dword [ebp - 8]
shr eax, cl
test eax, eax
jne 0x100d1580
mov eax, dword [ebp - 4]
movzx eax, byte [edi + eax]
add eax, dword [esi + 0x38]
mov dword [esi + 0x38], eax
cmp eax, 8
jb 0x100d15e2
nop
mov eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x44]
jb 0x100d15c4
lea ecx, [esi + 0x40]
call fcn.100b6f82
mov dl, al
jmp 0x100d15ca
mov dl, byte [eax]
inc eax
mov dword [esi + 0x40], eax
mov ecx, dword [esi + 0x3c]
add dword [esi + 0x38], 0xfffffff8
shl ecx, 8
movzx eax, dl
or ecx, eax
cmp dword [esi + 0x38], 8
mov dword [esi + 0x3c], ecx
jae 0x100d15b0
cmp edi, 9
jb 0x100d169a
jne 0x100d1607
push dword [esi + 0x74]
inc dword [esi + 0xb4]
mov ecx, esi
push dword [esi + 0x70]
call fcn.100d0b50
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0xb4], 0
mov ecx, esi
cmp edi, 0xe
jne 0x100d1649
push 0x10134864
call fcn.100d0d10
push 0xf
mov ecx, esi
lea edi, [eax + 5]
call fcn.100d13f0
add eax, 0x7fff
mov dword [esi + 0x74], edi
push edi
push eax
mov ecx, esi
mov dword [esi + 0x70], eax
call fcn.100d0b50
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x78]
sub eax, edi
mov dword [ebp - 8], edi
inc eax
and eax, 3
push 0x10134854
mov ebx, dword [esi + eax*4 + 0x7c]
call fcn.100d0d10
mov edi, eax
cmp edi, 0xff
jne 0x100d1683
cmp dword [ebp - 8], 0xa
jne 0x100d1683
xor dword [esi + 0xac], 0x10
xor eax, eax
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
cmp ebx, 0x100
jb 0x100d16f6
mov eax, dword [esi + 0xc0]
inc edi
dec eax
cmp ebx, eax
jb 0x100d16f6
inc edi
jmp 0x100d16f6
mov ecx, dword [esi + 0xa0]
add ecx, edi
mov dword [esi + 0xb4], 0
mov eax, ecx
shr eax, 4
sub ecx, eax
mov dword [esi + 0xa0], ecx
mov ecx, esi
push 0x10134894
call fcn.100d0d10
movzx ecx, al
mov ebx, dword [esi + ecx*4 + 0x4c4]
test al, al
je 0x100d16f6
dec dword [esi + ebx*4 + 0x14c4]
mov eax, dword [esi + ecx*4 + 0x4c0]
inc dword [esi + eax*4 + 0x14c4]
mov dword [esi + ecx*4 + 0x4c4], eax
mov dword [esi + ecx*4 + 0x4c0], ebx
mov eax, dword [esi + 0x78]
add edi, 2
push edi
push ebx
mov ecx, esi
mov dword [esi + eax*4 + 0x7c], ebx
mov eax, dword [esi + 0x78]
inc eax
mov dword [esi + 0x70], ebx
and eax, 3
mov dword [esi + 0x74], edi
mov dword [esi + 0x78], eax
call fcn.100d0b50
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret