{"type": "func", "start": 8751344, "end": 8751532, "name": "GJBaseGameLayer::getPortalTargetPos", "pseudocode": "// \n// GJBaseGameLayer::getPortalTargetPos from 0x8588f0 to 0x8589ac (188 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::teleportPlayer @ 0x889c80\n// > <???> @ 0x511b0\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\ncocos2d::CCPoint GJBaseGameLayer::getPortalTargetPos(\n        GJBaseGameLayer *a1,\n        TeleportPortalObject *a2,\n        GameObject *a3,\n        PlayerObject *a4)\n{\n  cocos2d::CCPoint *v4; // x8\n  cocos2d::CCPoint *v5; // x20\n  float x; // [xsp+20h] [xbp+20h]\n  __int64 v10; // [xsp+40h] [xbp+40h] BYREF\n  cocos2d::CCPoint v11; // 0:kr00_8.8\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  v5 = v4;\n  if ( !a3 || a2->m_objectID == 747 )\n  {\n    x = a4->getPosition(a4)->x;\n    ((void (__fastcall *)(__int64 *__return_ptr, TeleportPortalObject *))a2->getRealPosition)(&v10, a2);\n    cocos2d::CCPoint::CCPoint(v5, x, *((float *)&v10 + 1) + a2->m_teleportYOffset);\n  }\n  else\n  {\n    v11 = a3->getRealPosition(a3);\n    result.x = v11.x;\n    result.y = v11.y;\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::getPortalTargetPos from 0x8588f0 to 0x8589ac (188 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::teleportPlayer @ 0x889c80\n; > <???> @ 0x511b0\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_50]!                                ; +0x0, 0x8588f0\nMOV             X29, SP                                                ; +0x4, 0x8588f4\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x8588f8\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x8588fc\nMOV             X20, X8                                                ; +0x10, 0x858900\nLDR             X4, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x14, 0x858904\nLDR             X4, [X4]                                               ; +0x18, 0x858908\nSTR             X4, [X29,#0x50+var_8]                                  ; +0x1c, 0x85890c\nCBZ             X2, loc_858954                                         ; +0x20, 0x858910\nLDR             W0, [X1,#0x3F4]                                        ; +0x24, 0x858914\nCMP             W0, #0x2EB                                             ; +0x28, 0x858918\nB.EQ            loc_858954                                             ; +0x2c, 0x85891c\nLDR             X1, [X2]                                               ; +0x30, 0x858920\nMOV             X0, X2                                                 ; +0x34, 0x858924\nLDR             X1, [X1,#0x540]                                        ; +0x38, 0x858928\nBLR             X1                                                     ; +0x3c, 0x85892c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x40, 0x858930\nMOV             X0, X20                                                ; +0x44, 0x858934\nLDR             X2, [X29,#0x50+var_8]                                  ; +0x48, 0x858938\nLDR             X1, [X19]                                              ; +0x4c, 0x85893c\nCMP             X2, X1                                                 ; +0x50, 0x858940\nB.NE            loc_8589A8                                             ; +0x54, 0x858944\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x58, 0x858948\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x5c, 0x85894c\nRET                                                                    ; +0x60, 0x858950\nLDR             X2, [X3]                                               ; +0x64, 0x858954\nMOV             X0, X3                                                 ; +0x68, 0x858958\nSTR             X1, [X29,#0x50+var_18]                                 ; +0x6c, 0x85895c\nLDR             X2, [X2,#0xC0]                                         ; +0x70, 0x858960\nBLR             X2                                                     ; +0x74, 0x858964\nLDR             X1, [X29,#0x50+var_18]                                 ; +0x78, 0x858968\nADD             X8, X29, #0x50+var_10                                  ; +0x7c, 0x85896c\nLDR             S0, [X0]                                               ; +0x80, 0x858970\nMOV             X0, X1                                                 ; +0x84, 0x858974\nLDR             X2, [X1]                                               ; +0x88, 0x858978\nSTR             Q0, [X29,#0x50+var_30]                                 ; +0x8c, 0x85897c\nLDR             X2, [X2,#0x540]                                        ; +0x90, 0x858980\nBLR             X2                                                     ; +0x94, 0x858984\nLDR             X1, [X29,#0x50+var_18]                                 ; +0x98, 0x858988\nMOV             X0, X20; this                                          ; +0x9c, 0x85898c\nLDR             S2, [X29,#0x50+var_C]                                  ; +0xa0, 0x858990\nLDR             Q0, [X29,#0x50+var_30]; float                          ; +0xa4, 0x858994\nLDR             S1, [X1,#0x72C]                                        ; +0xa8, 0x858998\nFADD            S1, S2, S1; float                                      ; +0xac, 0x85899c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xb0, 0x8589a0\nB               loc_858930                                             ; +0xb4, 0x8589a4\nBL              .__stack_chk_fail                                      ; +0xb8, 0x8589a8", "xrefs": ["GJBaseGameLayer::teleportPlayer @ 0x889c80", "<???> @ 0x511b0"], "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"}