{"type": "func", "start": 5369988112, "end": 5369989016, "name": "EndPortalObject::updateEndPos", "pseudocode": "// \n// EndPortalObject::updateEndPos from 0x140138410 to 0x140138798 (904 bytes)\n// \n// 3 xrefs:\n// > EndPortalObject::setVisible @ 0x1401383fa\n// > PlayLayer::checkForEnd @ 0x1403b4daa\n// > <???> @ 0x1406ca0bc\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=11\nvoid EndPortalObject::updateEndPos(EndPortalObject *a1, bool a2)\n{\n  cocos2d::CCDirector *v4; // rax\n  float v5; // xmm6_4\n  __int64 v6; // rcx\n  __int64 v7; // rcx\n  EndPortalObject_vtbl *v8; // rbx\n  const cocos2d::CCPoint *v9; // rax\n  __int64 v10; // rax\n  cocos2d::CCParticleSystemQuad *m_particle; // rcx\n  EndPortalObject_vtbl *v12; // rbx\n  const cocos2d::CCPoint *v13; // rax\n  float v14; // [rsp+74h] [rbp+Ch]\n  cocos2d::CCPoint v15; // [rsp+80h] [rbp+18h] BYREF\n  void *v16; // [rsp+88h] [rbp+20h] BYREF\n\n  v4 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);\n  cocos2d::CCDirector::getWinSize(v4);\n  if ( a1->m_startPosHeightRelated )\n  {\n    v5 = 225.0;\n    if ( *(float *)(((__int64 (__fastcall *)(EndPortalObject *, cocos2d::CCPoint *))a1->getStartPos)(a1, &v15) + 4) >= 225.0 )\n      v5 = *(float *)(((__int64 (__fastcall *)(EndPortalObject *, void **))a1->getStartPos)(a1, &v16) + 4);\n  }\n  else\n  {\n    v6 = qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v15 = (cocos2d::CCPoint)operator new(0x668u);\n      qword_1406C2ED8 = ((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v15);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v6 = qword_1406C2ED8;\n    }\n    v7 = *(_QWORD *)(v6 + 520);\n    if ( *(_BYTE *)(*(_QWORD *)(v7 + 3488) + 2489LL) )\n    {\n      v5 = (float)((float)(v14 * 0.5) / *(float *)(v7 + 424)) + *(float *)(v7 + 1296);\n    }\n    else\n    {\n      v5 = 225.0;\n      if ( (float)((float)((float)(v14 * 0.5) / *(float *)(v7 + 424)) + *(float *)(v7 + 1296)) >= 225.0 )\n        v5 = (float)((float)(v14 * 0.5) / *(float *)(v7 + 424)) + *(float *)(v7 + 1296);\n    }\n  }\n  v8 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v9 = a1->getPosition_0(a1);\n  cocos2d::CCPoint::CCPoint(&v15, v9->x, v5);\n  ((void (__fastcall *)(EndPortalObject *, __int64))v8->setStartPos)(a1, v10);\n  m_particle = a1->m_particle;\n  if ( m_particle )\n  {\n    if ( a2 )\n      ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *))m_particle->update)(m_particle);\n    if ( !qword_1406C2ED8 )\n    {\n      v16 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v16);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    }\n    ((void (__fastcall *)(cocos2d::CCParticleSystemQuad *))a1->m_particle->setScale_0)(a1->m_particle);\n  }\n  if ( !qword_1406C2ED8 )\n  {\n    v16 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v16);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n  }\n  ((void (__fastcall *)(EndPortalObject *))a1->setScaleX)(a1);\n  if ( !qword_1406C2ED8 )\n  {\n    v15 = (cocos2d::CCPoint)operator new(0x668u);\n    qword_1406C2ED8 = ((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v15);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n  }\n  ((void (__fastcall *)(EndPortalObject *))a1->setScaleY)(a1);\n  if ( a1->m_gradientBar )\n  {\n    if ( !qword_1406C2ED8 )\n    {\n      v15 = (cocos2d::CCPoint)operator new(0x668u);\n      qword_1406C2ED8 = ((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v15);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    }\n    ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_gradientBar->setScaleY)(a1->m_gradientBar);\n    ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_gradientBar->setScaleX)(a1->m_gradientBar);\n  }\n  v12 = a1->GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v13 = a1->getPosition_0(a1);\n  v12->setPosition_0(a1, v13);\n}", "assembly": "; \n; EndPortalObject::updateEndPos from 0x140138410 to 0x140138798 (904 bytes)\n; \n; 3 xrefs:\n; > EndPortalObject::setVisible @ 0x1401383fa\n; > PlayLayer::checkForEnd @ 0x1403b4daa\n; > <???> @ 0x1406ca0bc\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    rbx                                                            ; +0x0, 0x140138410\npush    rsi                                                            ; +0x2, 0x140138412\npush    rdi                                                            ; +0x3, 0x140138413\nsub     rsp, 50h                                                       ; +0x4, 0x140138414\nmovaps  [rsp+68h+var_28], xmm6                                         ; +0x8, 0x140138418\nmovaps  [rsp+68h+var_38], xmm7                                         ; +0xd, 0x14013841d\nmovaps  [rsp+68h+var_48], xmm8                                         ; +0x12, 0x140138422\nmovzx   esi, dl                                                        ; +0x18, 0x140138428\nmov     rdi, rcx                                                       ; +0x1b, 0x14013842b\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1e, 0x14013842e\nmov     rcx, rax                                                       ; +0x24, 0x140138434\nlea     rdx, [rsp+68h+arg_0]                                           ; +0x27, 0x140138437\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x2c, 0x14013843c\ncmp     byte ptr [rdi+559h], 0                                         ; +0x32, 0x140138442\njz      short loc_14013848F                                            ; +0x39, 0x140138449\nmov     rax, [rdi]                                                     ; +0x3b, 0x14013844b\nlea     rdx, [rsp+68h+arg_10]                                          ; +0x3e, 0x14013844e\nmov     rcx, rdi                                                       ; +0x46, 0x140138456\ncall    qword ptr [rax+670h]                                           ; +0x49, 0x140138459\nmovss   xmm6, cs:dword_1406233FC                                       ; +0x4f, 0x14013845f\ncomiss  xmm6, dword ptr [rax+4]                                        ; +0x57, 0x140138467\nja      loc_140138532                                                  ; +0x5b, 0x14013846b\nmov     rax, [rdi]                                                     ; +0x61, 0x140138471\nlea     rdx, [rsp+68h+arg_18]                                          ; +0x64, 0x140138474\nmov     rcx, rdi                                                       ; +0x6c, 0x14013847c\ncall    qword ptr [rax+670h]                                           ; +0x6f, 0x14013847f\nmovss   xmm6, dword ptr [rax+4]                                        ; +0x75, 0x140138485\njmp     loc_140138532                                                  ; +0x7a, 0x14013848a\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x7f, 0x14013848f\ntest    rcx, rcx                                                       ; +0x86, 0x140138496\njnz     short loc_1401384CD                                            ; +0x89, 0x140138499\nmov     ecx, 668h; Size                                                ; +0x8b, 0x14013849b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x90, 0x1401384a0\nmov     [rsp+68h+arg_10], rax                                          ; +0x95, 0x1401384a5\nmov     rcx, rax                                                       ; +0x9d, 0x1401384ad\ncall    sub_14017AB00                                                  ; +0xa0, 0x1401384b0\nnop                                                                    ; +0xa5, 0x1401384b5\nmov     cs:qword_1406C2ED8, rax                                        ; +0xa6, 0x1401384b6\nmov     rdx, [rax]                                                     ; +0xad, 0x1401384bd\nmov     rcx, rax                                                       ; +0xb0, 0x1401384c0\ncall    qword ptr [rdx+48h]                                            ; +0xb3, 0x1401384c3\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xb6, 0x1401384c6\nmov     rcx, [rcx+208h]                                                ; +0xbd, 0x1401384cd\nmov     rax, [rcx+0DA0h]                                               ; +0xc4, 0x1401384d4\ncmp     byte ptr [rax+9B9h], 0                                         ; +0xcb, 0x1401384db\njz      short loc_140138504                                            ; +0xd2, 0x1401384e2\nmovss   xmm6, [rsp+68h+arg_4]                                          ; +0xd4, 0x1401384e4\nmulss   xmm6, cs:dword_140622B08                                       ; +0xda, 0x1401384ea\ndivss   xmm6, dword ptr [rcx+1A8h]                                     ; +0xe2, 0x1401384f2\naddss   xmm6, dword ptr [rcx+510h]                                     ; +0xea, 0x1401384fa\njmp     short loc_140138532                                            ; +0xf2, 0x140138502\nmovss   xmm0, [rsp+68h+arg_4]                                          ; +0xf4, 0x140138504\nmulss   xmm0, cs:dword_140622B08                                       ; +0xfa, 0x14013850a\ndivss   xmm0, dword ptr [rcx+1A8h]                                     ; +0x102, 0x140138512\naddss   xmm0, dword ptr [rcx+510h]                                     ; +0x10a, 0x14013851a\nmovss   xmm6, cs:dword_1406233FC                                       ; +0x112, 0x140138522\ncomiss  xmm6, xmm0                                                     ; +0x11a, 0x14013852a\nja      short loc_140138532                                            ; +0x11d, 0x14013852d\nmovaps  xmm6, xmm0                                                     ; +0x11f, 0x14013852f\nmov     rbx, [rdi]                                                     ; +0x122, 0x140138532\nmov     rcx, rdi                                                       ; +0x125, 0x140138535\ncall    qword ptr [rbx+0C8h]                                           ; +0x128, 0x140138538\nmovaps  xmm2, xmm6                                                     ; +0x12e, 0x14013853e\nmovss   xmm1, dword ptr [rax]                                          ; +0x131, 0x140138541\nlea     rcx, [rsp+68h+arg_10]                                          ; +0x135, 0x140138545\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x13d, 0x14013854d\nmov     rdx, rax                                                       ; +0x143, 0x140138553\nmov     rcx, rdi                                                       ; +0x146, 0x140138556\ncall    qword ptr [rbx+4B0h]                                           ; +0x149, 0x140138559\nmov     rcx, [rdi+308h]                                                ; +0x14f, 0x14013855f\nmovss   xmm7, cs:flt_140622C24                                         ; +0x156, 0x140138566\nmovss   xmm8, cs:dword_1406236F0                                       ; +0x15e, 0x14013856e\ntest    rcx, rcx                                                       ; +0x167, 0x140138577\njz      loc_140138600                                                  ; +0x16a, 0x14013857a\ntest    sil, sil                                                       ; +0x170, 0x140138580\njz      short loc_14013858E                                            ; +0x173, 0x140138583\nmov     rax, [rcx]                                                     ; +0x175, 0x140138585\nmovaps  xmm1, xmm7                                                     ; +0x178, 0x140138588\ncall    qword ptr [rax+20h]                                            ; +0x17b, 0x14013858b\ncmp     byte ptr [rdi+558h], 0                                         ; +0x17e, 0x14013858e\njz      short loc_14013859D                                            ; +0x185, 0x140138595\nmovaps  xmm6, xmm8                                                     ; +0x187, 0x140138597\njmp     short loc_1401385A0                                            ; +0x18b, 0x14013859b\nmovaps  xmm6, xmm7                                                     ; +0x18d, 0x14013859d\nmov     rax, cs:qword_1406C2ED8                                        ; +0x190, 0x1401385a0\ntest    rax, rax                                                       ; +0x197, 0x1401385a7\njnz     short loc_1401385DE                                            ; +0x19a, 0x1401385aa\nmov     ecx, 668h; Size                                                ; +0x19c, 0x1401385ac\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1a1, 0x1401385b1\nmov     [rsp+68h+arg_18], rax                                          ; +0x1a6, 0x1401385b6\nmov     rcx, rax                                                       ; +0x1ae, 0x1401385be\ncall    sub_14017AB00                                                  ; +0x1b1, 0x1401385c1\nnop                                                                    ; +0x1b6, 0x1401385c6\nmov     cs:qword_1406C2ED8, rax                                        ; +0x1b7, 0x1401385c7\nmov     rdx, [rax]                                                     ; +0x1be, 0x1401385ce\nmov     rcx, rax                                                       ; +0x1c1, 0x1401385d1\ncall    qword ptr [rdx+48h]                                            ; +0x1c4, 0x1401385d4\nmov     rax, cs:qword_1406C2ED8                                        ; +0x1c7, 0x1401385d7\nmov     rcx, [rdi+308h]                                                ; +0x1ce, 0x1401385de\nmov     rdx, [rcx]                                                     ; +0x1d5, 0x1401385e5\nmov     rax, [rax+208h]                                                ; +0x1d8, 0x1401385e8\ndivss   xmm6, dword ptr [rax+1ACh]                                     ; +0x1df, 0x1401385ef\nmovaps  xmm1, xmm6                                                     ; +0x1e7, 0x1401385f7\ncall    qword ptr [rdx+0A0h]                                           ; +0x1ea, 0x1401385fa\ncmp     byte ptr [rdi+558h], 0                                         ; +0x1f0, 0x140138600\njz      short loc_14013860F                                            ; +0x1f7, 0x140138607\nmovaps  xmm6, xmm8                                                     ; +0x1f9, 0x140138609\njmp     short loc_140138612                                            ; +0x1fd, 0x14013860d\nmovaps  xmm6, xmm7                                                     ; +0x1ff, 0x14013860f\nmov     rax, cs:qword_1406C2ED8                                        ; +0x202, 0x140138612\ntest    rax, rax                                                       ; +0x209, 0x140138619\njnz     short loc_140138650                                            ; +0x20c, 0x14013861c\nmov     ecx, 668h; Size                                                ; +0x20e, 0x14013861e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x213, 0x140138623\nmov     [rsp+68h+arg_18], rax                                          ; +0x218, 0x140138628\nmov     rcx, rax                                                       ; +0x220, 0x140138630\ncall    sub_14017AB00                                                  ; +0x223, 0x140138633\nnop                                                                    ; +0x228, 0x140138638\nmov     cs:qword_1406C2ED8, rax                                        ; +0x229, 0x140138639\nmov     rdx, [rax]                                                     ; +0x230, 0x140138640\nmov     rcx, rax                                                       ; +0x233, 0x140138643\ncall    qword ptr [rdx+48h]                                            ; +0x236, 0x140138646\nmov     rax, cs:qword_1406C2ED8                                        ; +0x239, 0x140138649\nmov     rdx, [rdi]                                                     ; +0x240, 0x140138650\nmov     rax, [rax+208h]                                                ; +0x243, 0x140138653\ndivss   xmm6, dword ptr [rax+1ACh]                                     ; +0x24a, 0x14013865a\nmovaps  xmm1, xmm6                                                     ; +0x252, 0x140138662\nmov     rcx, rdi                                                       ; +0x255, 0x140138665\ncall    qword ptr [rdx+78h]                                            ; +0x258, 0x140138668\nmov     rax, cs:qword_1406C2ED8                                        ; +0x25b, 0x14013866b\ntest    rax, rax                                                       ; +0x262, 0x140138672\njnz     short loc_1401386A9                                            ; +0x265, 0x140138675\nmov     ecx, 668h; Size                                                ; +0x267, 0x140138677\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x26c, 0x14013867c\nmov     [rsp+68h+arg_10], rax                                          ; +0x271, 0x140138681\nmov     rcx, rax                                                       ; +0x279, 0x140138689\ncall    sub_14017AB00                                                  ; +0x27c, 0x14013868c\nnop                                                                    ; +0x281, 0x140138691\nmov     cs:qword_1406C2ED8, rax                                        ; +0x282, 0x140138692\nmov     rdx, [rax]                                                     ; +0x289, 0x140138699\nmov     rcx, rax                                                       ; +0x28c, 0x14013869c\ncall    qword ptr [rdx+48h]                                            ; +0x28f, 0x14013869f\nmov     rax, cs:qword_1406C2ED8                                        ; +0x292, 0x1401386a2\nmov     rdx, [rdi]                                                     ; +0x299, 0x1401386a9\nmov     rax, [rax+208h]                                                ; +0x29c, 0x1401386ac\nmovaps  xmm1, xmm7                                                     ; +0x2a3, 0x1401386b3\ndivss   xmm1, dword ptr [rax+1ACh]                                     ; +0x2a6, 0x1401386b6\nmov     rcx, rdi                                                       ; +0x2ae, 0x1401386be\ncall    qword ptr [rdx+88h]                                            ; +0x2b1, 0x1401386c1\nmov     rbx, [rdi+550h]                                                ; +0x2b7, 0x1401386c7\ntest    rbx, rbx                                                       ; +0x2be, 0x1401386ce\njz      loc_140138768                                                  ; +0x2c1, 0x1401386d1\nmov     rax, cs:qword_1406C2ED8                                        ; +0x2c7, 0x1401386d7\ntest    rax, rax                                                       ; +0x2ce, 0x1401386de\njnz     short loc_140138715                                            ; +0x2d1, 0x1401386e1\nmov     ecx, 668h; Size                                                ; +0x2d3, 0x1401386e3\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2d8, 0x1401386e8\nmov     [rsp+68h+arg_10], rax                                          ; +0x2dd, 0x1401386ed\nmov     rcx, rax                                                       ; +0x2e5, 0x1401386f5\ncall    sub_14017AB00                                                  ; +0x2e8, 0x1401386f8\nnop                                                                    ; +0x2ed, 0x1401386fd\nmov     cs:qword_1406C2ED8, rax                                        ; +0x2ee, 0x1401386fe\nmov     rdx, [rax]                                                     ; +0x2f5, 0x140138705\nmov     rcx, rax                                                       ; +0x2f8, 0x140138708\ncall    qword ptr [rdx+48h]                                            ; +0x2fb, 0x14013870b\nmov     rax, cs:qword_1406C2ED8                                        ; +0x2fe, 0x14013870e\nmov     rcx, [rdi+550h]                                                ; +0x305, 0x140138715\nmov     rdx, [rcx]                                                     ; +0x30c, 0x14013871c\nmov     rax, [rax+208h]                                                ; +0x30f, 0x14013871f\nmovss   xmm1, [rsp+68h+arg_4]                                          ; +0x316, 0x140138726\ndivss   xmm1, dword ptr [rax+1ACh]                                     ; +0x31c, 0x14013872c\nmulss   xmm1, cs:dword_140622D04                                       ; +0x324, 0x140138734\ndivss   xmm1, dword ptr [rbx+1B4h]                                     ; +0x32c, 0x14013873c\ncall    qword ptr [rdx+88h]                                            ; +0x334, 0x140138744\ncmp     byte ptr [rdi+558h], 0                                         ; +0x33a, 0x14013874a\njnz     short loc_140138757                                            ; +0x341, 0x140138751\nmovaps  xmm8, xmm7                                                     ; +0x343, 0x140138753\nmov     rcx, [rdi+550h]                                                ; +0x347, 0x140138757\nmov     rax, [rcx]                                                     ; +0x34e, 0x14013875e\nmovaps  xmm1, xmm8                                                     ; +0x351, 0x140138761\ncall    qword ptr [rax+78h]                                            ; +0x355, 0x140138765\nmov     rbx, [rdi]                                                     ; +0x358, 0x140138768\nmov     rcx, rdi                                                       ; +0x35b, 0x14013876b\ncall    qword ptr [rbx+0C8h]                                           ; +0x35e, 0x14013876e\nmov     rdx, rax                                                       ; +0x364, 0x140138774\nmov     rcx, rdi                                                       ; +0x367, 0x140138777\ncall    qword ptr [rbx+0B8h]                                           ; +0x36a, 0x14013877a\nmovaps  xmm6, [rsp+68h+var_28]                                         ; +0x370, 0x140138780\nmovaps  xmm7, [rsp+68h+var_38]                                         ; +0x375, 0x140138785\nmovaps  xmm8, [rsp+68h+var_48]                                         ; +0x37a, 0x14013878a\nadd     rsp, 50h                                                       ; +0x380, 0x140138790\npop     rdi                                                            ; +0x384, 0x140138794\npop     rsi                                                            ; +0x385, 0x140138795\npop     rbx                                                            ; +0x386, 0x140138796\nretn                                                                   ; +0x387, 0x140138797", "xrefs": ["EndPortalObject::setVisible @ 0x1401383fa", "PlayLayer::checkForEnd @ 0x1403b4daa", "<???> @ 0x1406ca0bc"], "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"}