这...... 好家伙只是将获取的数据进行了对比,然后直接返回token, 想复杂了。。。。
int __fastcall Java_com_***_***_***_WhiteBoxNativeImpl_connectionToNativeVerifyDigest(JNIEnv *a1, int a2, int a3, size_t a4, int a5, int a6, size_t a7, int a8, int a9, int a10, int a11)
{
_DWORD *v13;
const char *v14;
const char *v15;
int v16;
const char *v17;
jbyte *v18;
jbyte *v19;
jstring (*v20)(JNIEnv *, const char *);
const char *v21;
const char *v23;
void *v24;
const char *v25;
jbyte *v26;
jbyte *v27;
const char *v28;
const char *v29;
v13 = malloc(0x20u);
v14 = (*a1)->GetStringUTFChars(a1, a9, 0);
v15 = (*a1)->GetStringUTFChars(a1, a5, 0);
if ( !j_readFileFromApk(v14, v15, v13) )
{
_android_log_print(4, "LeosinAcsctl: digest", "can't find file, LINE = %d", 275);
LABEL_8:
v20 = (*a1)->NewStringUTF;
v21 = "can't find file";
return (int)v20(a1, v21);
}
v29 = v14;
v16 = j_calculateDigest(a1, v13, a10);
if ( !v16 || (v17 = (const char *)v16, !v13[4]) )
{
_android_log_print(4, "LeosinAcsctl: digest", "unsupproted signAlg, LINE = %d", 281);
v20 = (*a1)->NewStringUTF;
v21 = "unsupproted signAlg";
return (int)v20(a1, v21);
}
v18 = (*a1)->GetByteArrayElements(a1, a3, 0);
v19 = (jbyte *)malloc(a4);
qmemcpy(v19, v18, a4);
if ( strncmp(v17, v19, a4) )
{
_android_log_print(4, "LeosinAcsctl: digest", "mainfiestFileDigest is wrong, LINE = %d", 290);
v20 = (*a1)->NewStringUTF;
v21 = "mainfiestFileDigest is wrong";
return (int)v20(a1, v21);
}
(*a1)->ReleaseByteArrayElements(a1, (jbyteArray)a3, v18, 2);
(*a1)->ReleaseStringUTFChars(a1, (jstring)a5, v15);
free(v19);
free(v13);
v23 = (*a1)->GetStringUTFChars(a1, a8, 0);
v24 = malloc(0x20u);
if ( !j_readFileFromApk(v29, v23, v24) )
{
_android_log_print(4, "LeosinAcsctl: digest", "can't find file, LINE = %d", 301);
goto LABEL_8;
}
v28 = v23;
v25 = (const char *)j_calculateDigest(a1, v24, a11);
v26 = (*a1)->GetByteArrayElements(a1, a6, 0);
v27 = (jbyte *)malloc(a4);
qmemcpy(v27, v26, a7);
__android_log_print(4, "LeosinAcsctl: digest", "dexClassDigestLen is %d", a7);
__android_log_print(4, "LeosinAcsctl: digest", "dexClassDigestArr is %s", v27);
__android_log_print(4, "LeosinAcsctl: digest", "dexClassDigest is %s", v25);
if ( !strncmp(v27, v25, a7) )
{
(*a1)->ReleaseByteArrayElements(a1, (jbyteArray)a6, v26, 2);
(*a1)->ReleaseStringUTFChars(a1, (jstring)a8, v28);
free(v27);
free(v24);
(*a1)->ReleaseStringUTFChars(a1, (jstring)a9, v29);
v20 = (*a1)->NewStringUTF;
v21 = "****";
}
else
{
_android_log_print(4, "LeosinAcsctl: digest", "can't find file, LINE = %d", 313);
v20 = (*a1)->NewStringUTF;
v21 = "dexclass digest is wrong";
}
return (int)v20(a1, v21);
}