{"type": "func", "start": 6443132736, "end": 6443133162, "name": "cocos2d::ZipUtils::base64DecodeEnc", "pseudocode": "// \n// cocos2d::ZipUtils::base64DecodeEnc from 0x1800a6740 to 0x1800a68ea (426 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c1cec\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=2\n_OWORD *__fastcall cocos2d::ZipUtils::base64DecodeEnc(_OWORD *a1, unsigned __int8 *a2, __int64 a3)\n{\n  __int64 v6; // rdx\n  unsigned __int8 *v7; // rcx\n  int v8; // eax\n  __m128i si128; // xmm6\n  __int64 v10; // rax\n  void *v11; // rcx\n  void *Block; // [rsp+30h] [rbp-B8h] BYREF\n  _BYTE v14[32]; // [rsp+48h] [rbp-A0h] BYREF\n  __int64 v15; // [rsp+68h] [rbp-80h]\n  void *Src[2]; // [rsp+70h] [rbp-78h] BYREF\n  __m128i v17; // [rsp+80h] [rbp-68h]\n  __int128 v18; // [rsp+90h] [rbp-58h] BYREF\n  __m128i v19; // [rsp+A0h] [rbp-48h]\n\n  Block = a1;\n  v15 = a3;\n  v6 = *((_QWORD *)a2 + 2);\n  if ( !v6 )\n  {\nLABEL_14:\n    sub_180016870((__int64)a1, (__int64)a2);\n    goto LABEL_15;\n  }\n  Block = nullptr;\n  v7 = a2;\n  if ( *((_QWORD *)a2 + 3) > 0xFu )\n    v7 = *(unsigned __int8 **)a2;\n  v8 = base64Decode(v7, v6, &Block, 1);\n  if ( v8 <= 0 )\n  {\n    if ( Block )\n    {\n      j_j_free_0(Block);\n      Block = nullptr;\n    }\n    goto LABEL_14;\n  }\n  *(_OWORD *)Src = 0;\n  si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);\n  v17 = si128;\n  LOBYTE(Src[0]) = 0;\n  sub_180007DF0(Src, Block, v8);\n  v10 = sub_180016870((__int64)v14, a3);\n  cocos2d::ZipUtils::encryptDecryptWKey(&v18, Src, v10);\n  if ( Block )\n  {\n    j_j_free_0(Block);\n    Block = nullptr;\n  }\n  *a1 = v18;\n  a1[1] = v19;\n  v19 = si128;\n  LOBYTE(v18) = 0;\n  if ( v17.m128i_i64[1] > 0xFuLL )\n  {\n    v11 = Src[0];\n    if ( (unsigned __int64)(v17.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v11 = *((void **)Src[0] - 1);\n      if ( (unsigned __int64)((char *)Src[0] - (char *)v11 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free_0(v11);\n  }\nLABEL_15:\n  sub_180005C70(a3);\n  return a1;\n}", "assembly": "; \n; cocos2d::ZipUtils::base64DecodeEnc from 0x1800a6740 to 0x1800a68ea (426 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c1cec\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; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x1800a6740\npush    rbp                                                            ; +0x5, 0x1800a6745\npush    rsi                                                            ; +0x6, 0x1800a6746\npush    rdi                                                            ; +0x7, 0x1800a6747\nsub     rsp, 0D0h                                                      ; +0x8, 0x1800a6748\nmovaps  [rsp+0E8h+var_28], xmm6                                        ; +0xf, 0x1800a674f\nmov     rax, cs:__security_cookie                                      ; +0x17, 0x1800a6757\nxor     rax, rsp                                                       ; +0x1e, 0x1800a675e\nmov     [rsp+0E8h+var_38], rax                                         ; +0x21, 0x1800a6761\nmov     rsi, r8                                                        ; +0x29, 0x1800a6769\nmov     rdi, rdx                                                       ; +0x2c, 0x1800a676c\nmov     rbx, rcx                                                       ; +0x2f, 0x1800a676f\nmov     [rsp+0E8h+Block], rcx                                          ; +0x32, 0x1800a6772\nmov     [rsp+0E8h+var_80], r8                                          ; +0x37, 0x1800a6777\nxor     ebp, ebp                                                       ; +0x3c, 0x1800a677c\nmov     rdx, [rdx+10h]                                                 ; +0x3e, 0x1800a677e\ntest    rdx, rdx                                                       ; +0x42, 0x1800a6782\njz      loc_1800A68A8                                                  ; +0x45, 0x1800a6785\nmov     [rsp+0E8h+Block], rbp                                          ; +0x4b, 0x1800a678b\nmov     rcx, rdi                                                       ; +0x50, 0x1800a6790\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x53, 0x1800a6793\njbe     short loc_1800A679D                                            ; +0x58, 0x1800a6798\nmov     rcx, [rdi]                                                     ; +0x5a, 0x1800a679a\nmov     r9b, 1                                                         ; +0x5d, 0x1800a679d\nlea     r8, [rsp+0E8h+Block]                                           ; +0x60, 0x1800a67a0\ncall    base64Decode                                                   ; +0x65, 0x1800a67a5\ntest    eax, eax                                                       ; +0x6a, 0x1800a67aa\njle     loc_1800A6894                                                  ; +0x6c, 0x1800a67ac\nxorps   xmm0, xmm0                                                     ; +0x72, 0x1800a67b2\nmovups  xmmword ptr [rsp+0E8h+Src], xmm0                               ; +0x75, 0x1800a67b5\nmovdqa  xmm6, cs:xmmword_1800EC500                                     ; +0x7a, 0x1800a67ba\nmovdqu  [rsp+0E8h+var_68], xmm6                                        ; +0x82, 0x1800a67c2\nmov     byte ptr [rsp+0E8h+Src], 0                                     ; +0x8b, 0x1800a67cb\nmovsxd  r8, eax                                                        ; +0x90, 0x1800a67d0\nmov     rdx, [rsp+0E8h+Block]                                          ; +0x93, 0x1800a67d3\nlea     rcx, [rsp+0E8h+Src]; Src                                       ; +0x98, 0x1800a67d8\ncall    sub_180007DF0                                                  ; +0x9d, 0x1800a67dd\nmov     rdx, rsi                                                       ; +0xa2, 0x1800a67e2\nlea     rcx, [rsp+0E8h+var_A0]                                         ; +0xa5, 0x1800a67e5\ncall    sub_180016870                                                  ; +0xaa, 0x1800a67ea\nmov     r8, rax                                                        ; +0xaf, 0x1800a67ef\nlea     rdx, [rsp+0E8h+Src]                                            ; +0xb2, 0x1800a67f2\nlea     rcx, [rsp+0E8h+var_58]                                         ; +0xb7, 0x1800a67f7\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) ; +0xbf, 0x1800a67ff\nmov     rcx, [rsp+0E8h+Block]; Block                                   ; +0xc4, 0x1800a6804\ntest    rcx, rcx                                                       ; +0xc9, 0x1800a6809\njz      short loc_1800A6818                                            ; +0xcc, 0x1800a680c\ncall    j_j_free_0                                                     ; +0xce, 0x1800a680e\nmov     [rsp+0E8h+Block], rbp                                          ; +0xd3, 0x1800a6813\nmovups  xmm0, [rsp+0E8h+var_58]                                        ; +0xd8, 0x1800a6818\nmovups  xmmword ptr [rbx], xmm0                                        ; +0xe0, 0x1800a6820\nmovups  xmm1, [rsp+0E8h+var_48]                                        ; +0xe3, 0x1800a6823\nmovups  xmmword ptr [rbx+10h], xmm1                                    ; +0xeb, 0x1800a682b\nmovdqu  [rsp+0E8h+var_48], xmm6                                        ; +0xef, 0x1800a682f\nmov     byte ptr [rsp+0E8h+var_58], 0                                  ; +0xf8, 0x1800a6838\nmov     rdx, qword ptr [rsp+0E8h+var_68+8]                             ; +0x100, 0x1800a6840\ncmp     rdx, 0Fh                                                       ; +0x108, 0x1800a6848\njbe     short loc_1800A68B4                                            ; +0x10c, 0x1800a684c\ninc     rdx                                                            ; +0x10e, 0x1800a684e\nmov     rcx, [rsp+0E8h+Src]; Block                                     ; +0x111, 0x1800a6851\nmov     rax, rcx                                                       ; +0x116, 0x1800a6856\ncmp     rdx, 1000h                                                     ; +0x119, 0x1800a6859\njb      short loc_1800A688D                                            ; +0x120, 0x1800a6860\nadd     rdx, 27h ; '''                                                 ; +0x122, 0x1800a6862\nmov     rcx, [rcx-8]                                                   ; +0x126, 0x1800a6866\nsub     rax, rcx                                                       ; +0x12a, 0x1800a686a\nsub     rax, 8                                                         ; +0x12d, 0x1800a686d\ncmp     rax, 1Fh                                                       ; +0x131, 0x1800a6871\njbe     short loc_1800A688D                                            ; +0x135, 0x1800a6875\nmov     [rsp+0E8h+Reserved], rbp; Reserved                             ; +0x137, 0x1800a6877\nxor     r9d, r9d; LineNo                                               ; +0x13c, 0x1800a687c\nxor     r8d, r8d; FileName                                             ; +0x13f, 0x1800a687f\nxor     edx, edx; FunctionName                                         ; +0x142, 0x1800a6882\nxor     ecx, ecx; Expression                                           ; +0x144, 0x1800a6884\ncall    cs:_invoke_watson                                              ; +0x146, 0x1800a6886\ndb 0CCh                                                                ; +0x14c, 0x1800a688c\ncall    j_j_free_0                                                     ; +0x14d, 0x1800a688d\njmp     short loc_1800A68B4                                            ; +0x152, 0x1800a6892\nmov     rcx, [rsp+0E8h+Block]; Block                                   ; +0x154, 0x1800a6894\ntest    rcx, rcx                                                       ; +0x159, 0x1800a6899\njz      short loc_1800A68A8                                            ; +0x15c, 0x1800a689c\ncall    j_j_free_0                                                     ; +0x15e, 0x1800a689e\nmov     [rsp+0E8h+Block], rbp                                          ; +0x163, 0x1800a68a3\nmov     rdx, rdi                                                       ; +0x168, 0x1800a68a8\nmov     rcx, rbx                                                       ; +0x16b, 0x1800a68ab\ncall    sub_180016870                                                  ; +0x16e, 0x1800a68ae\nnop                                                                    ; +0x173, 0x1800a68b3\nmov     rcx, rsi                                                       ; +0x174, 0x1800a68b4\ncall    sub_180005C70                                                  ; +0x177, 0x1800a68b7\nmov     rax, rbx                                                       ; +0x17c, 0x1800a68bc\nmov     rcx, [rsp+0E8h+var_38]                                         ; +0x17f, 0x1800a68bf\nxor     rcx, rsp; StackCookie                                          ; +0x187, 0x1800a68c7\ncall    __security_check_cookie                                        ; +0x18a, 0x1800a68ca\nmov     rbx, [rsp+0E8h+arg_18]                                         ; +0x18f, 0x1800a68cf\nmovaps  xmm6, [rsp+0E8h+var_28]                                        ; +0x197, 0x1800a68d7\nadd     rsp, 0D0h                                                      ; +0x19f, 0x1800a68df\npop     rdi                                                            ; +0x1a6, 0x1800a68e6\npop     rsi                                                            ; +0x1a7, 0x1800a68e7\npop     rbp                                                            ; +0x1a8, 0x1800a68e8\nretn                                                                   ; +0x1a9, 0x1800a68e9", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801c1cec"], "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"}