{"type": "func", "start": 5369202576, "end": 5369202752, "name": "PlatformToolbox::copyToClipboard", "pseudocode": "// \n// PlatformToolbox::copyToClipboard from 0x140078790 to 0x140078840 (176 bytes)\n// \n// 3 xrefs:\n// > InfoLayer::onCopyLevelID @ 0x1402bd2d9\n// > ProfilePage::onCopyName @ 0x1403c33f6\n// > <???> @ 0x1406c66a8\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\nchar __fastcall PlatformToolbox::copyToClipboard(_QWORD *Src)\n{\n  _QWORD *v2; // rsi\n  __int64 v3; // rbx\n  HGLOBAL v5; // rdi\n  void *v6; // rax\n\n  v2 = Src;\n  if ( Src[3] > 0xFu )\n    v2 = (_QWORD *)*Src;\n  v3 = -1;\n  while ( *((_BYTE *)v2 + ++v3) != 0 )\n    ;\n  v5 = GlobalAlloc(2u, v3 + 1);\n  v6 = GlobalLock(v5);\n  memcpy(v6, v2, v3 + 1);\n  GlobalUnlock(v5);\n  OpenClipboard(nullptr);\n  EmptyClipboard();\n  SetClipboardData(1u, v5);\n  CloseClipboard();\n  sub_14003A830((__int64)Src);\n  return 1;\n}", "assembly": "; \n; PlatformToolbox::copyToClipboard from 0x140078790 to 0x140078840 (176 bytes)\n; \n; 3 xrefs:\n; > InfoLayer::onCopyLevelID @ 0x1402bd2d9\n; > ProfilePage::onCopyName @ 0x1403c33f6\n; > <???> @ 0x1406c66a8\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140078790\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140078795\nmov     [rsp+arg_18], rdi                                              ; +0xa, 0x14007879a\npush    r14                                                            ; +0xf, 0x14007879f\nsub     rsp, 20h                                                       ; +0x11, 0x1400787a1\ncmp     qword ptr [rcx+18h], 0Fh                                       ; +0x15, 0x1400787a5\nmov     r14, rcx                                                       ; +0x1a, 0x1400787aa\nmov     rsi, rcx                                                       ; +0x1d, 0x1400787ad\njbe     short loc_1400787B5                                            ; +0x20, 0x1400787b0\nmov     rsi, [rcx]                                                     ; +0x22, 0x1400787b2\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0x25, 0x1400787b5\nnop     dword ptr [rax+00h]                                            ; +0x2c, 0x1400787bc\ncmp     byte ptr [rsi+rbx+1], 0                                        ; +0x30, 0x1400787c0\nlea     rbx, [rbx+1]                                                   ; +0x35, 0x1400787c5\njnz     short loc_1400787C0                                            ; +0x39, 0x1400787c9\nlea     rdx, [rbx+1]; dwBytes                                          ; +0x3b, 0x1400787cb\nmov     ecx, 2; uFlags                                                 ; +0x3f, 0x1400787cf\ncall    cs:GlobalAlloc                                                 ; +0x44, 0x1400787d4\nmov     rcx, rax; hMem                                                 ; +0x4a, 0x1400787da\nmov     rdi, rax                                                       ; +0x4d, 0x1400787dd\ncall    cs:GlobalLock                                                  ; +0x50, 0x1400787e0\nlea     r8, [rbx+1]; Size                                              ; +0x56, 0x1400787e6\nmov     rdx, rsi; Src                                                  ; +0x5a, 0x1400787ea\nmov     rcx, rax; void *                                               ; +0x5d, 0x1400787ed\ncall    memcpy                                                         ; +0x60, 0x1400787f0\nmov     rcx, rdi; hMem                                                 ; +0x65, 0x1400787f5\ncall    cs:GlobalUnlock                                                ; +0x68, 0x1400787f8\nxor     ecx, ecx; hWndNewOwner                                         ; +0x6e, 0x1400787fe\ncall    cs:OpenClipboard                                               ; +0x70, 0x140078800\ncall    cs:EmptyClipboard                                              ; +0x76, 0x140078806\nmov     rdx, rdi; hMem                                                 ; +0x7c, 0x14007880c\nmov     ecx, 1; uFormat                                                ; +0x7f, 0x14007880f\ncall    cs:SetClipboardData                                            ; +0x84, 0x140078814\ncall    cs:CloseClipboard                                              ; +0x8a, 0x14007881a\nmov     rcx, r14                                                       ; +0x90, 0x140078820\ncall    sub_14003A830                                                  ; +0x93, 0x140078823\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x98, 0x140078828\nmov     al, 1                                                          ; +0x9d, 0x14007882d\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x9f, 0x14007882f\nmov     rdi, [rsp+28h+arg_18]                                          ; +0xa4, 0x140078834\nadd     rsp, 20h                                                       ; +0xa9, 0x140078839\npop     r14                                                            ; +0xad, 0x14007883d\nretn                                                                   ; +0xaf, 0x14007883f", "xrefs": ["InfoLayer::onCopyLevelID @ 0x1402bd2d9", "ProfilePage::onCopyName @ 0x1403c33f6", "<???> @ 0x1406c66a8"], "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"}