{"type": "func", "start": 4295286560, "end": 4295286873, "name": "EditorUI::onTargetIDChange", "pseudocode": "// \n// EditorUI::onTargetIDChange from 0x10004df20 to 0x10004e059 (313 bytes)\n// \n// 2 xrefs:\n// > EditorUI::keyDown @ 0x100050e26\n// > EditorUI::keyDown @ 0x1000510bd\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\nvoid __fastcall EditorUI::onTargetIDChange(EditorUI *a1, int a2)\n{\n  char v2; // al\n  GameObject *m_selectedObject; // rdi\n  cocos2d::CCArray *m_selectedObjects; // r14\n  unsigned int v7; // r15d\n  GameObject *v8; // rax\n  unsigned int v9; // r12d\n  EffectGameObject *v10; // r13\n  int m_targetGroupID; // esi\n  __int64 v12; // rax\n  __int64 v13; // r15\n  cocos2d::CCString *v14; // rax\n  const char *CString; // rax\n  char v16; // [rsp-8h] [rbp-30h]\n\n  v16 = v2;\n  m_selectedObject = a1->m_selectedObject;\n  if ( m_selectedObject )\n  {\n    m_selectedObjects = (cocos2d::CCArray *)sub_10071FA80(m_selectedObject);\n    if ( !(unsigned int)sub_100720070(m_selectedObjects) )\n      return;\n  }\n  else\n  {\n    m_selectedObjects = a1->m_selectedObjects;\n    if ( !(unsigned int)sub_100720070(m_selectedObjects) )\n      return;\n  }\n  if ( (unsigned int)sub_100720070(m_selectedObjects) )\n  {\n    v7 = 0;\n    while ( 1 )\n    {\n      v8 = (GameObject *)sub_1007200C0(m_selectedObjects, v7);\n      if ( !GameObject::isTrigger(v8) )\n        break;\n      if ( ++v7 >= (unsigned int)sub_100720070(m_selectedObjects) )\n        goto LABEL_9;\n    }\n  }\n  else\n  {\nLABEL_9:\n    if ( (unsigned int)sub_100720070(m_selectedObjects) )\n    {\n      v9 = 0;\n      do\n      {\n        v10 = (EffectGameObject *)sub_1007200C0(m_selectedObjects, v9);\n        if ( GameObject::isTrigger(v10) )\n        {\n          m_targetGroupID = v10->m_targetGroupID;\n          if ( m_targetGroupID > 0 )\n          {\n            EffectGameObject::setTargetID(v10, a2 + m_targetGroupID);\n            v12 = ((__int64 (__fastcall *)(EffectGameObject *, __int64))v10->getChildByTag)(v10, 999);\n            if ( v12 )\n            {\n              v13 = v12;\n              v14 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v16);\n              CString = cocos2d::CCString::getCString(v14);\n              (*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v13 + 912LL))(v13, CString);\n            }\n          }\n        }\n        ++v9;\n      }\n      while ( v9 < (unsigned int)sub_100720070(m_selectedObjects) );\n    }\n  }\n}", "assembly": "; \n; EditorUI::onTargetIDChange from 0x10004df20 to 0x10004e059 (313 bytes)\n; \n; 2 xrefs:\n; > EditorUI::keyDown @ 0x100050e26\n; > EditorUI::keyDown @ 0x1000510bd\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    rbp                                                            ; +0x0, 0x10004df20\nmov     rbp, rsp                                                       ; +0x1, 0x10004df21\npush    r15                                                            ; +0x4, 0x10004df24\npush    r14                                                            ; +0x6, 0x10004df26\npush    r13                                                            ; +0x8, 0x10004df28\npush    r12                                                            ; +0xa, 0x10004df2a\npush    rbx                                                            ; +0xc, 0x10004df2c\npush    rax; char                                                      ; +0xd, 0x10004df2d\nmov     ebx, esi                                                       ; +0xe, 0x10004df2e\nmov     rax, rdi                                                       ; +0x10, 0x10004df30\nmov     rdi, [rdi+520h]                                                ; +0x13, 0x10004df33\ntest    rdi, rdi                                                       ; +0x1a, 0x10004df3a\njz      short loc_10004DF58                                            ; +0x1d, 0x10004df3d\ncall    sub_10071FA80                                                  ; +0x1f, 0x10004df3f\nmov     r14, rax                                                       ; +0x24, 0x10004df44\nmov     rdi, r14                                                       ; +0x27, 0x10004df47\ncall    sub_100720070                                                  ; +0x2a, 0x10004df4a\ntest    eax, eax                                                       ; +0x2f, 0x10004df4f\njnz     short loc_10004DF6F                                            ; +0x31, 0x10004df51\njmp     loc_10004E04A                                                  ; +0x33, 0x10004df53\nmov     r14, [rax+328h]                                                ; +0x38, 0x10004df58\nmov     rdi, r14                                                       ; +0x3f, 0x10004df5f\ncall    sub_100720070                                                  ; +0x42, 0x10004df62\ntest    eax, eax                                                       ; +0x47, 0x10004df67\njz      loc_10004E04A                                                  ; +0x49, 0x10004df69\nmov     rdi, r14                                                       ; +0x4f, 0x10004df6f\ncall    sub_100720070                                                  ; +0x52, 0x10004df72\ntest    eax, eax                                                       ; +0x57, 0x10004df77\njz      short loc_10004DFAB                                            ; +0x59, 0x10004df79\nxor     r15d, r15d                                                     ; +0x5b, 0x10004df7b\nxchg    ax, ax                                                         ; +0x5e, 0x10004df7e\nmov     rdi, r14                                                       ; +0x60, 0x10004df80\nmov     esi, r15d                                                      ; +0x63, 0x10004df83\ncall    sub_1007200C0                                                  ; +0x66, 0x10004df86\nmov     rdi, rax                                                       ; +0x6b, 0x10004df8b\ncall    GameObject__isTrigger                                          ; +0x6e, 0x10004df8e\ntest    al, al                                                         ; +0x73, 0x10004df93\njz      loc_10004E04A                                                  ; +0x75, 0x10004df95\ninc     r15d                                                           ; +0x7b, 0x10004df9b\nmov     rdi, r14                                                       ; +0x7e, 0x10004df9e\ncall    sub_100720070                                                  ; +0x81, 0x10004dfa1\ncmp     r15d, eax                                                      ; +0x86, 0x10004dfa6\njb      short loc_10004DF80                                            ; +0x89, 0x10004dfa9\nmov     rdi, r14                                                       ; +0x8b, 0x10004dfab\ncall    sub_100720070                                                  ; +0x8e, 0x10004dfae\ntest    eax, eax                                                       ; +0x93, 0x10004dfb3\njz      loc_10004E04A                                                  ; +0x95, 0x10004dfb5\nxor     r12d, r12d                                                     ; +0x9b, 0x10004dfbb\njmp     short loc_10004DFD0                                            ; +0x9e, 0x10004dfbe\ninc     r12d                                                           ; +0xa0, 0x10004dfc0\nmov     rdi, r14                                                       ; +0xa3, 0x10004dfc3\ncall    sub_100720070                                                  ; +0xa6, 0x10004dfc6\ncmp     r12d, eax                                                      ; +0xab, 0x10004dfcb\njnb     short loc_10004E04A                                            ; +0xae, 0x10004dfce\nmov     rdi, r14                                                       ; +0xb0, 0x10004dfd0\nmov     esi, r12d                                                      ; +0xb3, 0x10004dfd3\ncall    sub_1007200C0                                                  ; +0xb6, 0x10004dfd6\nmov     r13, rax                                                       ; +0xbb, 0x10004dfdb\nmov     rdi, rax                                                       ; +0xbe, 0x10004dfde\ncall    GameObject__isTrigger                                          ; +0xc1, 0x10004dfe1\ntest    al, al                                                         ; +0xc6, 0x10004dfe6\njz      short loc_10004DFC0                                            ; +0xc8, 0x10004dfe8\nmov     esi, [r13+5B8h]                                                ; +0xca, 0x10004dfea\ntest    esi, esi                                                       ; +0xd1, 0x10004dff1\njle     short loc_10004DFC0                                            ; +0xd3, 0x10004dff3\nadd     esi, ebx                                                       ; +0xd5, 0x10004dff5\nmov     rdi, r13                                                       ; +0xd7, 0x10004dff7\ncall    EffectGameObject__setTargetID                                  ; +0xda, 0x10004dffa\nmov     rax, [r13+0]                                                   ; +0xdf, 0x10004dfff\nmov     rdi, r13                                                       ; +0xe3, 0x10004e003\nmov     esi, 3E7h                                                      ; +0xe6, 0x10004e006\ncall    qword ptr [rax+1D0h]                                           ; +0xeb, 0x10004e00b\ntest    rax, rax                                                       ; +0xf1, 0x10004e011\njz      short loc_10004DFC0                                            ; +0xf4, 0x10004e014\nmov     r15, rax                                                       ; +0xf6, 0x10004e016\nmov     esi, [r13+5B8h]                                                ; +0xf9, 0x10004e019\nlea     rdi, aI; \"%i\"                                                  ; +0x100, 0x10004e020\nxor     eax, eax                                                       ; +0x107, 0x10004e027\ncall    sub_1007AB580                                                  ; +0x109, 0x10004e029\nmov     rdi, rax                                                       ; +0x10e, 0x10004e02e\ncall    cocos2d__CCString__getCString                                  ; +0x111, 0x10004e031\nmov     rcx, [r15]                                                     ; +0x116, 0x10004e036\nmov     rdi, r15                                                       ; +0x119, 0x10004e039\nmov     rsi, rax                                                       ; +0x11c, 0x10004e03c\ncall    qword ptr [rcx+390h]                                           ; +0x11f, 0x10004e03f\njmp     loc_10004DFC0                                                  ; +0x125, 0x10004e045\nadd     rsp, 8                                                         ; +0x12a, 0x10004e04a\npop     rbx                                                            ; +0x12e, 0x10004e04e\npop     r12                                                            ; +0x12f, 0x10004e04f\npop     r13                                                            ; +0x131, 0x10004e051\npop     r14                                                            ; +0x133, 0x10004e053\npop     r15                                                            ; +0x135, 0x10004e055\npop     rbp                                                            ; +0x137, 0x10004e057\nretn                                                                   ; +0x138, 0x10004e058", "xrefs": ["EditorUI::keyDown @ 0x100050e26", "EditorUI::keyDown @ 0x1000510bd"], "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"}