; ; cocos2d::CCSpriteBatchNode::sortAllChildren from 0x18008f080 to 0x18008f18c (268 bytes) ; ; 7 xrefs: ; > @ 0x1800ec4c0 ; > @ 0x180103ec0 ; > @ 0x180105c28 ; > @ 0x18013d8e8 ; > @ 0x18013d8f8 ; > @ 0x1801438a8 ; > @ 0x1801b6114 ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; push rbx ; +0x0, 0x18008f080 sub rsp, 20h ; +0x2, 0x18008f082 cmp byte ptr [rcx+120h], 0 ; +0x6, 0x18008f086 mov rbx, rcx ; +0xd, 0x18008f08d jz loc_18008F186 ; +0x10, 0x18008f090 cmp byte ptr [rcx+160h], 0 ; +0x16, 0x18008f096 jz short loc_18008F0AC ; +0x1d, 0x18008f09d cmp byte ptr [rcx+161h], 0 ; +0x1f, 0x18008f09f jz loc_18008F186 ; +0x26, 0x18008f0a6 cmp byte ptr [rcx+138h], 0 ; +0x2c, 0x18008f0ac jz short loc_18008F0BC ; +0x33, 0x18008f0b3 call ?sortAllChildrenWithIndex@CCNode@cocos2d@@QEAAXXZ; cocos2d::CCNode::sortAllChildrenWithIndex(void) ; +0x35, 0x18008f0b5 jmp short loc_18008F0C1 ; +0x3a, 0x18008f0ba call ?sortAllChildrenNoIndex@CCNode@cocos2d@@QEAAXXZ; cocos2d::CCNode::sortAllChildrenNoIndex(void) ; +0x3c, 0x18008f0bc mov rcx, [rbx+0D0h]; this ; +0x41, 0x18008f0c1 call ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x48, 0x18008f0c8 test eax, eax ; +0x4d, 0x18008f0cd jz loc_18008F178 ; +0x4f, 0x18008f0cf mov rax, [rbx+0D0h] ; +0x55, 0x18008f0d5 mov [rsp+28h+arg_8], rsi ; +0x5c, 0x18008f0dc mov [rsp+28h+arg_10], rdi ; +0x61, 0x18008f0e1 test rax, rax ; +0x66, 0x18008f0e6 jz short loc_18008F120 ; +0x69, 0x18008f0e9 mov rdi, [rax+38h] ; +0x6b, 0x18008f0eb mov eax, [rdi] ; +0x6f, 0x18008f0ef test eax, eax ; +0x71, 0x18008f0f1 jz short loc_18008F120 ; +0x73, 0x18008f0f3 mov rdi, [rdi+10h] ; +0x75, 0x18008f0f5 lea rsi, [rax-1] ; +0x79, 0x18008f0f9 lea rsi, [rdi+rsi*8] ; +0x7d, 0x18008f0fd cmp rdi, rsi ; +0x81, 0x18008f101 ja short loc_18008F120 ; +0x84, 0x18008f104 mov rcx, [rdi] ; +0x86, 0x18008f106 test rcx, rcx ; +0x89, 0x18008f109 jz short loc_18008F120 ; +0x8c, 0x18008f10c mov rax, [rcx] ; +0x8e, 0x18008f10e call qword ptr [rax+240h] ; +0x91, 0x18008f111 add rdi, 8 ; +0x97, 0x18008f117 cmp rdi, rsi ; +0x9b, 0x18008f11b jbe short loc_18008F106 ; +0x9e, 0x18008f11e mov rax, [rbx+0D0h] ; +0xa0, 0x18008f120 mov [rsp+28h+arg_0], 0 ; +0xa7, 0x18008f127 test rax, rax ; +0xaf, 0x18008f12f jz short loc_18008F16E ; +0xb2, 0x18008f132 mov rdi, [rax+38h] ; +0xb4, 0x18008f134 mov eax, [rdi] ; +0xb8, 0x18008f138 test eax, eax ; +0xba, 0x18008f13a jz short loc_18008F16E ; +0xbc, 0x18008f13c mov rdi, [rdi+10h] ; +0xbe, 0x18008f13e lea rsi, [rax-1] ; +0xc2, 0x18008f142 lea rsi, [rdi+rsi*8] ; +0xc6, 0x18008f146 cmp rdi, rsi ; +0xca, 0x18008f14a ja short loc_18008F16E ; +0xcd, 0x18008f14d nop ; +0xcf, 0x18008f14f mov rdx, [rdi]; struct cocos2d::CCSprite * ; +0xd0, 0x18008f150 test rdx, rdx ; +0xd3, 0x18008f153 jz short loc_18008F16E ; +0xd6, 0x18008f156 lea r8, [rsp+28h+arg_0]; int * ; +0xd8, 0x18008f158 mov rcx, rbx; this ; +0xdd, 0x18008f15d call ?updateAtlasIndex@CCSpriteBatchNode@cocos2d@@AEAAXPEAVCCSprite@2@PEAH@Z; cocos2d::CCSpriteBatchNode::updateAtlasIndex(cocos2d::CCSprite *,int *) ; +0xe0, 0x18008f160 add rdi, 8 ; +0xe5, 0x18008f165 cmp rdi, rsi ; +0xe9, 0x18008f169 jbe short loc_18008F150 ; +0xec, 0x18008f16c mov rsi, [rsp+28h+arg_8] ; +0xee, 0x18008f16e mov rdi, [rsp+28h+arg_10] ; +0xf3, 0x18008f173 mov byte ptr [rbx+120h], 0 ; +0xf8, 0x18008f178 mov byte ptr [rbx+161h], 0 ; +0xff, 0x18008f17f add rsp, 20h ; +0x106, 0x18008f186 pop rbx ; +0x10a, 0x18008f18a retn ; +0x10b, 0x18008f18b