{"type": "func", "start": 3674004, "end": 3674148, "name": "EditorUI::getLimitedPosition", "pseudocode": "// \n// EditorUI::getLimitedPosition from 0x380f94 to 0x381024 (144 bytes)\n// \n// 2 xrefs:\n// > EditorUI::moveObject @ 0x38106a\n// > EditorUI::getGridSnappedPos @ 0x381eac\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::getLimitedPosition(\n        cocos2d::CCPoint *__return_ptr retstr,\n        EditorUI *a2,\n        cocos2d::CCPoint a3)\n{\n  float v3; // s15\n  float v5; // s15\n  int v6; // r3\n\n  v3 = *(float *)LODWORD(a3.x);\n  if ( *(float *)LODWORD(a3.x) <= -3000.0 )\n  {\n    v3 = -3000.0;\n  }\n  else if ( v3 >= 240000.0 )\n  {\n    v3 = 240000.0;\n  }\n  LODWORD(a3.y) = a2->m_editorLayer;\n  *(float *)LODWORD(a3.x) = v3;\n  v5 = *(float *)(LODWORD(a3.x) + 4);\n  LODWORD(a3.y) = *(unsigned __int8 *)(*(_DWORD *)(LODWORD(a3.y) + 2240) + 365);\n  if ( v5 <= -3000.0 )\n    v5 = -3000.0;\n  if ( LODWORD(a3.y) )\n    v6 = 1000;\n  else\n    v6 = 80;\n  if ( (float)((float)((float)v6 * 30.0) + 90.0) <= v5 )\n    v5 = (float)((float)v6 * 30.0) + 90.0;\n  *(float *)(LODWORD(a3.x) + 4) = v5;\n  cocos2d::CCPoint::CCPoint(retstr, (const cocos2d::CCPoint *)LODWORD(a3.x));\n  return retstr;\n}", "assembly": "; \n; EditorUI::getLimitedPosition from 0x380f94 to 0x381024 (144 bytes)\n; \n; 2 xrefs:\n; > EditorUI::moveObject @ 0x38106a\n; > EditorUI::getGridSnappedPos @ 0x381eac\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\nVLDR            S15, [R2]                                              ; +0x0, 0x380f94\nPUSH            {R4,LR}                                                ; +0x4, 0x380f98\nMOV             R4, R0                                                 ; +0x6, 0x380f9a\nVLDR            S14, =-3000.0                                          ; +0x8, 0x380f9c\nVCMPE.F32       S15, S14                                               ; +0xc, 0x380fa0\nVMRS            APSR_nzcv, FPSCR                                       ; +0x10, 0x380fa4\nBLE             loc_380FBE                                             ; +0x14, 0x380fa8\nVLDR            S13, =240000.0                                         ; +0x16, 0x380faa\nVCMPE.F32       S15, S13                                               ; +0x1a, 0x380fae\nVMRS            APSR_nzcv, FPSCR                                       ; +0x1e, 0x380fb2\nIT PL                                                                  ; +0x22, 0x380fb6\nVMOVPL.F32      S15, S13                                               ; +0x24, 0x380fb8\nB               loc_380FC2                                             ; +0x28, 0x380fbc\nVMOV.F32        S15, S14                                               ; +0x2a, 0x380fbe\nLDR.W           R3, [R1,#0x340]                                        ; +0x2e, 0x380fc2\nMOV             R0, R4; this                                           ; +0x32, 0x380fc6\nVSTR            S15, [R2]                                              ; +0x34, 0x380fc8\nMOV             R1, R2; cocos2d::CCPoint *                             ; +0x38, 0x380fcc\nLDR.W           R3, [R3,#0x8C0]                                        ; +0x3a, 0x380fce\nVLDR            S15, [R2,#4]                                           ; +0x3e, 0x380fd2\nLDRB.W          R3, [R3,#0x16D]                                        ; +0x42, 0x380fd6\nVMOV.F32        S12, #30.0                                             ; +0x46, 0x380fda\nVCMPE.F32       S15, S14                                               ; +0x4a, 0x380fde\nVLDR            S14, =-3000.0                                          ; +0x4e, 0x380fe2\nVMRS            APSR_nzcv, FPSCR                                       ; +0x52, 0x380fe6\nIT LE                                                                  ; +0x56, 0x380fea\nVMOVLE.F32      S15, S14                                               ; +0x58, 0x380fec\nCMP             R3, #0                                                 ; +0x5c, 0x380ff0\nVLDR            S14, =90.0                                             ; +0x5e, 0x380ff2\nITE NE                                                                 ; +0x62, 0x380ff6\nMOVNE.W         R3, #0x3E8                                             ; +0x64, 0x380ff8\nMOVEQ           R3, #0x50 ; 'P'                                        ; +0x68, 0x380ffc\nVMOV            S13, R3                                                ; +0x6a, 0x380ffe\nVCVT.F32.S32    S13, S13                                               ; +0x6e, 0x381002\nVMLA.F32        S14, S13, S12                                          ; +0x72, 0x381006\nVCMPE.F32       S14, S15                                               ; +0x76, 0x38100a\nVMRS            APSR_nzcv, FPSCR                                       ; +0x7a, 0x38100e\nIT LE                                                                  ; +0x7e, 0x381012\nVMOVLE.F32      S15, S14                                               ; +0x80, 0x381014\nVSTR            S15, [R2,#4]                                           ; +0x84, 0x381018\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x88, 0x38101c\nMOV             R0, R4                                                 ; +0x8c, 0x381020\nPOP             {R4,PC}                                                ; +0x8e, 0x381022", "xrefs": ["EditorUI::moveObject @ 0x38106a", "EditorUI::getGridSnappedPos @ 0x381eac"], "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"}