//
// GJAccountManager::getShaPassword from 0x98a560 to 0x98a6c8 (360 bytes)
//
// 3 xrefs:
// > GJAccountManager::dataLoaded @ 0x98a864
// > AccountLoginLayer::onSubmit @ 0x9924d4
// > ??> @ 0x59a28
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:57:55 +0000
//
__int64 *__usercall GJAccountManager::getShaPassword@(char *a1@, __int64 *a2@)
{
char v4; // w0
__int64 v5; // x0
__int64 v6; // x1
cocos2d::CCString *v7; // x0
size_t v8; // x0
char *v9; // x19
unsigned int v10; // w0
unsigned __int8 *v11; // x3
char *v12; // x2
size_t v13; // x0
char *CString; // [xsp+38h] [xbp+38h]
__int64 v16; // [xsp+48h] [xbp+48h] BYREF
__int64 v17; // [xsp+50h] [xbp+50h]
void *v18; // [xsp+58h] [xbp+58h]
unsigned __int8 v19[24]; // [xsp+60h] [xbp+60h] BYREF
unsigned __int8 v20[48]; // [xsp+78h] [xbp+78h] BYREF
v16 = 0;
v4 = *a1;
v17 = 0;
v18 = nullptr;
if ( (v4 & 1) != 0 )
{
std::string::__init(&v16, *((void **)a1 + 2), *((_QWORD *)a1 + 1));
}
else
{
v5 = *(_QWORD *)a1;
v6 = *((_QWORD *)a1 + 1);
v18 = *((void **)a1 + 2);
v16 = v5;
v17 = v6;
}
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&qword_68 + 5,
"I29",
"fmAn",
120,
103,
"Ts");
CString = (char *)cocos2d::CCString::getCString(v7);
v8 = strlen(CString);
std::string::append((__int64)&v16, CString, v8);
v9 = (char *)&v16 + 1;
if ( (v16 & 1) != 0 )
v9 = (char *)v18;
v10 = strlen(v9);
rtsha1::calc((rtsha1 *)v9, (const void *)v10, (__int64)v19, v11);
rtsha1::toHexString((rtsha1 *)v19, v20, v12);
*a2 = 0;
a2[1] = 0;
a2[2] = 0;
v13 = strlen((const char *)v20);
std::string::__init(a2, v20, v13);
if ( (v16 & 1) != 0 )
operator delete(v18);
return a2;
}