Minor stuff

This commit is contained in:
Aurora Wright 2017-04-15 22:36:34 +02:00
parent 93c8c90804
commit c9456055ea
2 changed files with 14 additions and 12 deletions

View File

@ -291,9 +291,10 @@ static u32 findFunctionStart(u8* code, u32 pos)
static bool findLayeredFsSymbols(u8* code, u32 size, u32 *fsMountArchive, u32 *fsRegisterArchive, u32 *fsTryOpenFile, u32 *fsOpenFileDirectly, u32 *throwFatalError) static bool findLayeredFsSymbols(u8* code, u32 size, u32 *fsMountArchive, u32 *fsRegisterArchive, u32 *fsTryOpenFile, u32 *fsOpenFileDirectly, u32 *throwFatalError)
{ {
bool found = false;
u32 svcConnectToPort = 0xFFFFFFFF; u32 svcConnectToPort = 0xFFFFFFFF;
for(u32 addr = 0; addr <= size - 4; addr += 4) for(u32 addr = 0; !found && addr <= size - 4; addr += 4)
{ {
if(*fsMountArchive == 0xFFFFFFFF) if(*fsMountArchive == 0xFFFFFFFF)
{ {
@ -322,9 +323,11 @@ static bool findLayeredFsSymbols(u8* code, u32 size, u32 *fsMountArchive, u32 *f
if(addr >= 4 && svcConnectToPort == 0xFFFFFFFF && *(u32 *)(code + addr) == 0xEF00002D) if(addr >= 4 && svcConnectToPort == 0xFFFFFFFF && *(u32 *)(code + addr) == 0xEF00002D)
svcConnectToPort = addr - 4; svcConnectToPort = addr - 4;
if(svcConnectToPort != 0xFFFFFFFF && *fsMountArchive != 0xFFFFFFFF && *fsRegisterArchive != 0xFFFFFFFF && *fsTryOpenFile != 0xFFFFFFFF && *fsOpenFileDirectly != 0xFFFFFFFF) found = true;
} }
if(svcConnectToPort != 0xFFFFFFFF && *fsMountArchive != 0xFFFFFFFF && *fsRegisterArchive != 0xFFFFFFFF && *fsTryOpenFile != 0xFFFFFFFF && *fsOpenFileDirectly != 0xFFFFFFFF) if(found)
{ {
u32 func = 0xFFFFFFFF; u32 func = 0xFFFFFFFF;

View File

@ -564,8 +564,8 @@ void kernel9Loader(Arm9Bin *arm9Section)
aes_setkey(slot, decKey, AES_KEYX, AES_INPUT_BE | AES_INPUT_NORMAL); aes_setkey(slot, decKey, AES_KEYX, AES_INPUT_BE | AES_INPUT_NORMAL);
} }
if(ISSIGHAX) if(!ISSIGHAX) return;
{
twlConsoleInfoInit(); twlConsoleInfoInit();
if(k9lVersion == 2) if(k9lVersion == 2)
@ -576,7 +576,6 @@ void kernel9Loader(Arm9Bin *arm9Section)
aes_setkey(0x18, decKey, AES_KEYX, AES_INPUT_BE | AES_INPUT_NORMAL); aes_setkey(0x18, decKey, AES_KEYX, AES_INPUT_BE | AES_INPUT_NORMAL);
} }
} }
}
void computePinHash(u8 *outbuf, const u8 *inbuf) void computePinHash(u8 *outbuf, const u8 *inbuf)
{ {