{"type": "func", "start": 4645328, "end": 4645444, "name": "GJBaseGameLayer::getPortalTargetPos", "pseudocode": "// \n// GJBaseGameLayer::getPortalTargetPos from 0x46e1d0 to 0x46e244 (116 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::teleportPlayer @ 0x4912d0\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        cocos2d::CCPoint *__return_ptr retstr,\n        GJBaseGameLayer *a2,\n        TeleportPortalObject *a3,\n        GameObject *a4,\n        PlayerObject *a5)\n{\n  float x; // r7\n  _BYTE v9[4]; // [sp+4h] [bp-10h] BYREF\n  float v10; // [sp+8h] [bp-Ch]\n\n  if ( !a4 || a3->m_objectID == 747 )\n  {\n    x = a5->getPosition(a5)->x;\n    a3->getRealPosition((cocos2d::CCPoint *)v9, a3);\n    cocos2d::CCPoint::CCPoint(retstr, x, v10 + a3->m_teleportYOffset);\n  }\n  else\n  {\n    a4->getRealPosition(retstr, a4);\n  }\n  return retstr;\n}", "assembly": "; \n; GJBaseGameLayer::getPortalTargetPos from 0x46e1d0 to 0x46e244 (116 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::teleportPlayer @ 0x4912d0\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\nPUSH            {R4-R7,LR}                                             ; +0x0, 0x46e1d0\nMOV             R4, R2                                                 ; +0x2, 0x46e1d2\nLDR             R2, =(__stack_chk_guard_ptr - 0x46E1DE)                ; +0x4, 0x46e1d4\nSUB             SP, SP, #0x14                                          ; +0x6, 0x46e1d6\nMOV             R6, R0                                                 ; +0x8, 0x46e1d8\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0xa, 0x46e1da\nLDR             R2, [R2]; __stack_chk_guard                            ; +0xc, 0x46e1dc\nLDR             R1, [SP,#0x14+arg_0]                                   ; +0xe, 0x46e1de\nLDR             R5, [R2]                                               ; +0x10, 0x46e1e0\nSTR             R5, [SP,#0x14+var_8]                                   ; +0x12, 0x46e1e2\nMOV             R5, R2                                                 ; +0x14, 0x46e1e4\nCBZ             R3, loc_46E200                                         ; +0x16, 0x46e1e6\nLDR.W           R7, [R4,#0x374]                                        ; +0x18, 0x46e1e8\nMOVW            R2, #0x2EB                                             ; +0x1c, 0x46e1ec\nCMP             R7, R2                                                 ; +0x20, 0x46e1f0\nBEQ             loc_46E200                                             ; +0x22, 0x46e1f2\nLDR             R2, [R3]                                               ; +0x24, 0x46e1f4\nMOV             R1, R3                                                 ; +0x26, 0x46e1f6\nLDR.W           R2, [R2,#0x2A0]                                        ; +0x28, 0x46e1f8\nBLX             R2                                                     ; +0x2c, 0x46e1fc\nB               loc_46E232                                             ; +0x2e, 0x46e1fe\nLDR             R3, [R1]                                               ; +0x30, 0x46e200\nMOV             R0, R1                                                 ; +0x32, 0x46e202\nLDR             R3, [R3,#0x60]                                         ; +0x34, 0x46e204\nBLX             R3                                                     ; +0x36, 0x46e206\nLDR             R3, [R4]                                               ; +0x38, 0x46e208\nMOV             R1, R4                                                 ; +0x3a, 0x46e20a\nADD.W           R4, R4, #0x670                                         ; +0x3c, 0x46e20c\nLDR.W           R3, [R3,#0x2A0]                                        ; +0x40, 0x46e210\nLDR             R7, [R0]                                               ; +0x44, 0x46e214\nADD             R0, SP, #0x14+var_10                                   ; +0x46, 0x46e216\nBLX             R3                                                     ; +0x48, 0x46e218\nVLDR            S15, [R4]                                              ; +0x4a, 0x46e21a\nMOV             R0, R6; this                                           ; +0x4e, 0x46e21e\nMOV             R1, R7; float                                          ; +0x50, 0x46e220\nVLDR            S14, [SP,#0x14+var_C]                                  ; +0x52, 0x46e222\nVADD.F32        S15, S14, S15                                          ; +0x56, 0x46e226\nVMOV            R2, S15; float                                         ; +0x5a, 0x46e22a\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x5e, 0x46e22e\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x62, 0x46e232\nMOV             R0, R6                                                 ; +0x64, 0x46e234\nLDR             R3, [R5]                                               ; +0x66, 0x46e236\nCMP             R2, R3                                                 ; +0x68, 0x46e238\nBEQ             loc_46E240                                             ; +0x6a, 0x46e23a\nBLX             __stack_chk_fail                                       ; +0x6c, 0x46e23c\nADD             SP, SP, #0x14                                          ; +0x70, 0x46e240\nPOP             {R4-R7,PC}                                             ; +0x72, 0x46e242", "xrefs": ["GJBaseGameLayer::teleportPlayer @ 0x4912d0"], "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"}