{"type": "func", "start": 5369987488, "end": 5369987670, "name": "EndPortalObject::getSpawnPos", "pseudocode": "// \n// EndPortalObject::getSpawnPos from 0x1401381a0 to 0x140138256 (182 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::checkForEnd @ 0x1403b4d26\n// > PlayLayer::checkForEnd @ 0x1403b4d63\n// > <???> @ 0x1406ca098\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\n// Hidden C++ exception states: #wind=1\ncocos2d::CCPoint EndPortalObject::getSpawnPos(EndPortalObject *a1)\n{\n  cocos2d::CCPoint *v1; // rdx\n  cocos2d::CCPoint *v2; // rdi\n  float v4; // xmm6_4\n  __int64 v5; // rax\n  void *v7; // [rsp+40h] [rbp+8h]\n\n  v2 = v1;\n  if ( a1->m_flippedX )\n    v4 = -1.0;\n  else\n    v4 = 1.0;\n  v5 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v7 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v5 = qword_1406C2ED8;\n  }\n  cocos2d::CCPoint::CCPoint(\n    v2,\n    a1->m_startPosition.x - (float)((float)(300.0 / *(float *)(*(_QWORD *)(v5 + 520) + 424LL)) * v4),\n    a1->m_startPosition.y);\n  return (cocos2d::CCPoint)v2;\n}", "assembly": "; \n; EndPortalObject::getSpawnPos from 0x1401381a0 to 0x140138256 (182 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::checkForEnd @ 0x1403b4d26\n; > PlayLayer::checkForEnd @ 0x1403b4d63\n; > <???> @ 0x1406ca098\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401381a0\npush    rdi                                                            ; +0x5, 0x1401381a5\nsub     rsp, 30h                                                       ; +0x6, 0x1401381a6\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0xa, 0x1401381aa\nmov     rdi, rdx                                                       ; +0xf, 0x1401381af\nmov     rbx, rcx                                                       ; +0x12, 0x1401381b2\ncmp     byte ptr [rcx+558h], 0                                         ; +0x15, 0x1401381b5\njz      short loc_1401381C8                                            ; +0x1c, 0x1401381bc\nmovss   xmm6, cs:dword_1406236F0                                       ; +0x1e, 0x1401381be\njmp     short loc_1401381D0                                            ; +0x26, 0x1401381c6\nmovss   xmm6, cs:flt_140622C24                                         ; +0x28, 0x1401381c8\nmov     rax, cs:qword_1406C2ED8                                        ; +0x30, 0x1401381d0\ntest    rax, rax                                                       ; +0x37, 0x1401381d7\njnz     short loc_14013820B                                            ; +0x3a, 0x1401381da\nmov     ecx, 668h; Size                                                ; +0x3c, 0x1401381dc\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x41, 0x1401381e1\nmov     [rsp+38h+arg_0], rax                                           ; +0x46, 0x1401381e6\nmov     rcx, rax                                                       ; +0x4b, 0x1401381eb\ncall    sub_14017AB00                                                  ; +0x4e, 0x1401381ee\nnop                                                                    ; +0x53, 0x1401381f3\nmov     cs:qword_1406C2ED8, rax                                        ; +0x54, 0x1401381f4\nmov     rdx, [rax]                                                     ; +0x5b, 0x1401381fb\nmov     rcx, rax                                                       ; +0x5e, 0x1401381fe\ncall    qword ptr [rdx+48h]                                            ; +0x61, 0x140138201\nmov     rax, cs:qword_1406C2ED8                                        ; +0x64, 0x140138204\nmov     rax, [rax+208h]                                                ; +0x6b, 0x14013820b\nmovss   xmm0, cs:dword_14062343C                                       ; +0x72, 0x140138212\ndivss   xmm0, dword ptr [rax+1A8h]                                     ; +0x7a, 0x14013821a\nmulss   xmm0, xmm6                                                     ; +0x82, 0x140138222\nmovss   xmm1, dword ptr [rbx+3C8h]                                     ; +0x86, 0x140138226\nsubss   xmm1, xmm0                                                     ; +0x8e, 0x14013822e\nmovss   xmm2, dword ptr [rbx+3CCh]                                     ; +0x92, 0x140138232\nmov     rcx, rdi                                                       ; +0x9a, 0x14013823a\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x9d, 0x14013823d\nmov     rax, rdi                                                       ; +0xa3, 0x140138243\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xa6, 0x140138246\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0xab, 0x14013824b\nadd     rsp, 30h                                                       ; +0xb0, 0x140138250\npop     rdi                                                            ; +0xb4, 0x140138254\nretn                                                                   ; +0xb5, 0x140138255", "xrefs": ["PlayLayer::checkForEnd @ 0x1403b4d26", "PlayLayer::checkForEnd @ 0x1403b4d63", "<???> @ 0x1406ca098"], "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"}