Function at 0x10017110
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x20
cmp dword [eax + 0x104], 0
jne 0x1001712a
mov dword [eax + 0x104], 0x10
mov ecx, dword [eax + 0x104]
xor edx, edx
and ecx, 0xfffffffd
or ecx, 1
mov dword [eax + 0x104], ecx
mov ecx, dword [esp + 0x24]
mov dh, byte [ecx + 3]
push ebx
push ebp
push esi
movzx esi, byte [ecx + 1]
mov dl, byte [ecx + 2]
push edi
mov ebp, dword [esp + 0x38]
shr ebp, 2
shl edx, 8
or edx, esi
movzx esi, byte [ecx]
shl edx, 8
or esi, edx
xor edx, edx
mov dword [eax], esi
mov dh, byte [ecx + 7]
movzx edi, byte [ecx + 5]
mov dl, byte [ecx + 6]
shl edx, 8
or edx, edi
movzx edi, byte [ecx + 4]
shl edx, 8
or edi, edx
xor edx, edx
mov dword [eax + 4], edi
mov dh, byte [ecx + 0xb]
movzx ebx, byte [ecx + 9]
mov dl, byte [ecx + 0xa]
shl edx, 8
or edx, ebx
movzx ebx, byte [ecx + 8]
shl edx, 8
or edx, ebx
xor ebx, ebx
mov dword [eax + 8], edx
mov bh, byte [ecx + 0xf]
mov dword [esp + 0x18], edx
movzx edx, byte [ecx + 0xd]
mov bl, byte [ecx + 0xe]
shl ebx, 8
or ebx, edx
movzx edx, byte [ecx + 0xc]
shl ebx, 8
or ebx, edx
cmp ebp, 4
mov dword [eax + 0xc], ebx
mov edx, ebp
ja 0x100171cd
mov edx, 4
add edx, 6
mov dword [eax + 0x100], edx
lea eax, [edx*4 + 3]
xor edx, edx
div ebp
mov edx, dword [esp + 0x38]
cmp edx, 0x10
mov dword [esp + 0x34], eax
je 0x10017495
cmp edx, 0x18
je 0x100173a1
cmp edx, 0x20
je 0x10017218
mov eax, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
mov dword [eax + 0x100], 0
xor eax, eax
pop ebx
add esp, 0x20
ret
xor eax, eax
mov ah, byte [ecx + 0x13]
movzx edx, byte [ecx + 0x11]
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0x3c], 0
mov al, byte [ecx + 0x12]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 0x10]
shl eax, 8
or eax, edx
mov dword [ebp + 0x10], eax
mov dword [esp + 0x20], eax
movzx edx, byte [ecx + 0x15]
xor eax, eax
mov ah, byte [ecx + 0x17]
mov al, byte [ecx + 0x16]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 0x14]
shl eax, 8
or eax, edx
mov dword [ebp + 0x14], eax
movzx edx, byte [ecx + 0x19]
mov dword [esp + 0x24], eax
xor eax, eax
mov ah, byte [ecx + 0x1b]
mov al, byte [ecx + 0x1a]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 0x18]
shl eax, 8
or eax, edx
mov dword [ebp + 0x18], eax
movzx edx, byte [ecx + 0x1d]
mov dword [esp + 0x28], eax
xor eax, eax
mov ah, byte [ecx + 0x1f]
mov al, byte [ecx + 0x1e]
movzx ecx, byte [ecx + 0x1c]
shl eax, 8
or eax, edx
shl eax, 8
or eax, ecx
cmp dword [esp + 0x34], 0
mov dword [ebp + 0x1c], eax
jbe 0x10017505
lea ecx, [ebp + 0x24]
mov dword [esp + 0x38], ebx
mov ebx, eax
mov edx, eax
shr edx, 0x18
mov edx, dword [edx*4 + 0x10030a50]
shr ebx, 0x10
movzx ebp, bl
xor edx, dword [ebp*4 + 0x10030650]
mov ebx, eax
shr ebx, 8
movzx ebp, bl
xor edx, dword [ebp*4 + str.cwko0]
mov ebx, dword [esp + 0x38]
movzx ebp, al
xor edx, dword [ebp*4 + 0x10030e50]
mov ebp, dword [esp + 0x3c]
xor edx, dword [ebp*4 + 0x1002f1d8]
mov dword [esp + 0x38], eax
xor esi, edx
mov edx, dword [esp + 0x18]
xor edi, esi
xor edx, edi
mov dword [ecx + 4], edx
xor ebx, edx
mov dword [esp + 0x18], edx
mov dword [ecx - 4], esi
mov dword [ecx], edi
mov dword [ecx + 8], ebx
mov eax, ebx
shr eax, 0x10
movzx ebp, al
mov edx, ebx
shr edx, 0x18
mov eax, dword [edx*4 + 0x10030e50]
xor eax, dword [ebp*4 + 0x10030a50]
mov ebp, dword [esp + 0x24]
mov edx, ebx
shr edx, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x10030650]
movzx edx, bl
xor eax, dword [edx*4 + str.cwko0]
mov edx, dword [esp + 0x20]
xor edx, eax
mov eax, dword [esp + 0x38]
xor ebp, edx
mov dword [ecx + 0xc], edx
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x28]
xor edx, ebp
xor eax, edx
mov dword [ecx + 0x14], edx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x3c]
add edx, 1
mov dword [ecx + 0x10], ebp
mov dword [ecx + 0x18], eax
add ecx, 0x20
cmp edx, dword [esp + 0x34]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x3c], edx
jb 0x100172b2
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret
movzx edx, byte [ecx + 0x11]
xor eax, eax
mov ah, byte [ecx + 0x13]
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0x3c], 0
mov al, byte [ecx + 0x12]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 0x10]
shl eax, 8
or eax, edx
mov dword [ebp + 0x10], eax
movzx edx, byte [ecx + 0x15]
mov dword [esp + 0x20], eax
xor eax, eax
mov ah, byte [ecx + 0x17]
mov al, byte [ecx + 0x16]
movzx ecx, byte [ecx + 0x14]
shl eax, 8
or eax, edx
shl eax, 8
or ecx, eax
cmp dword [esp + 0x34], 0
mov dword [ebp + 0x14], ecx
jbe 0x10017505
lea eax, [ebp + 0x1c]
lea esp, [esp]
mov dword [esp + 0x38], ebx
mov ebx, ecx
shr ebx, 0x10
movzx ebp, bl
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x10030a50]
xor edx, dword [ebp*4 + 0x10030650]
mov ebx, ecx
shr ebx, 8
movzx ebp, bl
xor edx, dword [ebp*4 + str.cwko0]
mov ebx, dword [esp + 0x38]
movzx ebp, cl
xor edx, dword [ebp*4 + 0x10030e50]
mov ebp, dword [esp + 0x3c]
xor edx, dword [ebp*4 + 0x1002f1d8]
add ebp, 1
xor esi, edx
mov edx, dword [esp + 0x18]
xor edi, esi
xor edx, edi
xor ebx, edx
mov dword [eax + 4], edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x20]
xor edx, ebx
xor ecx, edx
mov dword [eax - 4], esi
mov dword [eax], edi
mov dword [eax + 8], ebx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], ecx
add eax, 0x18
cmp ebp, dword [esp + 0x34]
mov dword [esp + 0x20], edx
mov dword [esp + 0x3c], ebp
jb 0x10017400
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret
xor ebp, ebp
test eax, eax
jbe 0x10017505
mov eax, dword [esp + 0x3c]
add eax, 0x14
mov edx, ebx
shr edx, 0x10
movzx edx, dl
mov ecx, ebx
shr ecx, 0x18
mov ecx, dword [ecx*4 + 0x10030a50]
xor ecx, dword [edx*4 + 0x10030650]
mov edx, ebx
shr edx, 8
movzx edx, dl
xor ecx, dword [edx*4 + str.cwko0]
movzx edx, bl
xor ecx, dword [edx*4 + 0x10030e50]
add ebp, 1
xor ecx, dword [ebp*4 + 0x1002f1d4]
add eax, 0x10
xor esi, ecx
mov ecx, dword [esp + 0x18]
xor edi, esi
xor ecx, edi
xor ebx, ecx
cmp ebp, dword [esp + 0x34]
mov dword [eax - 0x14], esi
mov dword [eax - 0x10], edi
mov dword [eax - 0xc], ecx
mov dword [eax - 8], ebx
mov dword [esp + 0x18], ecx
jb 0x100174a2
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret