Function at 0x10178670
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
mov eax, dword [0x1029912c]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
xorps xmm0, xmm0
mov dword [esp + 0x3c], edx
lea eax, [esp + 0x10]
movlpd qword [esp + 0x58], xmm0
mov edi, ecx
movlpd qword [esp + 0x48], xmm0
push 0
push eax
mov edx, 0x1b
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], 0
call fcn.10171680
mov esi, eax
add esp, 8
mov dword [esp + 0x44], esi
test esi, esi
jne 0x10178a25
mov eax, dword [edi + 0x118]
mov ebx, dword [esp + 0x10]
cdq
push edx
push eax
push 1
push ebx
call fcn.101079a0
mov eax, dword [edi + 0xfc]
cdq
push edx
push eax
push 2
push ebx
call fcn.101079a0
mov eax, dword [esp + 0x7c]
add esp, 0x20
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x28], eax
push ebx
call fcn.101066b0
add esp, 4
cmp eax, 0x64
jne 0x10178763
push 0
push ebx
call fcn.10106f50
mov ebx, eax
xor edi, edi
mov eax, dword [esp + 0x14]
add esp, 8
cmp dword [eax + 0xfc], edi
jle 0x1017875b
nop dword [eax]
lea ecx, [esp + 0x44]
mov edx, ebx
push ecx
push edi
mov ecx, eax
call fcn.10178470
xor dword [esp + 0x30], eax
inc edi
mov eax, dword [esp + 0x14]
add esp, 8
xor dword [esp + 0x2c], edx
cmp edi, dword [eax + 0xfc]
jl 0x10178730
mov esi, dword [esp + 0x44]
mov ebx, dword [esp + 0x10]
test esi, esi
je 0x10178703
push ebx
call fcn.10105890
add esp, 4
test esi, esi
jne 0x101789f3
mov esi, eax
test eax, eax
jne 0x101789f3
mov esi, dword [esp + 0xc]
mov dword [esp + 0x20], 0
mov eax, dword [esi + 0x24]
push dword [esi + 0xdc]
push str.SELECT__s
mov eax, dword [eax]
mov dword [esp + 0x40], eax
call fcn.100e2630
mov edi, eax
add esp, 8
test edi, edi
jne 0x101787c8
push dword [esp + 0x20]
mov ebx, dword [esp + 0x50]
lea esi, [eax + 7]
mov edi, dword [esp + 0x4c]
call fcn.101057b0
add esp, 4
jmp 0x101789fb
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x20]
push 0
push eax
push 0
push 0x80
push 0xffffffffffffffff
mov edx, edi
call fcn.1013a960
add esp, 0x14
mov esi, eax
push edi
call fcn.100dfd40
mov ebx, dword [esp + 0x50]
add esp, 4
mov edi, dword [esp + 0x48]
test esi, esi
jne 0x101789e5
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x20]
push edi
call fcn.101066b0
add esp, 4
cmp eax, 0x64
jne 0x101789e1
push 0
push edi
call fcn.10107030
mov dword [esp + 0x3c], eax
add esp, 8
mov eax, dword [esp + 0xc]
mov dword [esp + 0x30], edx
mov dword [esp + 0x24], 0
cmp dword [eax + 0x2c], 0
je 0x10178855
mov ecx, dword [eax + 0x18]
inc ecx
push ecx
push edi
call fcn.10106f50
mov dword [esp + 0x2c], eax
add esp, 8
mov eax, dword [esp + 0xc]
xor ecx, ecx
mov dword [esp + 0x1c], ecx
nop dword [eax + eax]
cmp ecx, dword [eax + 0x18]
jge 0x10178808
mov eax, dword [eax + 0x20]
cmp byte [ecx + eax], 0
jne 0x101789cf
lea esi, [ecx + 1]
push esi
push edi
call fcn.10107120
push esi
push dword [esp + 0x2c]
mov edi, eax
call fcn.10106cb0
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
mov edx, dword [esp + 0x34]
push ecx
push eax
mov ecx, dword [esi + 0x24]
push edi
mov dword [esp + 0x34], 0
call fcn.1016db90
mov ecx, dword [esp + 0x34]
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x101789ae
mov edi, dword [esp + 0x1c]
jmp 0x101788c4
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x44]
mov dword [esp + 0x54], 0
push eax
lea eax, [esp + 0x5c]
mov dword [esp + 0x4c], 0
push eax
lea eax, [esp + 0x50]
mov dword [esp + 0x60], 0
push eax
lea eax, [esp + 0x60]
mov dword [esp + 0x50], 0
push eax
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0x4c]
push ecx
mov eax, dword [eax + 0x14]
call eax
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x101789aa
push dword [esp + 0x44]
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x44]
push edi
push dword [esp + 0x38]
push dword [esp + 0x40]
push eax
push dword [esp + 0x38]
call fcn.101783b0
xor dword [esp + 0x2c], eax
xor ebx, edx
mov eax, dword [esp + 0x24]
mov esi, 1
mov ecx, dword [esp + 0x30]
add esp, 0x18
mov dword [esp + 0x10], ebx
mov ebx, dword [eax + 0xfc]
cmp ebx, esi
jle 0x101788c0
mov edi, dword [eax + 0x100]
add edi, 0x18
mov edx, dword [edi]
cmp edx, dword [esp + 0x54]
jg 0x10178995
push dword [esp + 0x44]
mov ecx, dword [esp + 0x44]
push dword [esp + 0x20]
push dword [esp + 0x38]
push dword [esp + 0x40]
push esi
push dword [esp + 0x38]
call fcn.101783b0
xor dword [esp + 0x2c], eax
add esp, 0x18
xor dword [esp + 0x10], edx
inc esi
add edi, 0x18
cmp esi, ebx
jl 0x10178964
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
jmp 0x101788c0
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x101789bf
mov eax, dword [esp + 0x38]
push ecx
mov eax, dword [eax + 0x10]
call eax
add esp, 4
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov edi, dword [esp + 0x20]
cmp esi, 0x65
cmove esi, eax
inc ecx
mov dword [esp + 0x1c], ecx
test esi, esi
jne 0x101789e1
mov eax, dword [esp + 0xc]
jmp 0x10178860
mov edi, dword [esp + 0x14]
push dword [esp + 0x20]
call fcn.101057b0
add esp, 4
jmp 0x101789fb
mov ebx, dword [esp + 0x4c]
mov edi, dword [esp + 0x48]
cmp dword [esp + 0x28], edi
jne 0x10178a07
cmp dword [esp + 0x2c], ebx
je 0x10178a25
mov eax, dword [esp + 0x3c]
mov dword [eax], 0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.101d506b
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x64]
pop edi
mov dword [eax], 1
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.101d506b
mov esp, ebp
pop ebp
ret