{"type": "func", "start": 4295177648, "end": 4295177863, "name": "EditorUI::centerCameraOnObject", "pseudocode": "// \n// EditorUI::centerCameraOnObject from 0x1000335b0 to 0x100033687 (215 bytes)\n// \n// 0 xrefs:\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::centerCameraOnObject(EditorUI *a1, GameObject *a2)\n{\n  cocos2d::CCDirector *v4; // rsi\n  float *v5; // rax\n  __int64 v6; // rax\n  _BYTE v7[8]; // [rsp+8h] [rbp-28h] BYREF\n  float v8[2]; // [rsp+10h] [rbp-20h] BYREF\n  float v9; // [rsp+18h] [rbp-18h]\n  float v10; // [rsp+1Ch] [rbp-14h]\n  double v11; // 0:xmm0_8.8\n\n  v4 = cocos2d::CCDirector::sharedDirector();\n  *(cocos2d::CCSize *)&v11 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v8);\n  v10 = ((float (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCDirector *, double))a1->m_editorLayer->m_objectLayer->getScale)(\n          a1->m_editorLayer->m_objectLayer,\n          v4,\n          v11);\n  v5 = (float *)((__int64 (__fastcall *)(GameObject *))a2->getPosition)(a2);\n  v9 = (float)(v8[0] * 0.5) - (float)(*v5 * v10);\n  v6 = ((__int64 (__fastcall *)(GameObject *))a2->getPosition)(a2);\n  sub_10028CBE0(v7, v9, (float)(0.5 * v8[1]) - (float)(v10 * *(float *)(v6 + 4)));\n  ((void (__fastcall *)(cocos2d::CCLayer *, _BYTE *))a1->m_editorLayer->m_objectLayer->setPosition)(\n    a1->m_editorLayer->m_objectLayer,\n    v7);\n  EditorUI::constrainGameLayerPosition(a1, -100.0, -100.0);\n}", "assembly": "; \n; EditorUI::centerCameraOnObject from 0x1000335b0 to 0x100033687 (215 bytes)\n; \n; 0 xrefs:\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, 0x1000335b0\nmov     rbp, rsp                                                       ; +0x1, 0x1000335b1\npush    r14                                                            ; +0x4, 0x1000335b4\npush    rbx                                                            ; +0x6, 0x1000335b6\nsub     rsp, 20h                                                       ; +0x7, 0x1000335b7\nmov     r14, rsi                                                       ; +0xb, 0x1000335bb\nmov     rbx, rdi                                                       ; +0xe, 0x1000335be\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x11, 0x1000335c1\nlea     rdi, [rbp+var_20]                                              ; +0x16, 0x1000335c6\nmov     rsi, rax                                                       ; +0x1a, 0x1000335ca\ncall    cocos2d__CCDirector__getWinSize                                ; +0x1d, 0x1000335cd\nmov     rax, [rbx+4E8h]                                                ; +0x22, 0x1000335d2\nmov     rdi, [rax+0EB8h]                                               ; +0x29, 0x1000335d9\nmov     rax, [rdi]                                                     ; +0x30, 0x1000335e0\ncall    qword ptr [rax+0A8h]                                           ; +0x33, 0x1000335e3\nmovss   [rbp+var_14], xmm0                                             ; +0x39, 0x1000335e9\nmov     rax, [r14]                                                     ; +0x3e, 0x1000335ee\nmov     rdi, r14                                                       ; +0x41, 0x1000335f1\ncall    qword ptr [rax+0C0h]                                           ; +0x44, 0x1000335f4\nmovss   xmm1, [rbp+var_20]                                             ; +0x4a, 0x1000335fa\nmulss   xmm1, cs:dword_100814FA8                                       ; +0x4f, 0x1000335ff\nmovss   xmm0, dword ptr [rax]                                          ; +0x57, 0x100033607\nmulss   xmm0, [rbp+var_14]                                             ; +0x5b, 0x10003360b\nsubss   xmm1, xmm0                                                     ; +0x60, 0x100033610\nmovss   [rbp+var_18], xmm1                                             ; +0x64, 0x100033614\nmov     rax, [r14]                                                     ; +0x69, 0x100033619\nmov     rdi, r14                                                       ; +0x6c, 0x10003361c\ncall    qword ptr [rax+0C0h]                                           ; +0x6f, 0x10003361f\nmovss   xmm1, cs:dword_100814FA8                                       ; +0x75, 0x100033625\nmulss   xmm1, [rbp+var_1C]                                             ; +0x7d, 0x10003362d\nmovss   xmm0, [rbp+var_14]                                             ; +0x82, 0x100033632\nmulss   xmm0, dword ptr [rax+4]                                        ; +0x87, 0x100033637\nsubss   xmm1, xmm0                                                     ; +0x8c, 0x10003363c\nlea     r14, [rbp+var_28]                                              ; +0x90, 0x100033640\nmov     rdi, r14                                                       ; +0x94, 0x100033644\nmovss   xmm0, [rbp+var_18]                                             ; +0x97, 0x100033647\ncall    sub_10028CBE0                                                  ; +0x9c, 0x10003364c\nmov     rax, [rbx+4E8h]                                                ; +0xa1, 0x100033651\nmov     rdi, [rax+0EB8h]                                               ; +0xa8, 0x100033658\nmov     rax, [rdi]                                                     ; +0xaf, 0x10003365f\nmov     rsi, r14                                                       ; +0xb2, 0x100033662\ncall    qword ptr [rax+0B8h]                                           ; +0xb5, 0x100033665\nmovss   xmm0, cs:dword_10081501C                                       ; +0xbb, 0x10003366b\nmov     rdi, rbx                                                       ; +0xc3, 0x100033673\nmovaps  xmm1, xmm0                                                     ; +0xc6, 0x100033676\ncall    EditorUI__constrainGameLayerPosition                           ; +0xc9, 0x100033679\nadd     rsp, 20h                                                       ; +0xce, 0x10003367e\npop     rbx                                                            ; +0xd2, 0x100033682\npop     r14                                                            ; +0xd3, 0x100033683\npop     rbp                                                            ; +0xd5, 0x100033685\nretn                                                                   ; +0xd6, 0x100033686", "xrefs": [], "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"}