Function at 0x408660
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov esi, 1
mov ebp, 2
xor eax, eax
mov ebx, dword [esp + 0x44]
jmp 0x408683
inc esi
inc ebp
inc eax
movzx ecx, byte [ebx + eax]
movzx edx, cl
lea edi, [edx - 9]
cmp edi, 5
jb 0x408680
cmp edx, 0x20
je 0x408680
mov byte [esp + 3], cl
mov edx, ecx
add dl, 0xd5
test dl, 0xfd
mov edx, 0
sete dl
add edx, ebx
mov dword [esp + 0xc], 0xffffffff
xor edi, edi
mov dword [esp + 8], edx
jmp 0x4086cd
mov edx, dword [esp + 0xc]
inc edi
mov dword [esp + 0xc], edx
mov edx, dword [esp + 8]
lea ebx, [edx + edi]
movzx ecx, byte [eax + ebx]
lea edx, [ecx - 0x30]
cmp edx, 0xa
jb 0x4086c0
mov dword [esp + 0x20], ebx
cmp cl, 0x2e
jne 0x4086ee
mov edx, edi
cmp dword [esp + 0xc], 0
js 0x4086c4
mov dword [esp + 0x24], ecx
xor edx, edx
cmp dword [esp + 0xc], 0
setns dl
jns 0x408702
mov dword [esp + 0xc], edi
mov ecx, edi
mov dword [esp + 0x14], edx
sub ecx, edx
mov edx, ecx
mov dword [esp + 4], ecx
cmp ecx, 0xf
movzx ecx, byte [esp + 3]
mov ebx, dword [esp + 0x44]
jl 0x408723
mov edx, 0xf
test edx, edx
je 0x40874a
cmp edx, 9
mov dword [esp + 0x1c], edi
jle 0x40875b
mov dword [esp + 0x10], edx
mov edi, dword [esp + 8]
lea edx, [edi + esi]
mov ch, byte [edi + esi - 1]
cmp ch, 0x2e
jne 0x40876f
mov ch, byte [edx]
add edi, ebp
jmp 0x408771
mov eax, dword [esp + 0x48]
test eax, eax
je 0x408754
mov dword [eax], ebx
fldz
jmp 0x408a9d
fldz
cmp dword [esp + 4], 0
jle 0x4087a1
mov edi, dword [esp + 8]
add edi, eax
jmp 0x4088de
mov edi, edx
mov edx, dword [esp + 0x10]
movsx ecx, ch
lea ebx, [ecx - 0x30]
cmp edx, 0xb
jl 0x4088d1
mov dword [esp + 0x18], ecx
movzx ecx, byte [edi]
mov byte [esp + 4], cl
cmp cl, 0x2e
jne 0x4087a8
movzx edx, byte [edi + 1]
mov byte [esp + 4], dl
add edi, 2
jmp 0x4087a9
fld st(0)
jmp 0x408926
inc edi
mov ecx, dword [esp + 0x18]
mov edx, ebx
and edx, 0xfffffff5
mov dword [esp + 0x18], edx
and ecx, 0xa
mov edx, ecx
xor edx, 0xa
imul edx, dword [esp + 0x18]
or ebx, 0xa
imul ebx, ecx
movsx ecx, byte [esp + 4]
add ebx, edx
add ebx, ecx
add ebx, 0xffffffd0
cmp dword [esp + 0x10], 0xc
jl 0x4088d1
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x4087ef
mov ch, byte [edi + 1]
add edi, 2
jmp 0x4087f0
inc edi
mov edx, ebx
and edx, 0xfffffff5
mov dword [esp + 4], edx
mov edx, ebx
and edx, 0xa
or ebx, 0xa
imul ebx, edx
xor edx, 0xa
imul edx, dword [esp + 4]
movsx ecx, ch
add ebx, edx
add ebx, ecx
add ebx, 0xffffffd0
cmp dword [esp + 0x10], 0xd
jl 0x4088d1
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x408830
mov ch, byte [edi + 1]
add edi, 2
jmp 0x408831
inc edi
mov edx, ebx
and edx, 0xfffffff5
mov dword [esp + 4], edx
mov edx, ebx
and edx, 0xa
or ebx, 0xa
imul ebx, edx
xor edx, 0xa
imul edx, dword [esp + 4]
movsx ecx, ch
add ebx, edx
add ebx, ecx
add ebx, 0xffffffd0
cmp dword [esp + 0x10], 0xe
jl 0x4088d1
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x40886d
mov ch, byte [edi + 1]
add edi, 2
jmp 0x40886e
inc edi
mov edx, ebx
and edx, 0xfffffff5
mov dword [esp + 4], edx
mov edx, ebx
and edx, 0xa
or ebx, 0xa
imul ebx, edx
xor edx, 0xa
imul edx, dword [esp + 4]
movsx ecx, ch
add ebx, edx
add ebx, ecx
add ebx, 0xffffffd0
cmp dword [esp + 0x10], 0xf
jl 0x4088d1
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x4088aa
mov ch, byte [edi + 1]
add edi, 2
jmp 0x4088ab
inc edi
mov edx, ebx
and edx, 0xfffffff5
mov dword [esp + 4], edx
mov edx, ebx
and edx, 0xa
or ebx, 0xa
imul ebx, edx
xor edx, 0xa
imul edx, dword [esp + 4]
movsx ecx, ch
add ebx, edx
add ebx, ecx
add ebx, 0xffffffd0
mov dword [esp + 0x2c], ebx
mov edx, 9
fild dword [esp + 0x2c]
inc edx
xor ebx, ebx
jmp 0x408914
mov ch, byte [edi + 1]
add edi, 2
mov dword [esp + 4], edi
lea ebx, [ebx + ebx*4]
movsx edi, ch
lea ebx, [edi + ebx*2]
add ebx, 0xffffffd0
mov ecx, edx
dec ecx
mov edx, ecx
cmp ecx, 1
mov edi, dword [esp + 4]
jle 0x40891e
mov ch, byte [edi]
cmp ch, 0x2e
je 0x4088f0
inc edi
jmp 0x4088f6
mov dword [esp + 0x28], ebx
fild dword [esp + 0x28]
mov edi, dword [esp + 8]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x20]
fxch st(1)
fmul dword [str._knN]
neg edx
faddp st(1)
mov ecx, dword [esp + 0x24]
or ecx, 0x20
cmp ecx, 0x65
jne 0x40896e
mov dword [esp + 0x14], edx
movzx edx, byte [eax + ebx + 1]
mov eax, edx
add al, 0xd5
test al, 0xfd
je 0x408985
mov edi, dword [esp + 8]
add edi, esi
mov eax, edi
mov ebx, dword [esp + 0x1c]
lea ebp, [edi + ebx]
mov edi, ebx
jmp 0x408994
add eax, dword [esp + 0x1c]
add edi, eax
mov dword [esp + 8], edi
xor eax, eax
mov ebp, dword [esp + 0xc]
movzx ecx, byte [esp + 3]
jmp 0x4089f3
mov esi, dword [esp + 8]
add esi, ebp
mov eax, esi
mov edi, dword [esp + 0x1c]
lea ebp, [esi + edi]
movzx ecx, byte [esp + 3]
movzx ebx, byte [eax + edi]
lea esi, [ebx - 0x30]
xor eax, eax
cmp esi, 9
ja 0x4089e0
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
mov esi, eax
and esi, 0xfffffff5
mov edi, eax
and edi, 0xa
or eax, 0xa
imul eax, edi
xor edi, 0xa
imul edi, esi
movsx esi, bl
add esi, eax
lea eax, [edi + esi]
add eax, 0xffffffd0
movzx ebx, byte [ebp + 1]
inc ebp
mov esi, ebx
add esi, 0xffffffd0
cmp esi, 0xa
jb 0x4089b0
mov dword [esp + 8], ebp
cmp dl, 0x2d
jne 0x4089eb
neg eax
mov ebp, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
mov ebx, edx
add edx, edi
cmp edx, 0x10
jge 0x408a05
mov edx, 0xf
add ebp, eax
add ebp, edx
mov eax, ebp
sub eax, ebx
sub eax, edi
add eax, 0xfffffff1
mov esi, eax
sar esi, 0x1f
mov edx, eax
xor edx, esi
sub edx, esi
cmp edx, 0x200
jl 0x408a3c
mov edx, 0x1ff
mov esi, dword [esp + 0x4c]
test esi, esi
je 0x408a38
mov dword [esi], 0x22
fldz
jmp 0x408a4a
sub ebx, ebp
lea esi, [ebx + edi]
add esi, 0xf
fld1
test esi, esi
je 0x408a77
fstp st(0)
fld1
mov esi, 0x43e3f0
jmp 0x408a6e
mov ebx, edx
sar ebx, 1
add esi, 8
cmp edx, 2
mov edx, ebx
jb 0x408a77
test dl, 1
je 0x408a60
fmul qword [esi]
jmp 0x408a60
fld st(1)
fmul st(1)
test eax, eax
jns 0x408a8b
fstp st(0)
fdivp st(1)
fldz
fldz
fxch st(1)
fxch st(2)
fstp st(2)
fstp st(0)
mov eax, dword [esp + 0x48]
test eax, eax
mov edi, dword [esp + 8]
je 0x408a9d
mov dword [eax], edi
fld st(0)
fchs
cmp cl, 0x2d
je 0x408aac
fstp st(0)
fldz
fxch st(1)
fstp st(1)
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret