{"type": "func", "start": 4295219616, "end": 4295220327, "name": "EditorUI::updateZoom", "pseudocode": "// \n// EditorUI::updateZoom from 0x10003d9a0 to 0x10003dc67 (711 bytes)\n// \n// 6 xrefs:\n// > EditorUI::onStopPlaytest @ 0x10000c81d\n// > EditorUI::zoomIn @ 0x10000c878\n// > EditorUI::zoomOut @ 0x10000c8c9\n// > EditorUI::playtestStopped @ 0x10003d993\n// > EditorUI::zoomGameLayer @ 0x10003dcca\n// > EditorUI::scrollWheel @ 0x1000518c8\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 __fastcall EditorUI::updateZoom(EditorUI *a1, float a2)\n{\n  cocos2d::CCDirector *v3; // rsi\n  LevelEditorLayer *m_editorLayer; // rdi\n  const cocos2d::CCPoint *m_objectLayer; // r14\n  __int64 v6; // rax\n  __int64 v7; // rax\n  __int64 v8; // rax\n  __int64 v9; // rax\n  int SectionCount; // eax\n  int v11; // ecx\n  float v12; // xmm0_4\n  GJRotationControl *m_rotationControl; // rdi\n  GJRotationControl_vtbl *v14; // rax\n  GJTransformControl *m_transformControl; // rbx\n  cocos2d::CCArray *m_warpSprites; // rax\n  cocos2d::ccArray *data; // rax\n  cocos2d::CCObject **arr; // r14\n  unsigned __int64 v19; // r15\n  __int64 v20; // rax\n  char v21; // [rsp+0h] [rbp-60h] BYREF\n  char v22[8]; // [rsp+8h] [rbp-58h] BYREF\n  char v23; // [rsp+10h] [rbp-50h] BYREF\n  char v24[8]; // [rsp+18h] [rbp-48h] BYREF\n  float XMin; // [rsp+20h] [rbp-40h]\n  float v26; // [rsp+24h] [rbp-3Ch]\n  float v27; // [rsp+28h] [rbp-38h] BYREF\n  float v28; // [rsp+2Ch] [rbp-34h]\n  float v29; // [rsp+30h] [rbp-30h]\n  float v30; // [rsp+34h] [rbp-2Ch]\n  double v31; // 0:xmm0_8.8\n\n  v29 = a2;\n  v3 = cocos2d::CCDirector::sharedDirector();\n  *(cocos2d::CCSize *)&v31 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v27);\n  m_editorLayer = a1->m_editorLayer;\n  m_objectLayer = (const cocos2d::CCPoint *)m_editorLayer->m_objectLayer;\n  v6 = ((__int64 (__fastcall *)(LevelEditorLayer *, cocos2d::CCDirector *, double))m_editorLayer->getParent)(\n         m_editorLayer,\n         v3,\n         v31);\n  v30 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v6 + 168LL))(v6);\n  v7 = ((__int64 (__fastcall *)(LevelEditorLayer *))a1->m_editorLayer->getParent)(a1->m_editorLayer);\n  (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 160LL))(v7, 1.0);\n  sub_10028CBE0(&v23, v27 * 0.5, v28 * 0.5);\n  cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v21, m_objectLayer);\n  ((void (__fastcall *)(cocos2d::CCLayer *, float))a1->m_editorLayer->m_objectLayer->setScale)(\n    a1->m_editorLayer->m_objectLayer,\n    v29);\n  cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)&v23, m_objectLayer);\n  sub_10028CBE0(v24, v27 * 0.5, 0.5 * v28);\n  sub_10028CD00(v22, v24, &v23);\n  v8 = (*(__int64 (__fastcall **)(const cocos2d::CCPoint *))(*(_QWORD *)m_objectLayer + 192LL))(m_objectLayer);\n  sub_10028CCE0(v24, v8);\n  (*(void (__fastcall **)(const cocos2d::CCPoint *, char *))(*(_QWORD *)m_objectLayer + 184LL))(m_objectLayer, v24);\n  EditorUI::constrainGameLayerPosition(a1, -100.0, -100.0);\n  v9 = ((__int64 (__fastcall *)(LevelEditorLayer *))a1->m_editorLayer->getParent)(a1->m_editorLayer);\n  (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v9 + 160LL))(v9, v30);\n  v30 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getPosition)(a1->m_editorLayer->m_objectLayer);\n  XMin = EditorUI::getXMin(a1, 0);\n  SectionCount = LevelEditorLayer::getSectionCount(a1->m_editorLayer);\n  v11 = 100;\n  if ( SectionCount >= 101 )\n    v11 = SectionCount;\n  v26 = (float)v11 * -100.0;\n  v12 = ((float (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer);\n  Slider::setValue(a1->m_positionSlider, fminf(fmaxf((float)(v30 - XMin) / (float)(v12 * v26), 0.0), 1.0));\n  m_rotationControl = a1->m_rotationControl;\n  v14 = m_rotationControl->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  v30 = 1.0 / v29;\n  ((void (__fastcall *)(GJRotationControl *))v14->setScale)(m_rotationControl);\n  m_transformControl = a1->m_transformControl;\n  m_warpSprites = m_transformControl->m_warpSprites;\n  if ( m_warpSprites )\n  {\n    data = m_warpSprites->data;\n    if ( data->num )\n    {\n      arr = data->arr;\n      v19 = (unsigned __int64)&arr[data->num - 1];\n      v29 = 0.69999999 * v30;\n      do\n      {\n        if ( !*arr )\n          break;\n        ((void (__fastcall *)(cocos2d::CCObject *, float))(*arr)->__vftable[2].copyWithZone)(\n          *arr,\n          m_transformControl->m_buttonScale * v29);\n        ++arr;\n      }\n      while ( (unsigned __int64)arr <= v19 );\n    }\n  }\n  v20 = ((__int64 (__fastcall *)(CCMenuItemSpriteExtra *))m_transformControl->m_warpLockButton->getNormalImage)(m_transformControl->m_warpLockButton);\n  (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 160LL))(v20, v30);\n}", "assembly": "; \n; EditorUI::updateZoom from 0x10003d9a0 to 0x10003dc67 (711 bytes)\n; \n; 6 xrefs:\n; > EditorUI::onStopPlaytest @ 0x10000c81d\n; > EditorUI::zoomIn @ 0x10000c878\n; > EditorUI::zoomOut @ 0x10000c8c9\n; > EditorUI::playtestStopped @ 0x10003d993\n; > EditorUI::zoomGameLayer @ 0x10003dcca\n; > EditorUI::scrollWheel @ 0x1000518c8\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    rbp                                                            ; +0x0, 0x10003d9a0\nmov     rbp, rsp                                                       ; +0x1, 0x10003d9a1\npush    r15                                                            ; +0x4, 0x10003d9a4\npush    r14                                                            ; +0x6, 0x10003d9a6\npush    r13                                                            ; +0x8, 0x10003d9a8\npush    r12                                                            ; +0xa, 0x10003d9aa\npush    rbx                                                            ; +0xc, 0x10003d9ac\nsub     rsp, 38h                                                       ; +0xd, 0x10003d9ad\nmovss   [rbp+var_30], xmm0                                             ; +0x11, 0x10003d9b1\nmov     rbx, rdi                                                       ; +0x16, 0x10003d9b6\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x19, 0x10003d9b9\nlea     rdi, [rbp+var_38]                                              ; +0x1e, 0x10003d9be\nmov     rsi, rax                                                       ; +0x22, 0x10003d9c2\ncall    cocos2d__CCDirector__getWinSize                                ; +0x25, 0x10003d9c5\nmov     rdi, [rbx+4E8h]                                                ; +0x2a, 0x10003d9ca\nmov     r14, [rdi+0EB8h]                                               ; +0x31, 0x10003d9d1\nmov     rax, [rdi]                                                     ; +0x38, 0x10003d9d8\ncall    qword ptr [rax+1F0h]                                           ; +0x3b, 0x10003d9db\nmov     rcx, [rax]                                                     ; +0x41, 0x10003d9e1\nmov     rdi, rax                                                       ; +0x44, 0x10003d9e4\ncall    qword ptr [rcx+0A8h]                                           ; +0x47, 0x10003d9e7\nmovss   [rbp+var_2C], xmm0                                             ; +0x4d, 0x10003d9ed\nmov     rdi, [rbx+4E8h]                                                ; +0x52, 0x10003d9f2\nmov     rax, [rdi]                                                     ; +0x59, 0x10003d9f9\ncall    qword ptr [rax+1F0h]                                           ; +0x5c, 0x10003d9fc\nmov     rcx, [rax]                                                     ; +0x62, 0x10003da02\nmovss   xmm0, cs:alpha                                                 ; +0x65, 0x10003da05\nmov     rdi, rax                                                       ; +0x6d, 0x10003da0d\ncall    qword ptr [rcx+0A0h]                                           ; +0x70, 0x10003da10\nmovss   xmm2, cs:dword_100814FA8                                       ; +0x76, 0x10003da16\nmovss   xmm0, [rbp+var_38]                                             ; +0x7e, 0x10003da1e\nmulss   xmm0, xmm2                                                     ; +0x83, 0x10003da23\nmovss   xmm1, [rbp+var_34]                                             ; +0x87, 0x10003da27\nmulss   xmm1, xmm2                                                     ; +0x8c, 0x10003da2c\nlea     r15, [rbp+var_50]                                              ; +0x90, 0x10003da30\nmov     rdi, r15                                                       ; +0x94, 0x10003da34\ncall    sub_10028CBE0                                                  ; +0x97, 0x10003da37\nlea     r12, [rbp+var_60]                                              ; +0x9c, 0x10003da3c\nmov     rdi, r12                                                       ; +0xa0, 0x10003da40\nmov     rsi, r14                                                       ; +0xa3, 0x10003da43\nmov     rdx, r15                                                       ; +0xa6, 0x10003da46\ncall    cocos2d__CCNode__convertToNodeSpace                            ; +0xa9, 0x10003da49\nmov     rax, [rbx+4E8h]                                                ; +0xae, 0x10003da4e\nmov     rdi, [rax+0EB8h]                                               ; +0xb5, 0x10003da55\nmov     rax, [rdi]                                                     ; +0xbc, 0x10003da5c\nmovss   xmm0, [rbp+var_30]                                             ; +0xbf, 0x10003da5f\ncall    qword ptr [rax+0A0h]                                           ; +0xc4, 0x10003da64\nmov     rdi, r15                                                       ; +0xca, 0x10003da6a\nmov     rsi, r14                                                       ; +0xcd, 0x10003da6d\nmov     rdx, r12                                                       ; +0xd0, 0x10003da70\ncall    cocos2d__CCNode__convertToWorldSpace                           ; +0xd3, 0x10003da73\nmovss   xmm0, [rbp+var_38]                                             ; +0xd8, 0x10003da78\nmovss   xmm1, cs:dword_100814FA8                                       ; +0xdd, 0x10003da7d\nmulss   xmm0, xmm1                                                     ; +0xe5, 0x10003da85\nmulss   xmm1, [rbp+var_34]                                             ; +0xe9, 0x10003da89\nlea     r12, [rbp+var_48]                                              ; +0xee, 0x10003da8e\nmov     rdi, r12                                                       ; +0xf2, 0x10003da92\ncall    sub_10028CBE0                                                  ; +0xf5, 0x10003da95\nlea     r13, [rbp+var_58]                                              ; +0xfa, 0x10003da9a\nmov     rdi, r13                                                       ; +0xfe, 0x10003da9e\nmov     rsi, r12                                                       ; +0x101, 0x10003daa1\nmov     rdx, r15                                                       ; +0x104, 0x10003daa4\ncall    sub_10028CD00                                                  ; +0x107, 0x10003daa7\nmov     rax, [r14]                                                     ; +0x10c, 0x10003daac\nmov     rdi, r14                                                       ; +0x10f, 0x10003daaf\ncall    qword ptr [rax+0C0h]                                           ; +0x112, 0x10003dab2\nlea     r15, [rbp+var_48]                                              ; +0x118, 0x10003dab8\nmov     rdi, r15                                                       ; +0x11c, 0x10003dabc\nmov     rsi, rax                                                       ; +0x11f, 0x10003dabf\nmov     rdx, r13                                                       ; +0x122, 0x10003dac2\ncall    sub_10028CCE0                                                  ; +0x125, 0x10003dac5\nmov     rax, [r14]                                                     ; +0x12a, 0x10003daca\nmov     rdi, r14                                                       ; +0x12d, 0x10003dacd\nmov     rsi, r15                                                       ; +0x130, 0x10003dad0\ncall    qword ptr [rax+0B8h]                                           ; +0x133, 0x10003dad3\nmovss   xmm0, cs:dword_10081501C                                       ; +0x139, 0x10003dad9\nmov     rdi, rbx                                                       ; +0x141, 0x10003dae1\nmovaps  xmm1, xmm0                                                     ; +0x144, 0x10003dae4\ncall    EditorUI__constrainGameLayerPosition                           ; +0x147, 0x10003dae7\nmov     rdi, [rbx+4E8h]                                                ; +0x14c, 0x10003daec\nmov     rax, [rdi]                                                     ; +0x153, 0x10003daf3\ncall    qword ptr [rax+1F0h]                                           ; +0x156, 0x10003daf6\nmov     rcx, [rax]                                                     ; +0x15c, 0x10003dafc\nmov     rdi, rax                                                       ; +0x15f, 0x10003daff\nmovss   xmm0, [rbp+var_2C]                                             ; +0x162, 0x10003db02\ncall    qword ptr [rcx+0A0h]                                           ; +0x167, 0x10003db07\nmov     rax, [rbx+4E8h]                                                ; +0x16d, 0x10003db0d\nmov     rdi, [rax+0EB8h]                                               ; +0x174, 0x10003db14\nmov     rax, [rdi]                                                     ; +0x17b, 0x10003db1b\ncall    qword ptr [rax+0C0h]                                           ; +0x17e, 0x10003db1e\nmovss   xmm0, dword ptr [rax]                                          ; +0x184, 0x10003db24\nmovss   [rbp+var_2C], xmm0                                             ; +0x188, 0x10003db28\nmov     rdi, rbx                                                       ; +0x18d, 0x10003db2d\nxor     esi, esi                                                       ; +0x190, 0x10003db30\ncall    EditorUI__getXMin                                              ; +0x192, 0x10003db32\nmovss   [rbp+var_40], xmm0                                             ; +0x197, 0x10003db37\nmov     rdi, [rbx+4E8h]                                                ; +0x19c, 0x10003db3c\ncall    LevelEditorLayer__getSectionCount                              ; +0x1a3, 0x10003db43\ncmp     eax, 65h ; 'e'                                                 ; +0x1a8, 0x10003db48\nmov     ecx, 64h ; 'd'                                                 ; +0x1ab, 0x10003db4b\ncmovge  ecx, eax                                                       ; +0x1b0, 0x10003db50\nxorps   xmm0, xmm0                                                     ; +0x1b3, 0x10003db53\ncvtsi2ss xmm0, ecx                                                     ; +0x1b6, 0x10003db56\nmulss   xmm0, cs:dword_10081501C                                       ; +0x1ba, 0x10003db5a\nmovss   [rbp+var_3C], xmm0                                             ; +0x1c2, 0x10003db62\nmov     rax, [rbx+4E8h]                                                ; +0x1c7, 0x10003db67\nmov     rdi, [rax+0EB8h]                                               ; +0x1ce, 0x10003db6e\nmov     rax, [rdi]                                                     ; +0x1d5, 0x10003db75\ncall    qword ptr [rax+0A8h]                                           ; +0x1d8, 0x10003db78\nmulss   xmm0, [rbp+var_3C]                                             ; +0x1de, 0x10003db7e\nmovss   xmm1, [rbp+var_2C]                                             ; +0x1e3, 0x10003db83\nsubss   xmm1, [rbp+var_40]                                             ; +0x1e8, 0x10003db88\ndivss   xmm1, xmm0                                                     ; +0x1ed, 0x10003db8d\nxorps   xmm0, xmm0                                                     ; +0x1f1, 0x10003db91\nmaxss   xmm1, xmm0                                                     ; +0x1f4, 0x10003db94\nminss   xmm1, cs:alpha                                                 ; +0x1f8, 0x10003db98\nmovaps  xmm0, xmm1                                                     ; +0x200, 0x10003dba0\nmov     rdi, [rbx+2F0h]                                                ; +0x203, 0x10003dba3\ncall    Slider__setValue                                               ; +0x20a, 0x10003dbaa\nmov     rdi, [rbx+2A0h]                                                ; +0x20f, 0x10003dbaf\nmovss   xmm0, cs:alpha                                                 ; +0x216, 0x10003dbb6\ndivss   xmm0, [rbp+var_30]                                             ; +0x21e, 0x10003dbbe\nmov     rax, [rdi]                                                     ; +0x223, 0x10003dbc3\nmovss   [rbp+var_2C], xmm0                                             ; +0x226, 0x10003dbc6\ncall    qword ptr [rax+0A0h]                                           ; +0x22b, 0x10003dbcb\nmov     rbx, [rbx+2C0h]                                                ; +0x231, 0x10003dbd1\nmov     rax, [rbx+1F8h]                                                ; +0x238, 0x10003dbd8\ntest    rax, rax                                                       ; +0x23f, 0x10003dbdf\njz      short loc_10003DC37                                            ; +0x242, 0x10003dbe2\nmov     rax, [rax+38h]                                                 ; +0x244, 0x10003dbe4\nmov     ecx, [rax]                                                     ; +0x248, 0x10003dbe8\ntest    rcx, rcx                                                       ; +0x24a, 0x10003dbea\njz      short loc_10003DC37                                            ; +0x24d, 0x10003dbed\nmov     r14, [rax+10h]                                                 ; +0x24f, 0x10003dbef\nlea     r15, [r14+rcx*8]                                               ; +0x253, 0x10003dbf3\nadd     r15, 0FFFFFFFFFFFFFFF8h                                        ; +0x257, 0x10003dbf7\nmovss   xmm0, cs:dword_100814FC4                                       ; +0x25b, 0x10003dbfb\nmulss   xmm0, [rbp+var_2C]                                             ; +0x263, 0x10003dc03\nmovss   [rbp+var_30], xmm0                                             ; +0x268, 0x10003dc08\nnop     dword ptr [rax]                                                ; +0x26d, 0x10003dc0d\nmov     rdi, [r14]                                                     ; +0x270, 0x10003dc10\ntest    rdi, rdi                                                       ; +0x273, 0x10003dc13\njz      short loc_10003DC37                                            ; +0x276, 0x10003dc16\nmovss   xmm0, dword ptr [rbx+228h]                                     ; +0x278, 0x10003dc18\nmulss   xmm0, [rbp+var_30]                                             ; +0x280, 0x10003dc20\nmov     rax, [rdi]                                                     ; +0x285, 0x10003dc25\ncall    qword ptr [rax+0A0h]                                           ; +0x288, 0x10003dc28\nadd     r14, 8                                                         ; +0x28e, 0x10003dc2e\ncmp     r14, r15                                                       ; +0x292, 0x10003dc32\njbe     short loc_10003DC10                                            ; +0x295, 0x10003dc35\nmov     rdi, [rbx+208h]                                                ; +0x297, 0x10003dc37\nmov     rax, [rdi]                                                     ; +0x29e, 0x10003dc3e\ncall    qword ptr [rax+420h]                                           ; +0x2a1, 0x10003dc41\nmov     rcx, [rax]                                                     ; +0x2a7, 0x10003dc47\nmov     rdi, rax                                                       ; +0x2aa, 0x10003dc4a\nmovss   xmm0, [rbp+var_2C]                                             ; +0x2ad, 0x10003dc4d\ncall    qword ptr [rcx+0A0h]                                           ; +0x2b2, 0x10003dc52\nadd     rsp, 38h                                                       ; +0x2b8, 0x10003dc58\npop     rbx                                                            ; +0x2bc, 0x10003dc5c\npop     r12                                                            ; +0x2bd, 0x10003dc5d\npop     r13                                                            ; +0x2bf, 0x10003dc5f\npop     r14                                                            ; +0x2c1, 0x10003dc61\npop     r15                                                            ; +0x2c3, 0x10003dc63\npop     rbp                                                            ; +0x2c5, 0x10003dc65\nretn                                                                   ; +0x2c6, 0x10003dc66", "xrefs": ["EditorUI::onStopPlaytest @ 0x10000c81d", "EditorUI::zoomIn @ 0x10000c878", "EditorUI::zoomOut @ 0x10000c8c9", "EditorUI::playtestStopped @ 0x10003d993", "EditorUI::zoomGameLayer @ 0x10003dcca", "EditorUI::scrollWheel @ 0x1000518c8"], "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"}