{"type": "func", "start": 6443123472, "end": 6443123640, "name": "cocos2d::ZipUtils::encryptDecrypt", "pseudocode": "// \n// cocos2d::ZipUtils::encryptDecrypt from 0x1800a4310 to 0x1800a43b8 (168 bytes)\n// \n// 4 xrefs:\n// > cocos2d::ZipUtils::decompressString2 @ 0x1800a3ef9\n// > cocos2d::ZipUtils::decompressString @ 0x1800a419e\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b7b54\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::encryptDecrypt(_QWORD *a1, _QWORD *a2, char a3)\n{\n  unsigned int v6; // esi\n  unsigned __int64 v7; // rbp\n  __int64 v8; // rcx\n  _QWORD *v9; // rax\n  _QWORD *v10; // rdx\n\n  v6 = 0;\n  *(_OWORD *)a1 = 0;\n  a1[2] = 0;\n  a1[3] = 15;\n  *(_BYTE *)a1 = 0;\n  v7 = a2[2];\n  sub_180078760(a1, v7, 0);\n  if ( v7 )\n  {\n    v8 = 0;\n    do\n    {\n      v9 = a2;\n      if ( a2[3] > 0xFu )\n        v9 = (_QWORD *)*a2;\n      v10 = a1;\n      if ( a1[3] > 0xFu )\n        v10 = (_QWORD *)*a1;\n      *((_BYTE *)v10 + v8) = *((_BYTE *)v9 + v8) ^ a3;\n      v8 = ++v6;\n    }\n    while ( v6 < v7 );\n  }\n  return a1;\n}", "assembly": "; \n; cocos2d::ZipUtils::encryptDecrypt from 0x1800a4310 to 0x1800a43b8 (168 bytes)\n; \n; 4 xrefs:\n; > cocos2d::ZipUtils::decompressString2 @ 0x1800a3ef9\n; > cocos2d::ZipUtils::decompressString @ 0x1800a419e\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b7b54\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, 0x1800a4310\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1800a4315\nmov     [rsp+arg_0], rcx                                               ; +0xa, 0x1800a431a\npush    rsi                                                            ; +0xf, 0x1800a431f\npush    rdi                                                            ; +0x10, 0x1800a4320\npush    r14                                                            ; +0x11, 0x1800a4321\nsub     rsp, 30h                                                       ; +0x13, 0x1800a4323\nmov     r14d, r8d                                                      ; +0x17, 0x1800a4327\nmov     rdi, rdx                                                       ; +0x1a, 0x1800a432a\nmov     rbx, rcx                                                       ; +0x1d, 0x1800a432d\nxor     esi, esi                                                       ; +0x20, 0x1800a4330\nmov     [rsp+48h+var_28], esi                                          ; +0x22, 0x1800a4332\nxorps   xmm0, xmm0                                                     ; +0x26, 0x1800a4336\nmovups  xmmword ptr [rcx], xmm0                                        ; +0x29, 0x1800a4339\nmov     [rcx+10h], rsi                                                 ; +0x2c, 0x1800a433c\nmov     qword ptr [rcx+18h], 0Fh                                       ; +0x30, 0x1800a4340\nmov     [rcx], sil                                                     ; +0x38, 0x1800a4348\nmov     [rsp+48h+var_28], 1                                            ; +0x3b, 0x1800a434b\nmov     rbp, [rdx+10h]                                                 ; +0x43, 0x1800a4353\nxor     r8d, r8d                                                       ; +0x47, 0x1800a4357\nmov     rdx, rbp                                                       ; +0x4a, 0x1800a435a\ncall    sub_180078760                                                  ; +0x4d, 0x1800a435d\ntest    rbp, rbp                                                       ; +0x52, 0x1800a4362\njz      short loc_1800A43A1                                            ; +0x55, 0x1800a4365\nmov     ecx, esi                                                       ; +0x57, 0x1800a4367\nnop     dword ptr [rax+00000000h]                                      ; +0x59, 0x1800a4369\nmov     rax, rdi                                                       ; +0x60, 0x1800a4370\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x63, 0x1800a4373\njbe     short loc_1800A437D                                            ; +0x68, 0x1800a4378\nmov     rax, [rdi]                                                     ; +0x6a, 0x1800a437a\nlea     r8, [rcx+rax]                                                  ; +0x6d, 0x1800a437d\nmov     rdx, rbx                                                       ; +0x71, 0x1800a4381\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x74, 0x1800a4384\njbe     short loc_1800A438E                                            ; +0x79, 0x1800a4389\nmov     rdx, [rbx]                                                     ; +0x7b, 0x1800a438b\nmovzx   eax, r14b                                                      ; +0x7e, 0x1800a438e\nxor     al, [r8]                                                       ; +0x82, 0x1800a4392\nmov     [rcx+rdx], al                                                  ; +0x85, 0x1800a4395\ninc     esi                                                            ; +0x88, 0x1800a4398\nmov     ecx, esi                                                       ; +0x8a, 0x1800a439a\ncmp     rcx, rbp                                                       ; +0x8c, 0x1800a439c\njb      short loc_1800A4370                                            ; +0x8f, 0x1800a439f\nmov     rax, rbx                                                       ; +0x91, 0x1800a43a1\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x94, 0x1800a43a4\nmov     rbp, [rsp+48h+arg_10]                                          ; +0x99, 0x1800a43a9\nadd     rsp, 30h                                                       ; +0x9e, 0x1800a43ae\npop     r14                                                            ; +0xa2, 0x1800a43b2\npop     rdi                                                            ; +0xa4, 0x1800a43b4\npop     rsi                                                            ; +0xa5, 0x1800a43b5\nretn                                                                   ; +0xa6, 0x1800a43b6\ndb 0CCh                                                                ; +0xa7, 0x1800a43b7", "xrefs": ["cocos2d::ZipUtils::decompressString2 @ 0x1800a3ef9", "cocos2d::ZipUtils::decompressString @ 0x1800a419e", "<???> @ 0x1801438a8", "<???> @ 0x1801b7b54"], "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"}