Function at 0x667cb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, edx
push ebx
mov edx, ecx
push esi
cmp dword [edx + 0x8874], 0
push edi
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x1c], edx
jne 0x668388
cmp dword [edx + 0x8870], 0
je 0x668388
mov ecx, eax
mov edi, 1
shl edi, cl
mov ecx, dword [edx + 0x8614]
mov edx, dword [edx + 0x85b8]
dec ecx
mov eax, dword [edx + 0x24]
mov esi, dword [edx + 0x1c]
shl ecx, 4
sub eax, ecx
inc eax
mov ebx, 0x10
cmp eax, ebx
cmovb ebx, eax
mov eax, dword [edx + 0x20]
inc esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], esi
cmp ecx, eax
jbe 0x667d1e
xor eax, eax
jmp 0x667d21
and eax, 0xf
dec eax
add eax, edi
xor edx, edx
div edi
imul eax, edi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax + 0x85b8]
mov eax, dword [edx + 0x18]
dec eax
add eax, edi
xor edx, edx
div edi
mov edx, dword [ebp - 0x1c]
imul eax, edi
mov dword [ebp - 8], eax
xor eax, eax
cmp dword [edx + 0xc], 4
sete al
add eax, 3
add eax, dword [edx + 0x18]
mov dword [ebp - 0x30], eax
mov eax, dword [edx + 0x8870]
mov bl, byte [eax + 0x808c]
mov esi, dword [eax + 0x86dc]
mov byte [ebp - 1], bl
mov bl, byte [eax + 0x808d]
mov eax, dword [edx + 0x85b8]
xor edx, edx
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x2c], eax
mov eax, ecx
div edi
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 2], bl
mov edx, dword [ecx + 0x85b8]
mov ebx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x2c]
mov dword [ebp - 0x28], esi
lea eax, [ecx + eax*4]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
mov eax, dword [ecx + 0xc]
cmp eax, 7
je 0x667dbe
cmp eax, 4
je 0x667dbe
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx + 0x10]
cmp eax, 1
jne 0x667eae
mov ecx, dword [ebp + 0xc]
mov eax, 0x80
shl eax, cl
cdq
idiv dword [ebp + 8]
mov dword [ebp - 0x38], eax
cmp ebx, dword [ebp - 0x18]
jae 0x668388
mov ecx, dword [ebp - 0xc]
mov edx, ebx
shl edx, 4
mov eax, edi
shl eax, 4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], edx
lea ebx, [ebx]
mov edi, dword [ebp - 0x24]
mov esi, eax
mov eax, ebx
shr eax, cl
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jae 0x667e91
mov ebx, dword [ebp - 0x34]
lea ecx, [ecx]
mov eax, esi
and eax, 0xf
movzx ecx, byte [eax + ebx + 0x725ab8]
mov eax, esi
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x28]
mov edx, dword [eax + ecx*4]
add edx, dword [ebp - 0x38]
mov ecx, dword [ebp + 0xc]
imul edx, dword [ebp + 8]
sar edx, cl
test edx, edx
jns 0x667e51
xor edx, edx
jmp 0x667e5f
cmp edx, 0xff
mov eax, 0xff
cmovg edx, eax
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x2c]
mov eax, esi
shr eax, cl
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 0x1c]
add eax, dword [edi + 0x80a8]
mov edi, dword [ebp - 0x30]
add eax, dword [ebp - 0x3c]
mov byte [eax + edi], dl
mov edi, dword [ebp - 0x20]
add esi, edi
cmp esi, dword [ebp - 0x10]
jb 0x667e20
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 8]
add edx, dword [ebp - 0x40]
add ebx, edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x34], edx
cmp ebx, dword [ebp - 0x18]
jb 0x667e00
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x667fa4
mov ecx, dword [ebp + 0xc]
mov eax, 0x8000
shl eax, cl
cdq
idiv dword [ebp + 8]
mov dword [ebp - 0x40], eax
cmp ebx, dword [ebp - 0x18]
jae 0x668388
mov ecx, dword [ebp - 0xc]
mov edx, ebx
shl edx, 4
mov eax, edi
shl eax, 4
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], edx
mov edi, dword [ebp - 0x24]
mov esi, eax
mov eax, ebx
shr eax, cl
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jae 0x667f87
movzx eax, byte [ebp - 1]
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 0x3c], eax
nop
mov eax, esi
and eax, 0xf
movzx ecx, byte [eax + ebx + 0x725ab8]
mov eax, esi
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x28]
mov edx, dword [eax + ecx*4]
add edx, dword [ebp - 0x40]
mov ecx, dword [ebp + 0xc]
imul edx, dword [ebp + 8]
sar edx, cl
mov ecx, dword [ebp - 0x3c]
shl edx, cl
test edx, edx
jns 0x667f46
xor edx, edx
jmp 0x667f54
cmp edx, 0xffff
mov eax, 0xffff
cmovg edx, eax
mov ecx, dword [ebp - 0xc]
mov eax, esi
shr eax, cl
mov ecx, dword [ebp - 0x2c]
add esi, edi
mov ecx, dword [ecx + eax*4]
add ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x30]
mov eax, dword [eax + 0x80a8]
mov word [eax + ecx*2], dx
cmp esi, dword [ebp - 0x10]
jb 0x667f10
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
add edx, dword [ebp - 0x44]
add ebx, edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x34], edx
cmp ebx, dword [ebp - 0x18]
jb 0x667ee7
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 3
jne 0x668098
cmp ebx, dword [ebp - 0x18]
jae 0x668388
mov ecx, dword [ebp - 0xc]
mov edx, ebx
shl edx, 4
mov eax, edi
shl eax, 4
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], edx
lea esp, [esp]
mov edi, dword [ebp - 0x24]
mov esi, eax
mov eax, ebx
shr eax, cl
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jae 0x66807b
movzx eax, byte [ebp - 1]
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 0x44], eax
jmp 0x668000
mov eax, esi
and eax, 0xf
movzx ecx, byte [eax + ebx + 0x725ab8]
mov eax, esi
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x28]
mov edx, dword [eax + ecx*4]
imul edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sar edx, cl
mov ecx, dword [ebp - 0x44]
shl edx, cl
cmp edx, 0xffff8000
jge 0x66803a
mov edx, 0xffff8000
jmp 0x668048
cmp edx, 0x7fff
mov eax, 0x7fff
cmovg edx, eax
mov ecx, dword [ebp - 0xc]
mov eax, esi
shr eax, cl
mov ecx, dword [ebp - 0x2c]
add esi, edi
mov ecx, dword [ecx + eax*4]
add ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x30]
mov eax, dword [eax + 0x80a8]
mov word [eax + ecx*2], dx
cmp esi, dword [ebp - 0x10]
jb 0x668000
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
add edx, dword [ebp - 0x3c]
add ebx, edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x34], edx
cmp ebx, dword [ebp - 0x18]
jb 0x667fd0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 4
jne 0x668165
cmp ebx, dword [ebp - 0x18]
jae 0x668388
mov ecx, dword [ebp - 0xc]
mov edx, ebx
shl edx, 4
mov eax, edi
shl eax, 4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], edx
mov edi, dword [ebp - 0x24]
mov esi, eax
mov eax, ebx
shr eax, cl
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jae 0x668148
mov ebx, dword [ebp - 0x34]
lea ecx, [ecx]
mov eax, esi
and eax, 0xf
movzx ecx, byte [eax + ebx + 0x725ab8]
mov eax, esi
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x28]
mov edx, dword [eax + ecx*4]
imul edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sar edx, cl
mov ecx, dword [ebp - 0xc]
mov eax, edx
sar eax, 0x1f
and edx, 0x7fff
xor edx, eax
sub edx, eax
mov eax, esi
shr eax, cl
mov ecx, dword [ebp - 0x2c]
add esi, edi
mov ecx, dword [ecx + eax*4]
add ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x30]
mov eax, dword [eax + 0x80a8]
mov word [eax + ecx*2], dx
cmp esi, dword [ebp - 0x10]
jb 0x6680e0
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
add edx, dword [ebp - 0x40]
add ebx, edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x34], edx
cmp ebx, dword [ebp - 0x18]
jb 0x6680c0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 6
jne 0x66823a
cmp ebx, dword [ebp - 0x18]
jae 0x668388
mov ecx, dword [ebp - 0xc]
mov edx, ebx
shl edx, 4
mov eax, edi
shl eax, 4
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], edx
lea ecx, [ecx]
mov edi, dword [ebp - 0x24]
mov esi, eax
mov eax, ebx
shr eax, cl
mov eax, dword [edi + eax*4]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jae 0x66821d
movzx eax, byte [ebp - 1]
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 0x44], eax
jmp 0x6681c0
mov eax, esi
and eax, 0xf
movzx ecx, byte [eax + ebx + 0x725ab8]
mov eax, esi
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x28]
mov edx, dword [eax + ecx*4]
imul edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sar edx, cl
mov ecx, dword [ebp - 0x44]
mov eax, esi
add esi, edi
shl edx, cl
mov ecx, dword [ebp - 0xc]
shr eax, cl
mov ecx, dword [ebp - 0x2c]
mov ecx, dword [ecx + eax*4]
add ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x30]
mov eax, dword [eax + 0x80a8]
mov dword [eax + ecx*4], edx
cmp esi, dword [ebp - 0x10]
jb 0x6681c0
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
add edx, dword [ebp - 0x3c]
add ebx, edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x34], edx
cmp ebx, dword [ebp - 0x18]
jb 0x668190
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 7
jne 0x667db4
cmp ebx, dword [ebp - 0x18]
jae 0x668388
mov ecx, dword [ebp - 0xc]
mov eax, ebx
shl eax, 4
mov dword [ebp - 0x34], eax
mov eax, edi
shl eax, 4
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0x24]
mov edx, eax
mov eax, ebx
shr eax, cl
mov dword [ebp - 0x38], edx
mov eax, dword [esi + eax*4]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jae 0x668374
movsx eax, byte [ebp - 2]
movzx ecx, byte [ebp - 1]
mov dword [ebp - 0x40], eax
mov ebx, 1
mov eax, 0x17
shl ebx, cl
sub eax, ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x3c], eax
nop
mov ecx, dword [ebp - 0x34]
mov eax, edx
and eax, 0xf
lea esi, [ebx - 1]
movzx ecx, byte [eax + ecx + 0x725ab8]
mov eax, edx
and eax, 0xfffffff0
shl eax, 4
add ecx, eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + ecx*4]
imul eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sar eax, cl
mov ecx, eax
sar ecx, 0x1f
mov edx, ecx
xor edx, eax
sub edx, ecx
mov dword [ebp - 0x48], ecx
mov ecx, dword [ebp - 0x44]
mov edi, edx
shr edi, cl
and esi, edx
or esi, ebx
test edi, edi
jne 0x6682f0
xor esi, ebx
mov edi, 1
mov eax, 0x7f
sub eax, dword [ebp - 0x40]
add edi, eax
cmp esi, ebx
jge 0x668318
mov edi, edi
cmp edi, 1
jle 0x668391
test esi, esi
jle 0x668391
add esi, esi
dec edi
cmp esi, ebx
jl 0x668300
xor esi, ebx
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x38]
shl esi, cl
mov ecx, dword [ebp - 0xc]
and eax, 0x80000000
shl edi, 0x17
or esi, edi
mov edi, dword [ebp - 0x20]
or esi, eax
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x48], esi
movss xmm0, dword [ebp - 0x48]
add edx, edi
mov ecx, dword [ecx + eax*4]
add ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x30]
mov eax, dword [eax + 0x80a8]
mov dword [ebp - 0x38], edx
movss dword [eax + ecx*4], xmm0
cmp edx, dword [ebp - 0x10]
jb 0x6682a0
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x50]
add dword [ebp - 0x34], edx
add ebx, edi
mov dword [ebp - 0x14], ebx
cmp ebx, dword [ebp - 0x18]
jb 0x668262
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, ebx
jge 0x668318
xor edi, edi
jmp 0x66831a