内容简介:这里只说 AssetBundle,只有思路。1 废话般前提:逻辑上 AssetBundle 文件加密后肯定是需要解密了,再进行加载。2 Unity 加载AssetBundle文件可以使用 AssetBundle.LoadFromFile,加载内存流可以用AssetBundle.LoadFromMemory 和 AssetBundle.LoadFromStream。
这里只说 AssetBundle,只有思路。
1 废话般前提:逻辑上 AssetBundle 文件加密后肯定是需要解密了,再进行加载。
2 Unity 加载AssetBundle文件可以使用 AssetBundle.LoadFromFile,加载内存流可以用AssetBundle.LoadFromMemory 和 AssetBundle.LoadFromStream。
这些方法对应还有代Async后缀的异步加载方法。
文档在:https://docs.unity3d.com/ScriptReference/AssetBundle.html
3 打断点,看backtrace。
4 慢慢调试。
在我这个场景里,il2cpp dump是没有需求的。
贴一个bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 * frame #0: 0x0000000101234a68 global`AssetBundle_LoadFromMemory_m412557059 frame #1: 0x000000010025a610 global`U3CLoadDynamicAssetBundleU3Ec__AnonStorey3_U3CU3Em__0_m1954562509 + 72 frame #2: 0x000000010013a09c global`MainThreadDispatcher_SendAndWait_m4140732116 + 192 frame #3: 0x0000000100259414 global`AssetBundleLoader_LoadDynamicAssetBundle_m153660618 + 540 frame #4: 0x0000000100259e70 global`AssetBundleLoader_Load_m859069093 + 732 frame #5: 0x000000010072930c global`SpriteLoader_Load_m3286678683 + 1784 frame #6: 0x00000001005327c0 global`ExtImage_Awake_m3150663317 + 456 frame #7: 0x00000001017d6ad0 global`RuntimeInvoker_Void_t1841601450(MethodInfo const*, void*, void**) + 28 frame #8: 0x00000001021a1e24 global`il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 68 frame #9: 0x0000000101c035f4 global`ScriptingInvocation::Invoke(Il2CppException**, bool) + 60 frame #10: 0x0000000101c0352c global`ScriptingInvocation::InvokeChecked(Il2CppException**) + 68 frame #11: 0x0000000101ce10ac global`MonoBehaviour::CallMethodInactive(ScriptingMethodIl2Cpp) + 88 frame #12: 0x0000000101ce2e34 global`MonoBehaviour::CallAwake() + 76 frame #13: 0x0000000101ce3134 global`MonoBehaviour::AddToManager() + 132 frame #14: 0x0000000101ce2dcc global`MonoBehaviour::AwakeFromLoad(AwakeFromLoadMode) + 568 frame #15: 0x0000000101c0c548 global`AwakeFromLoadQueue::InvokePersistentManagerAwake(AwakeFromLoadQueue::Item*, unsigned int, AwakeFromLoadMode) + 96 frame #16: 0x0000000101c0c48c global`AwakeFromLoadQueue::PersistentManagerAwakeFromLoad(int, AwakeFromLoadMode) + 140 frame #17: 0x0000000101c0c3e8 global`AwakeFromLoadQueue::PersistentManagerAwakeFromLoad() + 36 frame #18: 0x0000000101bfc9b8 global`LoadSceneOperation::CompleteAwakeSequence() + 96 frame #19: 0x0000000101bfc3e0 global`LoadSceneOperation::PostLoadSceneAdditive() + 32 frame #20: 0x0000000101bfc304 global`LoadSceneOperation::IntegrateMainThread() + 80 frame #21: 0x0000000101bfd01c global`PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int) + 316 frame #22: 0x0000000101bfd59c global`PreloadManager::UpdatePreloading() + 252 frame #23: 0x0000000101b07c4c global`PlayerLoop() + 332 frame #24: 0x0000000101d4381c global`UnityPlayerLoopImpl(bool) + 32 frame #25: 0x0000000100047c80 global`UnityRepaint + 140 frame #26: 0x0000000100047b6c global`-[UnityAppController(Rendering) repaintDisplayLink] + 88 frame #27: 0x0000000184da2f24 QuartzCore`CA::Display::DisplayLinkItem::dispatch(unsigned long long) + 44 frame #28: 0x0000000184da2dd0 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 444 frame #29: 0x0000000181dba094 IOKit`IODispatchCalloutFromCFMessage + 372 frame #30: 0x0000000181ae2e50 CoreFoundation`__CFMachPortPerform + 180 frame #31: 0x0000000181afb218 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56 frame #32: 0x0000000181afa9cc CoreFoundation`__CFRunLoopDoSource1 + 436 frame #33: 0x0000000181af84b0 CoreFoundation`__CFRunLoopRun + 1840 frame #34: 0x0000000181a262b8 CoreFoundation`CFRunLoopRunSpecific + 444 frame #35: 0x00000001834da198 GraphicsServices`GSEventRunModal + 180 frame #36: 0x0000000187a6d7fc UIKit`-[UIApplication _run] + 684 frame #37: 0x0000000187a68534 UIKit`UIApplicationMain + 208 frame #38: 0x00000001000417dc global`main + 156 frame #39: 0x0000000180a095b8 libdyld.dylib`start + 4
工具:
https://github.com/Perfare/UnityStudio
https://github.com/HearthSim/UnityPack
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- 如何解密keystore文件
- 探索文件加解密
- lucky 勒索病毒分析与文件解密
- 如何解密Windows 10中的EFS加密文件和文件夹
- APICloud解密本地资源到逆向APP算法到通用资源解密
- NodeJS加密解密,node-rsa加密解密用法
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。