Function at 0x10066900
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1017f22d
mov eax, dword fs:[0]
push eax
push ecx
push ebx
sub esp, 0x60
mov eax, dword [0x101e6040]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
cmp dword [edi + 0x220], 0
mov esi, dword [ebx + 8]
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x40], esi
jne 0x1006697f
push 0x4000
call fcn.101554b7
add esp, 4
mov dword [edi + 0x220], eax
push 0x4000
call fcn.101554b7
add esp, 4
mov dword [edi + 0x224], eax
push dword [ebx + 0xc]
mov ecx, edi
push dword [esi + 0x4c]
push dword [esi + 0x48]
push esi
call fcn.1001f2a0
test eax, eax
je 0x10066d89
cmp dword [esi + 0x64], 0
jne 0x10066d57
mov ecx, dword [esi + 0x48]
xor eax, eax
mov edx, dword [esi + 0x4c]
mov word [esi + 0x13c], ax
mov eax, dword [edi + 0x50]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], edx
test eax, eax
jne 0x10066b0e
test edx, edx
jl 0x10066d4c
jg 0x100669d6
test ecx, ecx
je 0x10066d4c
test edx, edx
ja 0x100669ec
jb 0x100669e2
cmp ecx, 0x4000
jae 0x100669ec
mov dword [ebp - 0x40], edx
mov edx, ecx
mov dword [ebp - 0x4c], ecx
jmp 0x100669f8
mov edx, 0x4000
mov dword [ebp - 0x40], 0
cmp dword [edi + 0x1f0], 0
jne 0x10066af7
mov eax, dword [edi + 0x198]
lea esi, [ebp - 0x28]
push esi
push dword [ebp - 0x40]
lea ecx, [edi + 0x198]
mov eax, dword [eax + 0x1c]
push edx
push dword [edi + 0x220]
call eax
push dword [ebp - 0x24]
mov ecx, edi
mov esi, eax
push dword [ebp - 0x28]
call fcn.1001fd00
test esi, esi
je 0x10066af4
push 0
push 0
push dword [ebp - 0x28]
mov ecx, edi
push dword [edi + 0x220]
call fcn.1001f830
test eax, eax
mov eax, dword [ebp - 0x3c]
je 0x10066add
mov edx, dword [ebp - 0x28]
mov esi, dword [edi + 0x220]
movzx eax, word [eax + 0x13c]
test edx, edx
je 0x10066a8f
nop
movzx ecx, byte [esi]
lea esi, [esi + 1]
xor ecx, eax
shr ax, 8
movzx ecx, cl
xor ax, word [ecx*2 + 0x10193288]
movzx eax, ax
sub edx, 1
jne 0x10066a70
mov esi, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x48]
sub ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x44]
mov word [esi + 0x13c], ax
mov eax, dword [ebp - 0x24]
sbb edx, eax
mov dword [ebp - 0x48], ecx
mov ecx, dword [ebp - 0x28]
add dword [esi + 0x50], ecx
mov ecx, dword [ebp - 0x48]
adc dword [esi + 0x54], eax
cmp dword [edi + 0x4b0], 0
mov dword [ebp - 0x44], edx
je 0x100669c2
push 0
push dword [esi + 4]
lea ecx, [edi + 8]
push 0xa0000017
call fcn.1001f180
jmp 0x10066d89
push 0
push dword [eax + 4]
lea ecx, [edi + 8]
push 0xa0000030
call fcn.1001f180
jmp 0x10066d89
mov esi, dword [ebp - 0x3c]
push 0
push dword [esi + 4]
lea ecx, [edi + 8]
push 0xa0000102
call fcn.1001f180
jmp 0x10066d89
cmp eax, 0x25f
je 0x10066b20
cmp eax, 0x25e
jne 0x10066d89
xorps xmm0, xmm0
movups xmmword [ebp - 0x38], xmm0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x38], 0x101ca6a4
mov dword [ebp - 0x34], 0x101ca69c
mov dword [ebp - 4], 0
lea eax, [ebp - 0x38]
mov dword [ebp - 0x6c], eax
mov eax, dword [edi + 0x424]
mov dword [ebp - 0x68], eax
mov eax, dword [edi + 0x50]
mov dword [ebp - 0x2c], edi
movlpd qword [ebp - 0x60], xmm0
movlpd qword [ebp - 0x58], xmm0
mov dword [ebp - 0x64], ecx
cmp eax, 0x25f
jne 0x10066b7c
mov dword [ebp - 0x54], 7
mov dword [ebp - 0x58], 0x10
jmp 0x10066b91
cmp eax, 0x25e
jne 0x10066b91
mov dword [ebp - 0x54], 6
mov dword [ebp - 0x58], 0xf
push 0x7200
call fcn.1015144f
add esp, 4
mov esi, eax
mov dword [ebp - 0x44], esi
push 0x7200
push 0
push esi
call fcn.10152e30
add esp, 0xc
mov ecx, esi
push 0
call fcn.1005b980
xor eax, eax
mov byte [ebp - 4], 1
mov dword [esi + 0x4240], eax
mov dword [esi + 0x71f8], eax
mov dword [esi + 0x71fc], eax
mov word [esi + 0x71f0], ax
mov eax, dword [ebp - 0x54]
dec eax
mov dword [esi], vtable.CEncodeLzHuf.0
mov dword [esi + 0x71f4], 0x10193288
mov dword [esi + 0x71e8], 0
mov dword [esi + 0x71ec], 0
cmp eax, 6
ja case.0x10066c0c.1
jmp dword [eax*4 + 0x10066dac]
mov dword [esi + 0x28], 0x100000d
mov eax, 0x2000
jmp 0x10066c3b
mov dword [esi + 0x28], 0x100000f
mov eax, 0x8000
jmp 0x10066c3b
mov dword [esi + 0x28], 0x1000010
mov eax, 0x10000
cmp dword [esi + 0x71f8], 0
mov dword [esi + 0x3c], eax
lea eax, [eax*2 + 0x100]
mov dword [esi + 0x38], eax
jne case.0x10066c0c.1
mov eax, dword [esi + 0x4240]
test eax, eax
je 0x10066c68
push eax
call fcn.10154f5a
add esp, 4
push 0x8000
mov dword [esi + 0x4240], 0
mov dword [esi + 0x4244], 0x8000
call fcn.101554b7
add esp, 4
mov dword [esi + 0x4240], eax
test eax, eax
jne 0x10066cd1
nop dword [eax]
nop word [eax + eax]
mov eax, 0xcccccccd
mul dword [esi + 0x4244]
shr edx, 3
lea eax, [edx + edx*8]
mov dword [esi + 0x4244], eax
cmp eax, 0x1000
jb 0x10066cd1
push eax
call fcn.101554b7
add esp, 4
mov dword [esi + 0x4240], eax
test eax, eax
je 0x10066ca0
push 0x40000
call fcn.101554b7
add esp, 4
mov dword [esi + 0x71f8], eax
push 0x40000
call fcn.101554b7
add esp, 4
mov dword [esi + 0x71fc], eax
push 0x20100
call fcn.101554b7
add esp, 4
mov dword [esi + 0x34], eax
lea eax, [ebp - 0x6c]
mov ecx, esi
push eax
call fcn.1008fef0
mov edx, dword [esi]
mov ecx, esi
push 1
mov dword [ebp - 0x4c], eax
call dword [edx]
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x60]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x34], vtable.CArkUnknownImp.0
mov dword [eax + 0x50], ecx
mov ecx, dword [ebp - 0x4c]
mov dword [eax + 0x54], 0
mov word [eax + 0x13c], cx
mov dword [ebp - 0x38], vtable.IArkInStream.0
push 0
push 0
mov ecx, edi
call fcn.1001fd00
mov eax, 1
jmp 0x10066d8b
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.10151433
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8