Compare commits
18 Commits
agent/link
...
matcher/NW
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6d41f09c7 | ||
|
|
e697514b7b | ||
|
|
32c3f7f2cd | ||
|
|
1618565c1d | ||
|
|
6040414eec | ||
|
|
08acc800f1 | ||
|
|
0703b62968 | ||
|
|
86c3cacc2d | ||
|
|
f7e6fc5387 | ||
|
|
dfbb774ce4 | ||
|
|
9b69048f06 | ||
|
|
602b10ed43 | ||
|
|
f0a91338f4 | ||
|
|
ff568a273c | ||
|
|
9f6ef656fd | ||
|
|
9d2f607b3f | ||
|
|
c836ab8bae | ||
|
|
b889c52efc |
@@ -53,9 +53,9 @@ Progress
|
||||
<!-- progress:start -->
|
||||
| Decompiled | Matched | Linked | Data |
|
||||
|:---:|:---:|:---:|:---:|
|
||||
| 99.37% | 87.71% | 61.93% | 92.05% |
|
||||
| 99.37% | 87.71% | 62.05% | 92.06% |
|
||||
|
||||
units 917/1027 complete, functions 12213/12563 matched.
|
||||
units 918/1027 complete, functions 12213/12563 matched.
|
||||
|
||||
decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data
|
||||
<!-- progress:end -->
|
||||
|
||||
@@ -1385,19 +1385,19 @@ getDiskBannerData__Q33ipl7channel7ManagerFib = .text:0x81339FB0; // type:functio
|
||||
titleIDtoPageIndex__Q33ipl7channel7ManagerCFUxPiPi = .text:0x8133A2BC; // type:function size:0xA0
|
||||
getLockedMsgFromBuf__Q33ipl7channel7ManagerCFPCQ33ipl7channel22SChanMgrDiskInMessages = .text:0x8133A35C; // type:function size:0xA8
|
||||
nand_error_handling__Q33ipl7channel7ManagerFi = .text:0x8133A404; // type:function size:0xDC
|
||||
fn_8133A4E0__Q33ipl7channel7ManagerFUx = .text:0x8133A4E0; // type:function size:0x9C
|
||||
fn_8133A57C__Q33ipl7channel7ManagerFUx = .text:0x8133A57C; // type:function size:0x3C
|
||||
fn_8133A5B8__Q33ipl7channel7ManagerFUx = .text:0x8133A5B8; // type:function size:0x38
|
||||
fn_8133A5F0__Q33ipl7channel7ManagerFUx = .text:0x8133A5F0; // type:function size:0x44
|
||||
fn_8133A634__Q33ipl7channel7ManagerFUx = .text:0x8133A634; // type:function size:0x44
|
||||
fn_8133A678__Q33ipl7channel7ManagerFUx = .text:0x8133A678; // type:function size:0x40
|
||||
fn_8133A6B8__Q33ipl7channel7ManagerFUx = .text:0x8133A6B8; // type:function size:0x84
|
||||
fn_8133A73C__Q33ipl7channel7ManagerFUx = .text:0x8133A73C; // type:function size:0x68
|
||||
fn_8133A7A4__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A7A4; // type:function size:0xB8
|
||||
fn_8133A85C__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A85C; // type:function size:0xC8
|
||||
fn_8133A924__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A924; // type:function size:0xCC
|
||||
fn_8133A9F0__Q33ipl7channel7ManagerFv = .text:0x8133A9F0; // type:function size:0x60
|
||||
fn_8133AA50__Q33ipl7channel7ManagerFUx = .text:0x8133AA50; // type:function size:0x30
|
||||
findEntryByTitleId__Q33ipl7channel7ManagerFUx = .text:0x8133A4E0; // type:function size:0x9C
|
||||
getBannerCSIdx__Q33ipl7channel7ManagerFUx = .text:0x8133A57C; // type:function size:0x3C
|
||||
getSoundSize__Q33ipl7channel7ManagerFUx = .text:0x8133A5B8; // type:function size:0x38
|
||||
needsNetSetting__Q33ipl7channel7ManagerFUx = .text:0x8133A5F0; // type:function size:0x44
|
||||
usesAltSound__Q33ipl7channel7ManagerFUx = .text:0x8133A634; // type:function size:0x44
|
||||
isMissingTicket__Q33ipl7channel7ManagerFUx = .text:0x8133A678; // type:function size:0x40
|
||||
isNewsChannelV6Plus__Q33ipl7channel7ManagerFUx = .text:0x8133A6B8; // type:function size:0x84
|
||||
isOperaChannel__Q33ipl7channel7ManagerFUx = .text:0x8133A73C; // type:function size:0x68
|
||||
readBannerMetaAsync__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A7A4; // type:function size:0xB8
|
||||
readSoundMetaAsync__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A85C; // type:function size:0xC8
|
||||
readBannerCSAsync__Q33ipl7channel7ManagerFPQ23EGG4HeapUx = .text:0x8133A924; // type:function size:0xCC
|
||||
clearTmpChannel__Q33ipl7channel7ManagerFv = .text:0x8133A9F0; // type:function size:0x60
|
||||
unloadBanner__Q33ipl7channel7ManagerFUx = .text:0x8133AA50; // type:function size:0x30
|
||||
__ct__Q33ipl7channel20ChannelScriptManagerFv = .text:0x8133AA80; // type:function size:0x10
|
||||
create__Q33ipl7channel20ChannelScriptManagerFPQ23EGG7ExpHeap = .text:0x8133AA90; // type:function size:0x90
|
||||
init__Q33ipl7channel20ChannelScriptManagerFPQ33ipl4nand4FilePQ33ipl7channel9RsoThread = .text:0x8133AB20; // type:function size:0x3D4
|
||||
@@ -14110,7 +14110,7 @@ hairColorTable$1737 = .rodata:0x8161DDDC; // type:object size:0xB4 scope:local
|
||||
eyeColorTable$1742 = .rodata:0x8161DE90; // type:object size:0x1E scope:local
|
||||
scDefaultData = .rodata:0x8161DEB0; // type:object size:0x1BC scope:local
|
||||
scDayMax$1845 = .rodata:0x8161E070; // type:object size:0xD scope:local
|
||||
lbl_8161E080 = .rodata:0x8161E080; // type:object size:0x100 scope:local data:4byte
|
||||
scJpegAanScale = .rodata:0x8161E080; // type:object size:0x100 scope:local data:4byte
|
||||
TMCJPEGDEC_SampleH_N = .rodata:0x8161E180; // type:object size:0x18 data:byte
|
||||
TMCJPEGDEC_SampleV_N = .rodata:0x8161E198; // type:object size:0x18 data:byte
|
||||
TMCJPEGDEC_Zigzag_data = .rodata:0x8161E1B0; // type:object size:0x40 data:byte
|
||||
@@ -19181,13 +19181,13 @@ base64_array = .data:0x816874A0; // type:object size:0x80 scope:local
|
||||
@2185 = .data:0x816876A0; // type:object size:0x21 scope:local data:string
|
||||
@654 = .data:0x816876C8; // type:object size:0x48 scope:local data:string
|
||||
ShutdownFunctionInfo = .data:0x81687710; // type:object size:0x10 scope:local
|
||||
lbl_81687720 = .data:0x81687720; // type:object size:0x49 data:string
|
||||
scWpadVersionStr = .data:0x81687720; // type:object size:0x49 data:string
|
||||
lbl_8168776C = .data:0x8168776C; // type:object size:0x1C data:string
|
||||
lbl_81687788 = .data:0x81687788; // type:object size:0x1B data:string
|
||||
lbl_816877A4 = .data:0x816877A4; // type:object size:0x2F data:string
|
||||
lbl_816877D4 = .data:0x816877D4; // type:object size:0x27 data:string
|
||||
ShutdownFunctionInfo = .data:0x81687800; // type:object size:0x10 scope:local
|
||||
lbl_81687810 = .data:0x81687810; // type:object size:0x58
|
||||
scWpadManageStrs = .data:0x81687810; // type:object size:0x58
|
||||
lbl_81687868 = .data:0x81687868; // type:object size:0xC data:string
|
||||
lbl_81687874 = .data:0x81687874; // type:object size:0x37 data:string
|
||||
lbl_816878AC = .data:0x816878AC; // type:object size:0xB4
|
||||
@@ -20050,8 +20050,8 @@ lbl_816932D0 = .data:0x816932D0; // type:object size:0x48 data:string
|
||||
lbl_81693318 = .data:0x81693318; // type:object size:0xA data:string
|
||||
lbl_81693324 = .data:0x81693324; // type:object size:0x15 data:string
|
||||
@466 = .data:0x81693340; // type:object size:0xD scope:local data:string
|
||||
lbl_81693350 = .data:0x81693350; // type:object size:0xD0
|
||||
lbl_81693420 = .data:0x81693420; // type:object size:0x16 data:string
|
||||
scCntCacheStrs = .data:0x81693350; // type:object size:0xD0
|
||||
scCntCacheTitleDataFmt = .data:0x81693420; // type:object size:0x16 data:string
|
||||
__vt__Q23EGG9Allocator = .data:0x81693438; // type:object size:0x14
|
||||
__vt__Q23EGG9ArcPlayer = .data:0x81693450; // type:object size:0x54
|
||||
__vt__Q23EGG20SimpleAudioMgrWithFx = .data:0x816934A8; // type:object size:0x78
|
||||
@@ -20769,12 +20769,12 @@ NET_AES_BLOCK_MODE_CBC = .sdata2:0x81695040; // type:object size:0x8
|
||||
@524 = .sdata2:0x81695050; // type:object size:0x2 scope:local data:byte
|
||||
@1077 = .sdata2:0x81695054; // type:object size:0x2 scope:local data:byte
|
||||
@1128 = .sdata2:0x81695058; // type:object size:0x2 scope:local data:byte
|
||||
lbl_81695060 = .sdata2:0x81695060; // type:object size:0x1 data:byte
|
||||
lbl_81695061 = .sdata2:0x81695061; // type:object size:0x1 data:byte
|
||||
lbl_81695062 = .sdata2:0x81695062; // type:object size:0x1 data:byte
|
||||
lbl_81695064 = .sdata2:0x81695064; // type:object size:0x1 data:byte
|
||||
lbl_81695065 = .sdata2:0x81695065; // type:object size:0x1 data:byte
|
||||
lbl_81695066 = .sdata2:0x81695066; // type:object size:0x1 data:byte
|
||||
scRsnOui0 = .sdata2:0x81695060; // type:object size:0x1 data:byte
|
||||
scRsnOui1 = .sdata2:0x81695061; // type:object size:0x1 data:byte
|
||||
scRsnOui2 = .sdata2:0x81695062; // type:object size:0x1 data:byte
|
||||
scWpaOui0 = .sdata2:0x81695064; // type:object size:0x1 data:byte
|
||||
scWpaOui1 = .sdata2:0x81695065; // type:object size:0x1 data:byte
|
||||
scWpaOui2 = .sdata2:0x81695066; // type:object size:0x1 data:byte
|
||||
scFilePermissions = .sdata2:0x81695068; // type:object size:0x2 scope:local
|
||||
cWhite = .sdata2:0x81695070; // type:object size:0x4 scope:local data:byte
|
||||
@2829 = .sdata2:0x81695074; // type:object size:0x4 scope:local align:4 data:float
|
||||
@@ -22538,7 +22538,7 @@ lbl_816979C8 = .sdata:0x816979C8; // type:object size:0x5 data:string
|
||||
lbl_816979D0 = .sdata:0x816979D0; // type:object size:0x5 data:string
|
||||
lbl_816979D8 = .sdata:0x816979D8; // type:object size:0x4 data:string
|
||||
lbl_816979E0 = .sdata:0x816979E0; // type:object size:0x8 data:string
|
||||
lbl_816979E8 = .sdata:0x816979E8; // type:object size:0x1 data:byte
|
||||
CDBFSPathSeparator = .sdata:0x816979E8; // type:object size:0x1 data:byte
|
||||
@1433 = .sdata:0x816979F0; // type:object size:0x4 scope:local data:string
|
||||
@1435 = .sdata:0x816979F4; // type:object size:0x1 scope:local
|
||||
@1440 = .sdata:0x816979F8; // type:object size:0x6 scope:local data:string
|
||||
@@ -22700,9 +22700,9 @@ __SSLVersion = .sdata:0x81697CE0; // type:object size:0x4 data:4byte
|
||||
qErr$1631 = .sdata:0x81697D58; // type:object size:0x4 scope:local data:4byte
|
||||
l_dev_nandflash_init_info = .sdata:0x81697D60; // type:object size:0x8 scope:local
|
||||
l_dev_sd_direct_init_info = .sdata:0x81697D68; // type:object size:0x8 scope:local
|
||||
lbl_81697D70 = .sdata:0x81697D70; // type:object size:0x1 data:byte
|
||||
lbl_81697D71 = .sdata:0x81697D71; // type:object size:0x1 data:byte
|
||||
lbl_81697D72 = .sdata:0x81697D72; // type:object size:0x1 data:byte
|
||||
scWpaFindOui0 = .sdata:0x81697D70; // type:object size:0x1 data:byte
|
||||
scWpaFindOui1 = .sdata:0x81697D71; // type:object size:0x1 data:byte
|
||||
scWpaFindOui2 = .sdata:0x81697D72; // type:object size:0x1 data:byte
|
||||
__RFLVersion = .sdata:0x81697D78; // type:object size:0x4 data:4byte
|
||||
sRFLLastErrCode = .sdata:0x81697D7C; // type:object size:0x4 scope:local data:4byte
|
||||
scResFileFullPathName = .sdata:0x81697D80; // type:object size:0x4 scope:local data:4byte
|
||||
@@ -23109,7 +23109,7 @@ lbl_816983EC = .sdata:0x816983EC; // type:object size:0x6 data:string
|
||||
__KBDVersion = .sdata:0x816985C8; // type:object size:0x4 data:4byte
|
||||
__KPRVersion = .sdata:0x816985D0; // type:object size:0x4 data:4byte
|
||||
__CNTCACHEVersion = .sdata:0x816985D8; // type:object size:0x4 data:4byte
|
||||
lbl_816985DC = .sdata:0x816985DC; // type:object size:0x3 data:string
|
||||
scCntCacheSpaceNl = .sdata:0x816985DC; // type:object size:0x3 data:string
|
||||
@428 = .sdata:0x816985E0; // type:object size:0x4 scope:local data:string
|
||||
@429 = .sdata:0x816985E4; // type:object size:0x3 scope:local data:string
|
||||
@442 = .sdata:0x816985E7; // type:object size:0x8 scope:local data:string
|
||||
|
||||
@@ -918,7 +918,7 @@ config.libs = [
|
||||
Object(NonMatching, "keyboard/tiString.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiAtokString.cpp", extra_cflags=["-O4,p"]), # for 4.3J
|
||||
Object(NonMatching, "keyboard/tiZiString.cpp", extra_cflags=["-O4,p"]), # for 4.3U and 4.3E
|
||||
Object(NonMatching, "keyboard/tiTextDrawer.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiTextDrawer.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiNw4rManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(NonMatching, "keyboard/tiManager.cpp", extra_cflags=["-O4,p"]),
|
||||
Object(Matching, "keyboard/tiUtil.cpp", extra_cflags=["-O4,p"]),
|
||||
|
||||
@@ -336,19 +336,19 @@ namespace ipl {
|
||||
|
||||
BOOL nand_error_handling(int code);
|
||||
|
||||
SEntry* fn_8133A4E0(ESTitleId titleId);
|
||||
u32 fn_8133A57C(ESTitleId titleId);
|
||||
u32 fn_8133A5B8(ESTitleId titleId);
|
||||
BOOL fn_8133A5F0(ESTitleId titleId);
|
||||
BOOL fn_8133A634(ESTitleId titleId);
|
||||
BOOL fn_8133A678(ESTitleId titleId);
|
||||
BOOL fn_8133A6B8(ESTitleId titleId);
|
||||
BOOL fn_8133A73C(ESTitleId titleId);
|
||||
nand::MetaFile* fn_8133A7A4(EGG::Heap* heap, ESTitleId titleId);
|
||||
nand::MetaFile* fn_8133A85C(EGG::Heap* heap, ESTitleId titleId);
|
||||
nand::SharedFile* fn_8133A924(EGG::Heap* heap, ESTitleId titleId);
|
||||
void fn_8133A9F0();
|
||||
void fn_8133AA50(ESTitleId titleId);
|
||||
SEntry* findEntryByTitleId(ESTitleId titleId);
|
||||
u32 getBannerCSIdx(ESTitleId titleId);
|
||||
u32 getSoundSize(ESTitleId titleId);
|
||||
BOOL needsNetSetting(ESTitleId titleId);
|
||||
BOOL usesAltSound(ESTitleId titleId);
|
||||
BOOL isMissingTicket(ESTitleId titleId);
|
||||
BOOL isNewsChannelV6Plus(ESTitleId titleId);
|
||||
BOOL isOperaChannel(ESTitleId titleId);
|
||||
nand::MetaFile* readBannerMetaAsync(EGG::Heap* heap, ESTitleId titleId);
|
||||
nand::MetaFile* readSoundMetaAsync(EGG::Heap* heap, ESTitleId titleId);
|
||||
nand::SharedFile* readBannerCSAsync(EGG::Heap* heap, ESTitleId titleId);
|
||||
void clearTmpChannel();
|
||||
void unloadBanner(ESTitleId titleId);
|
||||
|
||||
BOOL isReady() { return mState == FINISH; }
|
||||
|
||||
|
||||
@@ -301,9 +301,9 @@ namespace nw4r {
|
||||
}
|
||||
|
||||
if (error == OS_EXCEPTION_FLOATING_POINT_EXCEPTION) {
|
||||
u32 uVar1 = sException.FPCSR_COPY;
|
||||
uVar1 &= (((uVar1 & 0xf8) << 0x16) | 0x01f80700);
|
||||
if ((uVar1 & 0x20000000) != 0) {
|
||||
u32 fpcsr = sException.FPCSR_COPY;
|
||||
fpcsr &= (((fpcsr & 0xf8) << 0x16) | 0x01f80700);
|
||||
if ((fpcsr & 0x20000000) != 0) {
|
||||
Exception_Printf_(" FPE: Invalid operation\n");
|
||||
if ((sException.FPCSR_COPY & 0x1000000) != 0) {
|
||||
Exception_Printf_(" SNaN\n");
|
||||
@@ -333,16 +333,16 @@ namespace nw4r {
|
||||
Exception_Printf_(" Invalid integer convert\n");
|
||||
}
|
||||
}
|
||||
if ((uVar1 & 0x10000000) != 0) {
|
||||
if ((fpcsr & 0x10000000) != 0) {
|
||||
Exception_Printf_(" FPE: Overflow\n");
|
||||
}
|
||||
if ((uVar1 & 0x8000000) != 0) {
|
||||
if ((fpcsr & 0x8000000) != 0) {
|
||||
Exception_Printf_(" FPE: Underflow\n");
|
||||
}
|
||||
if ((uVar1 & 0x4000000) != 0) {
|
||||
if ((fpcsr & 0x4000000) != 0) {
|
||||
Exception_Printf_(" FPE: Zero division\n");
|
||||
}
|
||||
if ((uVar1 & 0x2000000) != 0) {
|
||||
if ((fpcsr & 0x2000000) != 0) {
|
||||
Exception_Printf_(" FPE: Inexact result\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
extern void* memset(void* dest, s32 val, u32 count);
|
||||
|
||||
extern const u32 lbl_8161E080[64] = {
|
||||
extern const u32 scJpegAanScale[64] = {
|
||||
0x00000100, 0x000000B9, 0x000000C4, 0x000000DA, 0x00000100, 0x00000146, 0x000001D9, 0x000003A0, 0x000000B9, 0x00000085, 0x0000008D,
|
||||
0x0000009D, 0x000000B9, 0x000000EB, 0x00000155, 0x0000029D, 0x000000C4, 0x0000008D, 0x00000096, 0x000000A7, 0x000000C4, 0x000000F9,
|
||||
0x0000016A, 0x000002C6, 0x000000DA, 0x0000009D, 0x000000A7, 0x000000B9, 0x000000DA, 0x00000115, 0x00000192, 0x00000315, 0x00000100,
|
||||
@@ -1424,7 +1424,7 @@ static s32 TMCJPEGDEC_parse_dqt(TMCCJPEGDecWork* work) {
|
||||
s32 r;
|
||||
|
||||
d = tblCopy;
|
||||
*(CopyBlock64*)d = *(CopyBlock64*)lbl_8161E080;
|
||||
*(CopyBlock64*)d = *(CopyBlock64*)scJpegAanScale;
|
||||
|
||||
scaleInfo = (QuantizationTables*)&work->scaleFlag;
|
||||
|
||||
|
||||
@@ -62,8 +62,8 @@ typedef struct CXUncompContextHuffman {
|
||||
CXHuffmanDecodeTableEntry decodeTableData[0x200]; // 0x20
|
||||
} CXUncompContextHuffman;
|
||||
|
||||
void CXInitUncompContextRL(CXUncompContextRL* context, u8* param_2);
|
||||
void CXInitUncompContextLZ(CXUncompContextLZ* context, u8* param_2);
|
||||
void CXInitUncompContextRL(CXUncompContextRL* context, u8* data);
|
||||
void CXInitUncompContextLZ(CXUncompContextLZ* context, u8* data);
|
||||
void CXInitUncompContextHuffman(CXUncompContextHuffman* context, u8* param_2);
|
||||
|
||||
CXStreamingResult CXReadUncompRL(CXUncompContextRL* context, const void* src, u32 size);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
char lbl_81693350[0xd0] = {
|
||||
char scCntCacheStrs[0xd0] = {
|
||||
0x3c, 0x3c, 0x20, 0x52, 0x56, 0x4c, 0x5f, 0x53, 0x44, 0x4b, 0x20, 0x2d, 0x20, 0x43, 0x4e, 0x54,
|
||||
0x43, 0x41, 0x43, 0x48, 0x45, 0x20, 0x09, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x62,
|
||||
0x75, 0x69, 0x6c, 0x64, 0x3a, 0x20, 0x41, 0x70, 0x72, 0x20, 0x32, 0x30, 0x20, 0x32, 0x30, 0x31,
|
||||
@@ -22,12 +22,12 @@ char lbl_81693350[0xd0] = {
|
||||
0x74, 0x20, 0x00, 0x00, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x00,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x00
|
||||
};
|
||||
char lbl_81693420[0x16] = {
|
||||
char scCntCacheTitleDataFmt[0x16] = {
|
||||
0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x2f, 0x25, 0x30, 0x38, 0x78, 0x2f, 0x25, 0x30, 0x38, 0x78,
|
||||
0x2f, 0x64, 0x61, 0x74, 0x61, 0x00,
|
||||
};
|
||||
const char* __CNTCACHEVersion = lbl_81693350;
|
||||
char lbl_816985DC[3] = {0x20, 0x0a, 0x00};
|
||||
const char* __CNTCACHEVersion = scCntCacheStrs;
|
||||
char scCntCacheSpaceNl[3] = {0x20, 0x0a, 0x00};
|
||||
|
||||
extern void _savegpr_23();
|
||||
extern void _restgpr_23();
|
||||
@@ -72,9 +72,9 @@ asm void CNTCACHEClear() {
|
||||
mr r11, r12
|
||||
stw r0, 4(r12)
|
||||
bl _savegpr_23
|
||||
lis r30, lbl_81693350@ha
|
||||
lis r30, scCntCacheStrs@ha
|
||||
lis r3, _CNTCACHEMutex@ha
|
||||
addi r30, r30, lbl_81693350@l
|
||||
addi r30, r30, scCntCacheStrs@l
|
||||
li r29, 0
|
||||
addi r3, r3, _CNTCACHEMutex@l
|
||||
bl OSLockMutex
|
||||
@@ -146,7 +146,7 @@ L_184:
|
||||
stb r31, 0(r4)
|
||||
subf r23, r24, r4
|
||||
mr r3, r24
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
cmpwi r3, 0
|
||||
mr r29, r3
|
||||
@@ -246,7 +246,7 @@ asm void _CNTCACHEDeleteTitle() {
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
stw r30, 0x18(r1)
|
||||
@@ -284,7 +284,7 @@ L_350:
|
||||
bl ES_DeleteTitleContent
|
||||
L_364:
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
L_370:
|
||||
cmpwi r3, 0
|
||||
@@ -305,10 +305,10 @@ asm int _CNTCACHEIsTitleRemovable(ESTitleId titleId) {
|
||||
subfic r11, r11, -0x2100
|
||||
stwux r1, r1, r11
|
||||
mflr r0
|
||||
lis r5, lbl_81693420@ha
|
||||
lis r5, scCntCacheTitleDataFmt@ha
|
||||
stw r0, 4(r12)
|
||||
li r0, 1
|
||||
addi r5, r5, lbl_81693420@l
|
||||
addi r5, r5, scCntCacheTitleDataFmt@l
|
||||
stw r31, -4(r12)
|
||||
stw r30, -8(r12)
|
||||
mr r30, r3
|
||||
@@ -403,7 +403,7 @@ asm void _CNTCACHEDeleteContent() {
|
||||
stw r0, 4(r12)
|
||||
bl _savegpr_26
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
li r31, 0
|
||||
li r4, 0
|
||||
@@ -441,10 +441,10 @@ asm void _CNTCACHEDeleteContent() {
|
||||
rlwinm. r0, r3, 0, 0x1b, 0x1b
|
||||
beq L_6f0
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
li r26, 1
|
||||
lis r27, lbl_81693420@ha
|
||||
lis r27, scCntCacheTitleDataFmt@ha
|
||||
b L_6e8
|
||||
L_5b0:
|
||||
stw r31, errno(r0)
|
||||
@@ -488,7 +488,7 @@ L_5e8:
|
||||
li r0, -1
|
||||
stw r26, 0x20(r1)
|
||||
addi r3, r1, 0x40
|
||||
addi r5, r27, lbl_81693420@l
|
||||
addi r5, r27, scCntCacheTitleDataFmt@l
|
||||
stw r26, 0x24(r1)
|
||||
and r6, r30, r0
|
||||
and r7, r29, r0
|
||||
@@ -529,7 +529,7 @@ L_6d4:
|
||||
bdnz L_5e8
|
||||
L_6dc:
|
||||
li r3, 0
|
||||
la r4, lbl_816985DC
|
||||
la r4, scCntCacheSpaceNl
|
||||
bl strtok
|
||||
L_6e8:
|
||||
cmpwi r3, 0
|
||||
|
||||
@@ -221,11 +221,11 @@ CXSecureResult CXSecureUncompressLZ(const void* src, u32 length, void* dst) {
|
||||
return CX_SECURE_ERR_OK;
|
||||
}
|
||||
|
||||
BOOL CXiVerifyHuffmanTable_(const void* param_1, u8 param_2) {
|
||||
const u8* a = param_1;
|
||||
BOOL CXiVerifyHuffmanTable_(const void* table, u8 bitSize) {
|
||||
const u8* a = table;
|
||||
const u8* b = a + 1;
|
||||
u32 c = *a;
|
||||
const u8* d = (u8*)param_1 + ((c + 1) << 1);
|
||||
const u8* d = (u8*)table + ((c + 1) << 1);
|
||||
|
||||
u8 e[sizeof(u8) * 0x40];
|
||||
u32 i;
|
||||
@@ -233,7 +233,7 @@ BOOL CXiVerifyHuffmanTable_(const void* param_1, u8 param_2) {
|
||||
e[i] = 0;
|
||||
}
|
||||
|
||||
if (param_2 == 4 && c >= 16) {
|
||||
if (bitSize == 4 && c >= 16) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
static inline int CXiReadHeader(u8*, int*, const u8*, int, int);
|
||||
static inline CXHuffmanDecodeTableEntry* GetNextNode(CXHuffmanDecodeTableEntry*, int);
|
||||
|
||||
void CXInitUncompContextRL(CXUncompContextRL* context, u8* param_2) {
|
||||
context->unk_0x00 = param_2;
|
||||
void CXInitUncompContextRL(CXUncompContextRL* context, u8* data) {
|
||||
context->unk_0x00 = data;
|
||||
context->unk_0x04 = 0;
|
||||
context->unk_0x0e = 0;
|
||||
context->unk_0x0C = 0;
|
||||
@@ -13,8 +13,8 @@ void CXInitUncompContextRL(CXUncompContextRL* context, u8* param_2) {
|
||||
context->size = 0;
|
||||
}
|
||||
|
||||
void CXInitUncompContextLZ(CXUncompContextLZ* context, u8* param_2) {
|
||||
context->unk_0x00 = param_2;
|
||||
void CXInitUncompContextLZ(CXUncompContextLZ* context, u8* data) {
|
||||
context->unk_0x00 = data;
|
||||
context->unk_0x04 = 0;
|
||||
context->unk_0x11 = 0;
|
||||
context->unk_0x12 = 0;
|
||||
@@ -125,7 +125,7 @@ CXStreamingResult CXReadUncompRL(CXUncompContextRL* context, const void* src, u3
|
||||
return CX_STREAMING_ERR_OK;
|
||||
}
|
||||
|
||||
static int CXiReadHeader(u8* pHdrLen, int* pOutLen, const u8* pSrc, int srcSize, int param_5) {
|
||||
static int CXiReadHeader(u8* pHdrLen, int* pOutLen, const u8* pSrc, int srcSize, int maxOutLen) {
|
||||
int bytesParsed = 0;
|
||||
|
||||
while (*pHdrLen) {
|
||||
@@ -150,8 +150,8 @@ static int CXiReadHeader(u8* pHdrLen, int* pOutLen, const u8* pSrc, int srcSize,
|
||||
}
|
||||
}
|
||||
|
||||
if (param_5 > 0 && param_5 < *pOutLen) {
|
||||
*pOutLen = param_5;
|
||||
if (maxOutLen > 0 && maxOutLen < *pOutLen) {
|
||||
*pOutLen = maxOutLen;
|
||||
}
|
||||
|
||||
return bytesParsed;
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
#define DPD_CONFIG2_SIZE 2
|
||||
#define SPK_CONFIG_SIZE 7
|
||||
|
||||
char lbl_81687720[] = "<< RVL_SDK - WPAD \trelease build: Apr 20 2010 11:20:55 (0x4199_60831) >>";
|
||||
const char* __WPADVersion = lbl_81687720;
|
||||
char scWpadVersionStr[] = "<< RVL_SDK - WPAD \trelease build: Apr 20 2010 11:20:55 (0x4199_60831) >>";
|
||||
const char* __WPADVersion = scWpadVersionStr;
|
||||
|
||||
WPADStorage _wpd;
|
||||
WPADCB* _wpdcb[WPAD_MAX_CONTROLLERS];
|
||||
@@ -617,7 +617,7 @@ static void __reconnect(BOOL exec) {
|
||||
WUDShutdown(exec);
|
||||
}
|
||||
#ifdef __MWERKS__
|
||||
char lbl_81687810[0x58] = "Reconnect Start!!\n\0\0\0\0\0\0"
|
||||
char scWpadManageStrs[0x58] = "Reconnect Start!!\n\0\0\0\0\0\0"
|
||||
"Check the update of WiFi using channel\n\0"
|
||||
"WiFi uses channel = %d\n";
|
||||
extern void _savegpr_19();
|
||||
@@ -629,8 +629,8 @@ static asm void WPADiManageHandler(OSAlarm* pAlarm, OSContext* pContext) {
|
||||
stw r0, 0x164(r1)
|
||||
addi r11, r1, 0x160
|
||||
bl _savegpr_19
|
||||
lis r28, lbl_81687720@ha
|
||||
addi r28, r28, lbl_81687720@l
|
||||
lis r28, scWpadVersionStr@ha
|
||||
addi r28, r28, scWpadVersionStr@l
|
||||
bl WUDGetStatus
|
||||
cmpwi r3, 0x3
|
||||
beq WPADiManageHandler_8AC8
|
||||
|
||||
@@ -2691,160 +2691,81 @@ CDBErr CDBDatabaseCleanUpEmptyDirectoriesMonth(char* year, CDBLocation location,
|
||||
return CDB_ERROR_OK;
|
||||
}
|
||||
|
||||
asm CDBErr CDBDatabaseCleanUpEmptyDirectories(CDBDatabase* database, CDBRecordLocation recordLocation) {
|
||||
#ifdef __MWERKS__
|
||||
nofralloc
|
||||
stwu r1, -0x20(r1)
|
||||
mflr r0
|
||||
cmpwi r3, 0x0
|
||||
stw r0, 0x24(r1)
|
||||
stw r31, 0x1c(r1)
|
||||
mr r31, r3
|
||||
stw r30, 0x18(r1)
|
||||
stw r29, 0x14(r1)
|
||||
mr r29, r4
|
||||
lwz r5, CDBDatabaseWorkBuf(r0)
|
||||
addi r30, r5, 0x430c
|
||||
bne L_8148A13C
|
||||
li r3, 0x1
|
||||
b L_8148A2FC
|
||||
L_8148A13C:
|
||||
bl CDBLock
|
||||
lwz r3, 0x8(r31)
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A158
|
||||
addis r3, r3, 0x1
|
||||
lwz r31, -0x3ff0(r3)
|
||||
b L_8148A15C
|
||||
L_8148A158:
|
||||
li r31, 0x0
|
||||
L_8148A15C:
|
||||
bl CDBUnlock
|
||||
cmpwi r31, 0x0
|
||||
bne L_8148A198
|
||||
li r3, 0x2
|
||||
bl CDBIsPrintDebugMessage
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A190
|
||||
li r3, 0x2
|
||||
bl CDBReport_
|
||||
lis r3, lbl_8166B5D0@ha
|
||||
addi r3, r3, lbl_8166B5D0@l
|
||||
crclr 4*cr1+eq
|
||||
bl OSReport
|
||||
L_8148A190:
|
||||
li r3, 0x1b
|
||||
b L_8148A2FC
|
||||
L_8148A198:
|
||||
cmpwi r31, 0x1
|
||||
bne L_8148A1D0
|
||||
li r3, 0x2
|
||||
bl CDBIsPrintDebugMessage
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A1C8
|
||||
li r3, 0x2
|
||||
bl CDBReport_
|
||||
lis r3, lbl_8166B618@ha
|
||||
addi r3, r3, lbl_8166B618@l
|
||||
crclr 4*cr1+eq
|
||||
bl OSReport
|
||||
L_8148A1C8:
|
||||
li r3, 0x1a
|
||||
b L_8148A2FC
|
||||
L_8148A1D0:
|
||||
clrlwi. r0, r29, 31
|
||||
beq L_8148A24C
|
||||
mr r3, r30
|
||||
li r4, 0x1
|
||||
bl CDBFSFindFirstRoot
|
||||
b L_8148A234
|
||||
L_8148A1E8:
|
||||
mr r3, r30
|
||||
bl CDBFindDataIsDirectory
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A22C
|
||||
mr r3, r30
|
||||
bl CDBFindDataGetName
|
||||
bl CDBFSIsYearDirName
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A22C
|
||||
mr r3, r30
|
||||
bl CDBFindDataGetName
|
||||
li r4, 0x1
|
||||
li r5, 0x0
|
||||
bl CDBDatabaseCleanUpEmptyDirectoriesMonth
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A22C
|
||||
b L_8148A2FC
|
||||
L_8148A22C:
|
||||
mr r3, r30
|
||||
bl CDBFSFindNext
|
||||
L_8148A234:
|
||||
mr r3, r30
|
||||
bl CDBFindDataIsEnd
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A1E8
|
||||
mr r3, r30
|
||||
bl CDBFSFindClose
|
||||
L_8148A24C:
|
||||
bl CDBVFSync
|
||||
li r31, 0x0
|
||||
bl CDBFSSDIsMounted
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A270
|
||||
bl CDBFSSDIsEjected
|
||||
cmpwi r3, 0x0
|
||||
bne L_8148A270
|
||||
li r31, 0x1
|
||||
L_8148A270:
|
||||
cmpwi r31, 0x0
|
||||
beq L_8148A2F4
|
||||
rlwinm. r0, r29, 0, 30, 30
|
||||
beq L_8148A2F4
|
||||
mr r3, r30
|
||||
li r4, 0x2
|
||||
bl CDBFSFindFirstRoot
|
||||
b L_8148A2DC
|
||||
L_8148A290:
|
||||
mr r3, r30
|
||||
bl CDBFindDataIsDirectory
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A2D4
|
||||
mr r3, r30
|
||||
bl CDBFindDataGetName
|
||||
bl CDBFSIsYearDirName
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A2D4
|
||||
mr r3, r30
|
||||
bl CDBFindDataGetName
|
||||
li r4, 0x2
|
||||
li r5, 0x0
|
||||
bl CDBDatabaseCleanUpEmptyDirectoriesMonth
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A2D4
|
||||
b L_8148A2FC
|
||||
L_8148A2D4:
|
||||
mr r3, r30
|
||||
bl CDBFSFindNext
|
||||
L_8148A2DC:
|
||||
mr r3, r30
|
||||
bl CDBFindDataIsEnd
|
||||
cmpwi r3, 0x0
|
||||
beq L_8148A290
|
||||
mr r3, r30
|
||||
bl CDBFSFindClose
|
||||
L_8148A2F4:
|
||||
bl CDBVFSync
|
||||
li r3, 0x0
|
||||
L_8148A2FC:
|
||||
lwz r0, 0x24(r1)
|
||||
lwz r31, 0x1c(r1)
|
||||
lwz r30, 0x18(r1)
|
||||
lwz r29, 0x14(r1)
|
||||
mtlr r0
|
||||
addi r1, r1, 0x20
|
||||
blr
|
||||
#endif
|
||||
CDBErr CDBDatabaseCleanUpEmptyDirectories(CDBDatabase* database, CDBRecordLocation recordLocation) {
|
||||
CDBDatabase* db;
|
||||
CDBFindData* find;
|
||||
int flags;
|
||||
CDBDatabaseState* instance;
|
||||
CDBErr result;
|
||||
BOOL sdAvailable;
|
||||
|
||||
db = database;
|
||||
find = &CDBDatabaseWorkBuf->year;
|
||||
if (db == NULL) {
|
||||
return CDB_ERROR_1;
|
||||
}
|
||||
|
||||
CDBLock();
|
||||
instance = db->instance;
|
||||
if (instance != NULL) {
|
||||
flags = instance->flags;
|
||||
} else {
|
||||
flags = 0;
|
||||
}
|
||||
CDBUnlock();
|
||||
|
||||
if (flags == 0) {
|
||||
CDBReportError(lbl_8166B5D0);
|
||||
return CDB_ERROR_27;
|
||||
}
|
||||
if (flags == 1) {
|
||||
CDBReportError(lbl_8166B618);
|
||||
return CDB_ERROR_26;
|
||||
}
|
||||
|
||||
if ((recordLocation & 1) != 0) {
|
||||
CDBFSFindFirstRoot(find, 1);
|
||||
while (CDBFindDataIsEnd(find) == 0) {
|
||||
if (CDBFindDataIsDirectory(find) != 0) {
|
||||
if (CDBFSIsYearDirName(CDBFindDataGetName(find)) != 0) {
|
||||
result = CDBDatabaseCleanUpEmptyDirectoriesMonth(CDBFindDataGetName(find), 1, NULL);
|
||||
if (result != CDB_ERROR_OK) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
CDBFSFindNext(find);
|
||||
}
|
||||
CDBFSFindClose(find);
|
||||
}
|
||||
|
||||
CDBVFSync();
|
||||
sdAvailable = 0;
|
||||
if (CDBFSSDIsMounted() != 0) {
|
||||
if (CDBFSSDIsEjected() == 0) {
|
||||
sdAvailable = 1;
|
||||
}
|
||||
}
|
||||
if (sdAvailable != 0) {
|
||||
if ((recordLocation & 2) != 0) {
|
||||
CDBFSFindFirstRoot(find, 2);
|
||||
while (CDBFindDataIsEnd(find) == 0) {
|
||||
if (CDBFindDataIsDirectory(find) != 0) {
|
||||
if (CDBFSIsYearDirName(CDBFindDataGetName(find)) != 0) {
|
||||
result = CDBDatabaseCleanUpEmptyDirectoriesMonth(CDBFindDataGetName(find), 2, NULL);
|
||||
if (result != CDB_ERROR_OK) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
CDBFSFindNext(find);
|
||||
}
|
||||
CDBFSFindClose(find);
|
||||
}
|
||||
}
|
||||
|
||||
CDBVFSync();
|
||||
return CDB_ERROR_OK;
|
||||
}
|
||||
|
||||
#pragma section data_type ".data"
|
||||
|
||||
@@ -6,13 +6,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata"
|
||||
extern const char lbl_816979E8[8] = "/\0\0\0\0\0\0\0";
|
||||
#pragma pop
|
||||
char CDBFSPathSeparator = '/';
|
||||
|
||||
void CDBFSConcatenatePath(char* path, const char* concatPath) {
|
||||
strcat(path, lbl_816979E8);
|
||||
strcat(path, &CDBFSPathSeparator);
|
||||
strcat(path, concatPath);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <private/nhttp.h>
|
||||
|
||||
const char NHTTPi_strMultipartBound[] = STR_POSTBOUND;
|
||||
const char NHTTPi_strMultipartBound[24] = STR_POSTBOUND;
|
||||
|
||||
void* NHTTPi_alloc(u32 size, int align);
|
||||
void NHTTPi_free(void* ptr);
|
||||
|
||||
@@ -222,22 +222,23 @@ NWC24Err NWC24GetMsgObj(NWC24MsgObj* msg, NWC24MBoxType type, u32 id) {
|
||||
}
|
||||
|
||||
BOOL NWC24iIsMsgObjReadable(const MBCEntry* entry) {
|
||||
if (!(entry->type & 0x200000))
|
||||
const MBCEntry* e = *(const MBCEntry* volatile*)&entry;
|
||||
if (!(e->type & 0x200000))
|
||||
return FALSE;
|
||||
if (entry->type & 0xFE000000)
|
||||
if (e->type & 0xFE000000)
|
||||
return FALSE;
|
||||
if (entry->ledPattern & 0xFFF80000)
|
||||
if (e->ledPattern & 0xFFF80000)
|
||||
return FALSE;
|
||||
if (entry->type & 2) {
|
||||
if (entry->appId == 0)
|
||||
if (e->type & 2) {
|
||||
if (e->appId == 0)
|
||||
return TRUE;
|
||||
return (NWC24GetAppId() & 0xFFFFFF00) == (entry->appId & 0xFFFFFF00);
|
||||
return (NWC24GetAppId() & 0xFFFFFF00) == (e->appId & 0xFFFFFF00);
|
||||
}
|
||||
if (NWC24GetAppId() == 0x48414541)
|
||||
return TRUE;
|
||||
if (entry->type & 4)
|
||||
if (e->type & 4)
|
||||
return TRUE;
|
||||
return (NWC24GetAppId() & 0xFFFFFF00) == (entry->appId & 0xFFFFFF00);
|
||||
return (NWC24GetAppId() & 0xFFFFFF00) == (e->appId & 0xFFFFFF00);
|
||||
}
|
||||
|
||||
NWC24Err NWC24GetMsgIdList(NWC24MBoxType type, u32* ids, u32 maxLength) {
|
||||
|
||||
@@ -10,20 +10,20 @@
|
||||
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata2"
|
||||
const u8 lbl_81695060 = 0;
|
||||
const u8 lbl_81695061 = 0x0F;
|
||||
const u8 lbl_81695062 = 0xAC;
|
||||
const u8 scRsnOui0 = 0;
|
||||
const u8 scRsnOui1 = 0x0F;
|
||||
const u8 scRsnOui2 = 0xAC;
|
||||
const u8 lbl_81695063 = 0;
|
||||
const u8 lbl_81695064 = 0;
|
||||
const u8 lbl_81695065 = 0x50;
|
||||
const u8 lbl_81695066 = 0xF2;
|
||||
const u8 scWpaOui0 = 0;
|
||||
const u8 scWpaOui1 = 0x50;
|
||||
const u8 scWpaOui2 = 0xF2;
|
||||
const u8 lbl_81695067 = 0;
|
||||
#pragma pop
|
||||
#pragma push
|
||||
#pragma section sconst_type ".sdata"
|
||||
const u8 lbl_81697D70 = 0;
|
||||
const u8 lbl_81697D71 = 0x50;
|
||||
const u8 lbl_81697D72 = 0xF2;
|
||||
const u8 scWpaFindOui0 = 0;
|
||||
const u8 scWpaFindOui1 = 0x50;
|
||||
const u8 scWpaFindOui2 = 0xF2;
|
||||
const u8 lbl_81697D73 = 0;
|
||||
const u8 lbl_81697D74 = 0;
|
||||
const u8 lbl_81697D75 = 0;
|
||||
@@ -31,15 +31,15 @@ const u8 lbl_81697D76 = 0;
|
||||
const u8 lbl_81697D77 = 0;
|
||||
#pragma pop
|
||||
|
||||
#define lbl_81695060 (*((volatile const u8*)&lbl_81695060))
|
||||
#define lbl_81695061 (*((volatile const u8*)&lbl_81695061))
|
||||
#define lbl_81695062 (*((volatile const u8*)&lbl_81695062))
|
||||
#define lbl_81695064 (*((volatile const u8*)&lbl_81695064))
|
||||
#define lbl_81695065 (*((volatile const u8*)&lbl_81695065))
|
||||
#define lbl_81695066 (*((volatile const u8*)&lbl_81695066))
|
||||
#define lbl_81697D70 (*((volatile const u8*)&lbl_81697D70))
|
||||
#define lbl_81697D71 (*((volatile const u8*)&lbl_81697D71))
|
||||
#define lbl_81697D72 (*((volatile const u8*)&lbl_81697D72))
|
||||
#define scRsnOui0 (*((volatile const u8*)&scRsnOui0))
|
||||
#define scRsnOui1 (*((volatile const u8*)&scRsnOui1))
|
||||
#define scRsnOui2 (*((volatile const u8*)&scRsnOui2))
|
||||
#define scWpaOui0 (*((volatile const u8*)&scWpaOui0))
|
||||
#define scWpaOui1 (*((volatile const u8*)&scWpaOui1))
|
||||
#define scWpaOui2 (*((volatile const u8*)&scWpaOui2))
|
||||
#define scWpaFindOui0 (*((volatile const u8*)&scWpaFindOui0))
|
||||
#define scWpaFindOui1 (*((volatile const u8*)&scWpaFindOui1))
|
||||
#define scWpaFindOui2 (*((volatile const u8*)&scWpaFindOui2))
|
||||
extern void _savegpr_21();
|
||||
extern void _restgpr_21();
|
||||
|
||||
@@ -175,9 +175,9 @@ s32 WDGetPrivacyMode(WDBssDesc* bssDesc) {
|
||||
if (WDFindInformationElement((WDInfoElement**)&ieData, &ieLength, bssDesc, 0x30)) {
|
||||
u8 data[WD_VENDOR_LENGTH];
|
||||
|
||||
data[0] = lbl_81695060;
|
||||
data[1] = lbl_81695061;
|
||||
data[2] = lbl_81695062;
|
||||
data[0] = scRsnOui0;
|
||||
data[1] = scRsnOui1;
|
||||
data[2] = scRsnOui2;
|
||||
memcpy(readIE, ieData, sizeof(WDVendorInfoElement) + 2);
|
||||
if (memcmp(&readIE[2], data, WD_VENDOR_LENGTH) == 0) {
|
||||
if ((s32)readIE[5] == 3) {
|
||||
@@ -218,15 +218,15 @@ privacy_second: {
|
||||
u8 data[WD_VENDOR_LENGTH];
|
||||
u8 findData[WD_VENDOR_LENGTH];
|
||||
|
||||
findData[0] = lbl_81697D70;
|
||||
findData[1] = lbl_81697D71;
|
||||
findData[2] = lbl_81697D72;
|
||||
findData[0] = scWpaFindOui0;
|
||||
findData[1] = scWpaFindOui1;
|
||||
findData[2] = scWpaFindOui2;
|
||||
if (!WDiFindVendorSpecificIE(&ieData, &ieLength, bssDesc, 0xDD, findData, 1)) {
|
||||
goto privacy_fallback;
|
||||
}
|
||||
data[0] = lbl_81695064;
|
||||
data[1] = lbl_81695065;
|
||||
data[2] = lbl_81695066;
|
||||
data[0] = scWpaOui0;
|
||||
data[1] = scWpaOui1;
|
||||
data[2] = scWpaOui2;
|
||||
|
||||
{
|
||||
memcpy(readIE, ieData, sizeof(WDVendorInfoElement));
|
||||
|
||||
@@ -1058,7 +1058,7 @@ namespace ipl {
|
||||
}
|
||||
|
||||
const ESTitleId* titleEntry = &mTitleIds[mCurrentTitle];
|
||||
System::getChannelManager()->fn_8133AA50(*titleEntry);
|
||||
System::getChannelManager()->unloadBanner(*titleEntry);
|
||||
|
||||
if (mpSDChannelSelect->getWorker()->get_async_result() == 0) {
|
||||
mCurrentTitle++;
|
||||
|
||||
@@ -849,7 +849,7 @@ extern "C" void iplSDChannelTitle_813E7074(SDChannelTitle* scene) {
|
||||
extern "C" void iplSDChannelTitle_813E71A4(SDChannelTitle* scene) {
|
||||
if (!scene->mpChannelSelect->getWorker()->is_working()) {
|
||||
SCSetTmpTitleID(0);
|
||||
System::getChannelManager()->fn_8133A9F0();
|
||||
System::getChannelManager()->clearTmpChannel();
|
||||
int result = scene->mpChannelSelect->getWorker()->get_async_result();
|
||||
if (!result) {
|
||||
if (scene->mbCopiedTitle) {
|
||||
@@ -983,7 +983,7 @@ extern "C" void iplSDChannelTitle_813E7800(SDChannelTitle* scene) {
|
||||
|
||||
extern "C" void iplSDChannelTitle_813E787C(SDChannelTitle* scene) {
|
||||
if (scene->mbTmdReady) {
|
||||
if (!System::getChannelManager()->fn_8133A678(scene->mTitleId) && !utility::ESMisc::CheckTmdCountryCode(scene->mpTmd)) {
|
||||
if (!System::getChannelManager()->isMissingTicket(scene->mTitleId) && !utility::ESMisc::CheckTmdCountryCode(scene->mpTmd)) {
|
||||
System::getErrorHandler()->set(ErrorHandler::DEFAULT, 3, NULL, 0, -1);
|
||||
}
|
||||
scene->mMakerCode = scene->mpTmd->head.groupId;
|
||||
@@ -1043,8 +1043,8 @@ extern "C" void iplSDChannelTitle_813E7B30(SDChannelTitle* scene, ESTitleId titl
|
||||
delete scene->mpScriptFile;
|
||||
scene->mpScriptFile = NULL;
|
||||
}
|
||||
if (System::getChannelManager()->fn_8133A57C(title)) {
|
||||
scene->mpScriptFile = System::getChannelManager()->fn_8133A924(scene->mpRsoHeap, title);
|
||||
if (System::getChannelManager()->getBannerCSIdx(title)) {
|
||||
scene->mpScriptFile = System::getChannelManager()->readBannerCSAsync(scene->mpRsoHeap, title);
|
||||
scene->mbScriptFailed = false;
|
||||
scene->mScriptEnabled = 1;
|
||||
scene->mScriptState = 1;
|
||||
@@ -1097,7 +1097,7 @@ extern "C" void iplSDChannelTitle_813E7D14(SDChannelTitle* scene) {
|
||||
scene->mScriptState = 1;
|
||||
scene->mScriptHeapIndex = nextHeap;
|
||||
}
|
||||
if (System::getChannelManager()->fn_8133A634(scene->mTitleId) &&
|
||||
if (System::getChannelManager()->usesAltSound(scene->mTitleId) &&
|
||||
scene->mScriptFrame == scene->mScriptDuration - 240) {
|
||||
snd::getSystem()->stopBannerSound(180);
|
||||
}
|
||||
@@ -1155,7 +1155,7 @@ extern "C" void iplSDChannelTitle_813E8034(SDChannelTitle* scene) {
|
||||
scene->mpBannerAnimations[0]->play();
|
||||
}
|
||||
if (scene->mState != 6) {
|
||||
if (!System::getChannelManager()->fn_8133A634(scene->mTitleId) || !scene->mScriptEnabled) {
|
||||
if (!System::getChannelManager()->usesAltSound(scene->mTitleId) || !scene->mScriptEnabled) {
|
||||
iplSDChannelTitle_813E8160(scene);
|
||||
}
|
||||
if (!scene->mpBannerLayout) {
|
||||
@@ -1169,7 +1169,7 @@ extern "C" void iplSDChannelTitle_813E8034(SDChannelTitle* scene) {
|
||||
extern "C" void iplSDChannelTitle_813E8160(SDChannelTitle* scene) {
|
||||
if (scene->mpSoundFiles[scene->mLoadedIndex] && scene->mpSoundFiles[scene->mLoadedIndex]->checkData() == 1) {
|
||||
void* sound = scene->mpSoundFiles[scene->mLoadedIndex]->getBuffer();
|
||||
u32 size = System::getChannelManager()->fn_8133A5B8(scene->mTitleId);
|
||||
u32 size = System::getChannelManager()->getSoundSize(scene->mTitleId);
|
||||
snd::getSystem()->startBannerSound(sound, size, false);
|
||||
}
|
||||
}
|
||||
@@ -1230,7 +1230,7 @@ extern "C" void iplSDChannelTitle_813E8360(SDChannelTitle* scene) {
|
||||
}
|
||||
|
||||
extern "C" BOOL iplSDChannelTitle_813E847C(SDChannelTitle*, ESTmdView*, ESTitleId titleId) {
|
||||
if (!System::getChannelManager()->fn_8133A5F0(titleId) || ncd::NCDSetting::getConnectEnableFlag()) {
|
||||
if (!System::getChannelManager()->needsNetSetting(titleId) || ncd::NCDSetting::getConnectEnableFlag()) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -1429,8 +1429,8 @@ extern "C" void iplSDChannelTitle_813E8D14(SDChannelTitle*, nw4r::lyt::Pane* pan
|
||||
}
|
||||
|
||||
extern "C" nand::LayoutFile* iplSDChannelTitle_813E8DCC(SDChannelTitle*, ESTitleId title, nand::File** sound) {
|
||||
*sound = System::getChannelManager()->fn_8133A85C(System::getMem2App(), title);
|
||||
nand::MetaFile* banner = System::getChannelManager()->fn_8133A7A4(System::getMem2App(), title);
|
||||
*sound = System::getChannelManager()->readSoundMetaAsync(System::getMem2App(), title);
|
||||
nand::MetaFile* banner = System::getChannelManager()->readBannerMetaAsync(System::getMem2App(), title);
|
||||
return new (System::getMem2App(), 4) nand::LayoutFile(banner, NULL);
|
||||
}
|
||||
|
||||
@@ -1453,15 +1453,15 @@ extern "C" BOOL iplSDChannelTitle_813E8F04(SDChannelTitle* scene, ESTmdView* tmd
|
||||
return TRUE;
|
||||
}
|
||||
if (parental.enable & SC_PARENTAL_FLAG_ENABLED) {
|
||||
u32 restrictions = System::getChannelManager()->fn_8133A6B8(scene->mTitleId);
|
||||
u32 restrictions = System::getChannelManager()->isNewsChannelV6Plus(scene->mTitleId);
|
||||
u32 networkRestrictions = SCGetNetContentRestrictions();
|
||||
if (networkRestrictions & restrictions) {
|
||||
return FALSE;
|
||||
}
|
||||
if (SCGetWwwRestriction() && System::getChannelManager()->fn_8133A73C(scene->mTitleId)) {
|
||||
if (SCGetWwwRestriction() && System::getChannelManager()->isOperaChannel(scene->mTitleId)) {
|
||||
return FALSE;
|
||||
}
|
||||
if (System::getChannelManager()->fn_8133A73C(scene->mTitleId)) {
|
||||
if (System::getChannelManager()->isOperaChannel(scene->mTitleId)) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return utility::ESMisc::CheckTmdParentalControl(tmd);
|
||||
|
||||
@@ -1235,7 +1235,7 @@ namespace ipl {
|
||||
|
||||
#pragma pop
|
||||
|
||||
SEntry* Manager::fn_8133A4E0(ESTitleId titleId) {
|
||||
SEntry* Manager::findEntryByTitleId(ESTitleId titleId) {
|
||||
for (int page = 0; page < MAX_CHANNEL_PAGE; page++) {
|
||||
for (int index = 0; index < MAX_CHANNEL_INDEX; index++) {
|
||||
ESTitleId cmp = ES_TITLE_ID(mChannels[page][index].info.titleType, mChannels[page][index].info.titleCode);
|
||||
@@ -1255,8 +1255,8 @@ namespace ipl {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
u32 Manager::fn_8133A57C(ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
u32 Manager::getBannerCSIdx(ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel != NULL) {
|
||||
return channel->metaHdr->blockHdr.bannerCSIdx;
|
||||
} else {
|
||||
@@ -1264,8 +1264,8 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
u32 Manager::fn_8133A5B8(ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
u32 Manager::getSoundSize(ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel != NULL) {
|
||||
return channel->metaHdr->blockHdr.soundSize;
|
||||
} else {
|
||||
@@ -1273,8 +1273,8 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
BOOL Manager::fn_8133A5F0(ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
BOOL Manager::needsNetSetting(ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel != NULL && (channel->metaHdr->blockHdr.netSetting << 8)) {
|
||||
return TRUE;
|
||||
} else {
|
||||
@@ -1282,8 +1282,8 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
BOOL Manager::fn_8133A634(ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
BOOL Manager::usesAltSound(ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel != NULL && (channel->metaHdr->blockHdr.useAltSound << 14)) {
|
||||
return TRUE;
|
||||
} else {
|
||||
@@ -1291,8 +1291,8 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
BOOL Manager::fn_8133A678(ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
BOOL Manager::isMissingTicket(ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel != NULL && channel->missingTicket != FALSE) {
|
||||
return TRUE;
|
||||
} else {
|
||||
@@ -1300,8 +1300,8 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
BOOL Manager::fn_8133A6B8(ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
BOOL Manager::isNewsChannelV6Plus(ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1315,8 +1315,8 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
BOOL Manager::fn_8133A73C(ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
BOOL Manager::isOperaChannel(ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1329,8 +1329,8 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
nand::MetaFile* Manager::fn_8133A7A4(EGG::Heap* heap, ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
nand::MetaFile* Manager::readBannerMetaAsync(EGG::Heap* heap, ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1343,8 +1343,8 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
nand::MetaFile* Manager::fn_8133A85C(EGG::Heap* heap, ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
nand::MetaFile* Manager::readSoundMetaAsync(EGG::Heap* heap, ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1357,8 +1357,8 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
nand::SharedFile* Manager::fn_8133A924(EGG::Heap* heap, ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
nand::SharedFile* Manager::readBannerCSAsync(EGG::Heap* heap, ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1366,7 +1366,7 @@ namespace ipl {
|
||||
if (!channel->loadedBnr || channel->info.primaryType == channel::PRIMARY_TYPE_DISK) {
|
||||
return NULL;
|
||||
} else {
|
||||
u32 index = fn_8133A57C(titleId);
|
||||
u32 index = getBannerCSIdx(titleId);
|
||||
if (index == 0) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1375,15 +1375,15 @@ namespace ipl {
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::fn_8133A9F0() {
|
||||
void Manager::clearTmpChannel() {
|
||||
if (mTmpChannel.bnrFile != NULL) {
|
||||
delete mTmpChannel.bnrFile;
|
||||
}
|
||||
memset(&mTmpChannel, 0, sizeof(mTmpChannel));
|
||||
}
|
||||
|
||||
void Manager::fn_8133AA50(ESTitleId titleId) {
|
||||
SEntry* channel = fn_8133A4E0(titleId);
|
||||
void Manager::unloadBanner(ESTitleId titleId) {
|
||||
SEntry* channel = findEntryByTitleId(titleId);
|
||||
if (channel != NULL) {
|
||||
channel->loadedBnr = false;
|
||||
}
|
||||
|
||||
@@ -152,81 +152,81 @@ Rvl_decode_szs_done:
|
||||
}
|
||||
#else
|
||||
int Rvl_decode_szs(u8* out, u8* in) {
|
||||
register u8* pbVar1;
|
||||
register u8 bVar2;
|
||||
register u8 bVar3;
|
||||
register u8* pbVar5;
|
||||
register int iVar6;
|
||||
register int iVar7;
|
||||
register u32 uVar8;
|
||||
register u32 uVar9;
|
||||
register u32 uVar10;
|
||||
register u32 param_5;
|
||||
iVar6 = *(int*)(in + 4);
|
||||
uVar8 = 0;
|
||||
register u8* copySrc;
|
||||
register u8 hdrByte;
|
||||
register u8 extLenByte;
|
||||
register u8* inPtr;
|
||||
register int decodedSize;
|
||||
register int remaining;
|
||||
register u32 bitMask;
|
||||
register u32 copyLen;
|
||||
register u32 blockCount;
|
||||
register u32 flags;
|
||||
decodedSize = *(int*)(in + 4);
|
||||
bitMask = 0;
|
||||
in += 0x10;
|
||||
iVar7 = iVar6;
|
||||
remaining = decodedSize;
|
||||
do {
|
||||
next:
|
||||
while (1) {
|
||||
uVar8 >>= 1;
|
||||
pbVar5 = in;
|
||||
if (uVar8 == 0) {
|
||||
param_5 = *in;
|
||||
uVar8 = 0x80;
|
||||
pbVar5 = in + 1;
|
||||
bitMask >>= 1;
|
||||
inPtr = in;
|
||||
if (bitMask == 0) {
|
||||
flags = *in;
|
||||
bitMask = 0x80;
|
||||
inPtr = in + 1;
|
||||
}
|
||||
bVar2 = *pbVar5;
|
||||
if ((uVar8 & param_5) == 0) {
|
||||
hdrByte = *inPtr;
|
||||
if ((bitMask & flags) == 0) {
|
||||
break;
|
||||
}
|
||||
in = pbVar5 + 1;
|
||||
iVar7--;
|
||||
*out = bVar2;
|
||||
in = inPtr + 1;
|
||||
remaining--;
|
||||
*out = hdrByte;
|
||||
out++;
|
||||
if (iVar7 != 0) {
|
||||
if (remaining != 0) {
|
||||
goto next;
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
uVar9 = bVar2 >> 4;
|
||||
in = pbVar5 + 2;
|
||||
if (uVar9 == 0) {
|
||||
bVar3 = *in;
|
||||
in = pbVar5 + 3;
|
||||
uVar9 = bVar3 + 0x10;
|
||||
copyLen = hdrByte >> 4;
|
||||
in = inPtr + 2;
|
||||
if (copyLen == 0) {
|
||||
extLenByte = *in;
|
||||
in = inPtr + 3;
|
||||
copyLen = extLenByte + 0x10;
|
||||
}
|
||||
pbVar5 = out - (((bVar2 & 0xf) << 8) | pbVar5[1]);
|
||||
iVar7 = (iVar7 - uVar9) - 2;
|
||||
*out = pbVar5[-1];
|
||||
out[1] = *pbVar5;
|
||||
pbVar5 += 2;
|
||||
uVar10 = uVar9 >> 3;
|
||||
inPtr = out - (((hdrByte & 0xf) << 8) | inPtr[1]);
|
||||
remaining = (remaining - copyLen) - 2;
|
||||
*out = inPtr[-1];
|
||||
out[1] = *inPtr;
|
||||
inPtr += 2;
|
||||
blockCount = copyLen >> 3;
|
||||
out += 2;
|
||||
if (uVar10 != 0) {
|
||||
if (blockCount != 0) {
|
||||
do {
|
||||
*out = pbVar5[-1];
|
||||
out[1] = *pbVar5;
|
||||
out[2] = pbVar5[1];
|
||||
out[3] = pbVar5[2];
|
||||
out[4] = pbVar5[3];
|
||||
out[5] = pbVar5[4];
|
||||
out[6] = pbVar5[5];
|
||||
out[7] = pbVar5[6];
|
||||
pbVar5 += 8;
|
||||
*out = inPtr[-1];
|
||||
out[1] = *inPtr;
|
||||
out[2] = inPtr[1];
|
||||
out[3] = inPtr[2];
|
||||
out[4] = inPtr[3];
|
||||
out[5] = inPtr[4];
|
||||
out[6] = inPtr[5];
|
||||
out[7] = inPtr[6];
|
||||
inPtr += 8;
|
||||
out += 8;
|
||||
uVar10--;
|
||||
} while (uVar10 != 0);
|
||||
blockCount--;
|
||||
} while (blockCount != 0);
|
||||
}
|
||||
for (uVar9 &= 7; uVar9 != 0; uVar9--) {
|
||||
pbVar1 = pbVar5 - 1;
|
||||
pbVar5++;
|
||||
*out = *pbVar1;
|
||||
for (copyLen &= 7; copyLen != 0; copyLen--) {
|
||||
copySrc = inPtr - 1;
|
||||
inPtr++;
|
||||
*out = *copySrc;
|
||||
out++;
|
||||
}
|
||||
} while (0 < iVar7);
|
||||
} while (0 < remaining);
|
||||
done:
|
||||
return iVar6;
|
||||
return decodedSize;
|
||||
}
|
||||
#endif
|
||||
#ifdef __MWERKS__
|
||||
@@ -490,225 +490,225 @@ L_Rvl_decode_ash_return:
|
||||
}
|
||||
#else
|
||||
int Rvl_decode_ash(u8* out, u8* in) {
|
||||
u8* puVar1;
|
||||
u32* puVar2;
|
||||
u32 uVar3;
|
||||
u32 uVar4;
|
||||
u32 uVar5;
|
||||
u32 uVar6;
|
||||
int iVar7;
|
||||
u16 uVar8;
|
||||
u16 uVar10;
|
||||
u8* puVar9;
|
||||
int iVar11;
|
||||
u32 uVar12;
|
||||
u32 uVar13;
|
||||
u32 uVar14;
|
||||
u32 uVar15;
|
||||
int iVar16;
|
||||
int iVar17;
|
||||
u32 uVar18;
|
||||
u32 uVar19;
|
||||
u32 uVar20;
|
||||
u16* puVar21;
|
||||
u8* dst;
|
||||
u32* inWordPtr;
|
||||
u32 decodedSize;
|
||||
u32 sym9;
|
||||
u32 sym11;
|
||||
u32 nodeVal;
|
||||
int needBits;
|
||||
u16 nodeCount;
|
||||
u16 nextNode;
|
||||
u8* litPtr;
|
||||
int bitOff1;
|
||||
u32 bitPos1;
|
||||
u32 shifted;
|
||||
u32 bitWord1;
|
||||
u32 tmp15;
|
||||
int stackDepth;
|
||||
int bitOff2;
|
||||
u32 bitPos2;
|
||||
u32 bitWord2;
|
||||
u32 tmp20;
|
||||
u16* stackPtr;
|
||||
|
||||
uVar3 = *(u32*)(in + 4) & 0xffffff;
|
||||
iVar11 = 0x10;
|
||||
uVar12 = 0;
|
||||
uVar18 = 0;
|
||||
uVar19 = *(u32*)(*(int*)(in + 8) + in);
|
||||
iVar17 = *(int*)(in + 8) + 4;
|
||||
puVar21 = (u16*)&work[0x4ff8];
|
||||
uVar8 = 0x200;
|
||||
iVar16 = 0;
|
||||
uVar14 = *(u32*)(in + 0xc);
|
||||
uVar10 = 0x200;
|
||||
decodedSize = *(u32*)(in + 4) & 0xffffff;
|
||||
bitOff1 = 0x10;
|
||||
bitPos1 = 0;
|
||||
bitPos2 = 0;
|
||||
bitWord2 = *(u32*)(*(int*)(in + 8) + in);
|
||||
bitOff2 = *(int*)(in + 8) + 4;
|
||||
stackPtr = (u16*)&work[0x4ff8];
|
||||
nodeCount = 0x200;
|
||||
stackDepth = 0;
|
||||
bitWord1 = *(u32*)(in + 0xc);
|
||||
nextNode = 0x200;
|
||||
do {
|
||||
while (1) {
|
||||
if (uVar12 == 0x1f) {
|
||||
uVar13 = *(u32*)(in + iVar11);
|
||||
uVar12 = 0;
|
||||
iVar11 = iVar11 + 4;
|
||||
if (bitPos1 == 0x1f) {
|
||||
shifted = *(u32*)(in + bitOff1);
|
||||
bitPos1 = 0;
|
||||
bitOff1 = bitOff1 + 4;
|
||||
} else {
|
||||
uVar12 = uVar12 + 1;
|
||||
uVar13 = uVar14 << 1;
|
||||
bitPos1 = bitPos1 + 1;
|
||||
shifted = bitWord1 << 1;
|
||||
}
|
||||
if (-1 < (int)uVar14) {
|
||||
if (-1 < (int)bitWord1) {
|
||||
break;
|
||||
}
|
||||
*puVar21 = uVar10 | 0x8000;
|
||||
puVar21[1] = uVar10 | 0x4000;
|
||||
puVar21 = puVar21 + 2;
|
||||
iVar16 = iVar16 + 2;
|
||||
uVar8 = uVar8 + 1;
|
||||
uVar14 = uVar13;
|
||||
uVar10 = uVar10 + 1;
|
||||
*stackPtr = nextNode | 0x8000;
|
||||
stackPtr[1] = nextNode | 0x4000;
|
||||
stackPtr = stackPtr + 2;
|
||||
stackDepth = stackDepth + 2;
|
||||
nodeCount = nodeCount + 1;
|
||||
bitWord1 = shifted;
|
||||
nextNode = nextNode + 1;
|
||||
}
|
||||
iVar7 = uVar12 + 9;
|
||||
if (iVar7 < 0x21) {
|
||||
uVar4 = uVar13 >> 0x17;
|
||||
if (iVar7 == 0x20) {
|
||||
uVar14 = *(u32*)(in + iVar11);
|
||||
uVar12 = 0;
|
||||
iVar11 = iVar11 + 4;
|
||||
needBits = bitPos1 + 9;
|
||||
if (needBits < 0x21) {
|
||||
sym9 = shifted >> 0x17;
|
||||
if (needBits == 0x20) {
|
||||
bitWord1 = *(u32*)(in + bitOff1);
|
||||
bitPos1 = 0;
|
||||
bitOff1 = bitOff1 + 4;
|
||||
} else {
|
||||
uVar14 = uVar13 << 9;
|
||||
uVar12 = uVar12 + 9;
|
||||
bitWord1 = shifted << 9;
|
||||
bitPos1 = bitPos1 + 9;
|
||||
}
|
||||
} else {
|
||||
puVar2 = (u32*)(in + iVar11);
|
||||
iVar11 = iVar11 + 4;
|
||||
uVar4 = uVar13 >> 0x17 | *puVar2 >> (0x40U - iVar7 & 0x3f);
|
||||
uVar12 = uVar12 - 0x17;
|
||||
uVar14 = *puVar2 << (uVar12 & 0x3f);
|
||||
inWordPtr = (u32*)(in + bitOff1);
|
||||
bitOff1 = bitOff1 + 4;
|
||||
sym9 = shifted >> 0x17 | *inWordPtr >> (0x40U - needBits & 0x3f);
|
||||
bitPos1 = bitPos1 - 0x17;
|
||||
bitWord1 = *inWordPtr << (bitPos1 & 0x3f);
|
||||
}
|
||||
while (1) {
|
||||
puVar21 = puVar21 - 1;
|
||||
uVar10 = *puVar21;
|
||||
iVar16 = iVar16 - 1;
|
||||
iVar7 = (uVar10 & 0x3fff) * 2;
|
||||
if ((uVar10 & 0x8000) == 0) {
|
||||
stackPtr = stackPtr - 1;
|
||||
nextNode = *stackPtr;
|
||||
stackDepth = stackDepth - 1;
|
||||
needBits = (nextNode & 0x3fff) * 2;
|
||||
if ((nextNode & 0x8000) == 0) {
|
||||
break;
|
||||
}
|
||||
*(u16*)(&work[0x7fe] + iVar7) = (u16)uVar4;
|
||||
uVar4 = uVar10 & 0x3fff;
|
||||
if (iVar16 == 0) {
|
||||
uVar8 = 0x800;
|
||||
iVar16 = 0;
|
||||
uVar10 = 0x800;
|
||||
*(u16*)(&work[0x7fe] + needBits) = (u16)sym9;
|
||||
sym9 = nextNode & 0x3fff;
|
||||
if (stackDepth == 0) {
|
||||
nodeCount = 0x800;
|
||||
stackDepth = 0;
|
||||
nextNode = 0x800;
|
||||
do {
|
||||
while (1) {
|
||||
if (uVar18 == 0x1f) {
|
||||
uVar13 = *(u32*)(in + iVar17);
|
||||
uVar18 = 0;
|
||||
iVar17 = iVar17 + 4;
|
||||
if (bitPos2 == 0x1f) {
|
||||
shifted = *(u32*)(in + bitOff2);
|
||||
bitPos2 = 0;
|
||||
bitOff2 = bitOff2 + 4;
|
||||
} else {
|
||||
uVar18 = uVar18 + 1;
|
||||
uVar13 = uVar19 << 1;
|
||||
bitPos2 = bitPos2 + 1;
|
||||
shifted = bitWord2 << 1;
|
||||
}
|
||||
if (-1 < (int)uVar19) {
|
||||
if (-1 < (int)bitWord2) {
|
||||
break;
|
||||
}
|
||||
*puVar21 = uVar10 | 0x8000;
|
||||
puVar21[1] = uVar10 | 0x4000;
|
||||
puVar21 = puVar21 + 2;
|
||||
iVar16 = iVar16 + 2;
|
||||
uVar8 = uVar8 + 1;
|
||||
uVar19 = uVar13;
|
||||
uVar10 = uVar10 + 1;
|
||||
*stackPtr = nextNode | 0x8000;
|
||||
stackPtr[1] = nextNode | 0x4000;
|
||||
stackPtr = stackPtr + 2;
|
||||
stackDepth = stackDepth + 2;
|
||||
nodeCount = nodeCount + 1;
|
||||
bitWord2 = shifted;
|
||||
nextNode = nextNode + 1;
|
||||
}
|
||||
iVar7 = uVar18 + 0xb;
|
||||
if (iVar7 < 0x21) {
|
||||
uVar5 = uVar13 >> 0x15;
|
||||
if (iVar7 == 0x20) {
|
||||
uVar19 = *(u32*)(in + iVar17);
|
||||
uVar18 = 0;
|
||||
iVar17 = iVar17 + 4;
|
||||
needBits = bitPos2 + 0xb;
|
||||
if (needBits < 0x21) {
|
||||
sym11 = shifted >> 0x15;
|
||||
if (needBits == 0x20) {
|
||||
bitWord2 = *(u32*)(in + bitOff2);
|
||||
bitPos2 = 0;
|
||||
bitOff2 = bitOff2 + 4;
|
||||
} else {
|
||||
uVar19 = uVar13 << 0xb;
|
||||
uVar18 = uVar18 + 0xb;
|
||||
bitWord2 = shifted << 0xb;
|
||||
bitPos2 = bitPos2 + 0xb;
|
||||
}
|
||||
} else {
|
||||
puVar2 = (u32*)(in + iVar17);
|
||||
iVar17 = iVar17 + 4;
|
||||
uVar5 = uVar13 >> 0x15 | *puVar2 >> (0x40U - iVar7 & 0x3f);
|
||||
uVar18 = uVar18 - 0x15;
|
||||
uVar19 = *puVar2 << (uVar18 & 0x3f);
|
||||
inWordPtr = (u32*)(in + bitOff2);
|
||||
bitOff2 = bitOff2 + 4;
|
||||
sym11 = shifted >> 0x15 | *inWordPtr >> (0x40U - needBits & 0x3f);
|
||||
bitPos2 = bitPos2 - 0x15;
|
||||
bitWord2 = *inWordPtr << (bitPos2 & 0x3f);
|
||||
}
|
||||
while (1) {
|
||||
puVar21 = puVar21 - 1;
|
||||
uVar10 = *puVar21;
|
||||
iVar16 = iVar16 - 1;
|
||||
iVar7 = (uVar10 & 0x3fff) * 2;
|
||||
if ((uVar10 & 0x8000) == 0) {
|
||||
stackPtr = stackPtr - 1;
|
||||
nextNode = *stackPtr;
|
||||
stackDepth = stackDepth - 1;
|
||||
needBits = (nextNode & 0x3fff) * 2;
|
||||
if ((nextNode & 0x8000) == 0) {
|
||||
break;
|
||||
}
|
||||
*(u16*)(&work[0x2ffa] + iVar7) = (u16)uVar5;
|
||||
uVar5 = uVar10 & 0x3fff;
|
||||
uVar6 = uVar4;
|
||||
uVar13 = uVar3;
|
||||
if (iVar16 == 0) {
|
||||
*(u16*)(&work[0x2ffa] + needBits) = (u16)sym11;
|
||||
sym11 = nextNode & 0x3fff;
|
||||
nodeVal = sym9;
|
||||
shifted = decodedSize;
|
||||
if (stackDepth == 0) {
|
||||
do {
|
||||
while (0x1ff < uVar6) {
|
||||
if (uVar12 == 0x1f) {
|
||||
uVar15 = *(u32*)(in + iVar11);
|
||||
iVar11 = iVar11 + 4;
|
||||
uVar12 = 0;
|
||||
while (0x1ff < nodeVal) {
|
||||
if (bitPos1 == 0x1f) {
|
||||
tmp15 = *(u32*)(in + bitOff1);
|
||||
bitOff1 = bitOff1 + 4;
|
||||
bitPos1 = 0;
|
||||
} else {
|
||||
uVar12 = uVar12 + 1;
|
||||
uVar15 = uVar14 << 1;
|
||||
bitPos1 = bitPos1 + 1;
|
||||
tmp15 = bitWord1 << 1;
|
||||
}
|
||||
if ((int)uVar14 < 0) {
|
||||
uVar6 = *(u16*)(&work[0x7fe] + uVar6 * 2);
|
||||
uVar14 = uVar15;
|
||||
if ((int)bitWord1 < 0) {
|
||||
nodeVal = *(u16*)(&work[0x7fe] + nodeVal * 2);
|
||||
bitWord1 = tmp15;
|
||||
} else {
|
||||
uVar6 = *(u16*)((u8*)work + uVar6 * 2);
|
||||
uVar14 = uVar15;
|
||||
nodeVal = *(u16*)((u8*)work + nodeVal * 2);
|
||||
bitWord1 = tmp15;
|
||||
}
|
||||
}
|
||||
uVar15 = uVar5;
|
||||
if (uVar6 < 0x100) {
|
||||
*out = (char)uVar6;
|
||||
tmp15 = sym11;
|
||||
if (nodeVal < 0x100) {
|
||||
*out = (char)nodeVal;
|
||||
out = out + 1;
|
||||
uVar13 = uVar13 - 1;
|
||||
shifted = shifted - 1;
|
||||
} else {
|
||||
while (0x7ff < uVar15) {
|
||||
if (uVar18 == 0x1f) {
|
||||
uVar20 = *(u32*)(in + iVar17);
|
||||
iVar17 = iVar17 + 4;
|
||||
uVar18 = 0;
|
||||
while (0x7ff < tmp15) {
|
||||
if (bitPos2 == 0x1f) {
|
||||
tmp20 = *(u32*)(in + bitOff2);
|
||||
bitOff2 = bitOff2 + 4;
|
||||
bitPos2 = 0;
|
||||
} else {
|
||||
uVar18 = uVar18 + 1;
|
||||
uVar20 = uVar19 << 1;
|
||||
bitPos2 = bitPos2 + 1;
|
||||
tmp20 = bitWord2 << 1;
|
||||
}
|
||||
if ((int)uVar19 < 0) {
|
||||
uVar15 = *(u16*)(&work[0x2ffa] + uVar15 * 2);
|
||||
uVar19 = uVar20;
|
||||
if ((int)bitWord2 < 0) {
|
||||
tmp15 = *(u16*)(&work[0x2ffa] + tmp15 * 2);
|
||||
bitWord2 = tmp20;
|
||||
} else {
|
||||
uVar15 = *(u16*)(&work[0xffc] + uVar15 * 2);
|
||||
uVar19 = uVar20;
|
||||
tmp15 = *(u16*)(&work[0xffc] + tmp15 * 2);
|
||||
bitWord2 = tmp20;
|
||||
}
|
||||
}
|
||||
uVar6 = uVar6 - 0xfd;
|
||||
puVar9 = out - uVar15;
|
||||
uVar13 = uVar13 - uVar6;
|
||||
uVar15 = uVar6 >> 3;
|
||||
if (uVar15 == 0) {
|
||||
nodeVal = nodeVal - 0xfd;
|
||||
litPtr = out - tmp15;
|
||||
shifted = shifted - nodeVal;
|
||||
tmp15 = nodeVal >> 3;
|
||||
if (tmp15 == 0) {
|
||||
goto LAB_813325b8;
|
||||
}
|
||||
do {
|
||||
*out = puVar9[-1];
|
||||
out[1] = *puVar9;
|
||||
out[2] = puVar9[1];
|
||||
out[3] = puVar9[2];
|
||||
out[4] = puVar9[3];
|
||||
out[5] = puVar9[4];
|
||||
out[6] = puVar9[5];
|
||||
out[7] = puVar9[6];
|
||||
puVar9 = puVar9 + 8;
|
||||
*out = litPtr[-1];
|
||||
out[1] = *litPtr;
|
||||
out[2] = litPtr[1];
|
||||
out[3] = litPtr[2];
|
||||
out[4] = litPtr[3];
|
||||
out[5] = litPtr[4];
|
||||
out[6] = litPtr[5];
|
||||
out[7] = litPtr[6];
|
||||
litPtr = litPtr + 8;
|
||||
out = out + 8;
|
||||
uVar15 = uVar15 - 1;
|
||||
} while (uVar15 != 0);
|
||||
for (uVar6 = uVar6 & 7; uVar6 != 0; uVar6 = uVar6 - 1) {
|
||||
tmp15 = tmp15 - 1;
|
||||
} while (tmp15 != 0);
|
||||
for (nodeVal = nodeVal & 7; nodeVal != 0; nodeVal = nodeVal - 1) {
|
||||
LAB_813325b8:
|
||||
puVar1 = puVar9 - 1;
|
||||
puVar9 = puVar9 + 1;
|
||||
*out = *puVar1;
|
||||
dst = litPtr - 1;
|
||||
litPtr = litPtr + 1;
|
||||
*out = *dst;
|
||||
out = out + 1;
|
||||
}
|
||||
}
|
||||
uVar6 = uVar4;
|
||||
} while (uVar13 != 0);
|
||||
return uVar3;
|
||||
nodeVal = sym9;
|
||||
} while (shifted != 0);
|
||||
return decodedSize;
|
||||
}
|
||||
}
|
||||
*(u16*)(&work[0xffc] + iVar7) = (u16)uVar5;
|
||||
uVar10 = uVar8;
|
||||
*(u16*)(&work[0xffc] + needBits) = (u16)sym11;
|
||||
nextNode = nodeCount;
|
||||
} while (1);
|
||||
}
|
||||
}
|
||||
*(u16*)((u8*)work + iVar7) = (u16)uVar4;
|
||||
uVar10 = uVar8;
|
||||
*(u16*)((u8*)work + needBits) = (u16)sym9;
|
||||
nextNode = nodeCount;
|
||||
} while (1);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user