Function at 0x668d50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x70
mov dword [ebp - 0x20], ecx
nop
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x669d50
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
call fcn.00669680
mov dword [ebp - 0x38], eax
movzx eax, byte [0x868a70]
cmp al, 0x98
je 0x668e12
mov cl, 0xe7
nop dword [eax]
mov al, 0x2d
lock cmpxchg byte [0x868a70], cl
je 0x668db2
cmp al, 0x98
jne 0x668da0
jmp 0x668e12
mov eax, 0x12
nop word [eax + eax]
mov ecx, eax
neg ecx
and ecx, 0x3e
movzx edx, byte [eax + 0x868a1e]
xor dl, byte [ecx + 0x7e65c0]
xor dl, 0xde
mov byte [eax + 0x868a1e], dl
mov ecx, eax
and ecx, 0x3e
xor ecx, 0x3f
movzx edx, byte [eax + 0x868a1f]
xor dl, byte [ecx + 0x7e65c0]
xor dl, 0xde
mov byte [eax + 0x868a1f], dl
add eax, 2
cmp eax, 0x52
jne 0x668dc0
mov al, 0x98
xchg byte [0x868a70], al
mov dword [ebp - 0x10], 0xffffffff
nop
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp - 0x7c]
push 0x868a30
push esi
call fcn.00683fc0
mov eax, dword [ebp - 0x20]
lea esi, [eax + 4]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], 0
push esi
call fcn.00700090
add esp, 4
cmp eax, 0xf
jbe 0x668e78
nop
mov dword [ebp - 0x10], 2
sub esp, 0xc
movzx ecx, byte [ebp - 0x3c]
mov byte [esp + 4], cl
mov dword [esp + 8], esi
mov dword [esp], eax
lea ecx, [ebp - 0x58]
call fcn.0045afa0
jmp 0x668eab
nop
mov dword [ebp - 0x48], eax
mov ecx, dword [0x868f98]
add ecx, dword [ebp - 0x38]
mov edx, dword [0x868f84]
add ecx, edx
add ecx, 0x59c5
mov edi, eax
call dword [0x834360]
lea eax, [ebp - 0x58]
push edi
push esi
push eax
call ecx
add esp, 0xc
mov byte [ebp + edi - 0x58], 0
nop
mov dword [ebp - 0x10], 4
lea eax, [ebp - 0x58]
lea ecx, [ebp - 0x7c]
push dword [ebp - 0x24]
push eax
call fcn.006841c0
nop
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jb 0x668f06
nop
mov ecx, dword [ebp - 0x58]
lea edx, [eax + 1]
cmp edx, 0x1000
jb 0x668efb
nop
mov esi, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, esi
cmp ecx, 0x20
jae 0x669356
nop
mov ecx, dword [0x889b4c]
lea edx, [eax + ecx]
add edx, 0x24
mov ecx, esi
nop
push edx
push ecx
call fcn.0071996d
add esp, 8
mov eax, 0x7e6590
mov ecx, dword [0x7e6590]
add ecx, eax
cmp dword [0x869148], 0x7dbbba6d
cmove ecx, eax
mov dword [ebp - 0x24], ecx
mov eax, dword [0x7e658c]
mov dword [ebp - 0x34], eax
mov eax, 0x7e65a0
add eax, dword [0x7e65a0]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx]
mov dword [ecx + 0x34], eax
mov dword [ebp - 0x10], 2
lea eax, [ebp - 0x58]
push eax
call fcn.00587e90
add esp, 4
nop
mov eax, dword [0x889c14]
add eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x20]
lea edx, [ecx + 0x2c]
mov dword [ecx + 0x38], eax
mov dword [ecx + 0x30], 0xb371a8a
lea ecx, [ebp - 0x7c]
push edx
call fcn.00684510
lea ecx, [ebp - 0x7c]
mov eax, dword [ebp - 0x20]
push dword [eax + 0x430]
push dword [eax + 0x42c]
call fcn.00684600
nop
cmp dword [0x88abd0], 0
jne 0x668fd1
nop
push 0x20
call fcn.0071993d
add esp, 4
nop
mov dword [eax + 0x1c], 0xf
mov dword [eax + 4], 0x751360
mov dword [eax], 0
mov dword [0x869150], 0xac077eaa
mov dword [eax + 0x18], 0
mov byte [eax + 8], 0
mov dword [0x88abd0], eax
nop
mov eax, dword [0x88abd0]
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x54], 0
mov dword [ebp - 0x58], 0x751360
mov ecx, dword [eax]
mov dword [ebp - 0x64], ecx
test ecx, ecx
je 0x66900c
add eax, 4
mov dword [ebp - 0x10], 3
lea ecx, [ebp - 0x58]
push eax
call fcn.00586f10
nop
cmp dword [0x86914c], 0xf622d1c6
mov eax, dword [0x869144]
jne 0x669032
nop
mov dword [0x869148], 0x77d8f808
mov ecx, 2
sub ecx, eax
jmp 0x669035
lea ecx, [eax + 1]
nop
mov dword [0x869144], ecx
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], ecx
test ecx, eax
je 0x6690eb
mov dword [ebp - 0x20], 0
nop
mov dword [ebp - 0x10], 3
lea ecx, [ebp - 0x7c]
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x64]
push 0xb371a8a
call fcn.00684580
nop
mov edx, dword [ebp - 0x40]
cmp edx, 0x10
jb 0x669212
nop
mov esi, dword [ebp - 0x54]
mov eax, edx
xor eax, 1
mov ecx, edx
and ecx, 1
lea eax, [eax + ecx*2]
cmp eax, 0x1000
jb 0x669207
nop
mov edi, dword [esi - 4]
cmp dword [0x869160], 0xae030681
movzx eax, byte [0x7e65a8]
jne 0x6691d4
nop
mov ecx, dword [ebp - 0x5c]
test dword [ebp - 0x60], ecx
setne bl
add bl, bl
add bl, 0xfe
mov ecx, dword [ebp - 0x20]
sub al, cl
mul cl
shl al, cl
mov dword [0x869150], 0xb9411f77
sub al, cl
and al, bl
movzx eax, al
mov ecx, dword [0x889b4c]
sub eax, ecx
add eax, eax
sub eax, ecx
jmp 0x6691ec
nop
cmp dword [0x869150], 0xd8003bc5
jne 0x669118
nop
mov ecx, dword [ebp - 0x28]
lea eax, [ecx + 8]
add eax, dword [ecx + 8]
mov dword [0x869154], 0x91cde086
nop
cmp dword [ebp - 0x34], 0
jg 0x66912b
jmp 0x66904a
nop
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx]
add eax, ecx
nop
cmp dword [ebp - 0x34], 0
jle 0x66904a
nop
mov ecx, dword [0x86915c]
cmp dword [0x869154], 0xfb070755
jne 0x669243
mov dword [ebp - 0x68], ecx
xor edx, edx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x20], 0
mov edi, dword [ebp - 0x24]
jmp 0x6691b1
add edx, esi
add edx, 3
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx]
add eax, ecx
mov dword [ebp - 0x30], 0
nop
mov dword [ebp - 0x2c], 0
xor ecx, ecx
mov esi, dword [ebp - 0x34]
cmp esi, 1
sete cl
mov ebx, dword [ebp - 0x20]
xor bl, byte [ebp - 0x30]
mov dword [ebp - 0x20], ebx
inc edx
xor ebx, ebx
cmp edx, esi
setge bl
cmp dword [ebp - 0x68], 0x8d985426
cmove ecx, ebx
mov esi, 1
cmovne edx, esi
test cl, cl
jne 0x669051
lea ebx, [edi + edx]
mov esi, eax
sub esi, ebx
mov ebx, dword [ebp - 0x2c]
sbb ebx, 0
mov ecx, esi
neg ecx
mov ecx, 0
sbb ecx, ebx
movzx ecx, byte [edi + edx]
jge 0x669160
mov dword [ebp - 0x30], ecx
jmp 0x66917b
nop
sub al, byte [ebp - 0x20]
xor ecx, ecx
mov ebx, dword [ebp - 0x5c]
test dword [ebp - 0x60], ebx
movzx eax, al
cmovne eax, ecx
add eax, dword [0x889b4c]
nop
mov dword [0x889b4c], eax
sub esi, edi
add esi, 0xfffffffc
cmp esi, 0x20
jae 0x669363
add edx, 0x24
mov eax, edx
mov esi, edi
nop
push eax
push esi
call fcn.0071996d
add esp, 8
nop
mov dword [ebp - 0x10], 2
lea ecx, [ebp - 0x7c]
push dword [ebp + 8]
call fcn.00684820
lea ecx, [ebp - 0x7c]
call fcn.00684070
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
add esp, 0x70
pop esi
pop edi
pop ebx
pop ebp
ret 8
cmp ecx, 0x8d985426
jne 0x6692d3
xor ecx, ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x2c], 0
jmp 0x669282
mov edx, dword [ebp - 0x20]
xor dl, bl
mov dword [ebp - 0x20], edx
inc ecx
cmp ecx, dword [ebp - 0x34]
jge 0x669051
nop
mov edx, dword [ebp - 0x24]
lea ebx, [edx + ecx]
mov esi, eax
sub esi, ebx
mov ebx, dword [ebp - 0x30]
sbb ebx, 0
mov edi, esi
neg edi
mov edx, 0
sbb edx, ebx
mov edx, dword [ebp - 0x24]
movzx ebx, byte [edx + ecx]
jl 0x669270
nop
mov edi, dword [ebp - 0x2c]
mov eax, edi
xor eax, 1
and edi, 1
lea edi, [eax + edi*2]
add ecx, esi
add ecx, 3
mov edx, dword [ebp - 0x28]
lea eax, [edx + edi*4]
mov dword [ebp - 0x2c], edi
add eax, dword [edx + edi*4]
xor ebx, ebx
nop
mov dword [ebp - 0x30], 0
jmp 0x669270
nop
cmp dword [ebp - 0x34], 1
mov ecx, dword [ebp - 0x24]
movzx edx, byte [ecx]
mov dword [ebp - 0x20], edx
jne 0x669305
cmp eax, ecx
ja 0x669051
nop
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 4]
mov dword [ebp - 0x10], 3
mov dword [ebp - 0x20], 0
jmp 0x669051
mov edx, ecx
xor ecx, ecx
cmp eax, edx
jbe 0x669311
xor edx, edx
jmp 0x669320
nop
mov edx, dword [ebp - 0x28]
lea eax, [edx + 4]
add eax, dword [edx + 4]
mov edx, 1
inc dword [ebp - 0x24]
mov edi, dword [ebp - 0x24]
nop word cs:[eax + eax]
cmp edi, eax
mov esi, 0
sbb esi, ecx
movzx ebx, byte [edi]
jl 0x669330
mov eax, edx
xor eax, 1
and edx, 1
lea edx, [eax + edx*2]
mov ecx, dword [ebp - 0x28]
lea eax, [ecx + edx*4]
add eax, dword [ecx + edx*4]
xor ecx, ecx
jmp 0x669330
nop
mov dword [ebp - 0x10], 0
call fcn.006fce21
nop
mov dword [ebp - 0x10], 1
call fcn.006fce21
push ebp
sub esp, 0xc
add ebp, 0xc
call fcn.007311e0
nop dword [eax]
push ebp
sub esp, 0xc
add ebp, 0xc
call fcn.007311e0
nop dword [eax]
push ebp
sub esp, 0xc
add ebp, 0xc
nop
mov ecx, dword [ebp - 0x38]
add ecx, dword [0x868f90]
mov eax, dword [0x868f80]
lea esi, [eax + ecx]
add esi, 0x59c5
mov ecx, esi
call dword [0x834360]
lea ecx, [ebp - 0x58]
call esi
add esp, 0xc
pop ebp
ret