//
// GJGameState::getGameObjectPhysics from 0x140205660 to 0x14020579a (314 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::processAdvancedFollowAction @ 0x14022f557
// > ??> @ 0x1406ccc90
//
// 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
//
GameObjectPhysics *GJGameState::getGameObjectPhysics(GJGameState *a1, GameObject *a2)
{
std::_List_val>>::_Nodeptr Myhead; // rdx
std::_Vector_val>>>>>::pointer Myfirst; // r8
unsigned __int64 v6; // rcx
std::_List_unchecked_const_iterator>>, std::_Iterator_base0>::_Nodeptr Ptr; // rax
std::_List_unchecked_const_iterator>>, std::_Iterator_base0>::_Nodeptr v8; // rcx
GameObjectPhysics *result; // rax
__int64 v10; // [rsp+20h] [rbp-48h] BYREF
__int64 v11; // [rsp+30h] [rbp-38h] BYREF
cocos2d::CCPoint v12; // [rsp+38h] [rbp-30h] BYREF
cocos2d::CCPoint v13[3]; // [rsp+40h] [rbp-28h] BYREF
int v14; // [rsp+58h] [rbp-10h]
unsigned int m_uniqueID; // [rsp+70h] [rbp+8h] BYREF
m_uniqueID = a2->m_uniqueID;
Myhead = a1->m_gameObjectPhysics._List._Mypair._Myval2._Myhead;
Myfirst = a1->m_gameObjectPhysics._Vec._Mypair._Myval2._Myfirst;
v6 = 2
* ((0x100000001B3LL
* (((unsigned __int64)m_uniqueID >> 24)
^ (0x100000001B3LL
* (BYTE2(m_uniqueID)
^ (0x100000001B3LL
* ((0x100000001B3LL * ((unsigned __int8)m_uniqueID ^ 0xCBF29CE484222325uLL)) ^ BYTE1(m_uniqueID)))))))
& a1->m_gameObjectPhysics._Mask);
Ptr = Myfirst[v6 + 1]._Ptr;
if ( Ptr != Myhead )
{
v8 = Myfirst[v6]._Ptr;
if ( m_uniqueID == *((_DWORD *)Ptr + 4) )
goto LABEL_7;
while ( Ptr != v8 )
{
Ptr = *((std::_List_unchecked_const_iterator>>, std::_Iterator_base0>::_Nodeptr *)Ptr
+ 1);
if ( m_uniqueID == *((_DWORD *)Ptr + 4) )
goto LABEL_7;
}
}
Ptr = nullptr;
LABEL_7:
if ( !Ptr )
Ptr = Myhead;
if ( Ptr == Myhead )
{
v11 = 0;
cocos2d::CCPoint::CCPoint(&v12);
cocos2d::CCPoint::CCPoint(v13);
v13[1] = 0;
v13[2] = 0;
v14 = 0;
sub_14024D240(&a1->m_gameObjectPhysics, &v10, &m_uniqueID, &v11);
result = (GameObjectPhysics *)(v10 + 24);
*(_QWORD *)(v10 + 24) = a2;
}
else
{
result = (GameObjectPhysics *)((char *)Ptr + 24);
}
result->m_unkInt1 = a1->m_commandIndex;
return result;
}