{"type": "func", "start": 5372889744, "end": 5372890109, "name": "SetGroupIDLayer::onAddGroup", "pseudocode": "// \n// SetGroupIDLayer::onAddGroup from 0x1403fca90 to 0x1403fcbfd (365 bytes)\n// \n// 2 xrefs:\n// > SetGroupIDLayer::init @ 0x1403f93b7\n// > <???> @ 0x1406d84e0\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=2\nvoid SetGroupIDLayer::onAddGroup(SetGroupIDLayer *a1, cocos2d::CCObject *a2)\n{\n  unsigned int m_groupIDValue; // ebp\n  GameObject *m_targetObject; // rcx\n  __int64 v5; // rcx\n  unsigned int i; // ebx\n  struct cocos2d::CCObject *v7; // rsi\n  __int64 v8; // rcx\n  void *v9; // [rsp+30h] [rbp+8h]\n  void *v10; // [rsp+30h] [rbp+8h]\n\n  m_groupIDValue = a1->m_groupIDValue;\n  a1->m_addedGroup = 1;\n  m_targetObject = a1->m_targetObject;\n  if ( m_targetObject )\n  {\n    if ( m_targetObject->addToGroup(m_targetObject, m_groupIDValue) == 1 )\n    {\n      v5 = qword_1406C2ED8;\n      if ( !qword_1406C2ED8 )\n      {\n        v9 = operator new(0x668u);\n        qword_1406C2ED8 = sub_14017AB00((__int64)v9);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n        v5 = qword_1406C2ED8;\n      }\n      (*(void (__fastcall **)(_QWORD, GameObject *, _QWORD, _QWORD))(**(_QWORD **)(v5 + 528) + 1152LL))(\n        *(_QWORD *)(v5 + 528),\n        a1->m_targetObject,\n        m_groupIDValue,\n        0);\n    }\n  }\n  else\n  {\n    for ( i = 0; i < cocos2d::CCArray::count(a1->m_targetObjects); ++i )\n    {\n      v7 = cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, i);\n      if ( ((unsigned int (__fastcall *)(struct cocos2d::CCObject *, _QWORD))v7->__vftable[19].setTag)(\n             v7,\n             m_groupIDValue) == 1 )\n      {\n        v8 = qword_1406C2ED8;\n        if ( !qword_1406C2ED8 )\n        {\n          v10 = operator new(0x668u);\n          qword_1406C2ED8 = sub_14017AB00((__int64)v10);\n          (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n          v8 = qword_1406C2ED8;\n        }\n        (*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *, _QWORD, _QWORD))(**(_QWORD **)(v8 + 528) + 1152LL))(\n          *(_QWORD *)(v8 + 528),\n          v7,\n          m_groupIDValue,\n          0);\n      }\n    }\n  }\n  SetGroupIDLayer::updateGroupIDButtons(a1);\n}", "assembly": "; \n; SetGroupIDLayer::onAddGroup from 0x1403fca90 to 0x1403fcbfd (365 bytes)\n; \n; 2 xrefs:\n; > SetGroupIDLayer::init @ 0x1403f93b7\n; > <???> @ 0x1406d84e0\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1403fca90\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1403fca95\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1403fca9a\npush    rdi                                                            ; +0xf, 0x1403fca9f\nsub     rsp, 20h                                                       ; +0x10, 0x1403fcaa0\nmov     rdi, rcx                                                       ; +0x14, 0x1403fcaa4\nmov     ebp, [rcx+2E4h]                                                ; +0x17, 0x1403fcaa7\nmov     byte ptr [rcx+304h], 1                                         ; +0x1d, 0x1403fcaad\nmov     rcx, [rcx+288h]                                                ; +0x24, 0x1403fcab4\ntest    rcx, rcx                                                       ; +0x2b, 0x1403fcabb\njz      short loc_1403FCB31                                            ; +0x2e, 0x1403fcabe\nmov     rax, [rcx]                                                     ; +0x30, 0x1403fcac0\nmov     edx, ebp                                                       ; +0x33, 0x1403fcac3\ncall    qword ptr [rax+598h]                                           ; +0x35, 0x1403fcac5\ncmp     eax, 1                                                         ; +0x3b, 0x1403fcacb\njnz     loc_1403FCBE1                                                  ; +0x3e, 0x1403fcace\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x44, 0x1403fcad4\ntest    rcx, rcx                                                       ; +0x4b, 0x1403fcadb\njnz     short loc_1403FCB0F                                            ; +0x4e, 0x1403fcade\nmov     ecx, 668h; Size                                                ; +0x50, 0x1403fcae0\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x55, 0x1403fcae5\nmov     [rsp+28h+arg_0], rax                                           ; +0x5a, 0x1403fcaea\nmov     rcx, rax                                                       ; +0x5f, 0x1403fcaef\ncall    sub_14017AB00                                                  ; +0x62, 0x1403fcaf2\nnop                                                                    ; +0x67, 0x1403fcaf7\nmov     cs:qword_1406C2ED8, rax                                        ; +0x68, 0x1403fcaf8\nmov     rdx, [rax]                                                     ; +0x6f, 0x1403fcaff\nmov     rcx, rax                                                       ; +0x72, 0x1403fcb02\ncall    qword ptr [rdx+48h]                                            ; +0x75, 0x1403fcb05\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x78, 0x1403fcb08\nmov     rcx, [rcx+210h]                                                ; +0x7f, 0x1403fcb0f\nmov     rax, [rcx]                                                     ; +0x86, 0x1403fcb16\nxor     r9d, r9d                                                       ; +0x89, 0x1403fcb19\nmov     r8d, ebp                                                       ; +0x8c, 0x1403fcb1c\nmov     rdx, [rdi+288h]                                                ; +0x8f, 0x1403fcb1f\ncall    qword ptr [rax+480h]                                           ; +0x96, 0x1403fcb26\njmp     loc_1403FCBE1                                                  ; +0x9c, 0x1403fcb2c\nxor     ebx, ebx                                                       ; +0xa1, 0x1403fcb31\nmov     rcx, [rdi+290h]                                                ; +0xa3, 0x1403fcb33\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xaa, 0x1403fcb3a\ntest    eax, eax                                                       ; +0xb0, 0x1403fcb40\njz      loc_1403FCBE1                                                  ; +0xb2, 0x1403fcb42\nnop     dword ptr [rax+rax+00000000h]                                  ; +0xb8, 0x1403fcb48\nmov     edx, ebx                                                       ; +0xc0, 0x1403fcb50\nmov     rcx, [rdi+290h]                                                ; +0xc2, 0x1403fcb52\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xc9, 0x1403fcb59\nmov     rsi, rax                                                       ; +0xcf, 0x1403fcb5f\nmov     r8, [rax]                                                      ; +0xd2, 0x1403fcb62\nmov     edx, ebp                                                       ; +0xd5, 0x1403fcb65\nmov     rcx, rax                                                       ; +0xd7, 0x1403fcb67\ncall    qword ptr [r8+598h]                                            ; +0xda, 0x1403fcb6a\ncmp     eax, 1                                                         ; +0xe1, 0x1403fcb71\njnz     short loc_1403FCBCA                                            ; +0xe4, 0x1403fcb74\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xe6, 0x1403fcb76\ntest    rcx, rcx                                                       ; +0xed, 0x1403fcb7d\njnz     short loc_1403FCBB1                                            ; +0xf0, 0x1403fcb80\nmov     ecx, 668h; Size                                                ; +0xf2, 0x1403fcb82\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xf7, 0x1403fcb87\nmov     [rsp+28h+arg_0], rax                                           ; +0xfc, 0x1403fcb8c\nmov     rcx, rax                                                       ; +0x101, 0x1403fcb91\ncall    sub_14017AB00                                                  ; +0x104, 0x1403fcb94\nnop                                                                    ; +0x109, 0x1403fcb99\nmov     cs:qword_1406C2ED8, rax                                        ; +0x10a, 0x1403fcb9a\nmov     rdx, [rax]                                                     ; +0x111, 0x1403fcba1\nmov     rcx, rax                                                       ; +0x114, 0x1403fcba4\ncall    qword ptr [rdx+48h]                                            ; +0x117, 0x1403fcba7\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x11a, 0x1403fcbaa\nmov     rcx, [rcx+210h]                                                ; +0x121, 0x1403fcbb1\nmov     rax, [rcx]                                                     ; +0x128, 0x1403fcbb8\nxor     r9d, r9d                                                       ; +0x12b, 0x1403fcbbb\nmov     r8d, ebp                                                       ; +0x12e, 0x1403fcbbe\nmov     rdx, rsi                                                       ; +0x131, 0x1403fcbc1\ncall    qword ptr [rax+480h]                                           ; +0x134, 0x1403fcbc4\ninc     ebx                                                            ; +0x13a, 0x1403fcbca\nmov     rcx, [rdi+290h]                                                ; +0x13c, 0x1403fcbcc\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x143, 0x1403fcbd3\ncmp     ebx, eax                                                       ; +0x149, 0x1403fcbd9\njb      loc_1403FCB50                                                  ; +0x14b, 0x1403fcbdb\nmov     rcx, rdi                                                       ; +0x151, 0x1403fcbe1\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x154, 0x1403fcbe4\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x159, 0x1403fcbe9\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x15e, 0x1403fcbee\nadd     rsp, 20h                                                       ; +0x163, 0x1403fcbf3\npop     rdi                                                            ; +0x167, 0x1403fcbf7\njmp     SetGroupIDLayer__updateGroupIDButtons                          ; +0x168, 0x1403fcbf8", "xrefs": ["SetGroupIDLayer::init @ 0x1403f93b7", "<???> @ 0x1406d84e0"], "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"}