{"type": "func", "start": 6443133168, "end": 6443133614, "name": "cocos2d::ZipUtils::base64EncodeEnc", "pseudocode": "// \n// cocos2d::ZipUtils::base64EncodeEnc from 0x1800a68f0 to 0x1800a6aae (446 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c1cf8\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:22:16 +0000\n// \n\n// Hidden C++ exception states: #wind=3\n_OWORD *__fastcall cocos2d::ZipUtils::base64EncodeEnc(_OWORD *a1, __int64 a2, void *a3)\n{\n  __int64 v6; // rax\n  unsigned __int8 *v7; // rcx\n  int v8; // eax\n  __m128i si128; // xmm6\n  void *v10; // rcx\n  void *Block[3]; // [rsp+30h] [rbp-39h] BYREF\n  _QWORD v13[2]; // [rsp+48h] [rbp-21h] BYREF\n  __m128i v14; // [rsp+58h] [rbp-11h]\n  __int128 Src; // [rsp+68h] [rbp-1h] BYREF\n  __m128i v16; // [rsp+78h] [rbp+Fh]\n\n  Block[0] = a1;\n  Block[2] = a3;\n  if ( *(_QWORD *)(a2 + 16) )\n  {\n    v6 = sub_180016870((__int64)&Src, (__int64)a3);\n    cocos2d::ZipUtils::encryptDecryptWKey(v13, a2, v6);\n    Block[0] = nullptr;\n    v7 = (unsigned __int8 *)v13;\n    if ( v14.m128i_i64[1] > 0xFuLL )\n      v7 = (unsigned __int8 *)v13[0];\n    v8 = base64Encode(v7, v14.m128i_u32[0], Block, 1);\n    if ( v8 <= 0 )\n    {\n      if ( Block[0] )\n      {\n        j_j_free_0(Block[0]);\n        Block[0] = nullptr;\n      }\n      sub_180016870((__int64)a1, a2);\n      if ( v14.m128i_i64[1] <= 0xFuLL )\n        goto LABEL_12;\n      v10 = (void *)v13[0];\n      if ( (unsigned __int64)(v14.m128i_i64[1] + 1) < 0x1000\n        || (v10 = *(void **)(v13[0] - 8LL), (unsigned __int64)(v13[0] - (_QWORD)v10 - 8LL) <= 0x1F) )\n      {\nLABEL_11:\n        j_j_free_0(v10);\nLABEL_12:\n        si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);\nLABEL_13:\n        v14 = si128;\n        LOBYTE(v13[0]) = 0;\n        goto LABEL_14;\n      }\n    }\n    else\n    {\n      Src = 0;\n      si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);\n      v16 = si128;\n      LOBYTE(Src) = 0;\n      sub_180007DF0(&Src, Block[0], v8);\n      if ( Block[0] )\n      {\n        j_j_free_0(Block[0]);\n        Block[0] = nullptr;\n      }\n      *a1 = Src;\n      a1[1] = v16;\n      if ( v14.m128i_i64[1] <= 0xFuLL )\n        goto LABEL_13;\n      v10 = (void *)v13[0];\n      if ( (unsigned __int64)(v14.m128i_i64[1] + 1) < 0x1000 )\n        goto LABEL_11;\n      v10 = *(void **)(v13[0] - 8LL);\n      if ( (unsigned __int64)(v13[0] - (_QWORD)v10 - 8LL) <= 0x1F )\n        goto LABEL_11;\n    }\n    invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n  }\n  sub_180016870((__int64)a1, a2);\nLABEL_14:\n  sub_180005C70((__int64)a3);\n  return a1;\n}", "assembly": "; \n; cocos2d::ZipUtils::base64EncodeEnc from 0x1800a68f0 to 0x1800a6aae (446 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c1cf8\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:22:16 +0000\n; \npush    rbp                                                            ; +0x0, 0x1800a68f0\npush    rbx                                                            ; +0x2, 0x1800a68f2\npush    rsi                                                            ; +0x3, 0x1800a68f3\npush    rdi                                                            ; +0x4, 0x1800a68f4\npush    r14                                                            ; +0x5, 0x1800a68f5\nlea     rbp, [rsp-37h]                                                 ; +0x7, 0x1800a68f7\nsub     rsp, 0A0h                                                      ; +0xc, 0x1800a68fc\nmovaps  [rsp+0C0h+var_30], xmm6                                        ; +0x13, 0x1800a6903\nmov     rax, cs:__security_cookie                                      ; +0x1b, 0x1800a690b\nxor     rax, rsp                                                       ; +0x22, 0x1800a6912\nmov     [rbp+57h+var_38], rax                                          ; +0x25, 0x1800a6915\nmov     rdi, r8                                                        ; +0x29, 0x1800a6919\nmov     rsi, rdx                                                       ; +0x2c, 0x1800a691c\nmov     rbx, rcx                                                       ; +0x2f, 0x1800a691f\nmov     [rbp+57h+Block], rcx                                           ; +0x32, 0x1800a6922\nmov     [rbp+57h+var_80], r8                                           ; +0x36, 0x1800a6926\nxor     r14d, r14d                                                     ; +0x3a, 0x1800a692a\ncmp     [rdx+10h], r14                                                 ; +0x3d, 0x1800a692d\njnz     short loc_1800A693D                                            ; +0x41, 0x1800a6931\ncall    sub_180016870                                                  ; +0x43, 0x1800a6933\njmp     loc_1800A6A17                                                  ; +0x48, 0x1800a6938\nmov     rdx, rdi                                                       ; +0x4d, 0x1800a693d\nlea     rcx, [rbp+57h+Src]                                             ; +0x50, 0x1800a6940\ncall    sub_180016870                                                  ; +0x54, 0x1800a6944\nmov     r8, rax                                                        ; +0x59, 0x1800a6949\nmov     rdx, rsi                                                       ; +0x5c, 0x1800a694c\nlea     rcx, [rbp+57h+var_78]                                          ; +0x5f, 0x1800a694f\ncall    ?encryptDecryptWKey@ZipUtils@cocos2d@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV34@V34@@Z; cocos2d::ZipUtils::encryptDecryptWKey(std::string const &,std::string) ; +0x63, 0x1800a6953\nnop                                                                    ; +0x68, 0x1800a6958\nmov     [rbp+57h+Block], r14                                           ; +0x69, 0x1800a6959\nlea     rcx, [rbp+57h+var_78]                                          ; +0x6d, 0x1800a695d\ncmp     qword ptr [rbp+57h+var_68+8], 0Fh                              ; +0x71, 0x1800a6961\ncmova   rcx, [rbp+57h+var_78]                                          ; +0x76, 0x1800a6966\nmov     r9b, 1                                                         ; +0x7b, 0x1800a696b\nlea     r8, [rbp+57h+Block]                                            ; +0x7e, 0x1800a696e\nmov     edx, dword ptr [rbp+57h+var_68]                                ; +0x82, 0x1800a6972\ncall    base64Encode                                                   ; +0x85, 0x1800a6975\ntest    eax, eax                                                       ; +0x8a, 0x1800a697a\njle     loc_1800A6A44                                                  ; +0x8c, 0x1800a697c\nxorps   xmm0, xmm0                                                     ; +0x92, 0x1800a6982\nmovups  [rbp+57h+Src], xmm0                                            ; +0x95, 0x1800a6985\nmovdqa  xmm6, cs:xmmword_1800EC500                                     ; +0x99, 0x1800a6989\nmovdqu  [rbp+57h+var_48], xmm6                                         ; +0xa1, 0x1800a6991\nmov     byte ptr [rbp+57h+Src], 0                                      ; +0xa6, 0x1800a6996\nmovsxd  r8, eax                                                        ; +0xaa, 0x1800a699a\nmov     rdx, [rbp+57h+Block]                                           ; +0xad, 0x1800a699d\nlea     rcx, [rbp+57h+Src]; Src                                        ; +0xb1, 0x1800a69a1\ncall    sub_180007DF0                                                  ; +0xb5, 0x1800a69a5\nmov     rcx, [rbp+57h+Block]; Block                                    ; +0xba, 0x1800a69aa\ntest    rcx, rcx                                                       ; +0xbe, 0x1800a69ae\njz      short loc_1800A69BC                                            ; +0xc1, 0x1800a69b1\ncall    j_j_free_0                                                     ; +0xc3, 0x1800a69b3\nmov     [rbp+57h+Block], r14                                           ; +0xc8, 0x1800a69b8\nmovups  xmm0, [rbp+57h+Src]                                            ; +0xcc, 0x1800a69bc\nmovups  xmmword ptr [rbx], xmm0                                        ; +0xd0, 0x1800a69c0\nmovups  xmm1, [rbp+57h+var_48]                                         ; +0xd3, 0x1800a69c3\nmovups  xmmword ptr [rbx+10h], xmm1                                    ; +0xd7, 0x1800a69c7\nmov     rdx, qword ptr [rbp+57h+var_68+8]                              ; +0xdb, 0x1800a69cb\ncmp     rdx, 0Fh                                                       ; +0xdf, 0x1800a69cf\njbe     short loc_1800A6A0E                                            ; +0xe3, 0x1800a69d3\ninc     rdx                                                            ; +0xe5, 0x1800a69d5\nmov     rcx, [rbp+57h+var_78]                                          ; +0xe8, 0x1800a69d8\nmov     rax, rcx                                                       ; +0xec, 0x1800a69dc\ncmp     rdx, 1000h                                                     ; +0xef, 0x1800a69df\njb      short loc_1800A6A01                                            ; +0xf6, 0x1800a69e6\nadd     rdx, 27h ; '''                                                 ; +0xf8, 0x1800a69e8\nmov     rcx, [rcx-8]; Block                                            ; +0xfc, 0x1800a69ec\nsub     rax, rcx                                                       ; +0x100, 0x1800a69f0\nsub     rax, 8                                                         ; +0x103, 0x1800a69f3\ncmp     rax, 1Fh                                                       ; +0x107, 0x1800a69f7\nja      loc_1800A6A98                                                  ; +0x10b, 0x1800a69fb\ncall    j_j_free_0                                                     ; +0x111, 0x1800a6a01\nmovdqa  xmm6, cs:xmmword_1800EC500                                     ; +0x116, 0x1800a6a06\nmovdqu  [rbp+57h+var_68], xmm6                                         ; +0x11e, 0x1800a6a0e\nmov     byte ptr [rbp+57h+var_78], 0                                   ; +0x123, 0x1800a6a13\nmov     rcx, rdi                                                       ; +0x127, 0x1800a6a17\ncall    sub_180005C70                                                  ; +0x12a, 0x1800a6a1a\nmov     rax, rbx                                                       ; +0x12f, 0x1800a6a1f\nmov     rcx, [rbp+57h+var_38]                                          ; +0x132, 0x1800a6a22\nxor     rcx, rsp; StackCookie                                          ; +0x136, 0x1800a6a26\ncall    __security_check_cookie                                        ; +0x139, 0x1800a6a29\nmovaps  xmm6, [rsp+0C0h+var_30]                                        ; +0x13e, 0x1800a6a2e\nadd     rsp, 0A0h                                                      ; +0x146, 0x1800a6a36\npop     r14                                                            ; +0x14d, 0x1800a6a3d\npop     rdi                                                            ; +0x14f, 0x1800a6a3f\npop     rsi                                                            ; +0x150, 0x1800a6a40\npop     rbx                                                            ; +0x151, 0x1800a6a41\npop     rbp                                                            ; +0x152, 0x1800a6a42\nretn                                                                   ; +0x153, 0x1800a6a43\nmov     rcx, [rbp+57h+Block]; Block                                    ; +0x154, 0x1800a6a44\ntest    rcx, rcx                                                       ; +0x158, 0x1800a6a48\njz      short loc_1800A6A56                                            ; +0x15b, 0x1800a6a4b\ncall    j_j_free_0                                                     ; +0x15d, 0x1800a6a4d\nmov     [rbp+57h+Block], r14                                           ; +0x162, 0x1800a6a52\nmov     rdx, rsi                                                       ; +0x166, 0x1800a6a56\nmov     rcx, rbx                                                       ; +0x169, 0x1800a6a59\ncall    sub_180016870                                                  ; +0x16c, 0x1800a6a5c\nnop                                                                    ; +0x171, 0x1800a6a61\nmov     rdx, qword ptr [rbp+57h+var_68+8]                              ; +0x172, 0x1800a6a62\ncmp     rdx, 0Fh                                                       ; +0x176, 0x1800a6a66\njbe     short loc_1800A6A06                                            ; +0x17a, 0x1800a6a6a\ninc     rdx                                                            ; +0x17c, 0x1800a6a6c\nmov     rcx, [rbp+57h+var_78]                                          ; +0x17f, 0x1800a6a6f\nmov     rax, rcx                                                       ; +0x183, 0x1800a6a73\ncmp     rdx, 1000h                                                     ; +0x186, 0x1800a6a76\njb      short loc_1800A6A01                                            ; +0x18d, 0x1800a6a7d\nadd     rdx, 27h ; '''                                                 ; +0x18f, 0x1800a6a7f\nmov     rcx, [rcx-8]                                                   ; +0x193, 0x1800a6a83\nsub     rax, rcx                                                       ; +0x197, 0x1800a6a87\nsub     rax, 8                                                         ; +0x19a, 0x1800a6a8a\ncmp     rax, 1Fh                                                       ; +0x19e, 0x1800a6a8e\njbe     loc_1800A6A01                                                  ; +0x1a2, 0x1800a6a92\nmov     [rsp+0C0h+Reserved], r14; Reserved                             ; +0x1a8, 0x1800a6a98\nxor     r9d, r9d; LineNo                                               ; +0x1ad, 0x1800a6a9d\nxor     r8d, r8d; FileName                                             ; +0x1b0, 0x1800a6aa0\nxor     edx, edx; FunctionName                                         ; +0x1b3, 0x1800a6aa3\nxor     ecx, ecx; Expression                                           ; +0x1b5, 0x1800a6aa5\ncall    cs:_invoke_watson                                              ; +0x1b7, 0x1800a6aa7\ndb 0CCh                                                                ; +0x1bd, 0x1800a6aad", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801c1cf8"], "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"}