Function at 0x10001164
Capabilities:
Encode data using xor
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x10], esi
push edi
mov edi, ecx
cmp esi, 1
jle 0x10001263
xor edx, edx
push 0x34
pop eax
div esi
movzx edx, byte [edi + esi - 1]
add eax, 6
mov dword [ebp - 4], edx
lea edx, [esi - 1]
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x1c], edx
sub eax, 0x61c88647
xor ecx, ecx
mov dword [ebp - 0xc], eax
shr eax, 2
and eax, 3
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
test edx, edx
jle 0x1000120b
mov esi, dword [ebp - 0x14]
movzx edx, byte [edi + ecx + 1]
mov ecx, dword [ebp - 4]
mov ebx, edx
shl al, 4
shr ebx, 3
xor bl, al
shr ecx, 5
mov al, dl
shl al, 2
xor cl, al
mov eax, dword [ebp - 8]
add bl, cl
and eax, 3
mov ecx, dword [ebp + 8]
xor eax, esi
mov cl, byte [ecx + eax*4]
xor cl, byte [ebp - 4]
mov al, byte [ebp - 0xc]
xor al, dl
add cl, al
xor bl, cl
mov ecx, dword [ebp - 8]
add byte [edi + ecx], bl
movzx eax, byte [edi + ecx]
inc ecx
mov dword [ebp - 4], eax
mov dword [ebp - 8], ecx
cmp ecx, dword [ebp - 0x1c]
jl 0x100011ba
mov esi, dword [ebp - 0x10]
movzx edx, byte [edi]
mov ecx, dword [ebp - 4]
mov ebx, edx
shl al, 4
shr ebx, 3
xor bl, al
shr ecx, 5
mov al, dl
shl al, 2
xor cl, al
mov eax, dword [ebp + 8]
add bl, cl
mov ecx, dword [ebp - 8]
and ecx, 3
xor ecx, dword [ebp - 0x14]
mov cl, byte [eax + ecx*4]
mov al, byte [ebp - 0xc]
xor cl, byte [ebp - 4]
xor al, dl
add cl, al
lea edx, [esi - 1]
xor bl, cl
add byte [edi + esi - 1], bl
sub dword [ebp - 0x18], 1
movzx eax, byte [edi + esi - 1]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
jne 0x1000119a
jmp 0x1000134f
cmp esi, 0xffffffff
jge 0x1000134f
push 0x34
neg esi
pop eax
cdq
idiv esi
mov dword [ebp - 0x10], esi
lea ebx, [esi - 1]
lea ecx, [eax + 6]
imul edx, ecx, 0x9e3779b9
mov dword [ebp - 0x14], ecx
movzx ecx, byte [edi]
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edx
mov eax, edx
shr eax, 2
and eax, 3
mov dword [ebp - 0x18], eax
mov eax, ebx
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x100012f4
mov esi, ebx
movzx edx, byte [edi + esi - 1]
mov ebx, ecx
shr ebx, 3
mov al, dl
shl al, 4
mov ecx, edx
xor bl, al
shr ecx, 5
mov al, byte [ebp - 4]
shl al, 2
xor cl, al
mov eax, esi
add bl, cl
and eax, 3
xor eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
mov cl, byte [ecx + eax*4]
mov al, byte [ebp - 8]
xor cl, dl
xor al, byte [ebp - 4]
add cl, al
xor bl, cl
sub byte [edi + esi], bl
movzx ecx, byte [edi + esi]
dec esi
mov dword [ebp - 4], ecx
test esi, esi
jg 0x100012a5
mov dword [ebp - 0xc], esi
mov esi, dword [ebp - 0x10]
movzx edx, byte [edi + esi - 1]
mov ebx, ecx
mov al, dl
shr ebx, 3
shl al, 4
mov ecx, edx
xor bl, al
shr ecx, 5
mov al, byte [ebp - 4]
shl al, 2
xor cl, al
mov eax, dword [ebp - 0xc]
add bl, cl
and eax, 3
xor eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
mov cl, byte [ecx + eax*4]
xor cl, dl
mov edx, dword [ebp - 8]
mov al, dl
add edx, 0x61c88647
xor al, byte [ebp - 4]
add cl, al
mov dword [ebp - 8], edx
xor bl, cl
sub byte [edi], bl
lea ebx, [esi - 1]
sub dword [ebp - 0x14], 1
movzx ecx, byte [edi]
mov dword [ebp - 4], ecx
jne 0x1000128f
pop edi
pop esi
pop ebx
leave
ret