{"type": "func", "start": 4296950552, "end": 4296950716, "name": "GJBaseGameLayer::getPortalTargetPos", "pseudocode": "// \n// GJBaseGameLayer::getPortalTargetPos from 0x1001e4318 to 0x1001e43bc (164 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::teleportPlayer @ 0x1001e3e00\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 __fastcall GJBaseGameLayer::getPortalTargetPos(\n        GJBaseGameLayer *a1,\n        TeleportPortalObject *a2,\n        GameObject *a3,\n        PlayerObject *a4)\n{\n  _DWORD *v4; // x8\n  _DWORD *v6; // x19\n  unsigned __int32 v7; // s8\n  __n128 v8; // q1\n  __n128 v9; // q0\n  __int64 v12; // [xsp+8h] [xbp-28h] BYREF\n  cocos2d::CCPoint v13; // 0:kr00_8.8\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  v6 = v4;\n  if ( a3 && a2->m_objectID != 747 )\n  {\n    v13 = ((cocos2d::CCPoint (__fastcall *)(GameObject *))a3->getRealPosition)(a3);\n    result.x = v13.x;\n    result.y = v13.y;\n  }\n  else\n  {\n    v7 = *(_DWORD *)((__int64 (__fastcall *)(PlayerObject *))a4->getPosition)(a4);\n    ((void (__fastcall *)(__int64 *__return_ptr, TeleportPortalObject *))a2->getRealPosition)(&v12, a2);\n    v8.n128_f32[0] = *((float *)&v12 + 1) + a2->m_teleportYOffset;\n    v9.n128_u32[0] = v7;\n    sub_100022980(v9, v8, v6);\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::getPortalTargetPos from 0x1001e4318 to 0x1001e43bc (164 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::teleportPlayer @ 0x1001e3e00\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\nSUB             SP, SP, #0x40                                          ; +0x0, 0x1001e4318\nSTP             D9, D8, [SP,#0x30+var_20]                              ; +0x4, 0x1001e431c\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1001e4320\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1001e4324\nADD             X29, SP, #0x30                                         ; +0x10, 0x1001e4328\nMOV             X20, X1                                                ; +0x14, 0x1001e432c\nMOV             X19, X8                                                ; +0x18, 0x1001e4330\nCBZ             X2, loc_1001E4344                                      ; +0x1c, 0x1001e4334\nLDR             W8, [X20,#0x404]                                       ; +0x20, 0x1001e4338\nCMP             W8, #0x2EB                                             ; +0x24, 0x1001e433c\nB.NE            loc_1001E4398                                          ; +0x28, 0x1001e4340\nLDR             X8, [X3]                                               ; +0x2c, 0x1001e4344\nLDR             X8, [X8,#0xC0]                                         ; +0x30, 0x1001e4348\nMOV             X0, X3                                                 ; +0x34, 0x1001e434c\nBLR             X8                                                     ; +0x38, 0x1001e4350\nLDR             S8, [X0]                                               ; +0x3c, 0x1001e4354\nLDR             X8, [X20]                                              ; +0x40, 0x1001e4358\nLDR             X9, [X8,#0x540]                                        ; +0x44, 0x1001e435c\nADD             X8, SP, #0x30+var_28                                   ; +0x48, 0x1001e4360\nMOV             X0, X20                                                ; +0x4c, 0x1001e4364\nBLR             X9                                                     ; +0x50, 0x1001e4368\nLDR             S0, [SP,#0x30+var_24]                                  ; +0x54, 0x1001e436c\nLDR             S1, [X20,#0x73C]                                       ; +0x58, 0x1001e4370\nFADD            S1, S0, S1                                             ; +0x5c, 0x1001e4374\nMOV             X0, X19                                                ; +0x60, 0x1001e4378\nFMOV            S0, S8                                                 ; +0x64, 0x1001e437c\nBL              sub_100022980                                          ; +0x68, 0x1001e4380\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x6c, 0x1001e4384\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x70, 0x1001e4388\nLDP             D9, D8, [SP,#0x30+var_20]                              ; +0x74, 0x1001e438c\nADD             SP, SP, #0x40 ; '@'                                    ; +0x78, 0x1001e4390\nRET                                                                    ; +0x7c, 0x1001e4394\nLDR             X8, [X2]                                               ; +0x80, 0x1001e4398\nLDR             X1, [X8,#0x540]                                        ; +0x84, 0x1001e439c\nMOV             X8, X19                                                ; +0x88, 0x1001e43a0\nMOV             X0, X2                                                 ; +0x8c, 0x1001e43a4\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x90, 0x1001e43a8\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x94, 0x1001e43ac\nLDP             D9, D8, [SP,#0x30+var_20]                              ; +0x98, 0x1001e43b0\nADD             SP, SP, #0x40 ; '@'                                    ; +0x9c, 0x1001e43b4\nBR              X1                                                     ; +0xa0, 0x1001e43b8", "xrefs": ["GJBaseGameLayer::teleportPlayer @ 0x1001e3e00"], "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"}