{"type": "func", "start": 3693208, "end": 3693496, "name": "EditorUI::flipObjectsX", "pseudocode": "// \n// EditorUI::flipObjectsX from 0x385a98 to 0x385bb8 (288 bytes)\n// \n// 2 xrefs:\n// > EditorUI::transformObjectCall @ 0x39ff4c\n// > EditorUI::createSmartObjectsFromTemplate @ 0x3a5394\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 EditorUI::flipObjectsX(EditorUI *a1, cocos2d::CCArray *a2)\n{\n  unsigned int v4; // r4\n  float v5; // s16\n  float v6; // s18\n  GameObject *v7; // r9\n  float v8; // s19\n  float v9; // r0\n  float v10; // s17\n  unsigned int v11; // r5\n  GameObject *v12; // r0\n  GameObject *v13; // r4\n  float x; // s17\n  int v15; // r0\n  int v16; // r0\n  cocos2d::CCPoint v17; // r2\n  cocos2d::CCPoint v18; // [sp+4h] [bp-1Ch] BYREF\n  cocos2d::CCRect v19; // [sp+Ch] [bp-14h] BYREF\n\n  v4 = 0;\n  v5 = -9999.0;\n  v6 = -9999.0;\n  while ( v4 < cocos2d::CCArray::count(a2) )\n  {\n    v7 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v4);\n    GameObject::updateStartPos(v7);\n    ((void (__fastcall *)(cocos2d::CCRect *, GameObject *, int, int))v7->getObjectRect_0)(\n      &v19,\n      v7,\n      1065353216,\n      1065353216);\n    v8 = COERCE_FLOAT(cocos2d::CCRect::getMaxX(&v19));\n    v9 = COERCE_FLOAT(cocos2d::CCRect::getMinX(&v19));\n    if ( v8 > v6 )\n      v6 = v8;\n    v10 = v9;\n    if ( v9 >= v5 && v5 != -9999.0 )\n      v10 = v5;\n    EditorUI::transformObject(a1, v7, FlipX, 1);\n    ++v4;\n    v5 = v10;\n  }\n  v11 = 0;\n  while ( v11 < cocos2d::CCArray::count(a2) )\n  {\n    v12 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v11++);\n    v13 = v12;\n    x = v12->getPosition(v12)->x;\n    v15 = (int)v13->getPosition(v13);\n    cocos2d::CCPoint::CCPoint(&v18, v6 - (float)(x - v5), *(float *)(v15 + 4));\n    v16 = (int)v13->getPosition(v13);\n    cocos2d::CCPoint::operator-(&v19, &v18, v16);\n    LODWORD(v17.x) = &v19;\n    EditorUI::moveObject(a1, v13, v17);\n  }\n}", "assembly": "; \n; EditorUI::flipObjectsX from 0x385a98 to 0x385bb8 (288 bytes)\n; \n; 2 xrefs:\n; > EditorUI::transformObjectCall @ 0x39ff4c\n; > EditorUI::createSmartObjectsFromTemplate @ 0x3a5394\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-R10,LR}                                            ; +0x0, 0x385a98\nMOV             R8, R0                                                 ; +0x4, 0x385a9c\nVPUSH           {D8-D10}                                               ; +0x6, 0x385a9e\nMOV             R7, R1                                                 ; +0xa, 0x385aa2\nLDR             R3, =(__stack_chk_guard_ptr - 0x385AB0)                ; +0xc, 0x385aa4\nMOVS            R4, #0                                                 ; +0xe, 0x385aa6\nVLDR            S16, =-9999.0                                          ; +0x10, 0x385aa8\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x14, 0x385aac\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x16, 0x385aae\nSUB             SP, SP, #0x20                                          ; +0x18, 0x385ab0\nLDR             R2, [R3]                                               ; +0x1a, 0x385ab2\nADD             R5, SP, #0x20+var_14                                   ; +0x1c, 0x385ab4\nMOV             R6, R3                                                 ; +0x1e, 0x385ab6\nVMOV.F32        S18, S16                                               ; +0x20, 0x385ab8\nSTR             R2, [SP,#0x20+var_4]                                   ; +0x24, 0x385abc\nVMOV.F32        S20, S16                                               ; +0x26, 0x385abe\nMOV             R0, R7; this                                           ; +0x2a, 0x385ac2\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2c, 0x385ac4\nCMP             R4, R0                                                 ; +0x30, 0x385ac8\nBCS             loc_385B3C                                             ; +0x32, 0x385aca\nMOV             R1, R4; unsigned int                                   ; +0x34, 0x385acc\nMOV             R0, R7; this                                           ; +0x36, 0x385ace\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x38, 0x385ad0\nMOV             R9, R0                                                 ; +0x3c, 0x385ad4\nBL              _ZN10GameObject14updateStartPosEv; GameObject::updateStartPos(void) ; +0x3e, 0x385ad6\nLDR.W           R3, [R9]                                               ; +0x42, 0x385ada\nMOV.W           R2, #0x3F800000                                        ; +0x46, 0x385ade\nMOV             R1, R9                                                 ; +0x4a, 0x385ae2\nMOV             R0, R5                                                 ; +0x4c, 0x385ae4\nLDR.W           R12, [R3,#0x294]                                       ; +0x4e, 0x385ae6\nMOV             R3, R2                                                 ; +0x52, 0x385aea\nBLX             R12                                                    ; +0x54, 0x385aec\nMOV             R0, R5; this                                           ; +0x56, 0x385aee\nBL              _ZNK7cocos2d6CCRect7getMaxXEv; cocos2d::CCRect::getMaxX(void) ; +0x58, 0x385af0\nVMOV            S19, R0                                                ; +0x5c, 0x385af4\nMOV             R0, R5; this                                           ; +0x60, 0x385af8\nBL              _ZNK7cocos2d6CCRect7getMinXEv; cocos2d::CCRect::getMinX(void) ; +0x62, 0x385afa\nVCMP.F32        S19, S18                                               ; +0x66, 0x385afe\nVMRS            APSR_nzcv, FPSCR                                       ; +0x6a, 0x385b02\nIT GT                                                                  ; +0x6e, 0x385b06\nVMOVGT.F32      S18, S19                                               ; +0x70, 0x385b08\nVMOV            S17, R0                                                ; +0x74, 0x385b0c\nVCMPE.F32       S17, S16                                               ; +0x78, 0x385b10\nVMRS            APSR_nzcv, FPSCR                                       ; +0x7c, 0x385b14\nBMI             loc_385B28                                             ; +0x80, 0x385b18\nVCMP.F32        S16, S20                                               ; +0x82, 0x385b1a\nVMRS            APSR_nzcv, FPSCR                                       ; +0x86, 0x385b1e\nIT NE                                                                  ; +0x8a, 0x385b22\nVMOVNE.F32      S17, S16                                               ; +0x8c, 0x385b24\nMOV             R0, R8                                                 ; +0x90, 0x385b28\nMOV             R1, R9                                                 ; +0x92, 0x385b2a\nMOVS            R2, #0x15                                              ; +0x94, 0x385b2c\nMOVS            R3, #1                                                 ; +0x96, 0x385b2e\nBL              _ZN8EditorUI15transformObjectEP10GameObject11EditCommandb; EditorUI::transformObject(GameObject *,EditCommand,bool) ; +0x98, 0x385b30\nADDS            R4, #1                                                 ; +0x9c, 0x385b34\nVMOV.F32        S16, S17                                               ; +0x9e, 0x385b36\nB               loc_385AC2                                             ; +0xa2, 0x385b3a\nADD.W           R9, SP, #0x20+var_1C                                   ; +0xa4, 0x385b3c\nADD.W           R10, SP, #0x20+var_14                                  ; +0xa8, 0x385b40\nMOVS            R5, #0                                                 ; +0xac, 0x385b44\nMOV             R0, R7; this                                           ; +0xae, 0x385b46\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xb0, 0x385b48\nCMP             R5, R0                                                 ; +0xb4, 0x385b4c\nBCS             loc_385BA2                                             ; +0xb6, 0x385b4e\nMOV             R1, R5; unsigned int                                   ; +0xb8, 0x385b50\nMOV             R0, R7; this                                           ; +0xba, 0x385b52\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xbc, 0x385b54\nADDS            R5, #1                                                 ; +0xc0, 0x385b58\nLDR             R3, [R0]                                               ; +0xc2, 0x385b5a\nMOV             R4, R0                                                 ; +0xc4, 0x385b5c\nLDR             R3, [R3,#0x60]                                         ; +0xc6, 0x385b5e\nBLX             R3                                                     ; +0xc8, 0x385b60\nLDR             R3, [R4]                                               ; +0xca, 0x385b62\nLDR             R3, [R3,#0x60]                                         ; +0xcc, 0x385b64\nVLDR            S17, [R0]                                              ; +0xce, 0x385b66\nMOV             R0, R4                                                 ; +0xd2, 0x385b6a\nBLX             R3                                                     ; +0xd4, 0x385b6c\nVSUB.F32        S17, S17, S16                                          ; +0xd6, 0x385b6e\nVSUB.F32        S17, S18, S17                                          ; +0xda, 0x385b72\nVMOV            R1, S17; float                                         ; +0xde, 0x385b76\nMOV             R3, R0                                                 ; +0xe2, 0x385b7a\nMOV             R0, R9; this                                           ; +0xe4, 0x385b7c\nLDR             R2, [R3,#4]; float                                     ; +0xe6, 0x385b7e\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xe8, 0x385b80\nLDR             R3, [R4]                                               ; +0xec, 0x385b84\nMOV             R0, R4                                                 ; +0xee, 0x385b86\nLDR             R3, [R3,#0x60]                                         ; +0xf0, 0x385b88\nBLX             R3                                                     ; +0xf2, 0x385b8a\nMOV             R1, R9                                                 ; +0xf4, 0x385b8c\nMOV             R2, R0                                                 ; +0xf6, 0x385b8e\nMOV             R0, R10                                                ; +0xf8, 0x385b90\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0xfa, 0x385b92\nMOV             R0, R8                                                 ; +0xfe, 0x385b96\nMOV             R1, R4                                                 ; +0x100, 0x385b98\nMOV             R2, R10                                                ; +0x102, 0x385b9a\nBL              _ZN8EditorUI10moveObjectEP10GameObjectN7cocos2d7CCPointE; EditorUI::moveObject(GameObject *,cocos2d::CCPoint) ; +0x104, 0x385b9c\nB               loc_385B46                                             ; +0x108, 0x385ba0\nLDR             R2, [SP,#0x20+var_4]                                   ; +0x10a, 0x385ba2\nLDR             R3, [R6]                                               ; +0x10c, 0x385ba4\nCMP             R2, R3                                                 ; +0x10e, 0x385ba6\nBEQ             loc_385BAE                                             ; +0x110, 0x385ba8\nBLX             __stack_chk_fail                                       ; +0x112, 0x385baa\nADD             SP, SP, #0x20 ; ' '                                    ; +0x116, 0x385bae\nVPOP            {D8-D10}                                               ; +0x118, 0x385bb0\nPOP.W           {R4-R10,PC}                                            ; +0x11c, 0x385bb4", "xrefs": ["EditorUI::transformObjectCall @ 0x39ff4c", "EditorUI::createSmartObjectsFromTemplate @ 0x3a5394"], "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"}