{"type": "func", "start": 5370276144, "end": 5370276507, "name": "EditorWindowPopup::clampWindowCenter", "pseudocode": "// \n// EditorWindowPopup::clampWindowCenter from 0x14017e930 to 0x14017ea9b (363 bytes)\n// \n// 5 xrefs:\n// > EditorWindowPopup::initWindow @ 0x14017e333\n// > EditorWindowPopup::ccTouchMoved @ 0x14017f709\n// > EditorWindowPopup::ccTouchEnded @ 0x14017f8bd\n// > EditorWindowPopup::ccTouchCancelled @ 0x14017fa1a\n// > <???> @ 0x140918a40\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:27:36 +0000\n// \n\ncocos2d::CCPoint *__fastcall EditorWindowPopup::clampWindowCenter(__int64 a1, cocos2d::CCPoint *a2, float *a3)\n{\n  __int64 v3; // rax\n  float v6; // xmm8_4\n  float v7; // xmm10_4\n  float v8; // xmm6_4\n  cocos2d::CCDirector *v9; // rax\n  float v10; // xmm9_4\n  __int64 v11; // rcx\n  cocos2d::CCDirector *v12; // rax\n  float v13; // xmm10_4\n  float v14; // xmm6_4\n  float v15; // xmm8_4\n  __int64 v16; // rcx\n  cocos2d::CCDirector *v17; // rax\n  float v18; // xmm7_4\n  __int64 v19; // rcx\n  cocos2d::CCDirector *v20; // rax\n  float v21; // xmm0_4\n  float v22; // xmm0_4\n\n  v3 = *(_QWORD *)(a1 + 1000);\n  v6 = *(float *)(a1 + 1048) * *(float *)(a1 + 1040);\n  if ( v3 )\n    v7 = *(float *)(v3 + 904);\n  else\n    v7 = 0.0;\n  v8 = (float)(*(float *)(a1 + 1048) * *(float *)(a1 + 1044)) * 0.5;\n  v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);\n  v10 = (float)((float)((float)(cocos2d::CCDirector::getScreenBottom(v9) + v7) + 10.0) - v8) + 6.0;\n  v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v11);\n  v13 = cocos2d::CCDirector::getScreenTop(v12) - v8;\n  v14 = v6 * 0.30000001;\n  v15 = v6 * 0.5;\n  v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v16);\n  v18 = (float)(cocos2d::CCDirector::getScreenLeft(v17) - v15) + v14;\n  v20 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v19);\n  v21 = (float)(cocos2d::CCDirector::getScreenRight(v20) + v15) - v14;\n  if ( v18 <= *a3 )\n  {\n    if ( *a3 > v21 )\n      *a3 = v21;\n  }\n  else\n  {\n    *a3 = v18;\n  }\n  v22 = a3[1];\n  if ( v10 <= v22 )\n  {\n    if ( v22 > v13 )\n      a3[1] = v13;\n  }\n  else\n  {\n    a3[1] = v10;\n  }\n  cocos2d::CCPoint::CCPoint(a2, (const struct cocos2d::CCPoint *)a3);\n  return a2;\n}", "assembly": "; \n; EditorWindowPopup::clampWindowCenter from 0x14017e930 to 0x14017ea9b (363 bytes)\n; \n; 5 xrefs:\n; > EditorWindowPopup::initWindow @ 0x14017e333\n; > EditorWindowPopup::ccTouchMoved @ 0x14017f709\n; > EditorWindowPopup::ccTouchEnded @ 0x14017f8bd\n; > EditorWindowPopup::ccTouchCancelled @ 0x14017fa1a\n; > <???> @ 0x140918a40\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:27:36 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14017e930\npush    rdi                                                            ; +0x5, 0x14017e935\nsub     rsp, 70h                                                       ; +0x6, 0x14017e936\nmov     rax, [rcx+3E8h]                                                ; +0xa, 0x14017e93a\nmov     rbx, r8                                                        ; +0x11, 0x14017e941\nmovaps  [rsp+78h+var_18], xmm6                                         ; +0x14, 0x14017e944\nmov     rdi, rdx                                                       ; +0x19, 0x14017e949\nmovss   xmm6, dword ptr [rcx+418h]                                     ; +0x1c, 0x14017e94c\nmovaps  [rsp+78h+var_28], xmm7                                         ; +0x24, 0x14017e954\nmovaps  [rsp+78h+var_38], xmm8                                         ; +0x29, 0x14017e959\nmovaps  xmm8, xmm6                                                     ; +0x2f, 0x14017e95f\nmulss   xmm8, dword ptr [rcx+410h]                                     ; +0x33, 0x14017e963\nmulss   xmm6, dword ptr [rcx+414h]                                     ; +0x3c, 0x14017e96c\nmovaps  [rsp+78h+var_48], xmm9                                         ; +0x44, 0x14017e974\nmovaps  [rsp+78h+var_58], xmm10                                        ; +0x4a, 0x14017e97a\ntest    rax, rax                                                       ; +0x50, 0x14017e980\njz      short loc_14017E990                                            ; +0x53, 0x14017e983\nmovss   xmm10, dword ptr [rax+388h]                                    ; +0x55, 0x14017e985\njmp     short loc_14017E994                                            ; +0x5e, 0x14017e98e\nxorps   xmm10, xmm10                                                   ; +0x60, 0x14017e990\nmulss   xmm6, cs:dword_140834F20                                       ; +0x64, 0x14017e994\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x6c, 0x14017e99c\nmov     rcx, rax                                                       ; +0x72, 0x14017e9a2\ncall    cs:?getScreenBottom@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenBottom(void) ; +0x75, 0x14017e9a5\nmovaps  xmm9, xmm0                                                     ; +0x7b, 0x14017e9ab\naddss   xmm9, xmm10                                                    ; +0x7f, 0x14017e9af\naddss   xmm9, cs:flt_1408354EC                                         ; +0x84, 0x14017e9b4\nsubss   xmm9, xmm6                                                     ; +0x8d, 0x14017e9bd\naddss   xmm9, cs:flt_140835490                                         ; +0x92, 0x14017e9c2\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x9b, 0x14017e9cb\nmov     rcx, rax                                                       ; +0xa1, 0x14017e9d1\ncall    cs:?getScreenTop@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenTop(void) ; +0xa4, 0x14017e9d4\nmovaps  xmm10, xmm0                                                    ; +0xaa, 0x14017e9da\nsubss   xmm10, xmm6                                                    ; +0xae, 0x14017e9de\nmovaps  xmm6, xmm8                                                     ; +0xb3, 0x14017e9e3\nmulss   xmm6, cs:dword_140834EA0                                       ; +0xb7, 0x14017e9e7\nmulss   xmm8, cs:dword_140834F20                                       ; +0xbf, 0x14017e9ef\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xc8, 0x14017e9f8\nmov     rcx, rax                                                       ; +0xce, 0x14017e9fe\ncall    cs:?getScreenLeft@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenLeft(void) ; +0xd1, 0x14017ea01\nmovaps  xmm7, xmm0                                                     ; +0xd7, 0x14017ea07\nsubss   xmm7, xmm8                                                     ; +0xda, 0x14017ea0a\naddss   xmm7, xmm6                                                     ; +0xdf, 0x14017ea0f\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xe3, 0x14017ea13\nmov     rcx, rax                                                       ; +0xe9, 0x14017ea19\ncall    cs:?getScreenRight@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenRight(void) ; +0xec, 0x14017ea1c\nmovss   xmm1, dword ptr [rbx]                                          ; +0xf2, 0x14017ea22\naddss   xmm0, xmm8                                                     ; +0xf6, 0x14017ea26\ncomiss  xmm7, xmm1                                                     ; +0xfb, 0x14017ea2b\nsubss   xmm0, xmm6                                                     ; +0xfe, 0x14017ea2e\njbe     short loc_14017EA3A                                            ; +0x102, 0x14017ea32\nmovss   dword ptr [rbx], xmm7                                          ; +0x104, 0x14017ea34\njmp     short loc_14017EA43                                            ; +0x108, 0x14017ea38\ncomiss  xmm1, xmm0                                                     ; +0x10a, 0x14017ea3a\njbe     short loc_14017EA43                                            ; +0x10d, 0x14017ea3d\nmovss   dword ptr [rbx], xmm0                                          ; +0x10f, 0x14017ea3f\nmovss   xmm0, dword ptr [rbx+4]                                        ; +0x113, 0x14017ea43\ncomiss  xmm9, xmm0                                                     ; +0x118, 0x14017ea48\njbe     short loc_14017EA56                                            ; +0x11c, 0x14017ea4c\nmovss   dword ptr [rbx+4], xmm9                                        ; +0x11e, 0x14017ea4e\njmp     short loc_14017EA62                                            ; +0x124, 0x14017ea54\ncomiss  xmm0, xmm10                                                    ; +0x126, 0x14017ea56\njbe     short loc_14017EA62                                            ; +0x12a, 0x14017ea5a\nmovss   dword ptr [rbx+4], xmm10                                       ; +0x12c, 0x14017ea5c\nmov     rdx, rbx                                                       ; +0x132, 0x14017ea62\nmov     rcx, rdi                                                       ; +0x135, 0x14017ea65\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x138, 0x14017ea68\nmov     rbx, [rsp+78h+arg_0]                                           ; +0x13e, 0x14017ea6e\nmov     rax, rdi                                                       ; +0x146, 0x14017ea76\nmovaps  xmm6, [rsp+78h+var_18]                                         ; +0x149, 0x14017ea79\nmovaps  xmm7, [rsp+78h+var_28]                                         ; +0x14e, 0x14017ea7e\nmovaps  xmm8, [rsp+78h+var_38]                                         ; +0x153, 0x14017ea83\nmovaps  xmm9, [rsp+78h+var_48]                                         ; +0x159, 0x14017ea89\nmovaps  xmm10, [rsp+78h+var_58]                                        ; +0x15f, 0x14017ea8f\nadd     rsp, 70h                                                       ; +0x165, 0x14017ea95\npop     rdi                                                            ; +0x169, 0x14017ea99\nretn                                                                   ; +0x16a, 0x14017ea9a", "xrefs": ["EditorWindowPopup::initWindow @ 0x14017e333", "EditorWindowPopup::ccTouchMoved @ 0x14017f709", "EditorWindowPopup::ccTouchEnded @ 0x14017f8bd", "EditorWindowPopup::ccTouchCancelled @ 0x14017fa1a", "<???> @ 0x140918a40"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}