//
// sub_77458C from 0x77458c to 0x7745d8 (76 bytes)
//
// 57 xrefs:
// > GameToolbox::createHashString @ 0x2ecf62
// > GameToolbox::gen_random @ 0x2ed210
// > CCTextInputNode::onTextFieldInsertText @ 0x2faef2
// > base64_encode @ 0x3073d8
// > base64_encode @ 0x307448
// > base64_encode @ 0x30745a
// > GameLevelManager::onGetOnlineLevelsCompleted @ 0x3c6708
// > GameLevelManager::onGetOnlineLevelsCompleted @ 0x3c671c
// > GameLevelManager::processOnDownloadLevelCompleted @ 0x3c7542
// > GameLevelManager::onGetMapPacksCompleted @ 0x3ca028
// > GameLevelManager::onGetMapPacksCompleted @ 0x3ca03c
// > GameLevelManager::uploadLevel @ 0x3cf8d0
// > GameLevelManager::uploadLevelList @ 0x3d5010
// > GJSmartTemplate::keyFromNeighbors @ 0x53a0ee
// > GJSmartTemplate::keyFromNeighbors @ 0x53a0f6
// > GJSmartTemplate::keyFromNeighbors @ 0x53a0fe
// > GJSmartTemplate::keyFromNeighbors @ 0x53a108
// > GJSmartTemplate::keyFromNeighbors @ 0x53a112
// > GJSmartTemplate::keyFromNeighbors @ 0x53a11c
// > GJSmartTemplate::keyFromNeighbors @ 0x53a126
// > GJSmartTemplate::keyFromNeighbors @ 0x53a130
// > GJSmartTemplate::keyFromNeighbors @ 0x53a13a
// > pugi::xml_node::path @ 0x603e4c
// > sub_74E068 @ 0x74e318
// > sub_74E068 @ 0x74e34c
// > sub_74E484 @ 0x74e762
// > sub_74E484 @ 0x74e796
// > sub_7512BC @ 0x751996
// > sub_751BE0 @ 0x7522ba
// > sub_75275C @ 0x752b32
// > sub_75275C @ 0x752bca
// > sub_75275C @ 0x752cca
// > sub_75275C @ 0x752ce8
// > sub_75275C @ 0x752d12
// > sub_75275C @ 0x752e60
// > sub_75275C @ 0x7530a0
// > sub_753514 @ 0x753a68
// > sub_753EC4 @ 0x7543f0
// > sub_754588 @ 0x754a9e
// > sub_754C30 @ 0x755146
// > sub_755338 @ 0x7558e8
// > sub_755AA0 @ 0x756022
// > sub_768DC8 @ 0x769470
// > sub_7696C4 @ 0x769d6c
// > sub_76A1F8 @ 0x76a6a4
// > sub_76A1F8 @ 0x76a6e6
// > sub_76A1F8 @ 0x76a6ee
// > sub_76A1F8 @ 0x76a76c
// > sub_76A1F8 @ 0x76a7b4
// > sub_76A1F8 @ 0x76a848
// > sub_76A1F8 @ 0x76aa2e
// > sub_76AEE0 @ 0x76b430
// > sub_76B8A0 @ 0x76bdec
// > sub_76BF44 @ 0x76c47a
// > sub_76C5CC @ 0x76cb02
// > sub_76CCB4 @ 0x76d290
// > sub_76D404 @ 0x76d9b0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int **__fastcall sub_77458C(int **result, char a2)
{
int *v2; // r3
int v4; // r2
int **v5; // r4
int v6; // r5
int *v7; // r2
v2 = *result;
v4 = *(*result - 3);
v5 = result;
v6 = v4 + 1;
if ( v4 + 1 > (unsigned int)*(*result - 2) || *(v2 - 1) > 0 )
{
sub_7740F8((_BYTE **)result, v4 + 1);
v2 = *v5;
v4 = *(*v5 - 3);
}
*((_BYTE *)v2 + v4) = a2;
v7 = *v5;
if ( *v5 - 3 != &dword_ACDD9C )
{
*(v7 - 3) = v6;
*(v7 - 1) = 0;
*((_BYTE *)v7 + v6) = 0;
}
return result;
}