{"type": "func", "start": 7904796, "end": 7905116, "name": "EndPortalObject::setPosition", "pseudocode": "// \n// EndPortalObject::setPosition from 0x789e1c to 0x789f5c (320 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x99648\n// > <???> @ 0x1176f28\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid EndPortalObject::setPosition(EndPortalObject *a1, const cocos2d::CCPoint *a2)\n{\n  cocos2d::CCSprite *m_gradientBar; // x22\n  void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24\n  float m_cameraZoom; // s2\n  float v7; // s1\n  cocos2d::CCParticleSystemQuad *m_particle; // x21\n  void (__fastcall *v9)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22\n  const cocos2d::CCPoint *v10; // x23\n  float v11; // s0\n  cocos2d::CCPoint v12; // [xsp+58h] [xbp+58h] BYREF\n  __int64 v13; // [xsp+60h] [xbp+60h] BYREF\n\n  GameObject::setPosition(a1, a2);\n  m_gradientBar = a1->m_gradientBar;\n  if ( m_gradientBar )\n  {\n    setPosition = m_gradientBar->setPosition;\n    m_cameraZoom = GameManager::sharedState()->m_playLayer->m_gameState.m_cameraZoom;\n    if ( a1->m_flippedX )\n      v7 = -1.0;\n    else\n      v7 = 1.0;\n    cocos2d::CCPoint::CCPoint(&v12, (float)(-14.0 - (float)(15.0 / m_cameraZoom)) * v7, 0.0);\n    cocos2d::CCPoint::operator+(&v13, a2, &v12);\n    setPosition(m_gradientBar, (const cocos2d::CCPoint *)&v13);\n  }\n  m_particle = a1->m_particle;\n  if ( m_particle )\n  {\n    v9 = m_particle->setPosition;\n    v10 = a1->getPosition(a1);\n    if ( a1->m_flippedX )\n      v11 = -1.0;\n    else\n      v11 = 1.0;\n    cocos2d::CCPoint::operator*(&a1->m_particleOffset, v11);\n    cocos2d::CCPoint::operator+(&v13, v10, &v12);\n    v9(m_particle, (const cocos2d::CCPoint *)&v13);\n  }\n}", "assembly": "; \n; EndPortalObject::setPosition from 0x789e1c to 0x789f5c (320 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x99648\n; > <???> @ 0x1176f28\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X29, X30, [SP,#var_70]!                                ; +0x0, 0x789e1c\nMOV             X29, SP                                                ; +0x4, 0x789e20\nSTP             X19, X20, [SP,#0x70+var_60]                            ; +0x8, 0x789e24\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x789e28\nMOV             X19, X0                                                ; +0x10, 0x789e2c\nSTP             X21, X22, [SP,#0x70+var_50]                            ; +0x14, 0x789e30\nSTP             X23, X24, [SP,#0x70+var_40]                            ; +0x18, 0x789e34\nLDR             X2, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x789e38\nMOV             X23, X1                                                ; +0x20, 0x789e3c\nLDR             X2, [X2]                                               ; +0x24, 0x789e40\nSTR             X2, [X29,#0x70+var_8]                                  ; +0x28, 0x789e44\nBL              _ZN10GameObject11setPositionERKN7cocos2d7CCPointE; GameObject::setPosition(cocos2d::CCPoint const&) ; +0x2c, 0x789e48\nLDR             X22, [X19,#0x538]                                      ; +0x30, 0x789e4c\nCBZ             X22, loc_789EBC                                        ; +0x34, 0x789e50\nLDR             X0, [X22]; this                                        ; +0x38, 0x789e54\nLDR             X24, [X0,#0xB8]                                        ; +0x3c, 0x789e58\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x40, 0x789e5c\nLDR             X1, [X0,#0x1D8]                                        ; +0x44, 0x789e60\nFMOV            S0, #15.0                                              ; +0x48, 0x789e64\nLDRB            W0, [X19,#0x540]                                       ; +0x4c, 0x789e68\nFMOV            S1, #-14.0                                             ; +0x50, 0x789e6c\nLDR             S2, [X1,#0x1A8]                                        ; +0x54, 0x789e70\nFDIV            S0, S0, S2                                             ; +0x58, 0x789e74\nFSUB            S0, S1, S0                                             ; +0x5c, 0x789e78\nCBNZ            W0, loc_789F50                                         ; +0x60, 0x789e7c\nFMOV            S1, #1.0                                               ; +0x64, 0x789e80\nFMUL            S0, S0, S1; float                                      ; +0x68, 0x789e84\nADD             X1, X29, #0x70+var_18                                  ; +0x6c, 0x789e88\nFMOV            S1, WZR; float                                         ; +0x70, 0x789e8c\nMOV             X0, X1; this                                           ; +0x74, 0x789e90\nSTR             X1, [X29,#0x70+var_28]                                 ; +0x78, 0x789e94\nADD             X21, X29, #0x70+var_10                                 ; +0x7c, 0x789e98\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x80, 0x789e9c\nLDR             X1, [X29,#0x70+var_28]                                 ; +0x84, 0x789ea0\nMOV             X0, X23                                                ; +0x88, 0x789ea4\nMOV             X8, X21                                                ; +0x8c, 0x789ea8\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x90, 0x789eac\nMOV             X0, X22                                                ; +0x94, 0x789eb0\nMOV             X1, X21                                                ; +0x98, 0x789eb4\nBLR             X24                                                    ; +0x9c, 0x789eb8\nLDR             X21, [X19,#0x308]                                      ; +0xa0, 0x789ebc\nCBZ             X21, loc_789F20                                        ; +0xa4, 0x789ec0\nLDR             X1, [X19]                                              ; +0xa8, 0x789ec4\nMOV             X0, X19                                                ; +0xac, 0x789ec8\nLDR             X2, [X21]                                              ; +0xb0, 0x789ecc\nLDR             X1, [X1,#0xC0]                                         ; +0xb4, 0x789ed0\nLDR             X22, [X2,#0xB8]                                        ; +0xb8, 0x789ed4\nBLR             X1                                                     ; +0xbc, 0x789ed8\nMOV             X23, X0                                                ; +0xc0, 0x789edc\nLDRB            W1, [X19,#0x540]                                       ; +0xc4, 0x789ee0\nADD             X0, X19, #0x31C                                        ; +0xc8, 0x789ee4\nCBNZ            W1, loc_789F48                                         ; +0xcc, 0x789ee8\nFMOV            S0, #1.0                                               ; +0xd0, 0x789eec\nADD             X1, X29, #0x70+var_18                                  ; +0xd4, 0x789ef0\nSTR             X1, [X29,#0x70+var_28]                                 ; +0xd8, 0x789ef4\nMOV             X8, X1                                                 ; +0xdc, 0x789ef8\nADD             X19, X29, #0x70+var_10                                 ; +0xe0, 0x789efc\nBL              _ZNK7cocos2d7CCPointmlEf; cocos2d::CCPoint::operator*(float) ; +0xe4, 0x789f00\nLDR             X1, [X29,#0x70+var_28]                                 ; +0xe8, 0x789f04\nMOV             X0, X23                                                ; +0xec, 0x789f08\nMOV             X8, X19                                                ; +0xf0, 0x789f0c\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0xf4, 0x789f10\nMOV             X0, X21                                                ; +0xf8, 0x789f14\nMOV             X1, X19                                                ; +0xfc, 0x789f18\nBLR             X22                                                    ; +0x100, 0x789f1c\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x104, 0x789f20\nLDR             X1, [X29,#0x70+var_8]                                  ; +0x108, 0x789f24\nLDR             X0, [X20]                                              ; +0x10c, 0x789f28\nCMP             X1, X0                                                 ; +0x110, 0x789f2c\nB.NE            loc_789F58                                             ; +0x114, 0x789f30\nLDP             X19, X20, [SP,#0x70+var_60]                            ; +0x118, 0x789f34\nLDP             X21, X22, [SP,#0x70+var_50]                            ; +0x11c, 0x789f38\nLDP             X23, X24, [SP,#0x70+var_40]                            ; +0x120, 0x789f3c\nLDP             X29, X30, [SP+0x70+var_70],#0x70                       ; +0x124, 0x789f40\nRET                                                                    ; +0x128, 0x789f44\nFMOV            S0, #-1.0                                              ; +0x12c, 0x789f48\nB               loc_789EF0                                             ; +0x130, 0x789f4c\nFMOV            S1, #-1.0                                              ; +0x134, 0x789f50\nB               loc_789E84                                             ; +0x138, 0x789f54\nBL              .__stack_chk_fail                                      ; +0x13c, 0x789f58", "xrefs": ["<???> @ 0x99648", "<???> @ 0x1176f28"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}