Function at 0x660ece20
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x7c
cmp dword [esp + 0x98], 0x1fff
mov edi, dword [esp + 0x98]
mov dword [esp + 0x48], eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x38], ecx
ja 0x660ed8d2
shr edi, 3
mov dword [esp + 0x68], 0x40
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x98]
mov dword [esp + 0x64], 0x3c
sub edi, 1
mov dword [esp + 0x54], edi
cmp edi, 0x7fff
ja 0x660ed21e
and edi, dword [esp + 0x98]
mov dword [esp + 0x64], edi
jne 0x660ed9dd
cmp eax, 0x102
mov edx, 0x102
cmovbe edx, eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x50], edx
cmp dword [esp + 0x94], eax
jbe 0x660ed21e
mov dword [esp + 0x6c], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x40], 0
lea esi, [esi]
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x90]
mov eax, dword [esp + 0x90]
mov edi, dword [esp + 0x54]
add esi, ebx
and edi, dword [esp + 0x90]
mov dword [esp + 0x24], esi
add eax, 2
cmp dword [esp + 0x94], eax
ja 0x660ed288
mov ebp, esi
xor ebx, ebx
mov esi, dword [esp + 0x94]
xor eax, eax
sub esi, dword [esp + 0x90]
lea esi, [esi]
nop
movzx edx, byte [ebp + eax]
lea ecx, [eax*8]
add eax, 1
shl edx, cl
xor ebx, edx
cmp esi, eax
jne 0x660ecf30
movzx eax, bx
mov dword [esp + 0x28], eax
mov ebp, dword [esp + 0x28]
test ebp, ebp
jne 0x660ed270
mov esi, dword [esp + 0x40]
test esi, esi
je 0x660ed424
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x90]
add eax, esi
cmp dword [esp + 0x94], eax
jb 0x660ed37e
mov ebx, dword [esp + 0x38]
cmp byte [ebx + eax - 1], 0
jne 0x660ed37e
movzx eax, si
mov ecx, esi
shl eax, 2
lea esi, [esi]
nop
mov esi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
mov ebx, dword [esi + 8]
mov edx, dword [esi]
mov esi, dword [esi + 4]
mov dword [ebx + edi*4], ebp
mov dword [esp + 0x34], ebx
lea ebx, [edx + ebp*4]
lea edx, [esi + edi*2]
mov dword [esp + 0x4c], ebx
mov ebx, dword [ebx]
mov dword [esp + 0x1c], esi
cmp ebx, 0xffffffff
je 0x660ecfcf
mov word [edx], bx
mov esi, dword [esp + 0x4c]
mov dword [esi], edi
mov esi, dword [esp + 0x2c]
mov ebx, dword [esi + 0x14]
mov word [ebx + edi*2], cx
mov dword [esp + 0x30], ebx
mov ebx, dword [esi + 0xc]
add eax, ebx
mov dword [esp + 0x58], ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x660ecffb
mov ebx, dword [esi + 0x10]
mov word [ebx + edi*2], cx
mov ebx, dword [esp + 0x20]
movzx ecx, word [edx]
mov dword [eax], edi
mov eax, dword [esp + 0x90]
lea esi, [eax + 0x102]
cmp esi, dword [esp + 0x94]
cmova esi, dword [esp + 0x94]
add esi, dword [esp + 0x38]
test ebx, ebx
je 0x660ed300
mov eax, dword [esp + 0x98]
mov dword [esp + 0x10], edi
xor edx, edx
mov ebp, 1
mov dword [esp + 0x44], 0
add eax, edi
mov dword [esp + 0x14], 0
mov edi, dword [esp + 0x40]
mov dword [esp + 0x18], eax
jmp 0x660ed0b2
mov eax, dword [esp + 0x1c]
lea edx, [ecx + ecx]
movzx eax, word [eax + ecx*2]
cmp ecx, eax
je 0x660ed138
cmp edi, 2
jbe 0x660ed250
cmp edi, dword [esp + 0x14]
jae 0x660ed250
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x10]
movzx ecx, word [eax + edx]
mov eax, dword [esp + 0x30]
movzx eax, word [eax + ecx*2]
cmp edi, eax
jne 0x660ed138
lea eax, [ebp + 1]
cmp ebp, dword [esp + 0x20]
je 0x660ed138
mov edx, ebx
mov ebp, eax
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
sub eax, ecx
sub ebx, ecx
cmp dword [esp + 0x10], ecx
cmovae ebx, eax
cmp ebx, edx
jb 0x660ed138
test ebx, ebx
je 0x660ed060
mov edx, dword [esp + 0x90]
sub edx, ebx
add edx, dword [esp + 0x38]
cmp edi, 2
jbe 0x660ed230
mov eax, dword [esp + 0x30]
movzx eax, word [eax + ecx*2]
cmp edi, eax
cmovbe eax, edi
add edx, eax
add eax, dword [esp + 0x24]
cmp esi, eax
je 0x660ed115
mov dword [esp + 0x3c], ecx
jmp 0x660ed10a
add eax, 1
add edx, 1
cmp esi, eax
je 0x660ed111
movzx ecx, byte [eax]
cmp byte [edx], cl
je 0x660ed100
mov ecx, dword [esp + 0x3c]
sub eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x14]
jbe 0x660ed060
cmp dword [esp + 0x50], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x44], ebx
ja 0x660ed060
lea esi, [esi]
cmp dword [esp + 0x14], 2
mov edx, dword [esp + 0xa4]
seta al
mov ebx, eax
test edx, edx
jne 0x660ed2c0
mov edi, dword [esp + 0x44]
cmp dword [esp + 0x98], edi
setb dl
and eax, edx
test al, al
jne 0x660ed410
cmp dword [esp + 0x14], 2
jbe 0x660ed30f
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x9c]
jb 0x660ed198
cmp eax, 3
jne 0x660ed54e
cmp dword [esp + 0x44], 0x1000
jbe 0x660ed54e
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x90]
movzx ebp, byte [eax + edi]
mov eax, dword [esp + 0x48]
mov edi, dword [eax + 4]
mov edx, dword [eax + 8]
mov eax, dword [eax]
lea ebx, [edi + 1]
mov dword [esp + 0x10], edi
lea esi, [ebx*4]
cmp esi, edx
jbe 0x660ed1f2
add edx, edx
mov edi, esi
cmp esi, edx
ja 0x660ed1d5
lea edi, [ebx + ebx*2]
shl edi, 2
shr edi, 1
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_realloc
test eax, eax
je 0x660eda10
mov ecx, dword [esp + 0x48]
mov dword [ecx + 8], edi
mov dword [ecx], eax
mov edi, dword [esp + 0x48]
mov dword [edi + 4], ebx
mov ebx, ebp
movzx ebp, bl
mov dword [eax + esi - 4], ebp
add dword [esp + 0x90], 1
mov eax, dword [esp + 0x90]
cmp dword [esp + 0x94], eax
ja 0x660ecee0
mov eax, dword [esp + 0x64]
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x24]
cmp esi, eax
jne 0x660ed0fa
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + ecx*2]
cmp ecx, eax
je 0x660ed138
lea esi, [esi]
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x28]
cmp dword [edx + eax*4], ecx
jne 0x660ed138
mov ecx, eax
jmp 0x660ed0a1
mov dword [esp + 0x40], 0
xor eax, eax
xor ecx, ecx
jmp 0x660ecfa0
mov eax, dword [esp + 0x90]
movzx eax, byte [ebx + eax + 1]
shl eax, 4
mov edx, eax
mov eax, dword [esp + 0x90]
movzx eax, byte [ebx + eax + 2]
shl eax, 8
xor eax, edx
movzx edx, byte [esi]
xor eax, edx
mov dword [esp + 0x28], eax
jmp 0x660ecf4e
mov ebp, dword [esp + 0x5c]
test ebp, ebp
jne 0x660ed394
test al, al
je 0x660ed483
mov edi, dword [esp + 0x68]
cmp dword [esp + 0x14], edi
jbe 0x660ed4a4
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x98], eax
jb 0x660ed410
mov dword [esp + 0x5c], 0
jmp 0x660ed174
mov eax, dword [esp + 0xa4]
test eax, eax
jne 0x660ed471
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x90]
mov edi, dword [eax + 4]
mov edx, dword [eax + 8]
mov eax, dword [eax]
lea ebx, [edi + 1]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x38]
lea esi, [ebx*4]
movzx ebp, byte [edi + ecx]
cmp esi, edx
jbe 0x660ed369
add edx, edx
mov edi, esi
cmp edx, esi
jb 0x660ed34c
lea edi, [ebx + ebx*2]
shl edi, 2
shr edi, 1
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_realloc
test eax, eax
je 0x660eda10
mov ecx, dword [esp + 0x48]
mov dword [ecx + 8], edi
mov dword [ecx], eax
mov edi, dword [esp + 0x48]
mov dword [edi + 4], ebx
mov ebx, ebp
movzx edx, bl
mov dword [eax + esi - 4], edx
jmp 0x660ed202
sub dword [esp + 0x40], 1
mov eax, dword [esp + 0x40]
mov ecx, eax
movzx eax, ax
shl eax, 2
jmp 0x660ecfa0
mov esi, dword [esp + 0x90]
test esi, esi
je 0x660ed9f1
mov eax, dword [esp + 0x90]
lea ecx, [eax - 1]
mov eax, dword [esp + 0x60]
add eax, 1
cmp eax, dword [esp + 0x14]
jb 0x660ed4c1
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x40]
mov dword [esp + 0x5c], 0
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x90], ecx
mov dword [eax], 0xffffffff
mov eax, dword [esp + 0x58]
mov dword [esp + 0x44], esi
mov dword [eax + edi*4], 0xffffffff
mov edi, dword [esp + 0x60]
cmp edi, 2
mov dword [esp + 0x14], edi
seta dl
cmp dword [esp + 0x98], esi
setb al
and eax, edx
test al, al
je 0x660ed169
mov dword [esp + 0x64], 0x56
mov eax, dword [esp + 0x64]
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x38]
add edx, dword [esp + 0x94]
lea eax, [esi + 0x102]
cmp eax, edx
cmovb edx, eax
mov eax, esi
cmp edx, esi
jne 0x660ed457
jmp 0x660ed45c
add eax, 1
cmp edx, eax
je 0x660ed45c
cmp byte [eax], 0
je 0x660ed450
sub eax, dword [esp + 0x24]
mov dword [esp + 0x40], eax
mov ecx, eax
movzx eax, ax
shl eax, 2
jmp 0x660ecfa0
mov dword [esp + 0x44], 0
xor ebx, ebx
mov dword [esp + 0x14], 0
mov edi, dword [esp + 0x5c]
test edi, edi
jne 0x660ed394
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x98], eax
setb al
and eax, ebx
jmp 0x660ed161
mov eax, dword [esp + 0x44]
mov dword [esp + 0x5c], 1
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x60], eax
jmp 0x660ed202
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x90]
movzx ecx, byte [eax + edi - 1]
mov edi, dword [edx + 4]
mov eax, dword [edx + 8]
mov edx, dword [edx]
lea esi, [edi + 1]
mov dword [esp + 0x10], edi
lea edi, [esi*4]
cmp edi, eax
jbe 0x660ed523
add eax, eax
mov ebp, edi
cmp edi, eax
jbe 0x660ed992
mov dword [esp], edx
mov dword [esp + 4], ebp
mov byte [esp + 0x10], cl
call sub.msvcrt.dll_realloc
movzx ecx, byte [esp + 0x10]
test eax, eax
mov edx, eax
je 0x660eda10
mov eax, dword [esp + 0x48]
mov dword [eax + 8], ebp
mov dword [eax], edx
mov eax, dword [esp + 0x48]
mov dword [esp + 0x5c], 0
mov dword [eax + 4], esi
movzx eax, cl
mov dword [edx + edi - 4], eax
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x98], eax
setb al
and eax, ebx
jmp 0x660ed161
mov edx, 0x1c
mov esi, 1
lea esi, [esi]
nop
lea eax, [edx + esi]
mov edi, dword [esp + 0x14]
shr eax, 1
cmp edi, dword [eax*4 + 0x661e2900]
ja 0x660ed8bc
lea edx, [eax - 1]
cmp edx, esi
jae 0x660ed560
cmp esi, 0x1d
jne 0x660ed8e3
sub esi, 1
mov eax, dword [esi*4 + 0x661e2900]
mov edx, 0x1d
mov ebx, 1
mov dword [esp + 0x18], eax
nop
lea eax, [edx + ebx]
mov edi, dword [esp + 0x44]
shr eax, 1
cmp edi, dword [eax*4 + 0x661e2800]
ja 0x660ed901
lea edx, [eax - 1]
cmp edx, ebx
jae 0x660ed5a0
cmp ebx, 0x1e
je 0x660ed8f9
mov eax, dword [esp + 0x44]
cmp eax, dword [ebx*4 + 0x661e2800]
jb 0x660ed8f9
mov ecx, dword [esp + 0x48]
mov eax, dword [ebx*4 + 0x661e2800]
mov edi, dword [ecx + 4]
mov edx, dword [ecx]
mov dword [esp + 0x1c], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x10], edi
add edi, 1
lea ebp, [edi*4]
cmp ebp, eax
jbe 0x660ed633
add eax, eax
mov ecx, ebp
cmp ebp, eax
jbe 0x660ed9ce
mov dword [esp + 4], ecx
mov dword [esp], edx
mov dword [esp + 0x10], ecx
call sub.msvcrt.dll_realloc
mov ecx, dword [esp + 0x10]
mov edx, eax
mov eax, dword [esp + 0x48]
test edx, edx
je 0x660ed9fe
mov dword [eax + 8], ecx
mov dword [eax], edx
mov eax, dword [esp + 0x48]
mov dword [eax + 4], edi
lea eax, [esi + 0x101]
mov dword [edx + ebp - 4], eax
mov eax, dword [esp + 0x48]
mov edi, dword [eax + 4]
mov eax, dword [eax + 8]
lea esi, [edi + 1]
mov dword [esp + 0x10], edi
lea edi, [esi*4]
cmp edi, eax
jbe 0x660ed68b
add eax, eax
mov ebp, edi
cmp edi, eax
jbe 0x660ed9bf
mov dword [esp], edx
mov dword [esp + 4], ebp
call sub.msvcrt.dll_realloc
mov edx, eax
mov eax, dword [esp + 0x48]
test edx, edx
je 0x660eda05
mov dword [eax + 8], ebp
mov dword [eax], edx
mov eax, dword [esp + 0x48]
mov dword [eax + 4], esi
mov eax, dword [esp + 0x14]
sub eax, dword [esp + 0x18]
mov dword [edx + edi - 4], eax
mov eax, dword [esp + 0x48]
mov edi, dword [eax + 4]
mov eax, dword [eax + 8]
lea esi, [edi + 1]
mov dword [esp + 0x10], edi
lea edi, [esi*4]
cmp edi, eax
jbe 0x660ed6e5
add eax, eax
mov ebp, edi
cmp edi, eax
jbe 0x660ed9b0
mov dword [esp], edx
mov dword [esp + 4], ebp
call sub.msvcrt.dll_realloc
mov edx, eax
mov eax, dword [esp + 0x48]
test edx, edx
je 0x660eda1d
mov dword [eax + 8], ebp
mov dword [eax], edx
mov eax, dword [esp + 0x48]
mov dword [eax + 4], esi
mov dword [edx + edi - 4], ebx
mov edi, dword [eax + 4]
mov eax, dword [eax + 8]
lea ebx, [edi + 1]
mov dword [esp + 0x10], edi
lea esi, [ebx*4]
cmp esi, eax
jbe 0x660ed72f
add eax, eax
mov edi, esi
cmp esi, eax
jbe 0x660ed9a1
mov dword [esp], edx
mov dword [esp + 4], edi
call sub.msvcrt.dll_realloc
mov edx, eax
test eax, eax
je 0x660ed742
mov eax, dword [esp + 0x48]
mov dword [eax + 8], edi
mov dword [eax], edx
mov eax, dword [esp + 0x48]
mov dword [eax + 4], ebx
mov eax, dword [esp + 0x44]
sub eax, dword [esp + 0x1c]
mov dword [edx + esi - 4], eax
mov eax, dword [esp + 0x2c]
mov edi, dword [eax + 8]
mov dword [esp + 0x18], edi
mov edi, dword [eax]
mov dword [esp + 0x24], edi
mov edi, dword [eax + 0x14]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x90]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x38]
lea ebp, [eax + edi + 1]
mov eax, edi
mov edi, 1
sub edi, eax
mov dword [esp + 0x30], edi
mov edi, ebp
jmp 0x660ed80e
movzx edx, byte [edi + 1]
mov eax, edx
movzx edx, byte [edi + 2]
shl eax, 4
shl edx, 8
xor edx, eax
movzx eax, byte [edi]
xor edx, eax
test edx, edx
je 0x660ed87a
xor ebx, ebx
mov eax, dword [esp + 0x24]
mov dword [esp + 0x40], 0
mov word [esp + 0x10], bx
mov ecx, dword [esp + 0x28]
lea eax, [eax + edx*4]
mov ebx, dword [esp + 0x18]
mov dword [ebx + esi*4], edx
mov edx, dword [eax]
cmp edx, 0xffffffff
je 0x660ed7d6
mov ebx, dword [esp + 0x2c]
mov ebx, dword [ebx + 4]
mov word [ebx + esi*2], dx
mov dword [eax], esi
movzx ebx, word [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov word [eax + esi*2], bx
mov eax, dword [ecx]
cmp eax, 0xffffffff
je 0x660ed7f7
mov ebx, dword [esp + 0x2c]
mov edx, dword [ebx + 0x10]
mov word [edx + esi*2], ax
mov eax, dword [esp + 0x30]
mov dword [ecx], esi
add edi, 1
add eax, ebp
cmp dword [esp + 0x14], eax
jbe 0x660ed96c
mov eax, ebp
mov esi, dword [esp + 0x54]
lea ebp, [eax + 1]
add eax, 3
and esi, ebp
cmp dword [esp + 0x94], eax
ja 0x660ed784
cmp dword [esp + 0x94], ebp
jbe 0x660ed87a
mov ebx, dword [esp + 0x94]
lea ecx, [edi - 1]
mov dword [esp + 0x10], ebp
xor edx, edx
mov dword [esp + 0x34], esi
xor eax, eax
sub ebx, ebp
mov ebp, ecx
mov esi, ebx
lea esi, [esi]
movzx ebx, byte [ebp + eax + 1]
lea ecx, [eax*8]
add eax, 1
shl ebx, cl
xor edx, ebx
cmp esi, eax
jne 0x660ed850
movzx edx, dx
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x34]
test edx, edx
jne 0x660ed7a3
mov edx, dword [esp + 0x40]
test edx, edx
je 0x660ed934
mov ebx, dword [esp + 0x40]
lea eax, [ebp + ebx]
cmp dword [esp + 0x94], eax
jb 0x660ed911
mov ecx, dword [esp + 0x38]
cmp byte [ecx + eax - 1], 0
jne 0x660ed911
movzx eax, bx
mov word [esp + 0x10], bx
mov ebx, dword [esp + 0x28]
xor edx, edx
lea ecx, [ebx + eax*4]
mov eax, dword [esp + 0x24]
jmp 0x660ed7bd
lea esi, [eax + 1]
cmp esi, edx
jbe 0x660ed560
cmp esi, 0x1d
je 0x660ed586
jmp 0x660ed8e3
mov dword [esp + 0x20], edi
mov dword [esp + 0x68], 0x101
jmp 0x660ece61
mov eax, dword [esp + 0x14]
cmp eax, dword [esi*4 + 0x661e2900]
jae 0x660ed589
jmp 0x660ed586
sub ebx, 1
jmp 0x660ed5d7
lea ebx, [eax + 1]
cmp ebx, edx
jbe 0x660ed5a0
jmp 0x660ed5bd
sub dword [esp + 0x40], 1
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x28]
mov word [esp + 0x10], ax
movzx eax, ax
xor edx, edx
lea ecx, [ebx + eax*4]
mov eax, dword [esp + 0x24]
jmp 0x660ed7bd
lea edx, [edi + 0x102]
mov eax, dword [esp + 0x38]
add eax, dword [esp + 0x94]
cmp eax, edx
cmovbe edx, eax
mov eax, edi
cmp edi, edx
jne 0x660ed95f
jmp 0x660ed964
add eax, 1
cmp edx, eax
je 0x660ed964
cmp byte [eax], 0
je 0x660ed958
sub eax, edi
mov dword [esp + 0x40], eax
jmp 0x660ed91a
mov edi, dword [esp + 0x14]
mov eax, 2
cmp edi, 2
cmovae eax, edi
mov edi, dword [esp + 0x90]
lea eax, [edi + eax - 1]
mov dword [esp + 0x90], eax
jmp 0x660ed202
lea eax, [esi + esi*2]
shl eax, 2
shr eax, 1
mov ebp, eax
jmp 0x660ed4fb
lea eax, [ebx + ebx*2]
shl eax, 2
shr eax, 1
mov edi, eax
jmp 0x660ed714
lea eax, [esi + esi*2]
shl eax, 2
shr eax, 1
mov ebp, eax
jmp 0x660ed6c6
lea eax, [esi + esi*2]
shl eax, 2
shr eax, 1
mov ebp, eax
jmp 0x660ed66c
lea eax, [edi + edi*2]
shl eax, 2
shr eax, 1
mov ecx, eax
jmp 0x660ed60c
mov dword [esp + 0x64], 0x5a
mov eax, dword [esp + 0x64]
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x64], 0x51
jmp 0x660ed21e
mov edx, dword [eax]
jmp 0x660ed644
mov edx, dword [eax]
jmp 0x660ed69e
mov dword [esp + 0x64], 0x53
jmp 0x660ed21e
mov edx, dword [eax]
jmp 0x660ed6f0