//
// sub_1004B0D80 from 0x1004b0d80 to 0x1004b0dc6 (70 bytes)
//
// 81 xrefs:
// > ??> @ 0x1008b0e20
// > ??> @ 0x1008b1498
// > ??> @ 0x1008b1a20
// > ??> @ 0x1008b6cc0
// > ??> @ 0x1008b7518
// > ??> @ 0x1008c0858
// > ??> @ 0x1008c0ec8
// > ??> @ 0x1008c1a80
// > ??> @ 0x1008c2018
// > ??> @ 0x1008c26f0
// > ??> @ 0x1008e33f8
// > ??> @ 0x1008e3968
// > ??> @ 0x1008e3ed8
// > ??> @ 0x1008e4448
// > ??> @ 0x1008e49b8
// > ??> @ 0x1008e4f48
// > ??> @ 0x1008e54f8
// > ??> @ 0x1008e5ab0
// > ??> @ 0x1008e6050
// > ??> @ 0x1008e65c0
// > ??> @ 0x1008e6b40
// > ??> @ 0x1008e70e8
// > ??> @ 0x1008e7670
// > ??> @ 0x1008e7be0
// > ??> @ 0x1008e8170
// > ??> @ 0x1008e8750
// > ??> @ 0x1008e8d30
// > ??> @ 0x1008e92f0
// > ??> @ 0x1008e9860
// > ??> @ 0x1008e9dd0
// > ??> @ 0x1008ea398
// > ??> @ 0x1008f92f8
// > ??> @ 0x10090c158
// > ??> @ 0x10090c760
// > ??> @ 0x10090f1c0
// > ??> @ 0x10090f7a8
// > ??> @ 0x10090fd18
// > ??> @ 0x100915b18
// > ??> @ 0x1009162b8
// > ??> @ 0x100916a20
// > ??> @ 0x100917110
// > ??> @ 0x100918058
// > ??> @ 0x10091b578
// > ??> @ 0x100924c38
// > ??> @ 0x100926a28
// > ??> @ 0x1009270c0
// > ??> @ 0x1009276c8
// > ??> @ 0x100927c50
// > ??> @ 0x100928860
// > ??> @ 0x10092f408
// > ??> @ 0x1009322f0
// > ??> @ 0x100933680
// > ??> @ 0x100935ad8
// > ??> @ 0x100936148
// > ??> @ 0x1009371b8
// > ??> @ 0x100939e68
// > ??> @ 0x10093ace8
// > ??> @ 0x10093bdb8
// > ??> @ 0x100946718
// > ??> @ 0x100947a20
// > ??> @ 0x100948b00
// > ??> @ 0x100949128
// > ??> @ 0x100949708
// > ??> @ 0x100949d90
// > ??> @ 0x10094a3a0
// > ??> @ 0x10094ab10
// > ??> @ 0x10094e400
// > ??> @ 0x100958be0
// > ??> @ 0x100964020
// > ??> @ 0x100973168
// > ??> @ 0x100976c70
// > ??> @ 0x100979580
// > ??> @ 0x100979b20
// > ??> @ 0x10097a0b0
// > ??> @ 0x1009828b8
// > ??> @ 0x100983d30
// > ??> @ 0x10098a020
// > ??> @ 0x10098c5c8
// > ??> @ 0x100990f68
// > ??> @ 0x1009915b0
// > ??> @ 0x100995988
//
// 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
//
__int64 __fastcall sub_1004B0D80(__int64 a1)
{
cocos2d::CCScriptEngineManager *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))(*(_QWORD *)v1, a1 - 336, 1);
}
return result;
}