# 解密求助

**URL:** <https://live2dhub.com/t/topic/4387>\
**Category:** 讨论\
**Created:** [2025 年4 月 6 日 22:55 UTC](https://live2dhub.com/t/topic/4387 "2025-04-06T22:55:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![d-miracle](https://live2dhub.com/user_avatar/live2dhub.com/d-miracle/32/5026_2.png) [@d-miracle](https://live2dhub.com/u/d-miracle)\
发布日期： [2025 年4 月 7 日 07:26 UTC](https://live2dhub.com/t/topic/4387/2 "2025-04-07T07:26:28Z")

</div>

cocos2d::CCGameMain::applicationDidFinishLaunching  
ResourcesDecode::decodeData  
关键在于这2个函数

它的加密是 xor + xxtea

```auto
a = b'FnJL7/EDzxyWj/caY9'
b = b'JNDYdpyRCeDuHO'
c = b'pyRCeD'
d = b'J/EDzxyWj/z'

```

检查是否是lua  
如果是lua  
密钥则是固定的

```auto
xor_key = d[-1:] + a + d[:-1] # b'zFnJL7/EDzxyWj/caY9J/EDzxyWj/'
xxtea_key = c + b[:-4] # b'pyRCeDJNDYdpyRCe'

```

不是lua的话

```auto
n = b'd5882a62c10623cf6057e52baa5b4fc8.png' # 文件名字(包括后缀)
xor_key = a[10:16] + n[-2:] + a[:10] # b'yWj/cangFnJL7/EDzx'
xxtea_key = n[:2] + b # b'd5JNDYdpyRCeDuHO'

```

去掉前10字节 然后xor, 接着xxtea  
解密完成

---

_[View the full topic](https://live2dhub.com/t/topic/4387)._
