{"type": "func", "start": 6443098336, "end": 6443098476, "name": "sub_18009E0E0", "pseudocode": "// \n// sub_18009E0E0 from 0x18009e0e0 to 0x18009e16c (140 bytes)\n// \n// 9 xrefs:\n// > cocos2d::CCNode::getChildren @ 0x1800033ed\n// > cocos2d::CCNode::qsortAllChildrenWithIndex @ 0x180004549\n// > cocos2d::CCNode::updateChildIndexes @ 0x180005554\n// > sub_18009D6F0 @ 0x18009d738\n// > sub_18009DA50 @ 0x18009da68\n// > sub_18009DD50 @ 0x18009dd59\n// > <???> @ 0x18013ef58\n// > <???> @ 0x18013ef8c\n// > <???> @ 0x1801b7524\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__int64 __fastcall sub_18009E0E0(__int64 a1)\n{\n  __int64 result; // rax\n  int v2; // r10d\n  int v3; // r11d\n  __int64 v4; // rsi\n  __int64 v5; // r9\n  __int64 v6; // r8\n  __int64 v7; // rbx\n  __int64 v8; // rdx\n\n  result = *(int *)(a1 + 8);\n  if ( (_DWORD)result != -1 )\n  {\n    v2 = 0;\n    v3 = 0;\n    v4 = *(int *)(a1 + 8);\n    if ( (int)result > 0 )\n    {\n      result = 0;\n      v5 = 0;\n      do\n      {\n        v6 = *(_QWORD *)(a1 + 16);\n        v7 = *(_QWORD *)(v6 + 8 * result);\n        if ( v7 )\n        {\n          if ( v5 > 0 )\n          {\n            v8 = 8 * (result - v5);\n            *(_QWORD *)(v8 + v6) = v7;\n            *(_DWORD *)(*(_QWORD *)(v8 + *(_QWORD *)(a1 + 16)) + 36LL) = v3 - v2;\n          }\n        }\n        else\n        {\n          ++v2;\n          ++v5;\n        }\n        ++v3;\n        ++result;\n      }\n      while ( result < v4 );\n    }\n    *(_DWORD *)(a1 + 8) = -1;\n  }\n  return result;\n}", "assembly": "; \n; sub_18009E0E0 from 0x18009e0e0 to 0x18009e16c (140 bytes)\n; \n; 9 xrefs:\n; > cocos2d::CCNode::getChildren @ 0x1800033ed\n; > cocos2d::CCNode::qsortAllChildrenWithIndex @ 0x180004549\n; > cocos2d::CCNode::updateChildIndexes @ 0x180005554\n; > sub_18009D6F0 @ 0x18009d738\n; > sub_18009DA50 @ 0x18009da68\n; > sub_18009DD50 @ 0x18009dd59\n; > <???> @ 0x18013ef58\n; > <???> @ 0x18013ef8c\n; > <???> @ 0x1801b7524\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    rdi                                                            ; +0x0, 0x18009e0e0\nmovsxd  rax, dword ptr [rcx+8]                                         ; +0x2, 0x18009e0e2\nmov     rdi, rcx                                                       ; +0x6, 0x18009e0e6\ncmp     eax, 0FFFFFFFFh                                                ; +0x9, 0x18009e0e9\njz      short loc_18009E16A                                            ; +0xc, 0x18009e0ec\nxor     r10d, r10d                                                     ; +0xe, 0x18009e0ee\nmov     [rsp+8+arg_8], rsi                                             ; +0x11, 0x18009e0f1\nmov     r11d, r10d                                                     ; +0x16, 0x18009e0f6\nmov     rsi, rax                                                       ; +0x19, 0x18009e0f9\ntest    eax, eax                                                       ; +0x1c, 0x18009e0fc\njle     short loc_18009E15E                                            ; +0x1e, 0x18009e0fe\nmov     [rsp+8+arg_0], rbx                                             ; +0x20, 0x18009e100\nmov     eax, r10d                                                      ; +0x25, 0x18009e105\nmov     r9d, r10d                                                      ; +0x28, 0x18009e108\nnop     dword ptr [rax+rax+00h]                                        ; +0x2b, 0x18009e10b\nmov     r8, [rdi+10h]                                                  ; +0x30, 0x18009e110\nmov     rbx, [r8+rax*8]                                                ; +0x34, 0x18009e114\ntest    rbx, rbx                                                       ; +0x38, 0x18009e118\njnz     short loc_18009E125                                            ; +0x3b, 0x18009e11b\ninc     r10d                                                           ; +0x3d, 0x18009e11d\ninc     r9                                                             ; +0x40, 0x18009e120\njmp     short loc_18009E14E                                            ; +0x43, 0x18009e123\ntest    r9, r9                                                         ; +0x45, 0x18009e125\njle     short loc_18009E14E                                            ; +0x48, 0x18009e128\nmov     rcx, rax                                                       ; +0x4a, 0x18009e12a\nsub     rcx, r9                                                        ; +0x4d, 0x18009e12d\nlea     rdx, ds:0[rcx*8]                                               ; +0x50, 0x18009e130\nmov     [rdx+r8], rbx                                                  ; +0x58, 0x18009e138\nmov     r8d, r11d                                                      ; +0x5c, 0x18009e13c\nmov     rcx, [rdi+10h]                                                 ; +0x5f, 0x18009e13f\nsub     r8d, r10d                                                      ; +0x63, 0x18009e143\nmov     rdx, [rdx+rcx]                                                 ; +0x66, 0x18009e146\nmov     [rdx+24h], r8d                                                 ; +0x6a, 0x18009e14a\ninc     r11d                                                           ; +0x6e, 0x18009e14e\ninc     rax                                                            ; +0x71, 0x18009e151\ncmp     rax, rsi                                                       ; +0x74, 0x18009e154\njl      short loc_18009E110                                            ; +0x77, 0x18009e157\nmov     rbx, [rsp+8+arg_0]                                             ; +0x79, 0x18009e159\nmov     rsi, [rsp+8+arg_8]                                             ; +0x7e, 0x18009e15e\nmov     dword ptr [rdi+8], 0FFFFFFFFh                                  ; +0x83, 0x18009e163\npop     rdi                                                            ; +0x8a, 0x18009e16a\nretn                                                                   ; +0x8b, 0x18009e16b", "xrefs": ["cocos2d::CCNode::getChildren @ 0x1800033ed", "cocos2d::CCNode::qsortAllChildrenWithIndex @ 0x180004549", "cocos2d::CCNode::updateChildIndexes @ 0x180005554", "sub_18009D6F0 @ 0x18009d738", "sub_18009DA50 @ 0x18009da68", "sub_18009DD50 @ 0x18009dd59", "<???> @ 0x18013ef58", "<???> @ 0x18013ef8c", "<???> @ 0x1801b7524"], "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"}