{"type": "func", "start": 5373217120, "end": 5373217717, "name": "LevelBindingsLayer::onCopy", "pseudocode": "// \n// LevelBindingsLayer::onCopy from 0x14044c960 to 0x14044cbb5 (597 bytes)\n// \n// 2 xrefs:\n// > LevelBindingsLayer::settingsEntries @ 0x14044c519\n// > <???> @ 0x140927524\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:32:25 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall LevelBindingsLayer::onCopy(__int64 *a1)\n{\n  _QWORD *v2; // r13\n  __int64 v3; // rdi\n  _QWORD *v4; // rdi\n  __int16 *v5; // r15\n  unsigned int v6; // esi\n  unsigned int *v7; // rbx\n  unsigned int *i; // r14\n  char v9; // di\n  _QWORD *v10; // rax\n  __int64 v11; // rbx\n  __int64 v12; // r8\n  __int64 v13; // rdx\n  void *v14; // rcx\n  __int64 v15; // rbx\n  cocos2d::CCNode *v16; // rax\n  __int128 v18; // [rsp+40h] [rbp-19h] BYREF\n  __int64 v19; // [rsp+50h] [rbp-9h]\n  __int64 v20; // [rsp+58h] [rbp-1h]\n  void *Block[2]; // [rsp+60h] [rbp+7h] BYREF\n  __int128 v22; // [rsp+70h] [rbp+17h]\n\n  v2 = LevelControlConfig::create();\n  v3 = 13;\n  if ( !*((_BYTE *)a1 + 1192) )\n    v3 = 9;\n  v4 = &v2[v3];\n  v5 = (__int16 *)&unk_140703EE8;\n  do\n  {\n    v6 = *(_DWORD *)v5;\n    (*(void (__fastcall **)(__int64, void **, _QWORD))(*(_QWORD *)a1[148] + 8LL))(a1[148], Block, *(unsigned int *)v5);\n    v7 = (unsigned int *)Block[0];\n    for ( i = (unsigned int *)Block[1]; v7 != i; ++v7 )\n      (*(void (__fastcall **)(_QWORD *, _QWORD, _QWORD))(*v4 + 24LL))(v4, *v7, v6);\n    sub_140069730((__int64)Block);\n    v5 += 2;\n  }\n  while ( v5 != &word_140703F00 );\n  v9 = *((_BYTE *)a1 + 1192);\n  v10 = LevelControlConfig::encode((__int64)v2, &v18);\n  v11 = (__int64)v10;\n  if ( v10[2] )\n  {\n    cocos2d::ZipUtils::base64URLEncode(Block, v10);\n  }\n  else\n  {\n    *(_OWORD *)Block = 0;\n    v22 = 0;\n    *(_OWORD *)Block = *(_OWORD *)v10;\n    v22 = *((_OWORD *)v10 + 1);\n    v10[2] = 0;\n    v10[3] = 15;\n    *(_BYTE *)v10 = 0;\n  }\n  sub_14003D310(v11);\n  sub_140059C40((__int64)&unk_14090B090 + (v9 != 0 ? 0x20 : 0), (__int64)Block);\n  v13 = *((_QWORD *)&v22 + 1);\n  if ( *((_QWORD *)&v22 + 1) > 0xFu )\n  {\n    v14 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v22 + 1) + 1LL) >= 0x1000 )\n    {\n      v14 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v14 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v14);\n  }\n  v18 = 0;\n  v19 = 0;\n  v20 = 15;\n  LOBYTE(v18) = 0;\n  *(_OWORD *)Block = 0;\n  *(_QWORD *)&v22 = 6;\n  *((_QWORD *)&v22 + 1) = 15;\n  strcpy((char *)Block, \"Copied\");\n  v15 = *a1;\n  v16 = TextAlertPopup::create((__int64)Block, v13, v12, 150, (__int64)&v18);\n  return (*(__int64 (__fastcall **)(__int64 *, cocos2d::CCNode *, __int64))(v15 + 456))(a1, v16, 100);\n}", "assembly": "; \n; LevelBindingsLayer::onCopy from 0x14044c960 to 0x14044cbb5 (597 bytes)\n; \n; 2 xrefs:\n; > LevelBindingsLayer::settingsEntries @ 0x14044c519\n; > <???> @ 0x140927524\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:32:25 +0000\n; \nmov     [rsp-8+arg_8], rbx                                             ; +0x0, 0x14044c960\nmov     [rsp-8+arg_10], rsi                                            ; +0x5, 0x14044c965\nmov     [rsp-8+arg_18], rdi                                            ; +0xa, 0x14044c96a\npush    rbp                                                            ; +0xf, 0x14044c96f\npush    r12                                                            ; +0x10, 0x14044c970\npush    r13                                                            ; +0x12, 0x14044c972\npush    r14                                                            ; +0x14, 0x14044c974\npush    r15                                                            ; +0x16, 0x14044c976\nlea     rbp, [rsp-37h]                                                 ; +0x18, 0x14044c978\nsub     rsp, 90h                                                       ; +0x1d, 0x14044c97d\nmov     rax, cs:__security_cookie                                      ; +0x24, 0x14044c984\nxor     rax, rsp                                                       ; +0x2b, 0x14044c98b\nmov     [rbp+57h+var_30], rax                                          ; +0x2e, 0x14044c98e\nmov     r12, rcx                                                       ; +0x32, 0x14044c992\ncall    LevelControlConfig__create                                     ; +0x35, 0x14044c995\nmov     r13, rax                                                       ; +0x3a, 0x14044c99a\nmov     [rbp+57h+var_78], rax                                          ; +0x3d, 0x14044c99d\nmov     edi, 68h ; 'h'                                                 ; +0x41, 0x14044c9a1\nmov     eax, 48h ; 'H'                                                 ; +0x46, 0x14044c9a6\ncmp     byte ptr [r12+4A8h], 0                                         ; +0x4b, 0x14044c9ab\ncmovz   edi, eax                                                       ; +0x54, 0x14044c9b4\nadd     rdi, r13                                                       ; +0x57, 0x14044c9b7\nlea     r15, unk_140703EE8                                             ; +0x5a, 0x14044c9ba\nlea     r13, word_140703F00                                            ; +0x61, 0x14044c9c1\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x68, 0x14044c9c8\nmov     esi, [r15]                                                     ; +0x70, 0x14044c9d0\nmov     rcx, [r12+4A0h]                                                ; +0x73, 0x14044c9d3\nmov     rax, [rcx]                                                     ; +0x7b, 0x14044c9db\nmov     r8d, esi                                                       ; +0x7e, 0x14044c9de\nlea     rdx, [rbp+57h+Block]                                           ; +0x81, 0x14044c9e1\ncall    qword ptr [rax+8]                                              ; +0x85, 0x14044c9e5\nnop                                                                    ; +0x88, 0x14044c9e8\nmov     rbx, [rbp+57h+Block]                                           ; +0x89, 0x14044c9e9\nmov     r14, [rbp+57h+Block+8]                                         ; +0x8d, 0x14044c9ed\ncmp     rbx, r14                                                       ; +0x91, 0x14044c9f1\njz      short loc_14044CA17                                            ; +0x94, 0x14044c9f4\nnop     word ptr [rax+rax+00000000h]                                   ; +0x96, 0x14044c9f6\nmov     rax, [rdi]                                                     ; +0xa0, 0x14044ca00\nmov     r8d, esi                                                       ; +0xa3, 0x14044ca03\nmov     edx, [rbx]                                                     ; +0xa6, 0x14044ca06\nmov     rcx, rdi                                                       ; +0xa8, 0x14044ca08\ncall    qword ptr [rax+18h]                                            ; +0xab, 0x14044ca0b\nadd     rbx, 4                                                         ; +0xae, 0x14044ca0e\ncmp     rbx, r14                                                       ; +0xb2, 0x14044ca12\njnz     short loc_14044CA00                                            ; +0xb5, 0x14044ca15\nlea     rcx, [rbp+57h+Block]                                           ; +0xb7, 0x14044ca17\ncall    sub_140069730                                                  ; +0xbb, 0x14044ca1b\nadd     r15, 4                                                         ; +0xc0, 0x14044ca20\ncmp     r15, r13                                                       ; +0xc4, 0x14044ca24\njnz     short loc_14044C9D0                                            ; +0xc7, 0x14044ca27\nmovzx   edi, byte ptr [r12+4A8h]                                       ; +0xc9, 0x14044ca29\nlea     rdx, [rbp+57h+var_70]                                          ; +0xd2, 0x14044ca32\nmov     rcx, [rbp+57h+var_78]                                          ; +0xd6, 0x14044ca36\ncall    LevelControlConfig__encode                                     ; +0xda, 0x14044ca3a\nmov     rbx, rax                                                       ; +0xdf, 0x14044ca3f\nmov     [rbp+57h+var_80], rax                                          ; +0xe2, 0x14044ca42\ncmp     qword ptr [rax+10h], 0                                         ; +0xe6, 0x14044ca46\njnz     short loc_14044CA7E                                            ; +0xeb, 0x14044ca4b\nxorps   xmm0, xmm0                                                     ; +0xed, 0x14044ca4d\nmovups  xmmword ptr [rbp+57h+Block], xmm0                              ; +0xf0, 0x14044ca50\nxorps   xmm1, xmm1                                                     ; +0xf4, 0x14044ca54\nmovdqu  [rbp+57h+var_40], xmm1                                         ; +0xf7, 0x14044ca57\nmovups  xmm0, xmmword ptr [rax]                                        ; +0xfc, 0x14044ca5c\nmovups  xmmword ptr [rbp+57h+Block], xmm0                              ; +0xff, 0x14044ca5f\nmovups  xmm1, xmmword ptr [rax+10h]                                    ; +0x103, 0x14044ca63\nmovups  [rbp+57h+var_40], xmm1                                         ; +0x107, 0x14044ca67\nxor     esi, esi                                                       ; +0x10b, 0x14044ca6b\nmov     [rax+10h], rsi                                                 ; +0x10d, 0x14044ca6d\nmov     qword ptr [rax+18h], 0Fh                                       ; +0x111, 0x14044ca71\nmov     [rax], sil                                                     ; +0x119, 0x14044ca79\njmp     short loc_14044CA8E                                            ; +0x11c, 0x14044ca7c\nmov     rdx, rbx                                                       ; +0x11e, 0x14044ca7e\nlea     rcx, [rbp+57h+Block]                                           ; +0x121, 0x14044ca81\ncall    cs:?base64URLEncode@ZipUtils@cocos2d@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV34@@Z; cocos2d::ZipUtils::base64URLEncode(std::string const &) ; +0x125, 0x14044ca85\nnop                                                                    ; +0x12b, 0x14044ca8b\nxor     esi, esi                                                       ; +0x12c, 0x14044ca8c\nmov     rcx, rbx                                                       ; +0x12e, 0x14044ca8e\ncall    sub_14003D310                                                  ; +0x131, 0x14044ca91\nneg     dil                                                            ; +0x136, 0x14044ca96\nsbb     rcx, rcx                                                       ; +0x139, 0x14044ca99\nand     ecx, 20h                                                       ; +0x13c, 0x14044ca9c\nlea     rax, unk_14090B090                                             ; +0x13f, 0x14044ca9f\nadd     rcx, rax                                                       ; +0x146, 0x14044caa6\nlea     rdx, [rbp+57h+Block]                                           ; +0x149, 0x14044caa9\ncall    sub_140059C40                                                  ; +0x14d, 0x14044caad\nmov     rdx, qword ptr [rbp+57h+var_40+8]                              ; +0x152, 0x14044cab2\ncmp     rdx, 0Fh                                                       ; +0x156, 0x14044cab6\njbe     short loc_14044CAFF                                            ; +0x15a, 0x14044caba\ninc     rdx                                                            ; +0x15c, 0x14044cabc\nmov     rcx, [rbp+57h+Block]; Block                                    ; +0x15f, 0x14044cabf\nmov     rax, rcx                                                       ; +0x163, 0x14044cac3\ncmp     rdx, 1000h                                                     ; +0x166, 0x14044cac6\njb      short loc_14044CAFA                                            ; +0x16d, 0x14044cacd\nadd     rdx, 27h ; '''                                                 ; +0x16f, 0x14044cacf\nmov     rcx, [rcx-8]                                                   ; +0x173, 0x14044cad3\nsub     rax, rcx                                                       ; +0x177, 0x14044cad7\nsub     rax, 8                                                         ; +0x17a, 0x14044cada\ncmp     rax, 1Fh                                                       ; +0x17e, 0x14044cade\njbe     short loc_14044CAFA                                            ; +0x182, 0x14044cae2\nmov     [rsp+0B0h+Reserved], rsi; Reserved                             ; +0x184, 0x14044cae4\nxor     r9d, r9d; LineNo                                               ; +0x189, 0x14044cae9\nxor     r8d, r8d; FileName                                             ; +0x18c, 0x14044caec\nxor     edx, edx; FunctionName                                         ; +0x18f, 0x14044caef\nxor     ecx, ecx; Expression                                           ; +0x191, 0x14044caf1\ncall    cs:_invoke_watson                                              ; +0x193, 0x14044caf3\nalign 2                                                                ; +0x199, 0x14044caf9\ncall    j_j_free                                                       ; +0x19a, 0x14044cafa\nlea     rax, [rbp+57h+var_70]                                          ; +0x19f, 0x14044caff\nmov     [rbp+57h+var_80], rax                                          ; +0x1a3, 0x14044cb03\nxorps   xmm0, xmm0                                                     ; +0x1a7, 0x14044cb07\nmovups  [rbp+57h+var_70], xmm0                                         ; +0x1aa, 0x14044cb0a\nmov     [rbp+57h+var_60], rsi                                          ; +0x1ae, 0x14044cb0e\nmov     [rbp+57h+var_58], 0Fh                                          ; +0x1b2, 0x14044cb12\nmov     byte ptr [rbp+57h+var_70], 0                                   ; +0x1ba, 0x14044cb1a\nmovups  xmmword ptr [rbp+57h+Block], xmm0                              ; +0x1be, 0x14044cb1e\nmov     qword ptr [rbp+57h+var_40], 6                                  ; +0x1c2, 0x14044cb22\nmov     qword ptr [rbp+57h+var_40+8], 0Fh                              ; +0x1ca, 0x14044cb2a\nmov     eax, cs:dword_1407936A0                                        ; +0x1d2, 0x14044cb32\nmov     dword ptr [rbp+57h+Block], eax                                 ; +0x1d8, 0x14044cb38\nmovzx   eax, cs:word_1407936A4                                         ; +0x1db, 0x14044cb3b\nmov     word ptr [rbp+57h+Block+4], ax                                 ; +0x1e2, 0x14044cb42\nmov     byte ptr [rbp+57h+Block+6], 0                                  ; +0x1e6, 0x14044cb46\nmov     rbx, [r12]                                                     ; +0x1ea, 0x14044cb4a\nlea     rax, [rbp+57h+var_70]                                          ; +0x1ee, 0x14044cb4e\nmov     [rsp+0B0h+Reserved], rax                                       ; +0x1f2, 0x14044cb52\nmov     r9d, 96h                                                       ; +0x1f7, 0x14044cb57\nmovss   xmm2, cs:dword_140834F64                                       ; +0x1fd, 0x14044cb5d\nmovss   xmm1, cs:dword_140834F20                                       ; +0x205, 0x14044cb65\nlea     rcx, [rbp+57h+Block]                                           ; +0x20d, 0x14044cb6d\ncall    TextAlertPopup__create                                         ; +0x211, 0x14044cb71\nmov     rdx, rax                                                       ; +0x216, 0x14044cb76\nmov     r8d, 64h ; 'd'                                                 ; +0x219, 0x14044cb79\nmov     rcx, r12                                                       ; +0x21f, 0x14044cb7f\ncall    qword ptr [rbx+1C8h]                                           ; +0x222, 0x14044cb82\nmov     rcx, [rbp+57h+var_30]                                          ; +0x228, 0x14044cb88\nxor     rcx, rsp; StackCookie                                          ; +0x22c, 0x14044cb8c\ncall    __security_check_cookie                                        ; +0x22f, 0x14044cb8f\nlea     r11, [rsp+0B0h+var_20]                                         ; +0x234, 0x14044cb94\nmov     rbx, [r11+38h]                                                 ; +0x23c, 0x14044cb9c\nmov     rsi, [r11+40h]                                                 ; +0x240, 0x14044cba0\nmov     rdi, [r11+48h]                                                 ; +0x244, 0x14044cba4\nmov     rsp, r11                                                       ; +0x248, 0x14044cba8\npop     r15                                                            ; +0x24b, 0x14044cbab\npop     r14                                                            ; +0x24d, 0x14044cbad\npop     r13                                                            ; +0x24f, 0x14044cbaf\npop     r12                                                            ; +0x251, 0x14044cbb1\npop     rbp                                                            ; +0x253, 0x14044cbb3\nretn                                                                   ; +0x254, 0x14044cbb4", "xrefs": ["LevelBindingsLayer::settingsEntries @ 0x14044c519", "<???> @ 0x140927524"], "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"}