{"type": "func", "start": 6443118736, "end": 6443119027, "name": "cocos2d::ZipUtils::base64URLDecode", "pseudocode": "// \n// cocos2d::ZipUtils::base64URLDecode from 0x1800a3090 to 0x1800a31b3 (291 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b7a58\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\n// Hidden C++ exception states: #wind=1\n_QWORD *__fastcall cocos2d::ZipUtils::base64URLDecode(_QWORD *a1, __int64 a2)\n{\n  __int64 v2; // rax\n  __int64 v4; // rdx\n  int v5; // eax\n  __int64 v6; // rdi\n  void *Src; // [rsp+30h] [rbp-48h] BYREF\n  __int128 v9; // [rsp+40h] [rbp-38h] BYREF\n  __int128 v10; // [rsp+50h] [rbp-28h]\n\n  v2 = a2;\n  Src = a1;\n  v4 = *(_QWORD *)(a2 + 16);\n  if ( v4 )\n  {\n    Src = nullptr;\n    if ( *(_QWORD *)(v2 + 24) > 0xFu )\n      v2 = *(_QWORD *)v2;\n    v5 = base64Decode((unsigned __int8 *)v2, v4, &Src, 1);\n    if ( v5 <= 0 )\n    {\n      if ( Src )\n        j_j_free_0(Src);\n      *(_OWORD *)a1 = 0;\n      a1[2] = 0;\n      a1[3] = 15;\n      *(_BYTE *)a1 = 0;\n    }\n    else\n    {\n      v9 = 0;\n      *(_QWORD *)&v10 = 0;\n      *((_QWORD *)&v10 + 1) = 15;\n      LOBYTE(v9) = 0;\n      v6 = v5;\n      if ( (unsigned __int64)v5 > 0xF )\n      {\n        sub_180007900(&v9, v5, 0, Src, v5);\n      }\n      else\n      {\n        *(_QWORD *)&v10 = v5;\n        memmove(&v9, Src, v5);\n        *((_BYTE *)&v9 + v6) = 0;\n      }\n      if ( Src )\n        j_j_free_0(Src);\n      *(_OWORD *)a1 = v9;\n      *((_OWORD *)a1 + 1) = v10;\n    }\n  }\n  else\n  {\n    sub_180016C80((__int64)a1, v2);\n  }\n  return a1;\n}", "assembly": "; \n; cocos2d::ZipUtils::base64URLDecode from 0x1800a3090 to 0x1800a31b3 (291 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b7a58\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_10], rbx                                              ; +0x0, 0x1800a3090\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1800a3095\npush    rdi                                                            ; +0xa, 0x1800a309a\nsub     rsp, 70h                                                       ; +0xb, 0x1800a309b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1800a309f\nxor     rax, rsp                                                       ; +0x16, 0x1800a30a6\nmov     [rsp+78h+var_18], rax                                          ; +0x19, 0x1800a30a9\nmov     rax, rdx                                                       ; +0x1e, 0x1800a30ae\nmov     rbx, rcx                                                       ; +0x21, 0x1800a30b1\nmov     [rsp+78h+Src], rcx                                             ; +0x24, 0x1800a30b4\nxor     esi, esi                                                       ; +0x29, 0x1800a30b9\nmov     rdx, [rdx+10h]                                                 ; +0x2b, 0x1800a30bb\ntest    rdx, rdx                                                       ; +0x2f, 0x1800a30bf\njnz     short loc_1800A30D1                                            ; +0x32, 0x1800a30c2\nmov     rdx, rax                                                       ; +0x34, 0x1800a30c4\ncall    sub_180016C80                                                  ; +0x37, 0x1800a30c7\njmp     loc_1800A3191                                                  ; +0x3c, 0x1800a30cc\nmov     [rsp+78h+Src], rsi                                             ; +0x41, 0x1800a30d1\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x46, 0x1800a30d6\njbe     short loc_1800A30E0                                            ; +0x4b, 0x1800a30db\nmov     rax, [rax]                                                     ; +0x4d, 0x1800a30dd\nmov     r9b, 1                                                         ; +0x50, 0x1800a30e0\nlea     r8, [rsp+78h+Src]                                              ; +0x53, 0x1800a30e3\nmov     rcx, rax                                                       ; +0x58, 0x1800a30e8\ncall    base64Decode                                                   ; +0x5b, 0x1800a30eb\ntest    eax, eax                                                       ; +0x60, 0x1800a30f0\njle     short loc_1800A316D                                            ; +0x62, 0x1800a30f2\nxorps   xmm0, xmm0                                                     ; +0x64, 0x1800a30f4\nmovups  [rsp+78h+var_38], xmm0                                         ; +0x67, 0x1800a30f7\nmov     qword ptr [rsp+78h+var_28], rsi                                ; +0x6c, 0x1800a30fc\nmov     qword ptr [rsp+78h+var_28+8], 0Fh                              ; +0x71, 0x1800a3101\nmov     byte ptr [rsp+78h+var_38], sil                                 ; +0x7a, 0x1800a310a\nmovsxd  rdi, eax                                                       ; +0x7f, 0x1800a310f\nlea     rcx, [rsp+78h+var_38]; Src                                     ; +0x82, 0x1800a3112\ncmp     rdi, 0Fh                                                       ; +0x87, 0x1800a3117\nja      short loc_1800A3136                                            ; +0x8b, 0x1800a311b\nmov     qword ptr [rsp+78h+var_28], rdi                                ; +0x8d, 0x1800a311d\nmov     r8, rdi; Size                                                  ; +0x92, 0x1800a3122\nmov     rdx, [rsp+78h+Src]; Src                                        ; +0x95, 0x1800a3125\ncall    memmove                                                        ; +0x9a, 0x1800a312a\nmov     byte ptr [rsp+rdi+78h+var_38], 0                               ; +0x9f, 0x1800a312f\njmp     short loc_1800A314B                                            ; +0xa4, 0x1800a3134\nmov     [rsp+78h+Size], rdi; Size                                      ; +0xa6, 0x1800a3136\nmov     r9, [rsp+78h+Src]                                              ; +0xab, 0x1800a313b\nxor     r8d, r8d                                                       ; +0xb0, 0x1800a3140\nmov     rdx, rdi                                                       ; +0xb3, 0x1800a3143\ncall    sub_180007900                                                  ; +0xb6, 0x1800a3146\nmov     rcx, [rsp+78h+Src]; Block                                      ; +0xbb, 0x1800a314b\ntest    rcx, rcx                                                       ; +0xc0, 0x1800a3150\njz      short loc_1800A315A                                            ; +0xc3, 0x1800a3153\ncall    j_j_free_0                                                     ; +0xc5, 0x1800a3155\nmovups  xmm0, [rsp+78h+var_38]                                         ; +0xca, 0x1800a315a\nmovups  xmmword ptr [rbx], xmm0                                        ; +0xcf, 0x1800a315f\nmovups  xmm1, [rsp+78h+var_28]                                         ; +0xd2, 0x1800a3162\nmovups  xmmword ptr [rbx+10h], xmm1                                    ; +0xd7, 0x1800a3167\njmp     short loc_1800A3191                                            ; +0xdb, 0x1800a316b\nmov     rcx, [rsp+78h+Src]; Block                                      ; +0xdd, 0x1800a316d\ntest    rcx, rcx                                                       ; +0xe2, 0x1800a3172\njz      short loc_1800A317C                                            ; +0xe5, 0x1800a3175\ncall    j_j_free_0                                                     ; +0xe7, 0x1800a3177\nxorps   xmm0, xmm0                                                     ; +0xec, 0x1800a317c\nmovups  xmmword ptr [rbx], xmm0                                        ; +0xef, 0x1800a317f\nmov     [rbx+10h], rsi                                                 ; +0xf2, 0x1800a3182\nmov     qword ptr [rbx+18h], 0Fh                                       ; +0xf6, 0x1800a3186\nmov     [rbx], sil                                                     ; +0xfe, 0x1800a318e\nmov     rax, rbx                                                       ; +0x101, 0x1800a3191\nmov     rcx, [rsp+78h+var_18]                                          ; +0x104, 0x1800a3194\nxor     rcx, rsp; StackCookie                                          ; +0x109, 0x1800a3199\ncall    __security_check_cookie                                        ; +0x10c, 0x1800a319c\nlea     r11, [rsp+78h+var_8]                                           ; +0x111, 0x1800a31a1\nmov     rbx, [r11+20h]                                                 ; +0x116, 0x1800a31a6\nmov     rsi, [r11+28h]                                                 ; +0x11a, 0x1800a31aa\nmov     rsp, r11                                                       ; +0x11e, 0x1800a31ae\npop     rdi                                                            ; +0x121, 0x1800a31b1\nretn                                                                   ; +0x122, 0x1800a31b2", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b7a58"], "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"}