; ; cocos2d::CCSpriteBatchNode::rebuildIndexInOrder from 0x18008ec20 to 0x18008ed43 (291 bytes) ; ; 6 xrefs: ; > cocos2d::CCSpriteBatchNode::rebuildIndexInOrder @ 0x18008ec9e ; > cocos2d::CCSpriteBatchNode::rebuildIndexInOrder @ 0x18008ed1e ; > @ 0x18013d844 ; > @ 0x18013d878 ; > @ 0x1801438a8 ; > @ 0x1801b6054 ; ; 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 ; mov [rsp+arg_10], rbx ; +0x0, 0x18008ec20 mov [rsp+arg_18], rbp ; +0x5, 0x18008ec25 push rsi ; +0xa, 0x18008ec2a push rdi ; +0xb, 0x18008ec2b push r15 ; +0xc, 0x18008ec2c sub rsp, 20h ; +0xe, 0x18008ec2e mov rax, [rdx] ; +0x12, 0x18008ec32 mov r15, rcx ; +0x15, 0x18008ec35 mov [rsp+38h+arg_0], r12 ; +0x18, 0x18008ec38 mov rcx, rdx ; +0x1d, 0x18008ec3d mov edi, r8d ; +0x20, 0x18008ec40 mov r12, rdx ; +0x23, 0x18008ec43 call qword ptr [rax+1D0h] ; +0x26, 0x18008ec46 mov rbp, rax ; +0x2c, 0x18008ec4c test rax, rax ; +0x2f, 0x18008ec4f jz short loc_18008ECB3 ; +0x32, 0x18008ec52 mov rcx, rax; this ; +0x34, 0x18008ec54 call ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x37, 0x18008ec57 test eax, eax ; +0x3c, 0x18008ec5c jz short loc_18008ECB3 ; +0x3e, 0x18008ec5e mov rbx, [rbp+38h] ; +0x40, 0x18008ec60 mov eax, [rbx] ; +0x44, 0x18008ec64 test eax, eax ; +0x46, 0x18008ec66 jz short loc_18008ECB3 ; +0x48, 0x18008ec68 mov rbx, [rbx+10h] ; +0x4a, 0x18008ec6a mov [rsp+38h+arg_8], r14 ; +0x4e, 0x18008ec6e lea r14, [rax-1] ; +0x53, 0x18008ec73 lea r14, [rbx+r14*8] ; +0x57, 0x18008ec77 cmp rbx, r14 ; +0x5b, 0x18008ec7b ja short loc_18008ECAE ; +0x5e, 0x18008ec7e mov rsi, [rbx] ; +0x60, 0x18008ec80 test rsi, rsi ; +0x63, 0x18008ec83 jz short loc_18008ECAE ; +0x66, 0x18008ec86 mov rax, [rsi] ; +0x68, 0x18008ec88 mov rcx, rsi ; +0x6b, 0x18008ec8b call qword ptr [rax+60h] ; +0x6e, 0x18008ec8e test eax, eax ; +0x71, 0x18008ec91 jns short loc_18008ECA5 ; +0x73, 0x18008ec93 mov r8d, edi; unsigned int ; +0x75, 0x18008ec95 mov rdx, rsi; struct cocos2d::CCSprite * ; +0x78, 0x18008ec98 mov rcx, r15; this ; +0x7b, 0x18008ec9b call ?rebuildIndexInOrder@CCSpriteBatchNode@cocos2d@@QEAAIPEAVCCSprite@2@I@Z; cocos2d::CCSpriteBatchNode::rebuildIndexInOrder(cocos2d::CCSprite *,uint) ; +0x7e, 0x18008ec9e mov edi, eax ; +0x83, 0x18008eca3 add rbx, 8 ; +0x85, 0x18008eca5 cmp rbx, r14 ; +0x89, 0x18008eca9 jbe short loc_18008EC80 ; +0x8c, 0x18008ecac mov r14, [rsp+38h+arg_8] ; +0x8e, 0x18008ecae mov rax, [r12] ; +0x93, 0x18008ecb3 mov rdx, r15 ; +0x97, 0x18008ecb7 mov rcx, r12 ; +0x9a, 0x18008ecba call qword ptr [rax+10h] ; +0x9d, 0x18008ecbd test al, al ; +0xa0, 0x18008ecc0 jnz short loc_18008ECCE ; +0xa2, 0x18008ecc2 mov [r12+168h], edi ; +0xa4, 0x18008ecc4 inc edi ; +0xac, 0x18008eccc mov r12, [rsp+38h+arg_0] ; +0xae, 0x18008ecce test rbp, rbp ; +0xb3, 0x18008ecd3 jz short loc_18008ED2E ; +0xb6, 0x18008ecd6 mov rcx, rbp; this ; +0xb8, 0x18008ecd8 call ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xbb, 0x18008ecdb test eax, eax ; +0xc0, 0x18008ece0 jz short loc_18008ED2E ; +0xc2, 0x18008ece2 mov rbx, [rbp+38h] ; +0xc4, 0x18008ece4 mov eax, [rbx] ; +0xc8, 0x18008ece8 test eax, eax ; +0xca, 0x18008ecea jz short loc_18008ED2E ; +0xcc, 0x18008ecec mov rbx, [rbx+10h] ; +0xce, 0x18008ecee lea rbp, [rax-1] ; +0xd2, 0x18008ecf2 lea rbp, [rbx+rbp*8] ; +0xd6, 0x18008ecf6 cmp rbx, rbp ; +0xda, 0x18008ecfa ja short loc_18008ED2E ; +0xdd, 0x18008ecfd nop ; +0xdf, 0x18008ecff mov rsi, [rbx] ; +0xe0, 0x18008ed00 test rsi, rsi ; +0xe3, 0x18008ed03 jz short loc_18008ED2E ; +0xe6, 0x18008ed06 mov rax, [rsi] ; +0xe8, 0x18008ed08 mov rcx, rsi ; +0xeb, 0x18008ed0b call qword ptr [rax+60h] ; +0xee, 0x18008ed0e test eax, eax ; +0xf1, 0x18008ed11 js short loc_18008ED25 ; +0xf3, 0x18008ed13 mov r8d, edi; unsigned int ; +0xf5, 0x18008ed15 mov rdx, rsi; struct cocos2d::CCSprite * ; +0xf8, 0x18008ed18 mov rcx, r15; this ; +0xfb, 0x18008ed1b call ?rebuildIndexInOrder@CCSpriteBatchNode@cocos2d@@QEAAIPEAVCCSprite@2@I@Z; cocos2d::CCSpriteBatchNode::rebuildIndexInOrder(cocos2d::CCSprite *,uint) ; +0xfe, 0x18008ed1e mov edi, eax ; +0x103, 0x18008ed23 add rbx, 8 ; +0x105, 0x18008ed25 cmp rbx, rbp ; +0x109, 0x18008ed29 jbe short loc_18008ED00 ; +0x10c, 0x18008ed2c mov rbx, [rsp+38h+arg_10] ; +0x10e, 0x18008ed2e mov eax, edi ; +0x113, 0x18008ed33 mov rbp, [rsp+38h+arg_18] ; +0x115, 0x18008ed35 add rsp, 20h ; +0x11a, 0x18008ed3a pop r15 ; +0x11e, 0x18008ed3e pop rdi ; +0x120, 0x18008ed40 pop rsi ; +0x121, 0x18008ed41 retn ; +0x122, 0x18008ed42