; ; CCAnimatedSprite::switchToMode from 0x140040b80 to 0x140040ced (365 bytes) ; ; 5 xrefs: ; > SpriteAnimationManager::executeAnimation @ 0x1400741bc ; > SpriteAnimationManager::executeAnimation @ 0x1400743f3 ; > @ 0x1406620ec ; > @ 0x140662120 ; > @ 0x1406c4230 ; ; 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], rsi ; +0x0, 0x140040b80 push rdi ; +0x5, 0x140040b85 sub rsp, 20h ; +0x6, 0x140040b86 mov esi, edx ; +0xa, 0x140040b8a mov rdi, rcx ; +0xc, 0x140040b8c cmp [rcx+2B8h], edx ; +0xf, 0x140040b8f jz loc_140040CE2 ; +0x15, 0x140040b95 mov rcx, [rcx+2A0h] ; +0x1b, 0x140040b9b mov [rsp+28h+arg_8], rbx ; +0x22, 0x140040ba2 call cs:?stopAllActions@CCNode@cocos2d@@QEAAXXZ; cocos2d::CCNode::stopAllActions(void) ; +0x27, 0x140040ba7 mov rcx, [rdi+2A0h] ; +0x2d, 0x140040bad xor edx, edx ; +0x34, 0x140040bb4 mov rax, [rcx] ; +0x36, 0x140040bb6 call qword ptr [rax+140h] ; +0x39, 0x140040bb9 mov rcx, [rdi+2A0h] ; +0x3f, 0x140040bbf cmp esi, 1 ; +0x46, 0x140040bc6 jnz short loc_140040C2B ; +0x49, 0x140040bc9 mov rbx, [rdi+2A8h] ; +0x4b, 0x140040bcb test rbx, rbx ; +0x52, 0x140040bd2 jz loc_140040CBF ; +0x55, 0x140040bd5 mov rbx, [rbx+140h] ; +0x5b, 0x140040bdb add rcx, 140h ; +0x62, 0x140040be2 mov rax, [rcx] ; +0x69, 0x140040be9 call qword ptr [rax+8] ; +0x6c, 0x140040bec mov rcx, [rdi+2A8h] ; +0x6f, 0x140040bef mov rdx, rax ; +0x76, 0x140040bf6 add rcx, 140h ; +0x79, 0x140040bf9 call qword ptr [rbx] ; +0x80, 0x140040c00 mov rcx, [rdi+2A0h] ; +0x82, 0x140040c02 call cs:?isFlipX@CCSprite@cocos2d@@QEAA_NXZ; cocos2d::CCSprite::isFlipX(void) ; +0x89, 0x140040c09 mov rcx, [rdi+2A8h] ; +0x8f, 0x140040c0f movzx edx, al ; +0x96, 0x140040c16 call cs:?setFlipX@CCSprite@cocos2d@@QEAAX_N@Z; cocos2d::CCSprite::setFlipX(bool) ; +0x99, 0x140040c19 mov rcx, [rdi+2A8h] ; +0x9f, 0x140040c1f jmp loc_140040CB8 ; +0xa6, 0x140040c26 add rcx, 140h ; +0xab, 0x140040c2b mov [rsp+28h+arg_10], rbp ; +0xb2, 0x140040c32 mov rax, [rcx] ; +0xb7, 0x140040c37 call qword ptr [rax+8] ; +0xba, 0x140040c3a lea rdx, [rsp+28h+arg_0] ; +0xbd, 0x140040c3d movzx ecx, word ptr [rax] ; +0xc2, 0x140040c42 movzx eax, byte ptr [rax+2] ; +0xc5, 0x140040c45 mov [rsp+28h+arg_0], cx ; +0xc9, 0x140040c49 mov rcx, [rdi+2B0h] ; +0xce, 0x140040c4e mov [rsp+28h+arg_2], al ; +0xd5, 0x140040c55 call CCPartAnimSprite__setColor ; +0xd9, 0x140040c59 mov rcx, [rdi+2A0h] ; +0xde, 0x140040c5e call cs:?isFlipX@CCSprite@cocos2d@@QEAA_NXZ; cocos2d::CCSprite::isFlipX(void) ; +0xe5, 0x140040c65 mov rbx, [rdi+2B0h] ; +0xeb, 0x140040c6b movzx ebp, al ; +0xf2, 0x140040c72 mov rcx, rbx ; +0xf5, 0x140040c75 call cs:?isFlipX@CCSprite@cocos2d@@QEAA_NXZ; cocos2d::CCSprite::isFlipX(void) ; +0xf8, 0x140040c78 cmp bpl, al ; +0xfe, 0x140040c7e jz short loc_140040C98 ; +0x101, 0x140040c81 mov rdx, [rbx] ; +0x103, 0x140040c83 xor al, 1 ; +0x106, 0x140040c86 movzx ecx, al ; +0x108, 0x140040c88 movd xmm1, ecx ; +0x10b, 0x140040c8b mov rcx, rbx ; +0x10f, 0x140040c8f cvtdq2ps xmm1, xmm1 ; +0x112, 0x140040c92 call qword ptr [rdx+78h] ; +0x115, 0x140040c95 movzx edx, bpl ; +0x118, 0x140040c98 mov rcx, rbx ; +0x11c, 0x140040c9c call cs:?setFlipX@CCSprite@cocos2d@@QEAAX_N@Z; cocos2d::CCSprite::setFlipX(bool) ; +0x11f, 0x140040c9f mov rbp, [rsp+28h+arg_10] ; +0x125, 0x140040ca5 mov byte ptr [rbx+268h], 1 ; +0x12a, 0x140040caa mov rcx, [rdi+2B0h] ; +0x131, 0x140040cb1 mov [rdi+2A0h], rcx ; +0x138, 0x140040cb8 call cs:?stopAllActions@CCNode@cocos2d@@QEAAXXZ; cocos2d::CCNode::stopAllActions(void) ; +0x13f, 0x140040cbf mov rcx, [rdi+2A0h] ; +0x145, 0x140040cc5 mov dl, 1 ; +0x14c, 0x140040ccc mov rax, [rcx] ; +0x14e, 0x140040cce call qword ptr [rax+140h] ; +0x151, 0x140040cd1 mov rbx, [rsp+28h+arg_8] ; +0x157, 0x140040cd7 mov [rdi+2B8h], esi ; +0x15c, 0x140040cdc mov rsi, [rsp+28h+arg_18] ; +0x162, 0x140040ce2 add rsp, 20h ; +0x167, 0x140040ce7 pop rdi ; +0x16b, 0x140040ceb retn ; +0x16c, 0x140040cec