Logre abrir un programa en fox y llegue al siguiente algoritmo, necesito que me ayuden a ver que hace este codigo necesito saber el numero de permiso. Gracias
PROCEDURE Click
n = thisform.text2.value
r = ''
j = 15
FOR i = 1 TO 16
r = r + ALLTRIM(STR(INT(n / (10 ^ j))))
n = thisform.text2.value - VAL(r) * (10 ^ j)
j = j - 1
ENDFOR
p = ALLTRIM(thisform.text4.value)
paux = ''
aux = VAL(CHR(ASC(RIGHT(r, 10)))) + VAL(CHR(ASC(RIGHT(r, 9))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 12)))) + VAL(CHR(ASC(RIGHT(r, 8))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 16)))) + VAL(CHR(ASC(RIGHT(r, 11))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 15)))) + VAL(CHR(ASC(RIGHT(r, 13))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 14)))) + VAL(CHR(ASC(RIGHT(r, 6))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 4)))) + VAL(CHR(ASC(RIGHT(r, 1))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 5)))) + VAL(CHR(ASC(RIGHT(r, 7))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 3)))) + VAL(CHR(ASC(RIGHT(r, 2))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
IF ALLTRIM(paux) = ALLTRIM(p)
WAIT WINDOW 'Número de Permiso correcto'
SELECT directoriosistema
dd = ALLTRIM(ubicacion1) + "kcpwin.dll"
ddd = ALLTRIM(ubicacion2) + "niwpck.win"
arch = FOPEN(dd, 1)
FPUTS(arch, ALLTRIM(thisform.text1.value))
FPUTS(arch, 'fab')
FCLOSE(arch)
arch = FCREATE(ddd)
FPUTS(arch, 'sd2=)f}´ds{oil]]u43oiA-/pf$#%6430U9Dñá8ÜFB,-sfd')
FCLOSE(arch)
registro123 = .T.
USE permiso_opcion
IF donde = .T.
DO FORM clave
SELECT permiso_opcion
ENDIF
RELEASE thisform
ELSE
IF ALLTRIM(thisform.text4.value) = '2547896245'
IF donde = .T.
IF limite() = .F.
WAIT WINDOW 'Número de Permiso incorrecto'
PROCEDURE Click
n = thisform.text2.value
r = ''
j = 15
FOR i = 1 TO 16
r = r + ALLTRIM(STR(INT(n / (10 ^ j))))
n = thisform.text2.value - VAL(r) * (10 ^ j)
j = j - 1
ENDFOR
p = ALLTRIM(thisform.text4.value)
paux = ''
aux = VAL(CHR(ASC(RIGHT(r, 10)))) + VAL(CHR(ASC(RIGHT(r, 9))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 12)))) + VAL(CHR(ASC(RIGHT(r, 8))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 16)))) + VAL(CHR(ASC(RIGHT(r, 11))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 15)))) + VAL(CHR(ASC(RIGHT(r, 13))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 14)))) + VAL(CHR(ASC(RIGHT(r, 6))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 4)))) + VAL(CHR(ASC(RIGHT(r, 1))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 5)))) + VAL(CHR(ASC(RIGHT(r, 7))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
aux = VAL(CHR(ASC(RIGHT(r, 3)))) + VAL(CHR(ASC(RIGHT(r, 2))))
IF aux > 9
a = aux
b = INT((a - INT(a / 10) * 10))
aux = b + INT(aux / 10)
ENDIF
paux = paux + LTRIM(STR(aux))
IF ALLTRIM(paux) = ALLTRIM(p)
WAIT WINDOW 'Número de Permiso correcto'
SELECT directoriosistema
dd = ALLTRIM(ubicacion1) + "kcpwin.dll"
ddd = ALLTRIM(ubicacion2) + "niwpck.win"
arch = FOPEN(dd, 1)
FPUTS(arch, ALLTRIM(thisform.text1.value))
FPUTS(arch, 'fab')
FCLOSE(arch)
arch = FCREATE(ddd)
FPUTS(arch, 'sd2=)f}´ds{oil]]u43oiA-/pf$#%6430U9Dñá8ÜFB,-sfd')
FCLOSE(arch)
registro123 = .T.
USE permiso_opcion
IF donde = .T.
DO FORM clave
SELECT permiso_opcion
ENDIF
RELEASE thisform
ELSE
IF ALLTRIM(thisform.text4.value) = '2547896245'
IF donde = .T.
IF limite() = .F.
WAIT WINDOW 'Número de Permiso incorrecto'