//
// PlatformToolbox::saveAndEncryptStringToFile from 0x394ef4 to 0x394fd2 (222 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:46:19 +0000
//
int __fastcall PlatformToolbox::saveAndEncryptStringToFile(int a1, char *a2, char *a3)
{
const char *v6; // r9
int StaticMethodInfo; // r7
const char *v8; // r1
jstring v9; // r8
_JNIEnv *v11[3]; // [sp+Ch] [bp-20h] BYREF
int v12[2]; // [sp+18h] [bp-14h] BYREF
const char *v13; // [sp+20h] [bp-Ch]
v12[0] = 0;
v12[1] = 0;
v13 = nullptr;
std::string::__init(v12, &unk_B6B226, 0);
std::string::append(v12, a3);
std::string::append(v12, a2);
if ( (v12[0] & 1) != 0 )
v6 = v13;
else
v6 = (char *)v12 + 1;
StaticMethodInfo = cocos2d::JniHelper::getStaticMethodInfo(
v11,
"com/customRobTop/SimpleCrypto",
"saveAndEncryptStringToFile",
"(Ljava/lang/String;Ljava/lang/String;)V");
if ( StaticMethodInfo )
{
if ( (*(_BYTE *)a1 & 1) != 0 )
v8 = *(const char **)(a1 + 8);
else
v8 = (const char *)(a1 + 1);
v9 = _JNIEnv::NewStringUTF(v11[0], v8);
if ( (*(_BYTE *)a1 & 1) != 0 )
{
**(_BYTE **)(a1 + 8) = 0;
*(_DWORD *)(a1 + 4) = 0;
}
else
{
*(_BYTE *)(a1 + 1) = 0;
*(_BYTE *)a1 = 0;
}
_JNIEnv::NewStringUTF(v11[0], v6);
_JNIEnv::CallStaticVoidMethod((int)v11[0], (int)v11[1], (int)v11[2], (int)v9);
_JNIEnv::DeleteLocalRef((int)v11[0]);
_JNIEnv::DeleteLocalRef((int)v11[0]);
_JNIEnv::DeleteLocalRef((int)v11[0]);
}
std::string::~string((int)v12);
return StaticMethodInfo;
}