Function at 0x10017670
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push 0xd4
mov ebx, ecx
push 0
push ebp
mov dword [esp + 0x18], ebx
call fcn.10050e40
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
mov esi, dword [esp + 0x30]
push ecx
push esi
mov edx, esi
call fcn.100166f0
lea ecx, [esi + eax*4]
add esp, 0x14
cmp esi, ecx
mov eax, 0x5a5a5a5a
je 0x100176b9
mov edi, edi
xor eax, dword [edx]
add edx, 4
cmp edx, ecx
jne 0x100176b0
mov dword [ebp + 0x14], eax
movzx eax, word [esi]
cmp eax, 0xdf
mov dword [esp + 0x24], eax
mov dword [ebp + 8], eax
ja case.0x100176d4.1
movzx edx, byte [eax + 0x1001795c]
jmp dword [edx*4 + 0x10017954]
or dword [ebp], 0x400
movzx eax, byte [esi + 3]
and eax, 0xf
lea eax, [esi + eax*4 + 4]
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc
cmp eax, 0x5e
jne 0x10017705
movzx ecx, byte [esi + 2]
and ecx, 7
mov dword [ebp + 0x10], ecx
mov edx, dword [esi + 4]
push edi
mov edi, dword [esi]
add esi, 4
shr edi, 0x1c
push edx
mov ecx, ebx
and edi, 1
call fcn.10016a20
mov dword [ebp + 0xc], eax
mov ecx, dword [ebx + 0x4c0]
lea edx, [ecx + 0x800]
cmp eax, edx
jb 0x10017740
add ecx, 0x840
cmp eax, ecx
jae 0x10017740
or dword [ebp], 0x80000000
mov eax, dword [esi]
and eax, 0xf00000
cmp eax, 0x100000
jne 0x10017755
or dword [ebp], 0x40000000
mov eax, dword [esi]
and eax, 0xf0000
cmp eax, 0xf0000
jne 0x10017769
or dword [ebp], 0xf
jmp 0x10017795
test eax, 0x10000
je 0x10017774
or dword [ebp], 1
test eax, 0x20000
je 0x1001777f
or dword [ebp], 2
test eax, 0x40000
je 0x1001778a
or dword [ebp], 4
test eax, 0x80000
je 0x10017795
or dword [ebp], 8
test dword [esi], 0x2000
je 0x100177a7
add esi, 4
mov dword [ebp + 0xc], 0x1280
test edi, edi
je 0x100177ae
add esi, 4
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
mov eax, dword [esp + 0x28]
push edx
push eax
add esi, 4
call fcn.10016870
add esp, 8
test eax, eax
mov dword [esp + 0x1c], eax
mov dword [ebp + 0x18], eax
mov dword [esp + 0x14], 0
jbe 0x10017946
lea edi, [ebp + 0x30]
mov edi, edi
mov ecx, dword [esi]
push ecx
mov ecx, ebx
call fcn.10016a20
mov edx, dword [esi]
and edx, 0xf000000
cmp edx, 0x1000000
mov dword [esp + 0x28], eax
jne 0x10017801
or dword [edi], 1
mov eax, dword [esi]
and eax, 0xf000000
cmp eax, 0xb000000
jne 0x10017812
or dword [edi], 2
mov ecx, dword [esi]
and ecx, 0xf000000
cmp ecx, 0xc000000
jne 0x10017825
or dword [edi], 3
test dword [esi], 0x2000
mov eax, 1
mov dword [esp + 0x18], eax
je 0x100178aa
mov ecx, dword [esp + 0x14]
mov edx, 0x800
shl edx, cl
or dword [ebp], edx
mov dword [edi - 4], eax
mov eax, dword [ebx + 4]
cmp dword [eax], 0xfffe0200
jb 0x100178a3
mov ebx, dword [esi + 4]
push ebx
call fcn.10033c10
push ebx
mov ebp, eax
mov dword [esp + 0x20], 2
call fcn.10033be0
add esp, 8
cmp eax, 0xf
jne 0x10017887
mov ebx, dword [esp + 0x10]
mov dword [edi + 4], ebp
mov ebp, dword [esp + 0x24]
mov dword [edi - 4], 2
jmp 0x100178aa
mov ebp, dword [esp + 0x24]
shr ebx, 0x10
and ebx, 3
add ebx, 0x80
shl ebx, 4
mov dword [edi + 4], ebx
mov ebx, dword [esp + 0x10]
jmp 0x100178aa
mov dword [edi + 4], 0x800
mov ecx, dword [esi]
push ecx
call fcn.10033c10
mov dword [edi + 0xc], eax
mov eax, dword [esi]
mov edx, eax
and edx, 0xff0000
add esp, 4
cmp edx, 0xe40000
jne 0x100178df
mov eax, dword [esp + 0x28]
mov dword [edi - 0x14], eax
lea ecx, [eax + 0x10]
lea edx, [eax + 0x20]
add eax, 0x30
mov dword [edi - 8], eax
jmp 0x10017921
mov ecx, eax
mov edx, eax
mov ebx, eax
shr eax, 0x10
and eax, 3
shl eax, 4
add eax, dword [esp + 0x28]
shr ecx, 0x12
shr edx, 0x14
shr ebx, 0x16
and ecx, 3
and edx, 3
and ebx, 3
mov dword [edi - 0x14], eax
mov eax, dword [esp + 0x28]
shl ecx, 4
shl edx, 4
shl ebx, 4
add ecx, eax
add edx, eax
add ebx, eax
mov dword [edi - 8], ebx
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
lea esi, [esi + eax*4]
mov eax, dword [esp + 0x14]
add eax, 1
mov dword [edi - 0xc], edx
mov dword [edi - 0x10], ecx
add edi, 0x24
cmp eax, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
jb 0x100177e0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc