//
// sub_140099FC0 from 0x140099fc0 to 0x14009a0d0 (272 bytes)
//
// 48 xrefs:
// > AudioAssetsBrowser::init @ 0x140098fc6
// > AudioAssetsBrowser::init @ 0x140098fd5
// > AdminActionConfirmPopup::init @ 0x1400a5db2
// > ReportPopup::init @ 0x1400c09ad
// > DeathTrackerPopup::refreshView @ 0x140106c2e
// > DeathMarkerLayer::init @ 0x140116652
// > GJBaseGameLayer::spawnObjectsInOrder @ 0x1403226fa
// > GJBaseGameLayer::activateTimerTrigger @ 0x14033de4e
// > GJEffectManager::registerCollisionTrigger @ 0x140366783
// > GJEffectManager::createKeyframeCommand @ 0x14036714a
// > GJEffectManager::spawnGroup @ 0x14036c564
// > sub_14036D630 @ 0x14036d689
// > GJEffectManager::startTimer @ 0x14036d856
// > GJEffectManager::loadFromState @ 0x14036f114
// > sub_140371120 @ 0x140371205
// > sub_140371120 @ 0x140371295
// > sub_1403712F0 @ 0x14037140b
// > sub_1403712F0 @ 0x1403714c6
// > sub_140371520 @ 0x140371748
// > sub_140371520 @ 0x140371828
// > sub_140371890 @ 0x140371aba
// > sub_140371890 @ 0x140371b99
// > sub_140373E00 @ 0x1403741b4
// > sub_1403741E0 @ 0x14037434d
// > sub_140374F40 @ 0x1403750ab
// > sub_140375140 @ 0x140375294
// > sub_140375320 @ 0x1403754a4
// > sub_140375540 @ 0x140375684
// > sub_140375720 @ 0x14037586c
// > sub_140375D50 @ 0x140375eb5
// > sub_140379B20 @ 0x140379d48
// > sub_140379B20 @ 0x140379e28
// > sub_140379E90 @ 0x14037a098
// > sub_140379E90 @ 0x14037a18f
// > sub_140514770 @ 0x1405151dc
// > sub_140514770 @ 0x1405151ef
// > PlayLayer::writePersistentSave @ 0x1405181a1
// > PlayLayer::loadPersistentCheckpoint @ 0x14051851f
// > sub_14051CEC0 @ 0x14051d0a3
// > sub_14051DB30 @ 0x14051db77
// > EffectGameObject::triggerObject @ 0x14064851a
// > EffectGameObject::triggerObject @ 0x1406487d0
// > SpawnTriggerGameObject::updateRemapKeys @ 0x14065a22b
// > CountTriggerGameObject::triggerObject @ 0x14065c63c
// > ??> @ 0x14088d278
// > ??> @ 0x14088d2e0
// > ??> @ 0x14088d2f0
// > ??> @ 0x140912ddc
//
// This function is hookable on this platform (idp: pc, 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 11:26:04 +0000
//
void **__fastcall sub_140099FC0(void **a1, char **a2)
{
char *v3; // rdi
char *v4; // r15
unsigned __int64 v5; // rbx
char *v6; // rdi
size_t v7; // rbx
unsigned __int64 v9; // rbp
size_t v10; // rbx
if ( a1 == (void **)a2 )
return a1;
v3 = (char *)*a1;
v4 = *a2;
v5 = (a2[1] - *a2) >> 2;
if ( v5 <= ((_BYTE *)a1[2] - (_BYTE *)*a1) >> 2 )
{
v9 = ((_BYTE *)a1[1] - v3) >> 2;
if ( v5 <= v9 )
{
v10 = 4 * v5;
memmove(v3, v4, v10);
}
else
{
memmove(v3, v4, 4 * v9);
v3 = (char *)a1[1];
v10 = 4 * (v5 - v9);
memmove(v3, &v4[4 * v9], v10);
}
a1[1] = &v3[v10];
return a1;
}
else
{
sub_14009A0D0(a1, v5);
v6 = (char *)*a1;
v7 = 4 * v5;
memmove(*a1, v4, v7);
a1[1] = &v6[v7];
return a1;
}
}