{"type": "func", "start": 5370844576, "end": 5370845493, "name": "EndPortalObject::updateEndPos", "pseudocode": "// \n// EndPortalObject::updateEndPos from 0x1402095a0 to 0x140209935 (917 bytes)\n// \n// 3 xrefs:\n// > EndPortalObject::setVisible @ 0x14020958a\n// > PlayLayer::checkForEnd @ 0x140513f19\n// > <???> @ 0x14091b350\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:28:16 +0000\n// \n\n// Hidden C++ exception states: #wind=11\n__int64 __fastcall EndPortalObject::updateEndPos(_QWORD **a1, char a2)\n{\n  __int64 v4; // rax\n  float v5; // xmm6_4\n  __int64 v6; // rcx\n  __int64 v7; // rcx\n  __int64 v8; // rbx\n  float *v9; // rax\n  __int64 v10; // rax\n  _QWORD *v11; // rcx\n  __int64 v12; // rbx\n  __int64 v13; // rax\n  char v15; // [rsp+70h] [rbp+8h] BYREF\n  float v16; // [rsp+74h] [rbp+Ch]\n  void *v17; // [rsp+80h] [rbp+18h] BYREF\n  void *v18; // [rsp+88h] [rbp+20h] BYREF\n\n  v4 = cocos2d::CCDirector::sharedDirector(a1);\n  cocos2d::CCDirector::getWinSize(v4, &v15);\n  if ( *((_BYTE *)a1 + 1369) )\n  {\n    v5 = 225.0;\n    if ( *(float *)(((__int64 (__fastcall *)(_QWORD **, void **))(*a1)[208])(a1, &v17) + 4) >= 225.0 )\n      v5 = *(float *)(((__int64 (__fastcall *)(_QWORD **, void **))(*a1)[208])(a1, &v18) + 4);\n  }\n  else\n  {\n    v6 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v17 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v17);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v6 = qword_14090BFD0;\n    }\n    v7 = *(_QWORD *)(v6 + 560);\n    if ( *(_BYTE *)(*(_QWORD *)(v7 + 3512) + 2497LL) )\n    {\n      v5 = (float)((float)(v16 * 0.5) / *(float *)(v7 + 424)) + *(float *)(v7 + 1296);\n    }\n    else\n    {\n      v5 = 225.0;\n      if ( (float)((float)((float)(v16 * 0.5) / *(float *)(v7 + 424)) + *(float *)(v7 + 1296)) >= 225.0 )\n        v5 = (float)((float)(v16 * 0.5) / *(float *)(v7 + 424)) + *(float *)(v7 + 1296);\n    }\n  }\n  v8 = (__int64)*a1;\n  v9 = (float *)((__int64 (__fastcall *)(_QWORD **))(*a1)[25])(a1);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, *v9, v5);\n  (*(void (__fastcall **)(_QWORD **, __int64))(v8 + 1216))(a1, v10);\n  v11 = a1[97];\n  if ( v11 )\n  {\n    if ( a2 )\n      (*(void (__fastcall **)(_QWORD *))(*v11 + 32LL))(v11);\n    if ( !qword_14090BFD0 )\n    {\n      v18 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v18);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    }\n    (*(void (__fastcall **)(_QWORD *))(*a1[97] + 160LL))(a1[97]);\n  }\n  if ( !qword_14090BFD0 )\n  {\n    v18 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v18);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n  }\n  ((void (__fastcall *)(_QWORD **))(*a1)[15])(a1);\n  if ( !qword_14090BFD0 )\n  {\n    v17 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v17);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n  }\n  ((void (__fastcall *)(_QWORD **))(*a1)[17])(a1);\n  if ( a1[170] )\n  {\n    if ( !qword_14090BFD0 )\n    {\n      v17 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v17);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    }\n    (*(void (__fastcall **)(_QWORD *))(*a1[170] + 136LL))(a1[170]);\n    (*(void (__fastcall **)(_QWORD *))(*a1[170] + 120LL))(a1[170]);\n  }\n  v12 = (__int64)*a1;\n  v13 = ((__int64 (__fastcall *)(_QWORD **))(*a1)[25])(a1);\n  return (*(__int64 (__fastcall **)(_QWORD **, __int64))(v12 + 184))(a1, v13);\n}", "assembly": "; \n; EndPortalObject::updateEndPos from 0x1402095a0 to 0x140209935 (917 bytes)\n; \n; 3 xrefs:\n; > EndPortalObject::setVisible @ 0x14020958a\n; > PlayLayer::checkForEnd @ 0x140513f19\n; > <???> @ 0x14091b350\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:28:16 +0000\n; \npush    rbx                                                            ; +0x0, 0x1402095a0\npush    rsi                                                            ; +0x2, 0x1402095a2\npush    rdi                                                            ; +0x3, 0x1402095a3\nsub     rsp, 50h                                                       ; +0x4, 0x1402095a4\nmovaps  [rsp+68h+var_28], xmm6                                         ; +0x8, 0x1402095a8\nmovaps  [rsp+68h+var_38], xmm7                                         ; +0xd, 0x1402095ad\nmovaps  [rsp+68h+var_48], xmm8                                         ; +0x12, 0x1402095b2\nmovzx   esi, dl                                                        ; +0x18, 0x1402095b8\nmov     rdi, rcx                                                       ; +0x1b, 0x1402095bb\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1e, 0x1402095be\nmov     rcx, rax                                                       ; +0x24, 0x1402095c4\nlea     rdx, [rsp+68h+arg_0]                                           ; +0x27, 0x1402095c7\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x2c, 0x1402095cc\ncmp     byte ptr [rdi+559h], 0                                         ; +0x32, 0x1402095d2\njz      short loc_14020961F                                            ; +0x39, 0x1402095d9\nmov     rax, [rdi]                                                     ; +0x3b, 0x1402095db\nlea     rdx, [rsp+68h+arg_10]                                          ; +0x3e, 0x1402095de\nmov     rcx, rdi                                                       ; +0x46, 0x1402095e6\ncall    qword ptr [rax+680h]                                           ; +0x49, 0x1402095e9\nmovss   xmm6, cs:dword_14083592C                                       ; +0x4f, 0x1402095ef\ncomiss  xmm6, dword ptr [rax+4]                                        ; +0x57, 0x1402095f7\nja      loc_1402096C5                                                  ; +0x5b, 0x1402095fb\nmov     rax, [rdi]                                                     ; +0x61, 0x140209601\nlea     rdx, [rsp+68h+arg_18]                                          ; +0x64, 0x140209604\nmov     rcx, rdi                                                       ; +0x6c, 0x14020960c\ncall    qword ptr [rax+680h]                                           ; +0x6f, 0x14020960f\nmovss   xmm6, dword ptr [rax+4]                                        ; +0x75, 0x140209615\njmp     loc_1402096C5                                                  ; +0x7a, 0x14020961a\nmov     rcx, cs:qword_14090BFD0                                        ; +0x7f, 0x14020961f\ntest    rcx, rcx                                                       ; +0x86, 0x140209626\njnz     short loc_140209660                                            ; +0x89, 0x140209629\nmov     ecx, 6E8h; Size                                                ; +0x8b, 0x14020962b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x90, 0x140209630\nmov     [rsp+68h+arg_10], rax                                          ; +0x95, 0x140209635\nmov     rcx, rax                                                       ; +0x9d, 0x14020963d\ncall    GameManager__GameManager                                       ; +0xa0, 0x140209640\nnop                                                                    ; +0xa5, 0x140209645\nmov     cs:qword_14090BFD0, rax                                        ; +0xa6, 0x140209646\nmov     rcx, [rax]                                                     ; +0xad, 0x14020964d\nmov     rdx, [rcx+48h]                                                 ; +0xb0, 0x140209650\nmov     rcx, rax                                                       ; +0xb4, 0x140209654\ncall    rdx                                                            ; +0xb7, 0x140209657\nmov     rcx, cs:qword_14090BFD0                                        ; +0xb9, 0x140209659\nmov     rcx, [rcx+230h]                                                ; +0xc0, 0x140209660\nmov     rax, [rcx+0DB8h]                                               ; +0xc7, 0x140209667\ncmp     byte ptr [rax+9C1h], 0                                         ; +0xce, 0x14020966e\njz      short loc_140209697                                            ; +0xd5, 0x140209675\nmovss   xmm6, [rsp+68h+arg_4]                                          ; +0xd7, 0x140209677\nmulss   xmm6, cs:dword_140834F20                                       ; +0xdd, 0x14020967d\ndivss   xmm6, dword ptr [rcx+1A8h]                                     ; +0xe5, 0x140209685\naddss   xmm6, dword ptr [rcx+510h]                                     ; +0xed, 0x14020968d\njmp     short loc_1402096C5                                            ; +0xf5, 0x140209695\nmovss   xmm0, [rsp+68h+arg_4]                                          ; +0xf7, 0x140209697\nmulss   xmm0, cs:dword_140834F20                                       ; +0xfd, 0x14020969d\ndivss   xmm0, dword ptr [rcx+1A8h]                                     ; +0x105, 0x1402096a5\naddss   xmm0, dword ptr [rcx+510h]                                     ; +0x10d, 0x1402096ad\nmovss   xmm6, cs:dword_14083592C                                       ; +0x115, 0x1402096b5\ncomiss  xmm6, xmm0                                                     ; +0x11d, 0x1402096bd\nja      short loc_1402096C5                                            ; +0x120, 0x1402096c0\nmovaps  xmm6, xmm0                                                     ; +0x122, 0x1402096c2\nmov     rbx, [rdi]                                                     ; +0x125, 0x1402096c5\nmov     rcx, rdi                                                       ; +0x128, 0x1402096c8\ncall    qword ptr [rbx+0C8h]                                           ; +0x12b, 0x1402096cb\nmovaps  xmm2, xmm6                                                     ; +0x131, 0x1402096d1\nmovss   xmm1, dword ptr [rax]                                          ; +0x134, 0x1402096d4\nlea     rcx, [rsp+68h+arg_10]                                          ; +0x138, 0x1402096d8\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x140, 0x1402096e0\nmov     rdx, rax                                                       ; +0x146, 0x1402096e6\nmov     rcx, rdi                                                       ; +0x149, 0x1402096e9\ncall    qword ptr [rbx+4C0h]                                           ; +0x14c, 0x1402096ec\nmov     rcx, [rdi+308h]                                                ; +0x152, 0x1402096f2\nmovss   xmm7, cs:flt_140835080                                         ; +0x159, 0x1402096f9\nmovss   xmm8, cs:dword_140835C90                                       ; +0x161, 0x140209701\ntest    rcx, rcx                                                       ; +0x16a, 0x14020970a\njz      loc_140209796                                                  ; +0x16d, 0x14020970d\ntest    sil, sil                                                       ; +0x173, 0x140209713\njz      short loc_140209721                                            ; +0x176, 0x140209716\nmov     rax, [rcx]                                                     ; +0x178, 0x140209718\nmovaps  xmm1, xmm7                                                     ; +0x17b, 0x14020971b\ncall    qword ptr [rax+20h]                                            ; +0x17e, 0x14020971e\ncmp     byte ptr [rdi+558h], 0                                         ; +0x181, 0x140209721\njz      short loc_140209730                                            ; +0x188, 0x140209728\nmovaps  xmm6, xmm8                                                     ; +0x18a, 0x14020972a\njmp     short loc_140209733                                            ; +0x18e, 0x14020972e\nmovaps  xmm6, xmm7                                                     ; +0x190, 0x140209730\nmov     rax, cs:qword_14090BFD0                                        ; +0x193, 0x140209733\ntest    rax, rax                                                       ; +0x19a, 0x14020973a\njnz     short loc_140209774                                            ; +0x19d, 0x14020973d\nmov     ecx, 6E8h; Size                                                ; +0x19f, 0x14020973f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1a4, 0x140209744\nmov     [rsp+68h+arg_18], rax                                          ; +0x1a9, 0x140209749\nmov     rcx, rax                                                       ; +0x1b1, 0x140209751\ncall    GameManager__GameManager                                       ; +0x1b4, 0x140209754\nnop                                                                    ; +0x1b9, 0x140209759\nmov     cs:qword_14090BFD0, rax                                        ; +0x1ba, 0x14020975a\nmov     rcx, [rax]                                                     ; +0x1c1, 0x140209761\nmov     rdx, [rcx+48h]                                                 ; +0x1c4, 0x140209764\nmov     rcx, rax                                                       ; +0x1c8, 0x140209768\ncall    rdx                                                            ; +0x1cb, 0x14020976b\nmov     rax, cs:qword_14090BFD0                                        ; +0x1cd, 0x14020976d\nmov     rcx, [rdi+308h]                                                ; +0x1d4, 0x140209774\nmov     rax, [rax+230h]                                                ; +0x1db, 0x14020977b\ndivss   xmm6, dword ptr [rax+1ACh]                                     ; +0x1e2, 0x140209782\nmov     rax, [rcx]                                                     ; +0x1ea, 0x14020978a\nmovaps  xmm1, xmm6                                                     ; +0x1ed, 0x14020978d\ncall    qword ptr [rax+0A0h]                                           ; +0x1f0, 0x140209790\ncmp     byte ptr [rdi+558h], 0                                         ; +0x1f6, 0x140209796\njz      short loc_1402097A5                                            ; +0x1fd, 0x14020979d\nmovaps  xmm6, xmm8                                                     ; +0x1ff, 0x14020979f\njmp     short loc_1402097A8                                            ; +0x203, 0x1402097a3\nmovaps  xmm6, xmm7                                                     ; +0x205, 0x1402097a5\nmov     rax, cs:qword_14090BFD0                                        ; +0x208, 0x1402097a8\ntest    rax, rax                                                       ; +0x20f, 0x1402097af\njnz     short loc_1402097E9                                            ; +0x212, 0x1402097b2\nmov     ecx, 6E8h; Size                                                ; +0x214, 0x1402097b4\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x219, 0x1402097b9\nmov     [rsp+68h+arg_18], rax                                          ; +0x21e, 0x1402097be\nmov     rcx, rax                                                       ; +0x226, 0x1402097c6\ncall    GameManager__GameManager                                       ; +0x229, 0x1402097c9\nnop                                                                    ; +0x22e, 0x1402097ce\nmov     cs:qword_14090BFD0, rax                                        ; +0x22f, 0x1402097cf\nmov     rcx, [rax]                                                     ; +0x236, 0x1402097d6\nmov     rdx, [rcx+48h]                                                 ; +0x239, 0x1402097d9\nmov     rcx, rax                                                       ; +0x23d, 0x1402097dd\ncall    rdx                                                            ; +0x240, 0x1402097e0\nmov     rax, cs:qword_14090BFD0                                        ; +0x242, 0x1402097e2\nmov     rax, [rax+230h]                                                ; +0x249, 0x1402097e9\ndivss   xmm6, dword ptr [rax+1ACh]                                     ; +0x250, 0x1402097f0\nmov     rax, [rdi]                                                     ; +0x258, 0x1402097f8\nmovaps  xmm1, xmm6                                                     ; +0x25b, 0x1402097fb\nmov     rcx, rdi                                                       ; +0x25e, 0x1402097fe\ncall    qword ptr [rax+78h]                                            ; +0x261, 0x140209801\nmov     rax, cs:qword_14090BFD0                                        ; +0x264, 0x140209804\ntest    rax, rax                                                       ; +0x26b, 0x14020980b\njnz     short loc_140209845                                            ; +0x26e, 0x14020980e\nmov     ecx, 6E8h; Size                                                ; +0x270, 0x140209810\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x275, 0x140209815\nmov     [rsp+68h+arg_10], rax                                          ; +0x27a, 0x14020981a\nmov     rcx, rax                                                       ; +0x282, 0x140209822\ncall    GameManager__GameManager                                       ; +0x285, 0x140209825\nnop                                                                    ; +0x28a, 0x14020982a\nmov     cs:qword_14090BFD0, rax                                        ; +0x28b, 0x14020982b\nmov     rcx, [rax]                                                     ; +0x292, 0x140209832\nmov     rdx, [rcx+48h]                                                 ; +0x295, 0x140209835\nmov     rcx, rax                                                       ; +0x299, 0x140209839\ncall    rdx                                                            ; +0x29c, 0x14020983c\nmov     rax, cs:qword_14090BFD0                                        ; +0x29e, 0x14020983e\nmov     rax, [rax+230h]                                                ; +0x2a5, 0x140209845\nmovaps  xmm1, xmm7                                                     ; +0x2ac, 0x14020984c\ndivss   xmm1, dword ptr [rax+1ACh]                                     ; +0x2af, 0x14020984f\nmov     rax, [rdi]                                                     ; +0x2b7, 0x140209857\nmov     rcx, rdi                                                       ; +0x2ba, 0x14020985a\ncall    qword ptr [rax+88h]                                            ; +0x2bd, 0x14020985d\ncmp     qword ptr [rdi+550h], 0                                        ; +0x2c3, 0x140209863\njz      loc_140209905                                                  ; +0x2cb, 0x14020986b\nmov     rax, cs:qword_14090BFD0                                        ; +0x2d1, 0x140209871\ntest    rax, rax                                                       ; +0x2d8, 0x140209878\njnz     short loc_1402098B2                                            ; +0x2db, 0x14020987b\nmov     ecx, 6E8h; Size                                                ; +0x2dd, 0x14020987d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2e2, 0x140209882\nmov     [rsp+68h+arg_10], rax                                          ; +0x2e7, 0x140209887\nmov     rcx, rax                                                       ; +0x2ef, 0x14020988f\ncall    GameManager__GameManager                                       ; +0x2f2, 0x140209892\nnop                                                                    ; +0x2f7, 0x140209897\nmov     cs:qword_14090BFD0, rax                                        ; +0x2f8, 0x140209898\nmov     rcx, [rax]                                                     ; +0x2ff, 0x14020989f\nmov     rdx, [rcx+48h]                                                 ; +0x302, 0x1402098a2\nmov     rcx, rax                                                       ; +0x306, 0x1402098a6\ncall    rdx                                                            ; +0x309, 0x1402098a9\nmov     rax, cs:qword_14090BFD0                                        ; +0x30b, 0x1402098ab\nmov     rcx, [rdi+550h]                                                ; +0x312, 0x1402098b2\nmov     rax, [rax+230h]                                                ; +0x319, 0x1402098b9\nmovss   xmm1, [rsp+68h+arg_4]                                          ; +0x320, 0x1402098c0\ndivss   xmm1, dword ptr [rax+1ACh]                                     ; +0x326, 0x1402098c6\nmulss   xmm1, cs:dword_140835164                                       ; +0x32e, 0x1402098ce\ndivss   xmm1, dword ptr [rcx+1B4h]                                     ; +0x336, 0x1402098d6\nmov     rax, [rcx]                                                     ; +0x33e, 0x1402098de\ncall    qword ptr [rax+88h]                                            ; +0x341, 0x1402098e1\ncmp     byte ptr [rdi+558h], 0                                         ; +0x347, 0x1402098e7\njnz     short loc_1402098F4                                            ; +0x34e, 0x1402098ee\nmovaps  xmm8, xmm7                                                     ; +0x350, 0x1402098f0\nmov     rcx, [rdi+550h]                                                ; +0x354, 0x1402098f4\nmov     rax, [rcx]                                                     ; +0x35b, 0x1402098fb\nmovaps  xmm1, xmm8                                                     ; +0x35e, 0x1402098fe\ncall    qword ptr [rax+78h]                                            ; +0x362, 0x140209902\nmov     rbx, [rdi]                                                     ; +0x365, 0x140209905\nmov     rcx, rdi                                                       ; +0x368, 0x140209908\ncall    qword ptr [rbx+0C8h]                                           ; +0x36b, 0x14020990b\nmov     rdx, rax                                                       ; +0x371, 0x140209911\nmov     rcx, rdi                                                       ; +0x374, 0x140209914\ncall    qword ptr [rbx+0B8h]                                           ; +0x377, 0x140209917\nmovaps  xmm6, [rsp+68h+var_28]                                         ; +0x37d, 0x14020991d\nmovaps  xmm7, [rsp+68h+var_38]                                         ; +0x382, 0x140209922\nmovaps  xmm8, [rsp+68h+var_48]                                         ; +0x387, 0x140209927\nadd     rsp, 50h                                                       ; +0x38d, 0x14020992d\npop     rdi                                                            ; +0x391, 0x140209931\npop     rsi                                                            ; +0x392, 0x140209932\npop     rbx                                                            ; +0x393, 0x140209933\nretn                                                                   ; +0x394, 0x140209934", "xrefs": ["EndPortalObject::setVisible @ 0x14020958a", "PlayLayer::checkForEnd @ 0x140513f19", "<???> @ 0x14091b350"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}