{"type": "func", "start": 3693504, "end": 3693792, "name": "EditorUI::flipObjectsY", "pseudocode": "// \n// EditorUI::flipObjectsY from 0x385bc0 to 0x385ce0 (288 bytes)\n// \n// 2 xrefs:\n// > EditorUI::transformObjectCall @ 0x39ff72\n// > EditorUI::createSmartObjectsFromTemplate @ 0x3a538a\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::flipObjectsY(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 y; // s17\n  float *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::getMaxY(&v19));\n    v9 = COERCE_FLOAT(cocos2d::CCRect::getMinY(&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, FlipY, 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    y = v12->getPosition(v12)->y;\n    v15 = (float *)v13->getPosition(v13);\n    cocos2d::CCPoint::CCPoint(&v18, *v15, v6 - (float)(y - v5));\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::flipObjectsY from 0x385bc0 to 0x385ce0 (288 bytes)\n; \n; 2 xrefs:\n; > EditorUI::transformObjectCall @ 0x39ff72\n; > EditorUI::createSmartObjectsFromTemplate @ 0x3a538a\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, 0x385bc0\nMOV             R8, R0                                                 ; +0x4, 0x385bc4\nVPUSH           {D8-D10}                                               ; +0x6, 0x385bc6\nMOV             R7, R1                                                 ; +0xa, 0x385bca\nLDR             R3, =(__stack_chk_guard_ptr - 0x385BD8)                ; +0xc, 0x385bcc\nMOVS            R4, #0                                                 ; +0xe, 0x385bce\nVLDR            S16, =-9999.0                                          ; +0x10, 0x385bd0\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x14, 0x385bd4\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x16, 0x385bd6\nSUB             SP, SP, #0x20                                          ; +0x18, 0x385bd8\nLDR             R2, [R3]                                               ; +0x1a, 0x385bda\nADD             R5, SP, #0x20+var_14                                   ; +0x1c, 0x385bdc\nMOV             R6, R3                                                 ; +0x1e, 0x385bde\nVMOV.F32        S18, S16                                               ; +0x20, 0x385be0\nSTR             R2, [SP,#0x20+var_4]                                   ; +0x24, 0x385be4\nVMOV.F32        S20, S16                                               ; +0x26, 0x385be6\nMOV             R0, R7; this                                           ; +0x2a, 0x385bea\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2c, 0x385bec\nCMP             R4, R0                                                 ; +0x30, 0x385bf0\nBCS             loc_385C64                                             ; +0x32, 0x385bf2\nMOV             R1, R4; unsigned int                                   ; +0x34, 0x385bf4\nMOV             R0, R7; this                                           ; +0x36, 0x385bf6\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x38, 0x385bf8\nMOV             R9, R0                                                 ; +0x3c, 0x385bfc\nBL              _ZN10GameObject14updateStartPosEv; GameObject::updateStartPos(void) ; +0x3e, 0x385bfe\nLDR.W           R3, [R9]                                               ; +0x42, 0x385c02\nMOV.W           R2, #0x3F800000                                        ; +0x46, 0x385c06\nMOV             R1, R9                                                 ; +0x4a, 0x385c0a\nMOV             R0, R5                                                 ; +0x4c, 0x385c0c\nLDR.W           R12, [R3,#0x294]                                       ; +0x4e, 0x385c0e\nMOV             R3, R2                                                 ; +0x52, 0x385c12\nBLX             R12                                                    ; +0x54, 0x385c14\nMOV             R0, R5; this                                           ; +0x56, 0x385c16\nBL              _ZNK7cocos2d6CCRect7getMaxYEv; cocos2d::CCRect::getMaxY(void) ; +0x58, 0x385c18\nVMOV            S19, R0                                                ; +0x5c, 0x385c1c\nMOV             R0, R5; this                                           ; +0x60, 0x385c20\nBL              _ZNK7cocos2d6CCRect7getMinYEv; cocos2d::CCRect::getMinY(void) ; +0x62, 0x385c22\nVCMP.F32        S19, S18                                               ; +0x66, 0x385c26\nVMRS            APSR_nzcv, FPSCR                                       ; +0x6a, 0x385c2a\nIT GT                                                                  ; +0x6e, 0x385c2e\nVMOVGT.F32      S18, S19                                               ; +0x70, 0x385c30\nVMOV            S17, R0                                                ; +0x74, 0x385c34\nVCMPE.F32       S17, S16                                               ; +0x78, 0x385c38\nVMRS            APSR_nzcv, FPSCR                                       ; +0x7c, 0x385c3c\nBMI             loc_385C50                                             ; +0x80, 0x385c40\nVCMP.F32        S16, S20                                               ; +0x82, 0x385c42\nVMRS            APSR_nzcv, FPSCR                                       ; +0x86, 0x385c46\nIT NE                                                                  ; +0x8a, 0x385c4a\nVMOVNE.F32      S17, S16                                               ; +0x8c, 0x385c4c\nMOV             R0, R8                                                 ; +0x90, 0x385c50\nMOV             R1, R9                                                 ; +0x92, 0x385c52\nMOVS            R2, #0x16                                              ; +0x94, 0x385c54\nMOVS            R3, #1                                                 ; +0x96, 0x385c56\nBL              _ZN8EditorUI15transformObjectEP10GameObject11EditCommandb; EditorUI::transformObject(GameObject *,EditCommand,bool) ; +0x98, 0x385c58\nADDS            R4, #1                                                 ; +0x9c, 0x385c5c\nVMOV.F32        S16, S17                                               ; +0x9e, 0x385c5e\nB               loc_385BEA                                             ; +0xa2, 0x385c62\nADD.W           R9, SP, #0x20+var_1C                                   ; +0xa4, 0x385c64\nADD.W           R10, SP, #0x20+var_14                                  ; +0xa8, 0x385c68\nMOVS            R5, #0                                                 ; +0xac, 0x385c6c\nMOV             R0, R7; this                                           ; +0xae, 0x385c6e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xb0, 0x385c70\nCMP             R5, R0                                                 ; +0xb4, 0x385c74\nBCS             loc_385CCA                                             ; +0xb6, 0x385c76\nMOV             R1, R5; unsigned int                                   ; +0xb8, 0x385c78\nMOV             R0, R7; this                                           ; +0xba, 0x385c7a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xbc, 0x385c7c\nADDS            R5, #1                                                 ; +0xc0, 0x385c80\nLDR             R3, [R0]                                               ; +0xc2, 0x385c82\nMOV             R4, R0                                                 ; +0xc4, 0x385c84\nLDR             R3, [R3,#0x60]                                         ; +0xc6, 0x385c86\nBLX             R3                                                     ; +0xc8, 0x385c88\nLDR             R3, [R4]                                               ; +0xca, 0x385c8a\nLDR             R3, [R3,#0x60]                                         ; +0xcc, 0x385c8c\nVLDR            S17, [R0,#4]                                           ; +0xce, 0x385c8e\nMOV             R0, R4                                                 ; +0xd2, 0x385c92\nBLX             R3                                                     ; +0xd4, 0x385c94\nVSUB.F32        S17, S17, S16                                          ; +0xd6, 0x385c96\nVSUB.F32        S17, S18, S17                                          ; +0xda, 0x385c9a\nVMOV            R2, S17; float                                         ; +0xde, 0x385c9e\nMOV             R3, R0                                                 ; +0xe2, 0x385ca2\nMOV             R0, R9; this                                           ; +0xe4, 0x385ca4\nLDR             R1, [R3]; float                                        ; +0xe6, 0x385ca6\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xe8, 0x385ca8\nLDR             R3, [R4]                                               ; +0xec, 0x385cac\nMOV             R0, R4                                                 ; +0xee, 0x385cae\nLDR             R3, [R3,#0x60]                                         ; +0xf0, 0x385cb0\nBLX             R3                                                     ; +0xf2, 0x385cb2\nMOV             R1, R9                                                 ; +0xf4, 0x385cb4\nMOV             R2, R0                                                 ; +0xf6, 0x385cb6\nMOV             R0, R10                                                ; +0xf8, 0x385cb8\nBL              _ZNK7cocos2d7CCPointmiERKS0_; cocos2d::CCPoint::operator-(cocos2d::CCPoint const&) ; +0xfa, 0x385cba\nMOV             R0, R8                                                 ; +0xfe, 0x385cbe\nMOV             R1, R4                                                 ; +0x100, 0x385cc0\nMOV             R2, R10                                                ; +0x102, 0x385cc2\nBL              _ZN8EditorUI10moveObjectEP10GameObjectN7cocos2d7CCPointE; EditorUI::moveObject(GameObject *,cocos2d::CCPoint) ; +0x104, 0x385cc4\nB               loc_385C6E                                             ; +0x108, 0x385cc8\nLDR             R2, [SP,#0x20+var_4]                                   ; +0x10a, 0x385cca\nLDR             R3, [R6]                                               ; +0x10c, 0x385ccc\nCMP             R2, R3                                                 ; +0x10e, 0x385cce\nBEQ             loc_385CD6                                             ; +0x110, 0x385cd0\nBLX             __stack_chk_fail                                       ; +0x112, 0x385cd2\nADD             SP, SP, #0x20 ; ' '                                    ; +0x116, 0x385cd6\nVPOP            {D8-D10}                                               ; +0x118, 0x385cd8\nPOP.W           {R4-R10,PC}                                            ; +0x11c, 0x385cdc", "xrefs": ["EditorUI::transformObjectCall @ 0x39ff72", "EditorUI::createSmartObjectsFromTemplate @ 0x3a538a"], "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"}