; ; cocos2d::CCSpriteBatchNode::updateAtlasIndex from 0x18008f2a0 to 0x18008f45d (445 bytes) ; ; 8 xrefs: ; > cocos2d::CCSpriteBatchNode::sortAllChildren @ 0x18008f160 ; > cocos2d::CCSpriteBatchNode::updateAtlasIndex @ 0x18008f314 ; > cocos2d::CCSpriteBatchNode::updateAtlasIndex @ 0x18008f3dc ; > @ 0x18013d980 ; > @ 0x18013d990 ; > @ 0x18013d9a4 ; > @ 0x1801438a8 ; > @ 0x1801b6144 ; ; 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_18], rbx ; +0x0, 0x18008f2a0 push rdi ; +0x5, 0x18008f2a5 push r14 ; +0x6, 0x18008f2a6 push r15 ; +0x8, 0x18008f2a8 sub rsp, 20h ; +0xa, 0x18008f2aa mov rax, [rdx] ; +0xe, 0x18008f2ae mov r15, rcx ; +0x11, 0x18008f2b1 mov rcx, rdx ; +0x14, 0x18008f2b4 mov rbx, r8 ; +0x17, 0x18008f2b7 mov r14, rdx ; +0x1a, 0x18008f2ba call qword ptr [rax+1D0h] ; +0x1d, 0x18008f2bd movzx ecx, byte ptr [r14+22Fh] ; +0x23, 0x18008f2c3 mov rdi, rax ; +0x2b, 0x18008f2cb test rax, rax ; +0x2e, 0x18008f2ce jz loc_18008F424 ; +0x31, 0x18008f2d1 mov r9, [rax+38h] ; +0x37, 0x18008f2d7 cmp dword ptr [r9], 0 ; +0x3b, 0x18008f2db jz loc_18008F424 ; +0x3f, 0x18008f2df mov [rsp+38h+arg_8], rsi ; +0x45, 0x18008f2e5 test cl, cl ; +0x4a, 0x18008f2ea jz short loc_18008F336 ; +0x4c, 0x18008f2ec mov ecx, [r9] ; +0x4e, 0x18008f2ee test ecx, ecx ; +0x51, 0x18008f2f1 jz short loc_18008F322 ; +0x53, 0x18008f2f3 mov rdi, [r9+10h] ; +0x55, 0x18008f2f5 lea rsi, [rcx-1] ; +0x59, 0x18008f2f9 lea rsi, [rdi+rsi*8] ; +0x5d, 0x18008f2fd cmp rdi, rsi ; +0x61, 0x18008f301 ja short loc_18008F322 ; +0x64, 0x18008f304 mov rdx, [rdi]; struct cocos2d::CCSprite * ; +0x66, 0x18008f306 test rdx, rdx ; +0x69, 0x18008f309 jz short loc_18008F322 ; +0x6c, 0x18008f30c mov r8, rbx; int * ; +0x6e, 0x18008f30e mov rcx, r15; this ; +0x71, 0x18008f311 call ?updateAtlasIndex@CCSpriteBatchNode@cocos2d@@AEAAXPEAVCCSprite@2@PEAH@Z; cocos2d::CCSpriteBatchNode::updateAtlasIndex(cocos2d::CCSprite *,int *) ; +0x74, 0x18008f314 add rdi, 8 ; +0x79, 0x18008f319 cmp rdi, rsi ; +0x7d, 0x18008f31d jbe short loc_18008F306 ; +0x80, 0x18008f320 mov rsi, [rsp+38h+arg_8] ; +0x82, 0x18008f322 mov rbx, [rsp+38h+arg_18] ; +0x87, 0x18008f327 add rsp, 20h ; +0x8c, 0x18008f32c pop r15 ; +0x90, 0x18008f330 pop r14 ; +0x92, 0x18008f332 pop rdi ; +0x94, 0x18008f334 retn ; +0x95, 0x18008f335 mov rax, [r9+10h] ; +0x96, 0x18008f336 mov [rsp+38h+arg_0], rbp ; +0x9a, 0x18008f33a mov bpl, 1 ; +0x9f, 0x18008f33f mov rcx, [rax] ; +0xa2, 0x18008f342 mov rax, [rcx] ; +0xa5, 0x18008f345 call qword ptr [rax+60h] ; +0xa8, 0x18008f348 test eax, eax ; +0xab, 0x18008f34b js short loc_18008F374 ; +0xad, 0x18008f34d mov edx, [r14+168h]; int ; +0xaf, 0x18008f34f mov eax, [rbx] ; +0xb6, 0x18008f356 mov [r14+168h], eax ; +0xb8, 0x18008f358 mov r8d, [rbx]; int ; +0xbf, 0x18008f35f cmp edx, r8d ; +0xc2, 0x18008f362 jz short loc_18008F36F ; +0xc5, 0x18008f365 mov rcx, r15; this ; +0xc7, 0x18008f367 call ?swap@CCSpriteBatchNode@cocos2d@@AEAAXHH@Z; cocos2d::CCSpriteBatchNode::swap(int,int) ; +0xca, 0x18008f36a inc dword ptr [rbx] ; +0xcf, 0x18008f36f xor bpl, bpl ; +0xd1, 0x18008f371 mov rsi, [rdi+38h] ; +0xd4, 0x18008f374 mov eax, [rsi] ; +0xd8, 0x18008f378 test eax, eax ; +0xda, 0x18008f37a jz short loc_18008F3EF ; +0xdc, 0x18008f37c mov rsi, [rsi+10h] ; +0xde, 0x18008f37e mov [rsp+38h+arg_10], r12 ; +0xe2, 0x18008f382 lea r12, [rax-1] ; +0xe7, 0x18008f387 lea r12, [rsi+r12*8] ; +0xeb, 0x18008f38b cmp rsi, r12 ; +0xef, 0x18008f38f ja short loc_18008F3EA ; +0xf2, 0x18008f392 mov rdi, [rsi] ; +0xf4, 0x18008f394 test rdi, rdi ; +0xf7, 0x18008f397 jz short loc_18008F3EA ; +0xfa, 0x18008f39a test bpl, bpl ; +0xfc, 0x18008f39c jz short loc_18008F3D3 ; +0xff, 0x18008f39f mov rax, [rdi] ; +0x101, 0x18008f3a1 mov rcx, rdi ; +0x104, 0x18008f3a4 call qword ptr [rax+60h] ; +0x107, 0x18008f3a7 test eax, eax ; +0x10a, 0x18008f3aa js short loc_18008F3D3 ; +0x10c, 0x18008f3ac mov edx, [r14+168h]; int ; +0x10e, 0x18008f3ae mov eax, [rbx] ; +0x115, 0x18008f3b5 mov [r14+168h], eax ; +0x117, 0x18008f3b7 mov r8d, [rbx]; int ; +0x11e, 0x18008f3be cmp edx, r8d ; +0x121, 0x18008f3c1 jz short loc_18008F3CE ; +0x124, 0x18008f3c4 mov rcx, r15; this ; +0x126, 0x18008f3c6 call ?swap@CCSpriteBatchNode@cocos2d@@AEAAXHH@Z; cocos2d::CCSpriteBatchNode::swap(int,int) ; +0x129, 0x18008f3c9 inc dword ptr [rbx] ; +0x12e, 0x18008f3ce xor bpl, bpl ; +0x130, 0x18008f3d0 mov r8, rbx; int * ; +0x133, 0x18008f3d3 mov rdx, rdi; struct cocos2d::CCSprite * ; +0x136, 0x18008f3d6 mov rcx, r15; this ; +0x139, 0x18008f3d9 call ?updateAtlasIndex@CCSpriteBatchNode@cocos2d@@AEAAXPEAVCCSprite@2@PEAH@Z; cocos2d::CCSpriteBatchNode::updateAtlasIndex(cocos2d::CCSprite *,int *) ; +0x13c, 0x18008f3dc add rsi, 8 ; +0x141, 0x18008f3e1 cmp rsi, r12 ; +0x145, 0x18008f3e5 jbe short loc_18008F394 ; +0x148, 0x18008f3e8 mov r12, [rsp+38h+arg_10] ; +0x14a, 0x18008f3ea test bpl, bpl ; +0x14f, 0x18008f3ef mov rbp, [rsp+38h+arg_0] ; +0x152, 0x18008f3f2 jz loc_18008F322 ; +0x157, 0x18008f3f7 mov edx, [r14+168h]; int ; +0x15d, 0x18008f3fd mov eax, [rbx] ; +0x164, 0x18008f404 mov [r14+168h], eax ; +0x166, 0x18008f406 mov r8d, [rbx]; int ; +0x16d, 0x18008f40d cmp edx, r8d ; +0x170, 0x18008f410 jz short loc_18008F41D ; +0x173, 0x18008f413 mov rcx, r15; this ; +0x175, 0x18008f415 call ?swap@CCSpriteBatchNode@cocos2d@@AEAAXHH@Z; cocos2d::CCSpriteBatchNode::swap(int,int) ; +0x178, 0x18008f418 inc dword ptr [rbx] ; +0x17d, 0x18008f41d jmp loc_18008F322 ; +0x17f, 0x18008f41f test cl, cl ; +0x184, 0x18008f424 jnz loc_18008F327 ; +0x186, 0x18008f426 mov edx, [r14+168h]; int ; +0x18c, 0x18008f42c mov eax, [rbx] ; +0x193, 0x18008f433 mov [r14+168h], eax ; +0x195, 0x18008f435 mov r8d, [rbx]; int ; +0x19c, 0x18008f43c cmp edx, r8d ; +0x19f, 0x18008f43f jz short loc_18008F44C ; +0x1a2, 0x18008f442 mov rcx, r15; this ; +0x1a4, 0x18008f444 call ?swap@CCSpriteBatchNode@cocos2d@@AEAAXHH@Z; cocos2d::CCSpriteBatchNode::swap(int,int) ; +0x1a7, 0x18008f447 inc dword ptr [rbx] ; +0x1ac, 0x18008f44c mov rbx, [rsp+38h+arg_18] ; +0x1ae, 0x18008f44e add rsp, 20h ; +0x1b3, 0x18008f453 pop r15 ; +0x1b7, 0x18008f457 pop r14 ; +0x1b9, 0x18008f459 pop rdi ; +0x1bb, 0x18008f45b retn ; +0x1bc, 0x18008f45c