{"type": "func", "start": 3044156, "end": 3044406, "name": "CCPartAnimSprite::transformSprite", "pseudocode": "// \n// CCPartAnimSprite::transformSprite from 0x2e733c to 0x2e7436 (250 bytes)\n// \n// 1 xrefs:\n// > CCPartAnimSprite::setDisplayFrame @ 0x2e74c0\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\nvoid CCPartAnimSprite::transformSprite(CCPartAnimSprite *a1, SpriteDescription *a2)\n{\n  CCSpritePart *v4; // r4\n  float x; // s15\n  float v6; // r1\n  CCSpritePart *v7; // r0\n  float y; // s15\n  CCSpritePart_vtbl *v9; // r3\n  float v10; // r1\n  void (__fastcall *setScaleY)(CCSpritePlus *__hidden, float); // r3\n  CCSpritePart *v12; // r0\n  _DWORD v13[2]; // [sp+0h] [bp-8h] BYREF\n\n  v13[0] = a1;\n  v13[1] = a2;\n  v4 = (CCSpritePart *)cocos2d::CCArray::objectAtIndex(a1->m_spriteParts, a2->m_tag);\n  cocos2d::CCNode::stopAllActions(v4);\n  v4->setPosition(v4, &a2->m_position);\n  x = a2->m_flipped.x;\n  if ( x == 0.0 )\n  {\n    v7 = v4;\n    v6 = a2->m_scale.x;\n  }\n  else\n  {\n    v6 = a2->m_scale.x;\n    v7 = v4;\n  }\n  if ( x != 0.0 )\n    LODWORD(v6) ^= 0x80000000;\n  v4->setScaleX(v7, COERCE_FLOAT(LODWORD(v6)));\n  y = a2->m_flipped.y;\n  v9 = v4->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  if ( y == 0.0 )\n  {\n    setScaleY = v9->setScaleY;\n    v12 = v4;\n    v10 = a2->m_scale.y;\n  }\n  else\n  {\n    v10 = a2->m_scale.y;\n    setScaleY = v9->setScaleY;\n    v12 = v4;\n  }\n  if ( y != 0.0 )\n    LODWORD(v10) ^= 0x80000000;\n  ((void (__fastcall *)(CCSpritePart *, _DWORD))setScaleY)(v12, LODWORD(v10));\n  ((void (__fastcall *)(CCSpritePart *, _DWORD))v4->setRotation)(v4, LODWORD(a2->m_rotation));\n  if ( a2->m_usesCustomTag )\n  {\n    v4->setDisplayFrame(v4, a2->m_texture);\n    sub_775C20(v13, &a2->m_texture->m_strFrameName);\n    CCSpritePart::frameChanged((int)v4, (int)v13);\n    sub_774008(v13);\n  }\n  if ( v4->getZOrder(v4) != a2->m_zValue )\n    ((void (__fastcall *)(CCPartAnimSprite *, CCSpritePart *))a1->reorderChild)(a1, v4);\n  CCSpritePart::setBeingUsed(v4, 1);\n  v4->setVisible(v4, 1);\n}", "assembly": "; \n; CCPartAnimSprite::transformSprite from 0x2e733c to 0x2e7436 (250 bytes)\n; \n; 1 xrefs:\n; > CCPartAnimSprite::setDisplayFrame @ 0x2e74c0\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.W          {R0,R1,R4-R8,LR}                                       ; +0x0, 0x2e733c\nMOV             R5, R1                                                 ; +0x4, 0x2e7340\nLDR             R7, =(__stack_chk_guard_ptr - 0x2E734C)                ; +0x6, 0x2e7342\nMOV             R8, R0                                                 ; +0x8, 0x2e7344\nLDR             R1, [R1,#0x54]; unsigned int                           ; +0xa, 0x2e7346\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xc, 0x2e7348\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xe, 0x2e734a\nLDR.W           R0, [R0,#0x210]; this                                  ; +0x10, 0x2e734c\nLDR             R3, [R7]                                               ; +0x14, 0x2e7350\nSTR             R3, [SP,#8+var_4]                                      ; +0x16, 0x2e7352\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x18, 0x2e7354\nMOV             R4, R0                                                 ; +0x1c, 0x2e7358\nBL              _ZN7cocos2d6CCNode14stopAllActionsEv; cocos2d::CCNode::stopAllActions(void) ; +0x1e, 0x2e735a\nLDR             R3, [R4]                                               ; +0x22, 0x2e735e\nADD.W           R1, R5, #0x34 ; '4'                                    ; +0x24, 0x2e7360\nMOV             R0, R4                                                 ; +0x28, 0x2e7364\nLDR             R3, [R3,#0x5C]                                         ; +0x2a, 0x2e7366\nBLX             R3                                                     ; +0x2c, 0x2e7368\nVLDR            S15, [R5,#0x44]                                        ; +0x2e, 0x2e736a\nLDR             R3, [R4]                                               ; +0x32, 0x2e736e\nVCMP.F32        S15, #0.0                                              ; +0x34, 0x2e7370\nVMRS            APSR_nzcv, FPSCR                                       ; +0x38, 0x2e7374\nITTEE NE                                                               ; +0x3c, 0x2e7378\nLDRNE           R1, [R5,#0x3C]                                         ; +0x3e, 0x2e737a\nMOVNE           R0, R4                                                 ; +0x40, 0x2e737c\nMOVEQ           R0, R4                                                 ; +0x42, 0x2e737e\nLDREQ           R1, [R5,#0x3C]                                         ; +0x44, 0x2e7380\nITET NE                                                                ; +0x46, 0x2e7382\nLDRNE           R3, [R3,#0x40]                                         ; +0x48, 0x2e7384\nLDREQ           R3, [R3,#0x40]                                         ; +0x4a, 0x2e7386\nEORNE.W         R1, R1, #0x80000000                                    ; +0x4c, 0x2e7388\nBLX             R3                                                     ; +0x50, 0x2e738c\nVLDR            S15, [R5,#0x48]                                        ; +0x52, 0x2e738e\nLDR             R3, [R4]                                               ; +0x56, 0x2e7392\nVCMP.F32        S15, #0.0                                              ; +0x58, 0x2e7394\nVMRS            APSR_nzcv, FPSCR                                       ; +0x5c, 0x2e7398\nITTTE NE                                                               ; +0x60, 0x2e739c\nLDRNE           R1, [R5,#0x40]                                         ; +0x62, 0x2e739e\nLDRNE           R3, [R3,#0x48]                                         ; +0x64, 0x2e73a0\nMOVNE           R0, R4                                                 ; +0x66, 0x2e73a2\nLDREQ           R3, [R3,#0x48]                                         ; +0x68, 0x2e73a4\nITTE EQ                                                                ; +0x6a, 0x2e73a6\nMOVEQ           R0, R4                                                 ; +0x6c, 0x2e73a8\nLDREQ           R1, [R5,#0x40]                                         ; +0x6e, 0x2e73aa\nEORNE.W         R1, R1, #0x80000000                                    ; +0x70, 0x2e73ac\nBLX             R3                                                     ; +0x74, 0x2e73b0\nLDR             R3, [R4]                                               ; +0x76, 0x2e73b2\nMOV             R0, R4                                                 ; +0x78, 0x2e73b4\nLDR             R1, [R5,#0x4C]                                         ; +0x7a, 0x2e73b6\nLDR.W           R3, [R3,#0xAC]                                         ; +0x7c, 0x2e73b8\nBLX             R3                                                     ; +0x80, 0x2e73bc\nLDRB.W          R3, [R5,#0x58]                                         ; +0x82, 0x2e73be\nCBZ             R3, loc_2E73EA                                         ; +0x86, 0x2e73c2\nLDR             R3, [R4]                                               ; +0x88, 0x2e73c4\nMOV             R0, R4                                                 ; +0x8a, 0x2e73c6\nLDR             R1, [R5,#0x5C]                                         ; +0x8c, 0x2e73c8\nMOV             R6, SP                                                 ; +0x8e, 0x2e73ca\nLDR.W           R3, [R3,#0x23C]                                        ; +0x90, 0x2e73cc\nBLX             R3                                                     ; +0x94, 0x2e73d0\nLDR             R1, [R5,#0x5C]                                         ; +0x96, 0x2e73d2\nMOV             R0, SP                                                 ; +0x98, 0x2e73d4\nADDS            R1, #0x80                                              ; +0x9a, 0x2e73d6\nBL              sub_775C20                                             ; +0x9c, 0x2e73d8\nMOV             R0, R4                                                 ; +0xa0, 0x2e73dc\nMOV             R1, SP                                                 ; +0xa2, 0x2e73de\nBL              _ZN12CCSpritePart12frameChangedESs; CCSpritePart::frameChanged(std::string) ; +0xa4, 0x2e73e0\nMOV             R0, SP                                                 ; +0xa8, 0x2e73e4\nBL              sub_774008                                             ; +0xaa, 0x2e73e6\nLDR             R3, [R4]                                               ; +0xae, 0x2e73ea\nMOV             R0, R4                                                 ; +0xb0, 0x2e73ec\nLDR             R3, [R3,#0x34]                                         ; +0xb2, 0x2e73ee\nBLX             R3                                                     ; +0xb4, 0x2e73f0\nLDR             R2, [R5,#0x50]                                         ; +0xb6, 0x2e73f2\nCMP             R0, R2                                                 ; +0xb8, 0x2e73f4\nBEQ             loc_2E7406                                             ; +0xba, 0x2e73f6\nLDR.W           R3, [R8]                                               ; +0xbc, 0x2e73f8\nMOV             R0, R8                                                 ; +0xc0, 0x2e73fc\nMOV             R1, R4                                                 ; +0xc2, 0x2e73fe\nLDR.W           R3, [R3,#0x120]                                        ; +0xc4, 0x2e7400\nBLX             R3                                                     ; +0xc8, 0x2e7404\nMOV             R0, R4; this                                           ; +0xca, 0x2e7406\nMOVS            R1, #1; bool                                           ; +0xcc, 0x2e7408\nBL              _ZN12CCSpritePart12setBeingUsedEb; CCSpritePart::setBeingUsed(bool) ; +0xce, 0x2e740a\nLDR             R3, [R4]                                               ; +0xd2, 0x2e740e\nMOV             R0, R4                                                 ; +0xd4, 0x2e7410\nMOVS            R1, #1                                                 ; +0xd6, 0x2e7412\nLDR.W           R3, [R3,#0xA4]                                         ; +0xd8, 0x2e7414\nBLX             R3                                                     ; +0xdc, 0x2e7418\nLDR             R2, [SP,#8+var_4]                                      ; +0xde, 0x2e741a\nLDR             R3, [R7]                                               ; +0xe0, 0x2e741c\nCMP             R2, R3                                                 ; +0xe2, 0x2e741e\nBEQ             loc_2E7430                                             ; +0xe4, 0x2e7420\nBLX             __stack_chk_fail                                       ; +0xe6, 0x2e7422\nMOV             R0, R6                                                 ; +0xea, 0x2e7426\nBL              sub_774008                                             ; +0xec, 0x2e7428\nBL              __cxa_end_cleanup                                      ; +0xf0, 0x2e742c\nADD             SP, SP, #8                                             ; +0xf4, 0x2e7430\nPOP.W           {R4-R8,PC}                                             ; +0xf6, 0x2e7432", "xrefs": ["CCPartAnimSprite::setDisplayFrame @ 0x2e74c0"], "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"}