Function at 0x4089a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov esi, 1
mov ebp, 2
xor eax, eax
mov ebx, dword [esp + 0x40]
jmp 0x4089c3
inc esi
inc ebp
inc eax
movzx ecx, byte [ebx + eax]
movzx edx, cl
lea edi, [edx - 9]
cmp edi, 5
jb 0x4089c0
cmp edx, 0x20
je 0x4089c0
mov byte [esp + 2], cl
mov edx, ecx
add dl, 0xd5
test dl, 0xfd
mov edx, 0
sete dl
add edx, ebx
xor edi, edi
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], edx
jmp 0x408a0d
mov edx, dword [esp + 8]
inc edi
mov dword [esp + 8], edx
mov edx, dword [esp + 4]
lea ebx, [edx + edi]
movzx ecx, byte [eax + ebx]
lea edx, [ecx - 0x30]
cmp edx, 0xa
jb 0x408a00
mov dword [esp + 0x1c], ebx
cmp cl, 0x2e
jne 0x408a2e
mov edx, edi
cmp dword [esp + 8], 0
js 0x408a04
mov dword [esp + 0x20], ecx
cmp dword [esp + 8], 0
setns ch
jns 0x408a40
mov dword [esp + 8], edi
xor edx, edx
mov dl, ch
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edx
sub edi, edx
mov ebx, edi
cmp edi, 0xf
movzx ecx, byte [esp + 2]
jl 0x408a5f
mov ebx, 0xf
test ebx, ebx
mov edx, dword [esp + 4]
je 0x408aab
cmp ebx, 9
jle 0x408ac0
lea edi, [edx + esi]
mov ch, byte [edx + esi - 1]
cmp ch, 0x2e
mov dword [esp + 0x18], esi
jne 0x408a83
mov ch, byte [edi]
mov esi, ebx
lea edi, [edx + ebp]
movsx ecx, ch
lea esi, [ecx - 0x30]
cmp ebx, 0xb
jl 0x408bf2
movzx edx, byte [edi]
cmp dl, 0x2e
mov dword [esp + 0xc], ebx
jne 0x408ae1
movzx edx, byte [edi + 1]
mov byte [esp + 3], dl
add edi, 2
jmp 0x408ae6
mov eax, dword [esp + 0x44]
test eax, eax
je 0x408ab9
mov edx, dword [esp + 0x40]
mov dword [eax], edx
fldz
jmp 0x408ddd
fldz
test edi, edi
jle 0x408ad2
mov dword [esp + 0x18], esi
lea edi, [edx + eax]
jmp 0x408bff
fld st(0)
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
jmp 0x408c6a
inc edi
mov byte [esp + 3], dl
mov edx, esi
and edx, 0xfffffff5
and ecx, 0xa
mov ebx, ecx
xor ebx, 0xa
imul ebx, edx
or esi, 0xa
imul esi, ecx
movsx ecx, byte [esp + 3]
add esi, ebx
add esi, ecx
add esi, 0xffffffd0
mov edx, dword [esp + 0xc]
cmp edx, 0xc
jl 0x408bf2
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x408b24
mov ch, byte [edi + 1]
add edi, 2
jmp 0x408b25
inc edi
mov edx, esi
and edx, 0xfffffff5
mov ebx, esi
and ebx, 0xa
or esi, 0xa
imul esi, ebx
xor ebx, 0xa
imul ebx, edx
movsx ecx, ch
add esi, ebx
add esi, ecx
add esi, 0xffffffd0
mov edx, dword [esp + 0xc]
cmp edx, 0xd
jl 0x408bf2
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x408b61
mov ch, byte [edi + 1]
add edi, 2
jmp 0x408b62
inc edi
mov edx, esi
and edx, 0xfffffff5
mov ebx, esi
and ebx, 0xa
or esi, 0xa
imul esi, ebx
xor ebx, 0xa
imul ebx, edx
movsx ecx, ch
add esi, ebx
add esi, ecx
add esi, 0xffffffd0
mov edx, dword [esp + 0xc]
cmp edx, 0xe
jl 0x408bf2
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x408b9a
mov ch, byte [edi + 1]
add edi, 2
jmp 0x408b9b
inc edi
mov edx, esi
and edx, 0xfffffff5
mov ebx, esi
and ebx, 0xa
or esi, 0xa
imul esi, ebx
xor ebx, 0xa
imul ebx, edx
movsx ecx, ch
add esi, ebx
add esi, ecx
add esi, 0xffffffd0
cmp dword [esp + 0xc], 0xf
jl 0x408bf2
mov ch, byte [edi]
cmp ch, 0x2e
jne 0x408bd1
mov ch, byte [edi + 1]
add edi, 2
jmp 0x408bd2
inc edi
mov ebx, esi
and ebx, 0xfffffff5
mov edx, esi
and edx, 0xa
or esi, 0xa
imul esi, edx
xor edx, 0xa
imul edx, ebx
movsx ebx, ch
add esi, edx
add esi, ebx
add esi, 0xffffffd0
mov dword [esp + 0x28], esi
mov ebx, 9
fild dword [esp + 0x28]
inc ebx
mov esi, ebx
xor ebx, ebx
jmp 0x408c4c
mov ch, byte [edi + 1]
add edi, 2
mov dword [esp + 0xc], edi
mov edi, ebx
and edi, 0xa
mov edx, ebx
or ebx, 0xa
imul ebx, edi
xor edi, 0xa
and edx, 0xfffffff5
imul edx, edi
movsx edi, ch
add ebx, edx
add ebx, edi
add ebx, 0xffffffd0
mov ecx, esi
dec ecx
mov esi, ecx
cmp ecx, 1
mov edx, dword [esp + 4]
mov edi, dword [esp + 0xc]
jle 0x408c56
mov ch, byte [edi]
cmp ch, 0x2e
je 0x408c10
inc edi
jmp 0x408c16
mov dword [esp + 0x24], ebx
fild dword [esp + 0x24]
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
fxch st(1)
fmul dword [str._knN]
neg edi
faddp st(1)
mov ecx, dword [esp + 0x20]
or ecx, 0x20
cmp ecx, 0x65
mov dword [esp + 0x14], edi
jne 0x408ca6
movzx edx, byte [eax + ebx + 1]
mov eax, edx
add al, 0xd5
test al, 0xfd
je 0x408cbd
mov edi, dword [esp + 4]
add edi, esi
mov eax, edi
mov ebx, dword [esp + 0x10]
lea ebp, [edi + ebx]
mov edi, ebx
jmp 0x408ccc
add eax, dword [esp + 0x10]
add edx, eax
mov dword [esp + 4], edx
xor eax, eax
mov ebp, dword [esp + 8]
movzx ecx, byte [esp + 2]
jmp 0x408d2e
mov esi, dword [esp + 4]
add esi, ebp
mov eax, esi
mov edi, dword [esp + 0x10]
lea ebp, [esi + edi]
movzx ecx, byte [esp + 2]
movzx ebx, byte [eax + edi]
lea esi, [ebx - 0x30]
xor eax, eax
cmp esi, 9
ja 0x408d1f
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
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 eax, edi
add eax, esi
add eax, 0xffffffd0
movzx ebx, byte [ebp + 1]
inc ebp
mov esi, ebx
add esi, 0xffffffd0
cmp esi, 0xa
jb 0x408cf0
mov dword [esp + 4], ebp
cmp dl, 0x2d
jne 0x408d2a
neg eax
mov ebp, dword [esp + 8]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
lea edx, [edi + ebx]
cmp edx, 0x10
jge 0x408d43
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
jb 0x408d7a
mov edx, 0x1ff
mov esi, dword [esp + 0x48]
test esi, esi
je 0x408d76
mov dword [esi], 0x22
fldz
jmp 0x408d88
sub ebx, ebp
lea esi, [ebx + edi]
add esi, 0xf
fld1
test esi, esi
je 0x408db7
fstp st(0)
fld1
mov esi, 0x43d3f0
jmp 0x408dae
mov ebx, edx
shr ebx, 1
add esi, 8
cmp edx, 2
mov edx, ebx
jb 0x408db7
test dl, 1
je 0x408da0
fmul qword [esi]
jmp 0x408da0
fld st(1)
fmul st(1)
test eax, eax
jns 0x408dcb
fstp st(0)
fdivp st(1)
fldz
fldz
fxch st(1)
fxch st(2)
fstp st(2)
fstp st(0)
mov eax, dword [esp + 0x44]
test eax, eax
mov edi, dword [esp + 4]
je 0x408ddd
mov dword [eax], edi
fld st(0)
fchs
cmp cl, 0x2d
je 0x408dec
fstp st(0)
fldz
fxch st(1)
fstp st(1)
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret