Function at 0x10016cfd
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x1c], ecx
mov edx, dword [0x1003ecbc]
push edi
xor edi, edi
mov dword [ebp - 0xc], esi
mov eax, edi
xor edx, 0xbf548d54
inc eax
cmp word [eax*2 + 0x10037870], di
jne 0x10016d1e
mov ecx, dword [ebp + 8]
mov ebx, dword [0x1003eb60]
cmp ecx, eax
jae 0x10016d5f
mov edi, dword [0x1003ec1c]
cmp ecx, 0x83d
jne 0x10016d4a
lea edi, [ebx - 0x5d016c32]
inc ecx
lea esi, [edi - 0xc931d20]
mov dword [ebp - 0x14], esi
cmp ecx, eax
jb 0x10016d3c
mov esi, dword [ebp - 0xc]
xor edi, edi
jmp 0x10016d67
mov eax, dword [0x1003ebc8]
mov dword [ebp - 0x14], eax
mov eax, str.MacGaelic
sub edx, 0x24648ffc
inc eax
cmp byte [eax], 0
jne 0x10016d6c
movzx eax, word [esi]
mov ecx, edi
mov edi, eax
mov dword [0x1003ecb4], edx
mov dword [ebp - 0x18], edi
xor edi, edi
test ax, ax
je 0x10016d9e
inc ecx
cmp word [esi + ecx*2], di
jne 0x10016d8f
cmp ecx, 0x116
je 0x10016da8
mov eax, edx
and eax, 0xb72ae655
mov dword [ebp - 0x14], eax
mov eax, edx
mov esi, str.ConvertPenStyle
xor eax, 0xb21c2cee
mov dword [ebp - 8], eax
mov eax, edi
push 8
pop ecx
lea edi, [ebp - 0x3c]
mov dword [ebp - 0x10], eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x18]
xor edi, edi
mov esi, dword [ebp - 0xc]
cmp cx, word [ebp - 0x3c]
jne 0x10016e01
mov ebx, dword [ebp - 0x10]
mov eax, edi
movzx ecx, cx
test cx, cx
je 0x10016df5
cmp word [ebp + eax - 0x3c], di
je 0x10016df5
inc ebx
lea eax, [ebx + ebx]
movzx ecx, word [eax + esi]
cmp cx, word [ebp + eax - 0x3c]
je 0x10016dda
mov dword [ebp - 0x10], ebx
mov ebx, dword [0x1003eb60]
mov eax, dword [ebp - 0x10]
movzx ecx, byte [esi + eax*2]
movzx eax, byte [ebp + eax*2 - 0x3c]
sub ecx, eax
cmp ecx, 0x8d5
jbe 0x10016e20
add ebx, 0x9d1d808
mov dword [0x1003eb60], ebx
mov esi, dword [ebp - 0x1c]
mov eax, edi
mov cl, byte [esi]
mov byte [ebp - 1], cl
test cl, cl
je 0x10016e4a
mov ecx, dword [ebp - 0x14]
add ecx, 0xde52c8a5
mov dword [ebp - 8], ecx
inc eax
cmp byte [eax + esi], 0
jne 0x10016e3a
cmp eax, 0x1033
ja 0x10016e59
jmp 0x10016e4d
mov ecx, dword [ebp - 8]
and ebx, 0xb7d50e97
mov dword [0x1003eb60], ebx
xor ecx, 0xad3dc7f2
cmp byte [ebp - 1], 0
mov dword [0x1003ebc8], ecx
je 0x10016e7d
xor edx, 0xbe84c42a
inc esi
cmp byte [esi], 0
jne 0x10016e6b
mov dword [0x1003ecb4], edx
mov dword [ebp - 0x1c], edi
mov esi, str.4_45f5k5p5z5
push 7
pop ecx
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 8]
movzx eax, word [edi]
mov esi, eax
mov dword [ebp + 8], esi
cmp ax, word [ebp - 0x38]
jne 0x10016f29
movzx ecx, si
xor eax, eax
mov esi, dword [ebp - 0x1c]
xor ebx, ebx
test cx, cx
je 0x10016ec7
cmp word [ebp + eax - 0x38], bx
je 0x10016ec7
inc esi
lea eax, [esi + esi]
movzx ecx, word [eax + edi]
cmp cx, word [ebp + eax - 0x38]
je 0x10016eac
mov eax, dword [ebp + 8]
mov ebx, dword [0x1003eb60]
mov edi, dword [ebp - 8]
cmp eax, esi
jae 0x10016efb
mov ecx, dword [0x1003ebc8]
cmp eax, 0xcf6
jne 0x10016ef0
lea edx, [ecx - 0x3f845ad8]
mov dword [0x1003ecb4], edx
or edi, 0x66d6a01a
inc eax
cmp eax, esi
jb 0x10016edd
mov esi, dword [ebp + 8]
xor eax, eax
mov ecx, eax
cmp word [ebp - 0x18], ax
je 0x10016f2e
lea eax, [edi - 0x782fc50]
mov edi, dword [ebp - 0xc]
mov dword [0x1003ebc8], eax
xor eax, eax
inc ecx
cmp word [edi + ecx*2], ax
jne 0x10016f18
cmp ecx, 0x202c
ja 0x10016f3d
jmp 0x10016f31
mov edi, dword [ebp - 8]
jmp 0x10016efe
mov edi, dword [ebp - 0xc]
imul ebx, ebx, 0xfc0b62f6
mov dword [0x1003eb60], ebx
test si, si
je 0x10016f50
mov ebx, edx
or ebx, 0x252e6ebb
mov dword [0x1003eb60], ebx
imul eax, edx, 0xe5619edf
xor esi, esi
mov ecx, esi
mov dword [0x1003ec28], eax
mov eax, ebx
and eax, 0x6979b799
mov dword [0x1003ec1c], eax
cmp word [ebp - 0x18], cx
je 0x10016f80
inc ecx
cmp word [edi + ecx*2], si
jne 0x10016f71
cmp ecx, 0xbd4
je 0x10016f8c
add edx, 0x160e2e64
mov dword [0x1003ecb4], edx
and eax, 0x4eed56d0
pop edi
mov dword [0x1003ecbc], eax
mov eax, ebx
pop esi
pop ebx
leave
ret