{"type": "func", "start": 3793564, "end": 3793982, "name": "EditorUI::checkDiffAfterTransformAnchor", "pseudocode": "// \n// EditorUI::checkDiffAfterTransformAnchor from 0x39e29c to 0x39e43e (418 bytes)\n// \n// 2 xrefs:\n// > GJTransformControl::refreshControl @ 0x39f72a\n// > GJTransformControl::ccTouchEnded @ 0x39fdc0\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\ncocos2d::CCPoint *EditorUI::checkDiffAfterTransformAnchor(\n        cocos2d::CCPoint *__return_ptr retstr,\n        EditorUI *a2,\n        cocos2d::CCPoint a3,\n        cocos2d::CCArray *a4)\n{\n  float y; // r10\n  int v7; // r11\n  const cocos2d::CCPoint *v8; // r0\n  const cocos2d::CCPoint *v9; // r0\n  int v10; // r2\n  bool v11; // r3\n  unsigned int v12; // r7\n  int v13; // r0\n  int v14; // r2\n  bool v15; // r3\n  cocos2d::CCNode *m_transformNode; // [sp+0h] [bp-3Ch]\n  float x; // [sp+4h] [bp-38h]\n  PlayerObject *v19; // [sp+4h] [bp-38h]\n  cocos2d::CCPoint v20; // [sp+Ch] [bp-30h] BYREF\n  cocos2d::CCPoint v21; // [sp+14h] [bp-28h] BYREF\n  unsigned int v22[6]; // [sp+1Ch] [bp-20h] BYREF\n\n  y = a3.y;\n  x = a3.x;\n  v7 = ((int (__fastcall *)(cocos2d::CCLayer *))a2->m_editorLayer->m_objectLayer->getScale)(a2->m_editorLayer->m_objectLayer);\n  v8 = a2->m_editorLayer->m_objectLayer->getPosition(a2->m_editorLayer->m_objectLayer);\n  cocos2d::CCPoint::CCPoint(&v20, v8);\n  ((void (__fastcall *)(cocos2d::CCLayer *, int))a2->m_editorLayer->m_objectLayer->setScale)(\n    a2->m_editorLayer->m_objectLayer,\n    1065353216);\n  a2->m_editorLayer->m_objectLayer->setPosition(a2->m_editorLayer->m_objectLayer, (const cocos2d::CCPoint *)&flt_AC5D38);\n  a2->m_transformNode->setPosition(a2->m_transformNode, (const cocos2d::CCPoint *)&flt_AC5D38);\n  ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))a2->m_transformNode->setScaleX)(\n    a2->m_transformNode,\n    LODWORD(a2->m_transformState.m_scaleX));\n  ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))a2->m_transformNode->setScaleY)(\n    a2->m_transformNode,\n    LODWORD(a2->m_transformState.m_scaleY));\n  ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))a2->m_transformNode->setRotationX)(\n    a2->m_transformNode,\n    LODWORD(a2->m_transformState.m_angleX));\n  ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))a2->m_transformNode->setRotationY)(\n    a2->m_transformNode,\n    LODWORD(a2->m_transformState.m_angleY));\n  ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))a2->m_transformNode->setSkewX)(\n    a2->m_transformNode,\n    LODWORD(a2->m_transformState.m_skewX));\n  ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))a2->m_transformNode->setSkewY)(\n    a2->m_transformNode,\n    LODWORD(a2->m_transformState.m_skewY));\n  ((void (__fastcall *)(unsigned int *))a2->m_transformNode->nodeToWorldTransform)(v22);\n  a2->m_transformChild->setPosition(a2->m_transformChild, (const cocos2d::CCPoint *)&flt_AC5D38);\n  m_transformNode = a2->m_transformNode;\n  v9 = m_transformNode->getPosition(m_transformNode);\n  cocos2d::CCNode::convertToWorldSpace(&v21, m_transformNode, v9);\n  cocos2d::CCPoint::operator+(v22, LODWORD(x), &v21);\n  cocos2d::CCPoint::operator=((PlayerObject *)&v21, COERCE_FLOAT(v22), v10, v11);\n  v12 = 0;\n  cocos2d::CCNode::convertToNodeSpace(retstr, a2->m_transformNode, &v21);\n  while ( v12 < cocos2d::CCArray::count((cocos2d::CCArray *)LODWORD(y)) )\n  {\n    v13 = cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)LODWORD(y), v12++);\n    v22[0] = *(_DWORD *)(v13 + 772);\n    v19 = (PlayerObject *)std::__detail::_Map_base<int,std::pair<int const,GameObjectEditorState>,std::allocator<std::pair<int const,GameObjectEditorState>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](\n                            &a2->m_objectEditorStates._M_h._M_buckets,\n                            v22);\n    cocos2d::CCPoint::operator+(v22, v19, retstr);\n    cocos2d::CCPoint::operator=(v19, COERCE_FLOAT(v22), v14, v15);\n  }\n  ((void (__fastcall *)(cocos2d::CCLayer *, int))a2->m_editorLayer->m_objectLayer->setScale)(\n    a2->m_editorLayer->m_objectLayer,\n    v7);\n  a2->m_editorLayer->m_objectLayer->setPosition(a2->m_editorLayer->m_objectLayer, &v20);\n  return retstr;\n}", "assembly": "; \n; EditorUI::checkDiffAfterTransformAnchor from 0x39e29c to 0x39e43e (418 bytes)\n; \n; 2 xrefs:\n; > GJTransformControl::refreshControl @ 0x39f72a\n; > GJTransformControl::ccTouchEnded @ 0x39fdc0\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          {R4-R11,LR}                                            ; +0x0, 0x39e29c\nMOV             R10, R3                                                ; +0x4, 0x39e2a0\nLDR             R5, =(__stack_chk_guard_ptr - 0x39E2AE)                ; +0x6, 0x39e2a2\nSUB             SP, SP, #0x3C                                          ; +0x8, 0x39e2a4\nMOV             R8, R0                                                 ; +0xa, 0x39e2a6\nMOV             R4, R1                                                 ; +0xc, 0x39e2a8\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xe, 0x39e2aa\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x10, 0x39e2ac\nSTR             R2, [SP,#0x3C+var_38]                                  ; +0x12, 0x39e2ae\nADD.W           R9, SP, #0x3C+var_30                                   ; +0x14, 0x39e2b0\nLDR             R7, =(flt_AC5D38 - 0x39E2BC)                           ; +0x18, 0x39e2b4\nLDR             R3, [R5]                                               ; +0x1a, 0x39e2b6\nADD             R7, PC; flt_AC5D38                                     ; +0x1c, 0x39e2b8\nSTR             R3, [SP,#0x3C+var_8]                                   ; +0x1e, 0x39e2ba\nLDR.W           R3, [R1,#0x340]                                        ; +0x20, 0x39e2bc\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x24, 0x39e2c0\nLDR             R3, [R0]                                               ; +0x28, 0x39e2c4\nLDR             R3, [R3,#0x54]                                         ; +0x2a, 0x39e2c6\nBLX             R3                                                     ; +0x2c, 0x39e2c8\nLDR.W           R3, [R4,#0x340]                                        ; +0x2e, 0x39e2ca\nMOV             R11, R0                                                ; +0x32, 0x39e2ce\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x34, 0x39e2d0\nLDR             R3, [R0]                                               ; +0x38, 0x39e2d4\nLDR             R3, [R3,#0x60]                                         ; +0x3a, 0x39e2d6\nBLX             R3                                                     ; +0x3c, 0x39e2d8\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0x3e, 0x39e2da\nMOV             R0, R9; this                                           ; +0x40, 0x39e2dc\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x42, 0x39e2de\nLDR.W           R3, [R4,#0x340]                                        ; +0x46, 0x39e2e2\nMOV.W           R1, #0x3F800000                                        ; +0x4a, 0x39e2e6\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x4e, 0x39e2ea\nLDR             R3, [R0]                                               ; +0x52, 0x39e2ee\nLDR             R3, [R3,#0x50]                                         ; +0x54, 0x39e2f0\nBLX             R3                                                     ; +0x56, 0x39e2f2\nLDR.W           R3, [R4,#0x340]                                        ; +0x58, 0x39e2f4\nMOV             R1, R7                                                 ; +0x5c, 0x39e2f8\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x5e, 0x39e2fa\nLDR             R3, [R0]                                               ; +0x62, 0x39e2fe\nLDR             R6, [R3,#0x5C]                                         ; +0x64, 0x39e300\nBLX             R6                                                     ; +0x66, 0x39e302\nLDR.W           R0, [R4,#0x21C]                                        ; +0x68, 0x39e304\nMOV             R1, R7                                                 ; +0x6c, 0x39e308\nADD             R6, SP, #0x3C+var_20                                   ; +0x6e, 0x39e30a\nLDR             R3, [R0]                                               ; +0x70, 0x39e30c\nLDR             R3, [R3,#0x5C]                                         ; +0x72, 0x39e30e\nBLX             R3                                                     ; +0x74, 0x39e310\nLDR.W           R0, [R4,#0x21C]                                        ; +0x76, 0x39e312\nLDR.W           R1, [R4,#0x174]                                        ; +0x7a, 0x39e316\nLDR             R3, [R0]                                               ; +0x7e, 0x39e31a\nLDR             R3, [R3,#0x40]                                         ; +0x80, 0x39e31c\nBLX             R3                                                     ; +0x82, 0x39e31e\nLDR.W           R0, [R4,#0x21C]                                        ; +0x84, 0x39e320\nLDR.W           R1, [R4,#0x178]                                        ; +0x88, 0x39e324\nLDR             R3, [R0]                                               ; +0x8c, 0x39e328\nLDR             R3, [R3,#0x48]                                         ; +0x8e, 0x39e32a\nBLX             R3                                                     ; +0x90, 0x39e32c\nLDR.W           R0, [R4,#0x21C]                                        ; +0x92, 0x39e32e\nLDR.W           R1, [R4,#0x17C]                                        ; +0x96, 0x39e332\nLDR             R3, [R0]                                               ; +0x9a, 0x39e336\nLDR.W           R3, [R3,#0xB4]                                         ; +0x9c, 0x39e338\nBLX             R3                                                     ; +0xa0, 0x39e33c\nLDR.W           R0, [R4,#0x21C]                                        ; +0xa2, 0x39e33e\nLDR.W           R1, [R4,#0x180]                                        ; +0xa6, 0x39e342\nLDR             R3, [R0]                                               ; +0xaa, 0x39e346\nLDR.W           R3, [R3,#0xBC]                                         ; +0xac, 0x39e348\nBLX             R3                                                     ; +0xb0, 0x39e34c\nLDR.W           R0, [R4,#0x21C]                                        ; +0xb2, 0x39e34e\nLDR.W           R1, [R4,#0x184]                                        ; +0xb6, 0x39e352\nLDR             R3, [R0]                                               ; +0xba, 0x39e356\nLDR             R3, [R3,#0x7C]                                         ; +0xbc, 0x39e358\nBLX             R3                                                     ; +0xbe, 0x39e35a\nLDR.W           R0, [R4,#0x21C]                                        ; +0xc0, 0x39e35c\nLDR.W           R1, [R4,#0x188]                                        ; +0xc4, 0x39e360\nLDR             R3, [R0]                                               ; +0xc8, 0x39e364\nLDR.W           R3, [R3,#0x84]                                         ; +0xca, 0x39e366\nBLX             R3                                                     ; +0xce, 0x39e36a\nLDR.W           R1, [R4,#0x21C]                                        ; +0xd0, 0x39e36c\nMOV             R0, R6                                                 ; +0xd4, 0x39e370\nLDR             R3, [R1]                                               ; +0xd6, 0x39e372\nLDR.W           R3, [R3,#0x194]                                        ; +0xd8, 0x39e374\nBLX             R3                                                     ; +0xdc, 0x39e378\nLDR.W           R0, [R4,#0x220]                                        ; +0xde, 0x39e37a\nMOV             R1, R7                                                 ; +0xe2, 0x39e37e\nADD             R7, SP, #0x3C+var_28                                   ; +0xe4, 0x39e380\nLDR             R3, [R0]                                               ; +0xe6, 0x39e382\nLDR             R3, [R3,#0x5C]                                         ; +0xe8, 0x39e384\nBLX             R3                                                     ; +0xea, 0x39e386\nLDR.W           R1, [R4,#0x21C]                                        ; +0xec, 0x39e388\nLDR             R3, [R1]                                               ; +0xf0, 0x39e38c\nMOV             R0, R1                                                 ; +0xf2, 0x39e38e\nSTR             R1, [SP,#0x3C+var_3C]                                  ; +0xf4, 0x39e390\nLDR             R3, [R3,#0x60]                                         ; +0xf6, 0x39e392\nBLX             R3                                                     ; +0xf8, 0x39e394\nLDR             R1, [SP,#0x3C+var_3C]; cocos2d::CCPoint *              ; +0xfa, 0x39e396\nMOV             R2, R0                                                 ; +0xfc, 0x39e398\nMOV             R0, R7; this                                           ; +0xfe, 0x39e39a\nBL              _ZN7cocos2d6CCNode19convertToWorldSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToWorldSpace(cocos2d::CCPoint const&) ; +0x100, 0x39e39c\nLDR.W           R12, [SP,#0x3C+var_38]                                 ; +0x104, 0x39e3a0\nMOV             R2, R7                                                 ; +0x108, 0x39e3a4\nMOV             R0, R6                                                 ; +0x10a, 0x39e3a6\nMOV             R1, R12                                                ; +0x10c, 0x39e3a8\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x10e, 0x39e3aa\nMOV             R0, R7                                                 ; +0x112, 0x39e3ae\nMOV             R1, R6                                                 ; +0x114, 0x39e3b0\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x116, 0x39e3b2\nMOV             R2, R7                                                 ; +0x11a, 0x39e3b6\nMOV             R0, R8; this                                           ; +0x11c, 0x39e3b8\nLDR.W           R1, [R4,#0x21C]; cocos2d::CCPoint *                    ; +0x11e, 0x39e3ba\nMOVS            R7, #0                                                 ; +0x122, 0x39e3be\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0x124, 0x39e3c0\nADD.W           R3, R4, #0x158                                         ; +0x128, 0x39e3c4\nSTR             R3, [SP,#0x3C+var_3C]                                  ; +0x12c, 0x39e3c8\nMOV             R0, R10; this                                          ; +0x12e, 0x39e3ca\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x130, 0x39e3cc\nCMP             R7, R0                                                 ; +0x134, 0x39e3d0\nBCS             loc_39E40A                                             ; +0x136, 0x39e3d2\nMOV             R1, R7; unsigned int                                   ; +0x138, 0x39e3d4\nMOV             R0, R10; this                                          ; +0x13a, 0x39e3d6\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x13c, 0x39e3d8\nMOV             R1, R6                                                 ; +0x140, 0x39e3dc\nADDS            R7, #1                                                 ; +0x142, 0x39e3de\nLDR.W           R2, [R0,#0x304]                                        ; +0x144, 0x39e3e0\nLDR             R0, [SP,#0x3C+var_3C]                                  ; +0x148, 0x39e3e4\nSTR             R2, [SP,#0x3C+var_20]                                  ; +0x14a, 0x39e3e6\nBL              _ZNSt8__detail9_Map_baseIiSt4pairIKi21GameObjectEditorStateESaIS4_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixEOi; std::__detail::_Map_base<int,std::pair<int const,GameObjectEditorState>,std::allocator<std::pair<int const,GameObjectEditorState>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int &&) ; +0x14c, 0x39e3e8\nMOV             R2, R8                                                 ; +0x150, 0x39e3ec\nMOV             R12, R0                                                ; +0x152, 0x39e3ee\nMOV             R0, R6                                                 ; +0x154, 0x39e3f0\nMOV             R1, R12                                                ; +0x156, 0x39e3f2\nSTR.W           R12, [SP,#0x3C+var_38]                                 ; +0x158, 0x39e3f4\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x15c, 0x39e3f8\nLDR.W           R12, [SP,#0x3C+var_38]                                 ; +0x160, 0x39e3fc\nMOV             R1, R6                                                 ; +0x164, 0x39e400\nMOV             R0, R12                                                ; +0x166, 0x39e402\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x168, 0x39e404\nB               loc_39E3CA                                             ; +0x16c, 0x39e408\nLDR.W           R3, [R4,#0x340]                                        ; +0x16e, 0x39e40a\nMOV             R1, R11                                                ; +0x172, 0x39e40e\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x174, 0x39e410\nLDR             R3, [R0]                                               ; +0x178, 0x39e414\nLDR             R3, [R3,#0x50]                                         ; +0x17a, 0x39e416\nBLX             R3                                                     ; +0x17c, 0x39e418\nLDR.W           R3, [R4,#0x340]                                        ; +0x17e, 0x39e41a\nMOV             R1, R9                                                 ; +0x182, 0x39e41e\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x184, 0x39e420\nLDR             R3, [R0]                                               ; +0x188, 0x39e424\nLDR             R3, [R3,#0x5C]                                         ; +0x18a, 0x39e426\nBLX             R3                                                     ; +0x18c, 0x39e428\nLDR             R2, [SP,#0x3C+var_8]                                   ; +0x18e, 0x39e42a\nLDR             R3, [R5]                                               ; +0x190, 0x39e42c\nMOV             R0, R8                                                 ; +0x192, 0x39e42e\nCMP             R2, R3                                                 ; +0x194, 0x39e430\nBEQ             loc_39E438                                             ; +0x196, 0x39e432\nBLX             __stack_chk_fail                                       ; +0x198, 0x39e434\nADD             SP, SP, #0x3C ; '<'                                    ; +0x19c, 0x39e438\nPOP.W           {R4-R11,PC}                                            ; +0x19e, 0x39e43a", "xrefs": ["GJTransformControl::refreshControl @ 0x39f72a", "GJTransformControl::ccTouchEnded @ 0x39fdc0"], "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"}