{"type": "func", "start": 5370539680, "end": 5370540042, "name": "EditorUI::onTargetIDChange", "pseudocode": "// \n// EditorUI::onTargetIDChange from 0x1401beea0 to 0x1401bf00a (362 bytes)\n// \n// 5 xrefs:\n// > EditorUI::handleEditorAction @ 0x1401c36ca\n// > EditorUI::handleEditorAction @ 0x1401c36e8\n// > <???> @ 0x1408a24d4\n// > <???> @ 0x1408a2510\n// > <???> @ 0x14091a540\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:02 +0000\n// \n\nunsigned int __fastcall EditorUI::onTargetIDChange(__int64 a1, int a2)\n{\n  cocos2d::CCArray *v3; // rbx\n  unsigned int result; // eax\n  unsigned int v5; // edi\n  struct cocos2d::CCObject *v6; // rax\n  unsigned int v7; // edi\n  struct cocos2d::CCObject *v8; // rsi\n  int v9; // eax\n  int v10; // ecx\n  __int64 v11; // rax\n  __int64 v12; // rbp\n  cocos2d::CCString *v13; // rax\n  const char *CString; // rax\n\n  if ( *(_QWORD *)(a1 + 1568) )\n    v3 = cocos2d::CCArray::createWithObject(*(struct cocos2d::CCObject **)(a1 + 1568));\n  else\n    v3 = *(cocos2d::CCArray **)(a1 + 944);\n  result = cocos2d::CCArray::count(v3);\n  if ( result )\n  {\n    v5 = 0;\n    if ( cocos2d::CCArray::count(v3) )\n    {\n      while ( 1 )\n      {\n        v6 = cocos2d::CCArray::objectAtIndex(v3, v5);\n        result = GameObject::isTrigger(v6);\n        if ( !(_BYTE)result )\n          break;\n        if ( ++v5 >= cocos2d::CCArray::count(v3) )\n          goto LABEL_8;\n      }\n    }\n    else\n    {\nLABEL_8:\n      v7 = 0;\n      result = cocos2d::CCArray::count(v3);\n      if ( result )\n      {\n        do\n        {\n          v8 = cocos2d::CCArray::objectAtIndex(v3, v7);\n          if ( (unsigned __int8)GameObject::isTrigger(v8) )\n          {\n            v9 = *((_DWORD *)v8 + 370);\n            if ( v9 > 0 )\n            {\n              v10 = v9 + a2;\n              v11 = *(_QWORD *)v8;\n              if ( v10 < 0 )\n                v10 = 0;\n              if ( v10 > 9999 )\n                v10 = 9999;\n              *((_DWORD *)v8 + 370) = v10;\n              v12 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *, __int64))(v11 + 472))(v8, 999);\n              if ( v12 )\n              {\n                v13 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, *((unsigned int *)v8 + 370));\n                CString = cocos2d::CCString::getCString(v13);\n                (**(void (__fastcall ***)(__int64, const char *))(v12 + 360))(v12 + 360, CString);\n              }\n            }\n          }\n          ++v7;\n          result = cocos2d::CCArray::count(v3);\n        }\n        while ( v7 < result );\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::onTargetIDChange from 0x1401beea0 to 0x1401bf00a (362 bytes)\n; \n; 5 xrefs:\n; > EditorUI::handleEditorAction @ 0x1401c36ca\n; > EditorUI::handleEditorAction @ 0x1401c36e8\n; > <???> @ 0x1408a24d4\n; > <???> @ 0x1408a2510\n; > <???> @ 0x14091a540\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:02 +0000\n; \npush    rbx                                                            ; +0x0, 0x1401beea0\npush    r14                                                            ; +0x2, 0x1401beea2\nsub     rsp, 28h                                                       ; +0x4, 0x1401beea4\nmov     rax, [rcx+620h]                                                ; +0x8, 0x1401beea8\nmov     r14d, edx                                                      ; +0xf, 0x1401beeaf\ntest    rax, rax                                                       ; +0x12, 0x1401beeb2\njz      short loc_1401BEEC5                                            ; +0x15, 0x1401beeb5\nmov     rcx, rax                                                       ; +0x17, 0x1401beeb7\ncall    cs:?createWithObject@CCArray@cocos2d@@SAPEAV12@PEAVCCObject@2@@Z; cocos2d::CCArray::createWithObject(cocos2d::CCObject *) ; +0x1a, 0x1401beeba\nmov     rbx, rax                                                       ; +0x20, 0x1401beec0\njmp     short loc_1401BEECC                                            ; +0x23, 0x1401beec3\nmov     rbx, [rcx+3B0h]                                                ; +0x25, 0x1401beec5\nmov     rcx, rbx                                                       ; +0x2c, 0x1401beecc\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x2f, 0x1401beecf\ntest    eax, eax                                                       ; +0x35, 0x1401beed5\njz      loc_1401BF002                                                  ; +0x37, 0x1401beed7\nmov     [rsp+38h+arg_10], rdi                                          ; +0x3d, 0x1401beedd\nmov     rcx, rbx                                                       ; +0x42, 0x1401beee2\nmov     [rsp+38h+var_18], r15                                          ; +0x45, 0x1401beee5\nxor     r15d, r15d                                                     ; +0x4a, 0x1401beeea\nmov     edi, r15d                                                      ; +0x4d, 0x1401beeed\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x50, 0x1401beef0\ntest    eax, eax                                                       ; +0x56, 0x1401beef6\njz      short loc_1401BEF2A                                            ; +0x58, 0x1401beef8\nnop     word ptr [rax+rax+00h]                                         ; +0x5a, 0x1401beefa\nmov     edx, edi                                                       ; +0x60, 0x1401bef00\nmov     rcx, rbx                                                       ; +0x62, 0x1401bef02\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x65, 0x1401bef05\nmov     rcx, rax                                                       ; +0x6b, 0x1401bef0b\ncall    GameObject__isTrigger                                          ; +0x6e, 0x1401bef0e\ntest    al, al                                                         ; +0x73, 0x1401bef13\njz      loc_1401BEFF8                                                  ; +0x75, 0x1401bef15\nmov     rcx, rbx                                                       ; +0x7b, 0x1401bef1b\ninc     edi                                                            ; +0x7e, 0x1401bef1e\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x80, 0x1401bef20\ncmp     edi, eax                                                       ; +0x86, 0x1401bef26\njb      short loc_1401BEF00                                            ; +0x88, 0x1401bef28\nmov     rcx, rbx                                                       ; +0x8a, 0x1401bef2a\nmov     edi, r15d                                                      ; +0x8d, 0x1401bef2d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x90, 0x1401bef30\ntest    eax, eax                                                       ; +0x96, 0x1401bef36\njz      loc_1401BEFF8                                                  ; +0x98, 0x1401bef38\nmov     [rsp+38h+arg_8], rsi                                           ; +0x9e, 0x1401bef3e\nmov     [rsp+38h+arg_18], r12                                          ; +0xa3, 0x1401bef43\nmov     r12d, 270Fh                                                    ; +0xa8, 0x1401bef48\nmov     [rsp+38h+arg_0], rbp                                           ; +0xae, 0x1401bef4e\nmov     edx, edi                                                       ; +0xb3, 0x1401bef53\nmov     rcx, rbx                                                       ; +0xb5, 0x1401bef55\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xb8, 0x1401bef58\nmov     rcx, rax                                                       ; +0xbe, 0x1401bef5e\nmov     rsi, rax                                                       ; +0xc1, 0x1401bef61\ncall    GameObject__isTrigger                                          ; +0xc4, 0x1401bef64\ntest    al, al                                                         ; +0xc9, 0x1401bef69\njz      short loc_1401BEFD6                                            ; +0xcb, 0x1401bef6b\nmov     eax, [rsi+5C8h]                                                ; +0xcd, 0x1401bef6d\ntest    eax, eax                                                       ; +0xd3, 0x1401bef73\njle     short loc_1401BEFD6                                            ; +0xd5, 0x1401bef75\nlea     ecx, [rax+r14]                                                 ; +0xd7, 0x1401bef77\nmov     edx, 3E7h                                                      ; +0xdb, 0x1401bef7b\nmov     rax, [rsi]                                                     ; +0xe0, 0x1401bef80\ntest    ecx, ecx                                                       ; +0xe3, 0x1401bef83\ncmovs   ecx, r15d                                                      ; +0xe5, 0x1401bef85\ncmp     ecx, r12d                                                      ; +0xe9, 0x1401bef89\ncmovg   ecx, r12d                                                      ; +0xec, 0x1401bef8c\nmov     [rsi+5C8h], ecx                                                ; +0xf0, 0x1401bef90\nmov     rcx, rsi                                                       ; +0xf6, 0x1401bef96\ncall    qword ptr [rax+1D8h]                                           ; +0xf9, 0x1401bef99\nmov     rbp, rax                                                       ; +0xff, 0x1401bef9f\ntest    rax, rax                                                       ; +0x102, 0x1401befa2\njz      short loc_1401BEFD6                                            ; +0x105, 0x1401befa5\nmov     edx, [rsi+5C8h]                                                ; +0x107, 0x1401befa7\nlea     rcx, word_1406ED6F8                                            ; +0x10d, 0x1401befad\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x114, 0x1401befb4\nmov     rcx, rax                                                       ; +0x11a, 0x1401befba\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x11d, 0x1401befbd\nlea     rcx, [rbp+168h]                                                ; +0x123, 0x1401befc3\nmov     rdx, [rcx]                                                     ; +0x12a, 0x1401befca\nmov     r8, [rdx]                                                      ; +0x12d, 0x1401befcd\nmov     rdx, rax                                                       ; +0x130, 0x1401befd0\ncall    r8                                                             ; +0x133, 0x1401befd3\nmov     rcx, rbx                                                       ; +0x136, 0x1401befd6\ninc     edi                                                            ; +0x139, 0x1401befd9\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x13b, 0x1401befdb\ncmp     edi, eax                                                       ; +0x141, 0x1401befe1\njb      loc_1401BEF53                                                  ; +0x143, 0x1401befe3\nmov     r12, [rsp+38h+arg_18]                                          ; +0x149, 0x1401befe9\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x14e, 0x1401befee\nmov     rbp, [rsp+38h+arg_0]                                           ; +0x153, 0x1401beff3\nmov     rdi, [rsp+38h+arg_10]                                          ; +0x158, 0x1401beff8\nmov     r15, [rsp+38h+var_18]                                          ; +0x15d, 0x1401beffd\nadd     rsp, 28h                                                       ; +0x162, 0x1401bf002\npop     r14                                                            ; +0x166, 0x1401bf006\npop     rbx                                                            ; +0x168, 0x1401bf008\nretn                                                                   ; +0x169, 0x1401bf009", "xrefs": ["EditorUI::handleEditorAction @ 0x1401c36ca", "EditorUI::handleEditorAction @ 0x1401c36e8", "<???> @ 0x1408a24d4", "<???> @ 0x1408a2510", "<???> @ 0x14091a540"], "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"}