{"type": "func", "start": 5370577824, "end": 5370578170, "name": "EditorUI::deselectTargetPortals", "pseudocode": "// \n// EditorUI::deselectTargetPortals from 0x1401c83a0 to 0x1401c84fa (346 bytes)\n// \n// 7 xrefs:\n// > EditorUI::onDelete @ 0x1401b0051\n// > EditorUI::onDelete @ 0x1401b0138\n// > EditorUI::onDeleteSelected @ 0x1401b0c31\n// > <???> @ 0x1408a2cbc\n// > <???> @ 0x1408a2cf0\n// > <???> @ 0x14091a810\n// > <???> @ 0x14091a81c\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:06 +0000\n// \n\ndouble __fastcall EditorUI::deselectTargetPortals(__int64 a1)\n{\n  cocos2d::CCArray *v2; // rcx\n  __int64 v3; // rcx\n  unsigned int v4; // esi\n  cocos2d::CCArray *v5; // rbp\n  unsigned int i; // edi\n  struct cocos2d::CCObject *v7; // rax\n  struct cocos2d::CCObject *v8; // rax\n  __int64 v9; // rax\n  __int64 v10; // rcx\n  double result; // xmm0_8\n\n  v2 = *(cocos2d::CCArray **)(a1 + 944);\n  if ( v2 && cocos2d::CCArray::count(v2) )\n  {\n    v4 = 0;\n    v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);\n    for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)); ++i )\n    {\n      v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 944), i);\n      if ( *((_DWORD *)v7 + 259) == 749 )\n        cocos2d::CCArray::addObject(v5, v7);\n    }\n    if ( cocos2d::CCArray::count(v5) )\n    {\n      do\n      {\n        v8 = cocos2d::CCArray::objectAtIndex(v5, v4);\n        EditorUI::deselectObject(a1, (__int64)v8);\n        ++v4;\n      }\n      while ( v4 < cocos2d::CCArray::count(v5) );\n    }\n  }\n  else\n  {\n    v9 = *(_QWORD *)(a1 + 1568);\n    if ( v9 && *(_DWORD *)(v9 + 1036) == 749 )\n    {\n      cocos2d::CCNode::stopActionByTag((cocos2d::CCNode *)a1, 124);\n      v10 = *(_QWORD *)(a1 + 1568);\n      if ( v10 )\n      {\n        *(_BYTE *)(v10 + 1141) = 0;\n        GameObject::updateObjectEditorColor(v10);\n      }\n      *(_QWORD *)(a1 + 1568) = 0;\n      EditorUI::toggleEditObjectButton(a1);\n      *(_BYTE *)(a1 + 824) = 1;\n      return cocos2d::CCPoint::operator=(a1 + 1544, &unk_14090A748);\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::deselectTargetPortals from 0x1401c83a0 to 0x1401c84fa (346 bytes)\n; \n; 7 xrefs:\n; > EditorUI::onDelete @ 0x1401b0051\n; > EditorUI::onDelete @ 0x1401b0138\n; > EditorUI::onDeleteSelected @ 0x1401b0c31\n; > <???> @ 0x1408a2cbc\n; > <???> @ 0x1408a2cf0\n; > <???> @ 0x14091a810\n; > <???> @ 0x14091a81c\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:06 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1401c83a0\npush    rsi                                                            ; +0x5, 0x1401c83a5\nsub     rsp, 20h                                                       ; +0x6, 0x1401c83a6\nmov     rbx, rcx                                                       ; +0xa, 0x1401c83aa\nmov     rcx, [rcx+3B0h]                                                ; +0xd, 0x1401c83ad\ntest    rcx, rcx                                                       ; +0x14, 0x1401c83b4\njz      loc_1401C8485                                                  ; +0x17, 0x1401c83b7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1d, 0x1401c83bd\ntest    eax, eax                                                       ; +0x23, 0x1401c83c3\njz      loc_1401C8485                                                  ; +0x25, 0x1401c83c5\nmov     [rsp+28h+arg_0], rbp                                           ; +0x2b, 0x1401c83cb\nmov     [rsp+28h+arg_8], rdi                                           ; +0x30, 0x1401c83d0\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x35, 0x1401c83d5\nmov     rcx, [rbx+3B0h]                                                ; +0x3b, 0x1401c83db\nxor     esi, esi                                                       ; +0x42, 0x1401c83e2\nmov     rbp, rax                                                       ; +0x44, 0x1401c83e4\nmov     edi, esi                                                       ; +0x47, 0x1401c83e7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x49, 0x1401c83e9\ntest    eax, eax                                                       ; +0x4f, 0x1401c83ef\njz      short loc_1401C843A                                            ; +0x51, 0x1401c83f1\nnop     dword ptr [rax+00h]                                            ; +0x53, 0x1401c83f3\nnop     word ptr [rax+rax+00000000h]                                   ; +0x57, 0x1401c83f7\nmov     rcx, [rbx+3B0h]                                                ; +0x60, 0x1401c8400\nmov     edx, edi                                                       ; +0x67, 0x1401c8407\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x69, 0x1401c8409\ncmp     dword ptr [rax+40Ch], 2EDh                                     ; +0x6f, 0x1401c840f\njnz     short loc_1401C8427                                            ; +0x79, 0x1401c8419\nmov     rdx, rax                                                       ; +0x7b, 0x1401c841b\nmov     rcx, rbp                                                       ; +0x7e, 0x1401c841e\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x81, 0x1401c8421\nmov     rcx, [rbx+3B0h]                                                ; +0x87, 0x1401c8427\ninc     edi                                                            ; +0x8e, 0x1401c842e\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x90, 0x1401c8430\ncmp     edi, eax                                                       ; +0x96, 0x1401c8436\njb      short loc_1401C8400                                            ; +0x98, 0x1401c8438\nmov     rcx, rbp                                                       ; +0x9a, 0x1401c843a\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x9d, 0x1401c843d\nmov     rdi, [rsp+28h+arg_8]                                           ; +0xa3, 0x1401c8443\ntest    eax, eax                                                       ; +0xa8, 0x1401c8448\njz      short loc_1401C8475                                            ; +0xaa, 0x1401c844a\nnop     dword ptr [rax+00h]                                            ; +0xac, 0x1401c844c\nmov     edx, esi                                                       ; +0xb0, 0x1401c8450\nmov     rcx, rbp                                                       ; +0xb2, 0x1401c8452\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xb5, 0x1401c8455\nmov     rdx, rax                                                       ; +0xbb, 0x1401c845b\nmov     rcx, rbx                                                       ; +0xbe, 0x1401c845e\ncall    EditorUI__deselectObject                                       ; +0xc1, 0x1401c8461\nmov     rcx, rbp                                                       ; +0xc6, 0x1401c8466\ninc     esi                                                            ; +0xc9, 0x1401c8469\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xcb, 0x1401c846b\ncmp     esi, eax                                                       ; +0xd1, 0x1401c8471\njb      short loc_1401C8450                                            ; +0xd3, 0x1401c8473\nmov     rbp, [rsp+28h+arg_0]                                           ; +0xd5, 0x1401c8475\nmov     rbx, [rsp+28h+arg_10]                                          ; +0xda, 0x1401c847a\nadd     rsp, 20h                                                       ; +0xdf, 0x1401c847f\npop     rsi                                                            ; +0xe3, 0x1401c8483\nretn                                                                   ; +0xe4, 0x1401c8484\nmov     rax, [rbx+620h]                                                ; +0xe5, 0x1401c8485\ntest    rax, rax                                                       ; +0xec, 0x1401c848c\njz      short loc_1401C847A                                            ; +0xef, 0x1401c848f\ncmp     dword ptr [rax+40Ch], 2EDh                                     ; +0xf1, 0x1401c8491\njnz     short loc_1401C847A                                            ; +0xfb, 0x1401c849b\nmov     edx, 7Ch ; '|'                                                 ; +0xfd, 0x1401c849d\nmov     rcx, rbx                                                       ; +0x102, 0x1401c84a2\ncall    cs:?stopActionByTag@CCNode@cocos2d@@QEAAXH@Z; cocos2d::CCNode::stopActionByTag(int) ; +0x105, 0x1401c84a5\nmov     rcx, [rbx+620h]                                                ; +0x10b, 0x1401c84ab\ntest    rcx, rcx                                                       ; +0x112, 0x1401c84b2\njz      short loc_1401C84C3                                            ; +0x115, 0x1401c84b5\nmov     byte ptr [rcx+475h], 0                                         ; +0x117, 0x1401c84b7\ncall    GameObject__updateObjectEditorColor                            ; +0x11e, 0x1401c84be\nxor     esi, esi                                                       ; +0x123, 0x1401c84c3\nmov     rcx, rbx                                                       ; +0x125, 0x1401c84c5\nmov     [rbx+620h], rsi                                                ; +0x128, 0x1401c84c8\ncall    EditorUI__toggleEditObjectButton                               ; +0x12f, 0x1401c84cf\nlea     rcx, [rbx+608h]                                                ; +0x134, 0x1401c84d4\nmov     byte ptr [rbx+338h], 1                                         ; +0x13b, 0x1401c84db\nlea     rdx, unk_14090A748                                             ; +0x142, 0x1401c84e2\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x149, 0x1401c84e9\nadd     rsp, 20h                                                       ; +0x14e, 0x1401c84ee\npop     rsi                                                            ; +0x152, 0x1401c84f2\njmp     cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x153, 0x1401c84f3", "xrefs": ["EditorUI::onDelete @ 0x1401b0051", "EditorUI::onDelete @ 0x1401b0138", "EditorUI::onDeleteSelected @ 0x1401b0c31", "<???> @ 0x1408a2cbc", "<???> @ 0x1408a2cf0", "<???> @ 0x14091a810", "<???> @ 0x14091a81c"], "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"}