//
// sub_1004A9F60 from 0x1004a9f60 to 0x1004a9fa6 (70 bytes)
//
// 89 xrefs:
// > ??> @ 0x100aba398
// > ??> @ 0x100abaa68
// > ??> @ 0x100abb1f8
// > ??> @ 0x100ac4000
// > ??> @ 0x100ac4698
// > ??> @ 0x100ac52a8
// > ??> @ 0x100ac5868
// > ??> @ 0x100ac5f60
// > ??> @ 0x100ae7b48
// > ??> @ 0x100ae80d8
// > ??> @ 0x100ae8668
// > ??> @ 0x100ae8bf8
// > ??> @ 0x100ae9188
// > ??> @ 0x100ae9738
// > ??> @ 0x100ae9d40
// > ??> @ 0x100aea350
// > ??> @ 0x100aea910
// > ??> @ 0x100aeaea0
// > ??> @ 0x100aeb440
// > ??> @ 0x100aeba08
// > ??> @ 0x100aebfb0
// > ??> @ 0x100aec540
// > ??> @ 0x100aecad0
// > ??> @ 0x100aed060
// > ??> @ 0x100aed5f0
// > ??> @ 0x100aedb88
// > ??> @ 0x100aee150
// > ??> @ 0x100aee730
// > ??> @ 0x100aeecc0
// > ??> @ 0x100aef250
// > ??> @ 0x100aef838
// > ??> @ 0x100affe10
// > ??> @ 0x100b13b18
// > ??> @ 0x100b14140
// > ??> @ 0x100b16ce8
// > ??> @ 0x100b172f0
// > ??> @ 0x100b17880
// > ??> @ 0x100b1d968
// > ??> @ 0x100b1e128
// > ??> @ 0x100b1e8b0
// > ??> @ 0x100b1efc0
// > ??> @ 0x100b1ff58
// > ??> @ 0x100b23718
// > ??> @ 0x100b2d200
// > ??> @ 0x100b2f0a0
// > ??> @ 0x100b2f758
// > ??> @ 0x100b2fd88
// > ??> @ 0x100b30378
// > ??> @ 0x100b30fb8
// > ??> @ 0x100b37d38
// > ??> @ 0x100b3be60
// > ??> @ 0x100b3d250
// > ??> @ 0x100b3f790
// > ??> @ 0x100b3fe28
// > ??> @ 0x100b40fa8
// > ??> @ 0x100b43fc0
// > ??> @ 0x100b44e80
// > ??> @ 0x100b45fa0
// > ??> @ 0x100b514c8
// > ??> @ 0x100b52830
// > ??> @ 0x100b53960
// > ??> @ 0x100b53fa8
// > ??> @ 0x100b545a8
// > ??> @ 0x100b54c50
// > ??> @ 0x100b55280
// > ??> @ 0x100b55a10
// > ??> @ 0x100b59480
// > ??> @ 0x100b64240
// > ??> @ 0x100b71540
// > ??> @ 0x100b80418
// > ??> @ 0x100b81270
// > ??> @ 0x100b81800
// > ??> @ 0x100b81da8
// > ??> @ 0x100b85c30
// > ??> @ 0x100b898d0
// > ??> @ 0x100b8a378
// > ??> @ 0x100b8c978
// > ??> @ 0x100b8cf38
// > ??> @ 0x100b8d4e8
// > ??> @ 0x100b96460
// > ??> @ 0x100b979c8
// > ??> @ 0x100b9e3f8
// > ??> @ 0x100ba0b10
// > ??> @ 0x100ba6660
// > ??> @ 0x100ba6cc8
// > ??> @ 0x100babbc0
// > ??> @ 0x100bb5a08
// > ??> @ 0x100bcde28
// > ??> @ 0x100bcef00
//
// 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 12:30:56 +0000
//
__int64 __fastcall sub_1004A9F60(__int64 a1)
{
_QWORD *v1; // rax
__int64 result; // rax
if ( *(_QWORD *)(a1 + 40) || *(_DWORD *)(a1 - 36) == 2 )
{
v1 = cocos2d::CCScriptEngineManager::sharedManager();
return (*(__int64 (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*v1 + 128LL))(*v1, a1 - 336, 1);
}
return result;
}