Compare commits
1 Commits
cleanup/ao
...
cleanup/ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9646c0c892 |
@@ -4399,31 +4399,31 @@ getCardSlotState__Q23ipl10memorycardFv = .text:0x813D2024; // type:function size
|
||||
getCardLastSrcSlot__Q23ipl10memorycardFv = .text:0x813D202C; // type:function size:0x10
|
||||
getCardLastSendCmd__Q23ipl10memorycardFv = .text:0x813D203C; // type:function size:0x10
|
||||
getCardLastCMDFCmdResult__Q23ipl10memorycardFv = .text:0x813D204C; // type:function size:0x10
|
||||
CardSequence_813D205C = .text:0x813D205C; // type:function size:0x44
|
||||
sendCardUnmountCmd = .text:0x813D205C; // type:function size:0x44
|
||||
sendCardFormatCmd__Q23ipl10memorycardFUc = .text:0x813D20A0; // type:function size:0x50
|
||||
sendCardCopyCmd__Q23ipl10memorycardFUcs = .text:0x813D20F0; // type:function size:0x54
|
||||
sendCardMoveCmd__Q23ipl10memorycardFUcs = .text:0x813D2144; // type:function size:0x54
|
||||
sendCardDeleteCmd__Q23ipl10memorycardFUcs = .text:0x813D2198; // type:function size:0x54
|
||||
sendCardThreadStopCmd__Q23ipl10memorycardFv = .text:0x813D21EC; // type:function size:0x40
|
||||
CardSequence_813D222C = .text:0x813D222C; // type:function size:0x110
|
||||
CardSequence_813D233C = .text:0x813D233C; // type:function size:0x9C
|
||||
pollCardSlot = .text:0x813D222C; // type:function size:0x110
|
||||
mapCardErrorCode = .text:0x813D233C; // type:function size:0x9C
|
||||
probeCard__Q23ipl10memorycardFv = .text:0x813D23D8; // type:function size:0x288
|
||||
initCardThread__Q23ipl10memorycardFv = .text:0x813D2660; // type:function size:0x29C
|
||||
shutdownCardThread__Q23ipl10memorycardFv = .text:0x813D28FC; // type:function size:0x148
|
||||
getIconStateArray__Q23ipl10memorycardFv = .text:0x813D2A44; // type:function size:0x10
|
||||
getIconComment__Q23ipl10memorycardFUcs = .text:0x813D2A54; // type:function size:0x20
|
||||
CardSequence_813D2A74 = .text:0x813D2A74; // type:function size:0xCC
|
||||
CardSequence_813D2B40 = .text:0x813D2B40; // type:function size:0x14C
|
||||
CardSequence_813D2C8C = .text:0x813D2C8C; // type:function size:0x4B4
|
||||
CardSequence_813D3140 = .text:0x813D3140; // type:function size:0xCC
|
||||
CardSequence_813D320C = .text:0x813D320C; // type:function size:0x9C
|
||||
CardSequence_813D32A8 = .text:0x813D32A8; // type:function size:0xD8
|
||||
CardSequence_813D3380 = .text:0x813D3380; // type:function size:0x58
|
||||
CardSequence_813D33D8 = .text:0x813D33D8; // type:function size:0x4C
|
||||
CardSequence_813D3424 = .text:0x813D3424; // type:function size:0x800
|
||||
CardSequence_813D3C24 = .text:0x813D3C24; // type:function size:0x14
|
||||
CardSequence_813D3C38 = .text:0x813D3C38; // type:function size:0xDC
|
||||
CardSequence_813D3D14 = .text:0x813D3D14; // type:function size:0x980
|
||||
clearCardFileEntry = .text:0x813D2A74; // type:function size:0xCC
|
||||
refreshCardSlotInfo = .text:0x813D2B40; // type:function size:0x14C
|
||||
cardThreadMain = .text:0x813D2C8C; // type:function size:0x4B4
|
||||
markAllCardFilesDirty = .text:0x813D3140; // type:function size:0xCC
|
||||
handleCardMountResult = .text:0x813D320C; // type:function size:0x9C
|
||||
reportCardThreadError = .text:0x813D32A8; // type:function size:0xD8
|
||||
sendCardSlotState = .text:0x813D3380; // type:function size:0x58
|
||||
clearAllCardFileEntries = .text:0x813D33D8; // type:function size:0x4C
|
||||
loadCardFileIcons = .text:0x813D3424; // type:function size:0x800
|
||||
clearCardWritePending = .text:0x813D3C24; // type:function size:0x14
|
||||
checkCardFileDuplicate = .text:0x813D3C38; // type:function size:0xDC
|
||||
runCardMoveOrCopy = .text:0x813D3D14; // type:function size:0x980
|
||||
IPLContestInitialize = .text:0x813D4694; // type:function size:0xBC
|
||||
IPLContestStart = .text:0x813D4750; // type:function size:0x14
|
||||
IPLContestProcess = .text:0x813D4764; // type:function size:0x6E8
|
||||
@@ -5168,7 +5168,7 @@ AOSS_814001B4 = .text:0x814001B4; // type:function size:0x13C
|
||||
AOSS_814002F0 = .text:0x814002F0; // type:function size:0x1E0
|
||||
AOSS_814004D0 = .text:0x814004D0; // type:function size:0x1D4
|
||||
AOSS_814006A4 = .text:0x814006A4; // type:function size:0x18C
|
||||
AOSSDecryptMessage = .text:0x81400830; // type:function size:0x504
|
||||
AOSS_81400830 = .text:0x81400830; // type:function size:0x504
|
||||
AOSS_81400D34 = .text:0x81400D34; // type:function size:0xD8
|
||||
AOSS_81400E0C = .text:0x81400E0C; // type:function size:0x2F8
|
||||
AOSS_81401104 = .text:0x81401104; // type:function size:0x180
|
||||
@@ -5176,11 +5176,11 @@ AOSS_81401284 = .text:0x81401284; // type:function size:0x128
|
||||
AOSS_814013AC = .text:0x814013AC; // type:function size:0x1C8
|
||||
AOSS_81401574 = .text:0x81401574; // type:function size:0x204
|
||||
AOSS_81401778 = .text:0x81401778; // type:function size:0x444
|
||||
AOSSBuildInterfaceOption = .text:0x81401BBC; // type:function size:0xE0
|
||||
AOSSInitKeySchedule = .text:0x81401C9C; // type:function size:0x124
|
||||
AOSSInitCrc32Table = .text:0x81401DC0; // type:function size:0xC0
|
||||
AOSSXorBufferWithKey = .text:0x81401E80; // type:function size:0x24C
|
||||
AOSSConnectAndAwaitHost = .text:0x814020CC; // type:function size:0xF0
|
||||
AOSS_81401BBC = .text:0x81401BBC; // type:function size:0xE0
|
||||
AOSS_81401C9C = .text:0x81401C9C; // type:function size:0x124
|
||||
AOSS_81401DC0 = .text:0x81401DC0; // type:function size:0xC0
|
||||
AOSS_81401E80 = .text:0x81401E80; // type:function size:0x24C
|
||||
AOSS_814020CC = .text:0x814020CC; // type:function size:0xF0
|
||||
ATERM_814021BC = .text:0x814021BC; // type:function size:0x268
|
||||
ATERM_81402424 = .text:0x81402424; // type:function size:0x348
|
||||
ATERM_8140276C = .text:0x8140276C; // type:function size:0x2B8
|
||||
@@ -24048,7 +24048,7 @@ g_detach_func = .sbss:0x8169970C; // type:object size:0x4 scope:local data:4byte
|
||||
st_uhs_msc_status = .sbss:0x81699710; // type:object size:0x4 scope:local data:4byte
|
||||
st_uhs_msc_msgid = .sbss:0x81699714; // type:object size:0x4 scope:local data:4byte
|
||||
st_uhs_msc_tskid = .sbss:0x81699718; // type:object size:0x4 scope:local data:4byte
|
||||
uhg_msc_memid = .sbss:0x8169971C; // type:object size:0x4 data:4byte
|
||||
uhg_msc_memid = .sbss:0x8169971C; // type:object size:0x4 scope:local data:4byte
|
||||
st_uhs_msc_blk_buf = .sbss:0x81699720; // type:object size:0x4 scope:local data:4byte
|
||||
__sdCardStatus = .sbss:0x81699728; // type:object size:0x4 scope:local data:4byte
|
||||
__sdReq = .sbss:0x8169972C; // type:object size:0x4 scope:local data:4byte
|
||||
|
||||
@@ -42,7 +42,7 @@ typedef struct UHF_MSC_MESSAGE {
|
||||
} UHF_MSC_MESSAGE;
|
||||
|
||||
extern UHF_MSC_DEVICE uhg_msc_blk_device_tbl[8];
|
||||
extern s32 uhg_msc_memid;
|
||||
extern s32 uhg_msc_memid_8169971C;
|
||||
s32 uhf_ker_set_priority(s32 task_id, s32 priority);
|
||||
void* uhf_ker_get_memory_block(s32 pool, u32 size, u32 alignment);
|
||||
s32 uhf_ker_release_memory_block(s32 pool, void* block);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <private/fa/puh_msc.h>
|
||||
|
||||
s32 uhg_msc_memid;
|
||||
s32 uhg_msc_memid_8169971C;
|
||||
static s32 st_uhs_msc_tskid;
|
||||
static s32 st_uhs_msc_msgid;
|
||||
static s32 st_uhs_msc_status;
|
||||
@@ -47,13 +47,13 @@ static s32 _uhf_msc_api_send_message(UHF_MSC_PARAMETERS* parameters, u32 command
|
||||
s32 result = 0;
|
||||
s32 semaphore;
|
||||
UHF_MSC_MESSAGE* message;
|
||||
message = uhf_ker_get_memory_block(uhg_msc_memid, sizeof(UHF_MSC_MESSAGE), 4);
|
||||
message = uhf_ker_get_memory_block(uhg_msc_memid_8169971C, sizeof(UHF_MSC_MESSAGE), 4);
|
||||
if (message == NULL) {
|
||||
return -12;
|
||||
}
|
||||
semaphore = uhf_ker_create_sem(0, 0);
|
||||
if (semaphore <= 0) {
|
||||
uhf_ker_release_memory_block(uhg_msc_memid, message);
|
||||
uhf_ker_release_memory_block(uhg_msc_memid_8169971C, message);
|
||||
return -12;
|
||||
}
|
||||
message->command = command;
|
||||
@@ -61,7 +61,7 @@ static s32 _uhf_msc_api_send_message(UHF_MSC_PARAMETERS* parameters, u32 command
|
||||
message->result = &result;
|
||||
message->parameters = *parameters;
|
||||
if (uhf_ker_send_message(st_uhs_msc_msgid, message, 0) != 0) {
|
||||
uhf_ker_release_memory_block(uhg_msc_memid, message);
|
||||
uhf_ker_release_memory_block(uhg_msc_memid_8169971C, message);
|
||||
uhf_ker_delete_sem(semaphore);
|
||||
return -12;
|
||||
}
|
||||
|
||||
@@ -287,13 +287,13 @@ s32 _uhf_msc_blk_send_message(UHF_MSC_PARAMETERS* parameters, u32 command) {
|
||||
s32 semaphore;
|
||||
UHF_MSC_MESSAGE* message;
|
||||
s32 mailbox = uhf_msc_get_message_id();
|
||||
message = uhf_ker_get_memory_block(uhg_msc_memid, sizeof(UHF_MSC_MESSAGE), 4);
|
||||
message = uhf_ker_get_memory_block(uhg_msc_memid_8169971C, sizeof(UHF_MSC_MESSAGE), 4);
|
||||
if (message == NULL) {
|
||||
return -1;
|
||||
}
|
||||
semaphore = uhf_ker_create_sem(0, 0);
|
||||
if (semaphore <= 0) {
|
||||
uhf_ker_release_memory_block(uhg_msc_memid, message);
|
||||
uhf_ker_release_memory_block(uhg_msc_memid_8169971C, message);
|
||||
return -1;
|
||||
}
|
||||
message->command = command;
|
||||
@@ -301,7 +301,7 @@ s32 _uhf_msc_blk_send_message(UHF_MSC_PARAMETERS* parameters, u32 command) {
|
||||
message->result = &result;
|
||||
message->parameters = *parameters;
|
||||
if (uhf_ker_send_message(mailbox, message, 0) != 0) {
|
||||
uhf_ker_release_memory_block(uhg_msc_memid, message);
|
||||
uhf_ker_release_memory_block(uhg_msc_memid_8169971C, message);
|
||||
uhf_ker_delete_sem(semaphore);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ struct CardThreadState {
|
||||
|
||||
MEMAllocator sAllocator_;
|
||||
static CardThreadState* sThread;
|
||||
extern "C" void* CardSequence_813D2C8C();
|
||||
extern "C" void* cardThreadMain();
|
||||
static char sCardSlotName[3] = "AB";
|
||||
|
||||
FileInfo* getCardDirState() {
|
||||
@@ -68,7 +68,7 @@ long getCardLastCMDFCmdResult() {
|
||||
return sThread->completionResult;
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D205C(u8 slot) {
|
||||
extern "C" s32 sendCardUnmountCmd(u8 slot) {
|
||||
sThread->sourceSlot = slot;
|
||||
sThread->lastCommand = 9;
|
||||
sThread->lastResult = -21;
|
||||
@@ -114,12 +114,12 @@ void sendCardDeleteCmd(u8 slot, s16 fileNo) {
|
||||
}
|
||||
|
||||
void sendCardThreadStopCmd() NO_INLINE {
|
||||
CardSequence_813D205C(0);
|
||||
CardSequence_813D205C(1);
|
||||
sendCardUnmountCmd(0);
|
||||
sendCardUnmountCmd(1);
|
||||
OSSendMessage(&sThread->requests, (OSMessage)0xB, 0);
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D222C(u8 slot) {
|
||||
extern "C" void pollCardSlot(u8 slot) {
|
||||
s32 result;
|
||||
|
||||
if (sThread->valid == 1) {
|
||||
@@ -139,7 +139,7 @@ extern "C" void CardSequence_813D222C(u8 slot) {
|
||||
}
|
||||
}
|
||||
if (result == 0) {
|
||||
if (sThread->slots[slot].state > 2 && CardSequence_813D205C(slot)) {
|
||||
if (sThread->slots[slot].state > 2 && sendCardUnmountCmd(slot)) {
|
||||
sThread->slots[slot].changed = 0;
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ done:
|
||||
return;
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D233C(s32 result) {
|
||||
extern "C" s32 mapCardErrorCode(s32 result) {
|
||||
switch (result) {
|
||||
case 0:
|
||||
return 0;
|
||||
@@ -186,8 +186,8 @@ extern "C" s32 CardSequence_813D233C(s32 result) {
|
||||
void probeCard() {
|
||||
OSMessage message;
|
||||
|
||||
CardSequence_813D222C(0);
|
||||
CardSequence_813D222C(1);
|
||||
pollCardSlot(0);
|
||||
pollCardSlot(1);
|
||||
while (OSReceiveMessage(&sThread->responses, &message, 0)) {
|
||||
s16 slot = (s16)(((u32)message >> 16) & 1);
|
||||
s8 command = (u8)(u32)message;
|
||||
@@ -251,9 +251,9 @@ checkCommand:
|
||||
break;
|
||||
}
|
||||
|
||||
sThread->lastResult = CardSequence_813D233C((s8)(((u32)message << 16) >> 24));
|
||||
sThread->lastResult = mapCardErrorCode((s8)(((u32)message << 16) >> 24));
|
||||
if ((s8)(u8)(u32)message != 0 && (s8)(u8)(u32)message != 9) {
|
||||
sThread->completionResult = CardSequence_813D233C((s8)(((u32)message << 16) >> 24));
|
||||
sThread->completionResult = mapCardErrorCode((s8)(((u32)message << 16) >> 24));
|
||||
if (sThread->sourceSlot != (s16)(((u32)message >> 16) & 1)) {
|
||||
sThread->destinationFileNo = (u32)message >> 24;
|
||||
}
|
||||
@@ -302,7 +302,7 @@ void initCardThread() {
|
||||
|
||||
OSInitMessageQueue(&sThread->responses, sThread->responseMessages, 0x10);
|
||||
OSInitMessageQueue(&sThread->requests, sThread->requestMessages, 0x10);
|
||||
OSCreateThread(&sThread->thread, (void* (*)(void*))CardSequence_813D2C8C, 0,
|
||||
OSCreateThread(&sThread->thread, (void* (*)(void*))cardThreadMain, 0,
|
||||
sThread->stack + sizeof(sThread->stack), 0x8000, 0x11, 0);
|
||||
OSResumeThread(&sThread->thread);
|
||||
OSSendMessage(&sThread->requests, (OSMessage)10, 0);
|
||||
@@ -348,7 +348,7 @@ const char* getIconComment(u8 slot, s16 index) {
|
||||
return sThread->comments[slot][index];
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D2A74(s32 slot, s32 index) {
|
||||
extern "C" void clearCardFileEntry(s32 slot, s32 index) {
|
||||
BOOL interrupts = OSDisableInterrupts();
|
||||
sThread->files[slot][index].fileNo = 0;
|
||||
sThread->files[slot][index].size = 0;
|
||||
@@ -360,7 +360,7 @@ extern "C" void CardSequence_813D2A74(s32 slot, s32 index) {
|
||||
OSRestoreInterrupts(interrupts);
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D2B40(s32 slot) {
|
||||
extern "C" void refreshCardSlotInfo(s32 slot) {
|
||||
u16 memSize;
|
||||
u32 sectorSize;
|
||||
s32 freeBytes;
|
||||
@@ -391,12 +391,12 @@ extern "C" void CardSequence_813D2B40(s32 slot) {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D320C(s32 slot, s32 result);
|
||||
extern "C" s32 CardSequence_813D32A8(s32 slot, s32 state, s32 result);
|
||||
extern "C" void CardSequence_813D3380(s32 slot, s32 state, s32 fileNo);
|
||||
extern "C" void CardSequence_813D33D8(s32 slot);
|
||||
extern "C" s32 CardSequence_813D3424(s32 slot, s32 fileNo, CARDDir* dir);
|
||||
extern "C" void CardSequence_813D3D14(s32 slot, s16 fileNo, s32 command);
|
||||
extern "C" s32 handleCardMountResult(s32 slot, s32 result);
|
||||
extern "C" s32 reportCardThreadError(s32 slot, s32 state, s32 result);
|
||||
extern "C" void sendCardSlotState(s32 slot, s32 state, s32 fileNo);
|
||||
extern "C" void clearAllCardFileEntries(s32 slot);
|
||||
extern "C" s32 loadCardFileIcons(s32 slot, s32 fileNo, CARDDir* dir);
|
||||
extern "C" void runCardMoveOrCopy(s32 slot, s16 fileNo, s32 command);
|
||||
|
||||
static inline void sendValidityResponse(u32 command, u32 valid) {
|
||||
union {
|
||||
@@ -408,7 +408,7 @@ static inline void sendValidityResponse(u32 command, u32 valid) {
|
||||
OSSendMessage(&sThread->responses, (OSMessage)reply.value, 1);
|
||||
}
|
||||
|
||||
extern "C" void* CardSequence_813D2C8C() {
|
||||
extern "C" void* cardThreadMain() {
|
||||
struct CardThreadLocals {
|
||||
u8 compareName[6];
|
||||
u32 message;
|
||||
@@ -455,7 +455,7 @@ loopStart:
|
||||
command = (local.message >> 14) & 4;
|
||||
result = CARDMount(slot, sThread->mountBuffers[command / 4], 0);
|
||||
if (result < 0) {
|
||||
result = CardSequence_813D320C(slot, result);
|
||||
result = handleCardMountResult(slot, result);
|
||||
if (result != 0) {
|
||||
goto mountContinue;
|
||||
}
|
||||
@@ -467,11 +467,11 @@ loopStart:
|
||||
}
|
||||
|
||||
mountContinue:
|
||||
CardSequence_813D33D8(slot);
|
||||
clearAllCardFileEntries(slot);
|
||||
for (file = 0; file < 0x7F; ++file) {
|
||||
result = __CARDGetStatusEx(slot, (s16)file, &local.mountDir);
|
||||
if (result < 0) {
|
||||
result = CardSequence_813D320C(slot, result);
|
||||
result = handleCardMountResult(slot, result);
|
||||
if (result != 0) {
|
||||
continue;
|
||||
}
|
||||
@@ -496,16 +496,16 @@ loopStart:
|
||||
goto mountError;
|
||||
}
|
||||
} else {
|
||||
result = CardSequence_813D3424(slot, (s16)file, &local.mountDir);
|
||||
result = loadCardFileIcons(slot, (s16)file, &local.mountDir);
|
||||
if (result < 0) {
|
||||
goto mountError;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CardSequence_813D2B40(slot);
|
||||
refreshCardSlotInfo(slot);
|
||||
sThread->mounted[command / 4] = 1;
|
||||
CardSequence_813D3380(slot, 0, 0);
|
||||
sendCardSlotState(slot, 0, 0);
|
||||
OSReport("Slot %c\n", sCardSlotName[slot]);
|
||||
for (listingFile = 0; listingFile < 0x7F; ++listingFile) {
|
||||
if (__CARDGetStatusEx(slot, (u16)listingFile, &local.listingDir) == 0) {
|
||||
@@ -519,30 +519,30 @@ loopStart:
|
||||
|
||||
mountError:
|
||||
OSReport("MountError\n");
|
||||
CardSequence_813D32A8(slot, 0, result);
|
||||
reportCardThreadError(slot, 0, result);
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
CardSequence_813D32A8((local.message >> 16) & 1, 9, -3);
|
||||
reportCardThreadError((local.message >> 16) & 1, 9, -3);
|
||||
break;
|
||||
case 1: {
|
||||
slot = (local.message >> 16) & 1;
|
||||
result = CARDFormat(slot);
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(slot, 1, result);
|
||||
reportCardThreadError(slot, 1, result);
|
||||
} else {
|
||||
sThread->mounted[slot] = 1;
|
||||
CardSequence_813D2B40(slot);
|
||||
CardSequence_813D3380(slot, 1, 0);
|
||||
refreshCardSlotInfo(slot);
|
||||
sendCardSlotState(slot, 1, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
CardSequence_813D3D14((local.message >> 16) & 1,
|
||||
runCardMoveOrCopy((local.message >> 16) & 1,
|
||||
(s16)(u8)(local.message >> 24), (s8)command);
|
||||
break;
|
||||
case 3:
|
||||
CardSequence_813D3D14((local.message >> 16) & 1,
|
||||
runCardMoveOrCopy((local.message >> 16) & 1,
|
||||
(s16)(u8)(local.message >> 24), (s8)command);
|
||||
break;
|
||||
case 4: {
|
||||
@@ -550,11 +550,11 @@ loopStart:
|
||||
fileNo = (s16)(local.message >> 24);
|
||||
result = CARDFastDelete(slot, fileNo);
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(slot, 4, result);
|
||||
reportCardThreadError(slot, 4, result);
|
||||
} else {
|
||||
CardSequence_813D2A74(slot, fileNo);
|
||||
CardSequence_813D2B40(slot);
|
||||
CardSequence_813D3380(slot, 4, (u8)fileNo);
|
||||
clearCardFileEntry(slot, fileNo);
|
||||
refreshCardSlotInfo(slot);
|
||||
sendCardSlotState(slot, 4, (u8)fileNo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -581,7 +581,7 @@ loopStart:
|
||||
++outerSlot;
|
||||
|
||||
} while (outerSlot < 2);
|
||||
CardSequence_813D3380(0, 0xC, 0);
|
||||
sendCardSlotState(0, 0xC, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -593,9 +593,9 @@ loopCheck:
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D3C38(s32 slot, s16 fileNo);
|
||||
extern "C" s32 checkCardFileDuplicate(s32 slot, s16 fileNo);
|
||||
|
||||
extern "C" void CardSequence_813D3140() {
|
||||
extern "C" void markAllCardFilesDirty() {
|
||||
u32 slot = 0;
|
||||
s32 fileNo;
|
||||
|
||||
@@ -607,7 +607,7 @@ extern "C" void CardSequence_813D3140() {
|
||||
sThread->files[slot][fileNo].unk_0x06 = 0;
|
||||
if (sThread->mounted[slot] != 0 &&
|
||||
sThread->mounted[slot ^ 1] != 0 &&
|
||||
CardSequence_813D3C38((u8)slot, (s16)fileNo) < 0) {
|
||||
checkCardFileDuplicate((u8)slot, (s16)fileNo) < 0) {
|
||||
sThread->files[slot][fileNo].unk_0x06 = flagValue;
|
||||
}
|
||||
++fileNo;
|
||||
@@ -618,7 +618,7 @@ extern "C" void CardSequence_813D3140() {
|
||||
} while ((s32)slot < 2);
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D320C(s32 slot, s32 result) {
|
||||
extern "C" s32 handleCardMountResult(s32 slot, s32 result) {
|
||||
if (result == -5) {
|
||||
goto reportError;
|
||||
}
|
||||
@@ -640,32 +640,32 @@ repairedCard:
|
||||
{
|
||||
result = CARDCheck(slot);
|
||||
if (result < 0) {
|
||||
return CardSequence_813D32A8(slot, 0, result);
|
||||
return reportCardThreadError(slot, 0, result);
|
||||
}
|
||||
OSReport("CardThread:Broken Card Repaired\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
reportError:
|
||||
return CardSequence_813D32A8(slot, 0, result);
|
||||
return reportCardThreadError(slot, 0, result);
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D32A8(s32 slot, s32 state, s32 result) {
|
||||
extern "C" s32 reportCardThreadError(s32 slot, s32 state, s32 result) {
|
||||
if (result != -7 && result != -27 && result != -8 && result != -9 &&
|
||||
(CardSequence_813D33D8(slot), result != -6) && result != -13) {
|
||||
(clearAllCardFileEntries(slot), result != -6) && result != -13) {
|
||||
OSReport("DEBUG: UnmountCard %d \n", slot);
|
||||
CARDUnmount(slot);
|
||||
sThread->mounted[slot & 0xFF] = 0;
|
||||
}
|
||||
OSReport("DEBUG: CardThread error %d %d\n", state, result);
|
||||
CardSequence_813D3140();
|
||||
markAllCardFilesDirty();
|
||||
OSSendMessage(&sThread->responses,
|
||||
(OSMessage)(((slot & 1) << 16) | ((result & 0xFF) << 8) | (state & 0xFF)), 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D3380(s32 slot, s32 state, s32 fileNo) {
|
||||
CardSequence_813D3140();
|
||||
extern "C" void sendCardSlotState(s32 slot, s32 state, s32 fileNo) {
|
||||
markAllCardFilesDirty();
|
||||
OSMessageQueue* queue = &sThread->responses;
|
||||
union CardThreadMessage {
|
||||
u32 value;
|
||||
@@ -683,15 +683,15 @@ extern "C" void CardSequence_813D3380(s32 slot, s32 state, s32 fileNo) {
|
||||
OSSendMessage(queue, (OSMessage)message.value, 1);
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D33D8(s32 slot) {
|
||||
extern "C" void clearAllCardFileEntries(s32 slot) {
|
||||
s32 file = 0;
|
||||
do {
|
||||
CardSequence_813D2A74(slot, (s16)file);
|
||||
clearCardFileEntry(slot, (s16)file);
|
||||
file = file + 1;
|
||||
} while (file < 0x7F);
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D3424(s32 slot, s32 fileNo, CARDDir* dir) {
|
||||
extern "C" s32 loadCardFileIcons(s32 slot, s32 fileNo, CARDDir* dir) {
|
||||
struct CardSequenceFileData {
|
||||
s32 commentSectorSize;
|
||||
s32 sectorSize;
|
||||
@@ -922,11 +922,11 @@ closeFileSuccess:
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D3C24(s32, s32) {
|
||||
extern "C" void clearCardWritePending(s32, s32) {
|
||||
sThread->writePending = 0;
|
||||
}
|
||||
|
||||
extern "C" s32 CardSequence_813D3C38(s32 slot, s16 fileNo) {
|
||||
extern "C" s32 checkCardFileDuplicate(s32 slot, s16 fileNo) {
|
||||
CARDDir sourceDir;
|
||||
CARDDir otherDir;
|
||||
s32 result = __CARDGetStatusEx(slot, fileNo, &sourceDir);
|
||||
@@ -950,7 +950,7 @@ extern "C" s32 CardSequence_813D3C38(s32 slot, s16 fileNo) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" void CardSequence_813D3D14(s32 slot, s16 fileNo, s32 command) {
|
||||
extern "C" void runCardMoveOrCopy(s32 slot, s16 fileNo, s32 command) {
|
||||
CARDDir createStatus;
|
||||
CARDDir checkedStatus;
|
||||
CARDDir ioStatus;
|
||||
@@ -970,10 +970,10 @@ extern "C" void CardSequence_813D3D14(s32 slot, s16 fileNo, s32 command) {
|
||||
s32 statusResult;
|
||||
s32 stage;
|
||||
|
||||
result = CardSequence_813D3C38(slot, fileNo);
|
||||
result = checkCardFileDuplicate(slot, fileNo);
|
||||
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(slot, command, result);
|
||||
reportCardThreadError(slot, command, result);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@@ -999,7 +999,7 @@ sectorSizeCheck:
|
||||
goto sectorSizeDone;
|
||||
}
|
||||
sectorSizeError:
|
||||
CardSequence_813D32A8(slot, command, sectorError);
|
||||
reportCardThreadError(slot, command, sectorError);
|
||||
goto finish;
|
||||
sectorSizeDone:
|
||||
;
|
||||
@@ -1023,7 +1023,7 @@ sectorSizeDone:
|
||||
result = CARDGetResultCode(slot);
|
||||
}
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(slot, command, result);
|
||||
reportCardThreadError(slot, command, result);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@@ -1056,7 +1056,7 @@ createDone:
|
||||
;
|
||||
}
|
||||
if (destinationFileNo < 0) {
|
||||
CardSequence_813D32A8(destinationSlot, command, destinationFileNo);
|
||||
reportCardThreadError(destinationSlot, command, destinationFileNo);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@@ -1099,7 +1099,7 @@ createDone:
|
||||
sThread->writePending = 1;
|
||||
ioResult = CARDWriteAsync(&sThread->destinationFile,
|
||||
sThread->transferBuffer, size, offset,
|
||||
CardSequence_813D3C24);
|
||||
clearCardWritePending);
|
||||
if (ioResult < 0) {
|
||||
goto copyIoFailure;
|
||||
}
|
||||
@@ -1176,7 +1176,7 @@ copyIoDone:
|
||||
}
|
||||
} else {
|
||||
metadataCopied = TRUE;
|
||||
result = CardSequence_813D3424(destinationSlot, destinationFileNo,
|
||||
result = loadCardFileIcons(destinationSlot, destinationFileNo,
|
||||
&sourceStatus);
|
||||
if (result < 0) {
|
||||
OSReport("Can't read icon for move dstfile\n");
|
||||
@@ -1214,7 +1214,7 @@ copyIoDone:
|
||||
s32 setResult = result;
|
||||
if (result == -3) {
|
||||
CARDFastDelete(slot, fileNo);
|
||||
CardSequence_813D2A74(slot, fileNo);
|
||||
clearCardFileEntry(slot, fileNo);
|
||||
} else {
|
||||
s32 restoreResult = __CARDSetStatusEx(slot, fileNo, &moveStatus);
|
||||
if (restoreResult < 0) {
|
||||
@@ -1227,13 +1227,13 @@ copyIoDone:
|
||||
stage = 3;
|
||||
result = CARDFastDelete(slot, fileNo);
|
||||
if (result >= 0) {
|
||||
CardSequence_813D2A74(slot, fileNo);
|
||||
clearCardFileEntry(slot, fileNo);
|
||||
stage = 4;
|
||||
result = __CARDGetStatusEx(destinationSlot,
|
||||
destinationFileNo, &moveStatus);
|
||||
if (result >= 0) {
|
||||
stage = 5;
|
||||
if ((result = CardSequence_813D3424(
|
||||
if ((result = loadCardFileIcons(
|
||||
destinationSlot, destinationFileNo, &moveStatus)) < 0) {
|
||||
goto moveStatusError;
|
||||
}
|
||||
@@ -1270,10 +1270,10 @@ moveStatusDone:
|
||||
}
|
||||
|
||||
if (result >= 0) {
|
||||
CardSequence_813D2B40(slot);
|
||||
CardSequence_813D2B40(destinationSlot);
|
||||
CardSequence_813D3380(slot, 0, fileNo & 0xFF);
|
||||
CardSequence_813D3380(destinationSlot, command, destinationFileNo & 0xFF);
|
||||
refreshCardSlotInfo(slot);
|
||||
refreshCardSlotInfo(destinationSlot);
|
||||
sendCardSlotState(slot, 0, fileNo & 0xFF);
|
||||
sendCardSlotState(destinationSlot, command, destinationFileNo & 0xFF);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@@ -1281,7 +1281,7 @@ cleanup:
|
||||
destinationSlot = slot ^ 1;
|
||||
result = CARDGetResultCode(destinationSlot);
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(destinationSlot, command, result);
|
||||
reportCardThreadError(destinationSlot, command, result);
|
||||
} else {
|
||||
if (temporaryCreated && !metadataCopied) {
|
||||
CARDFastDelete(destinationSlot, destinationFileNo);
|
||||
@@ -1289,18 +1289,18 @@ cleanup:
|
||||
if (metadataCopied) {
|
||||
if (__CARDGetStatusEx(destinationSlot, destinationFileNo,
|
||||
&createStatus) == 0) {
|
||||
CardSequence_813D3424(destinationSlot, destinationFileNo, &createStatus);
|
||||
loadCardFileIcons(destinationSlot, destinationFileNo, &createStatus);
|
||||
}
|
||||
}
|
||||
CardSequence_813D2B40(destinationSlot);
|
||||
CardSequence_813D3380(destinationSlot, 0, fileNo & 0xFF);
|
||||
refreshCardSlotInfo(destinationSlot);
|
||||
sendCardSlotState(destinationSlot, 0, fileNo & 0xFF);
|
||||
}
|
||||
result = CARDGetResultCode(slot);
|
||||
if (result < 0) {
|
||||
CardSequence_813D32A8(slot, command, result);
|
||||
reportCardThreadError(slot, command, result);
|
||||
} else {
|
||||
CardSequence_813D2B40(slot);
|
||||
CardSequence_813D3380(slot, 0, fileNo & 0xFF);
|
||||
refreshCardSlotInfo(slot);
|
||||
sendCardSlotState(slot, 0, fileNo & 0xFF);
|
||||
}
|
||||
|
||||
finish:
|
||||
|
||||
@@ -296,17 +296,17 @@ int AOSS_814001B4(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
int AOSS_814002F0(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestRecords* request);
|
||||
int AOSS_814004D0(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestRecords* request);
|
||||
int AOSS_814006A4(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestRecords* request);
|
||||
int AOSSDecryptMessage(AOSSDecryptionMessage* message);
|
||||
int AOSS_81400830(AOSSDecryptionMessage* message);
|
||||
int AOSS_81400D34(u16 command, const u8* manufacturerAddress);
|
||||
int AOSS_81401104(const AOSSOptionRecord* packet, AOSSStoredConfig* config);
|
||||
int AOSS_81401284(const AOSSOptionRecord* packet, AOSSStoredConfig* config);
|
||||
void AOSSInitKeySchedule(AOSSKeySchedule* schedule, const u8* key, u32 keyLength, u32 stateLength);
|
||||
void AOSSInitCrc32Table(u32 seed, u32* table);
|
||||
s16 AOSSBuildInterfaceOption(void* buffer);
|
||||
void AOSS_81401C9C(AOSSKeySchedule* schedule, const u8* key, u32 keyLength, u32 stateLength);
|
||||
void AOSS_81401DC0(u32 seed, u32* table);
|
||||
s16 AOSS_81401BBC(void* buffer);
|
||||
int AOSS_81401574(void* packet, AOSSRequestRecords* request, int socket);
|
||||
int AOSS_81401778(void* packet, void* request, int socket);
|
||||
int AOSSXorBufferWithKey(void* packet, s32 length, char* key, int keyLength);
|
||||
int AOSSConnectAndAwaitHost(void* settings, void* config);
|
||||
int AOSS_81401E80(void* packet, s32 length, char* key, int keyLength);
|
||||
int AOSS_814020CC(void* settings, void* config);
|
||||
int AOSS_81400E0C(const AOSSOptionRecord* packet, u8* settings);
|
||||
int AOSS_814013AC(int state, const AOSSReplyOption* response, int responseLength, void* config, void* networkData);
|
||||
|
||||
@@ -652,7 +652,7 @@ int AOSS_Init_old(AOSSInitInput* input)
|
||||
}
|
||||
goto finish_initialization;
|
||||
wait_for_initial_link:
|
||||
state = AOSSConnectAndAwaitHost(&settings,s_accessPointConfig);
|
||||
state = AOSS_814020CC(&settings,s_accessPointConfig);
|
||||
if (state == -1) {
|
||||
input->status = 0xf;
|
||||
if (s_accessPointConfig) {
|
||||
@@ -860,7 +860,7 @@ request_socket_cleanup_complete:
|
||||
memset(s_accessPointConfig,0,0x58);
|
||||
initialWait = waitIntervals.limits.connection;
|
||||
for (waitAttempt = 0; waitAttempt < (short)initialWait; waitAttempt++) {
|
||||
requestResult = AOSSConnectAndAwaitHost(&settings,s_accessPointConfig);
|
||||
requestResult = AOSS_814020CC(&settings,s_accessPointConfig);
|
||||
if (requestResult == -1) {
|
||||
input->status = 0xf;
|
||||
if (s_accessPointConfig) {
|
||||
@@ -969,7 +969,7 @@ request_socket_cleanup_complete:
|
||||
memset(s_responseBuffer,0,0x5dc);
|
||||
memcpy(messageIdentity,&requestRecords.records[2],8);
|
||||
manufacturerLength = strlen(s_manufacturer);
|
||||
AOSSXorBufferWithKey(messageIdentity,8,s_manufacturer,manufacturerLength);
|
||||
AOSS_81401E80(messageIdentity,8,s_manufacturer,manufacturerLength);
|
||||
receivedLength = SOHtoNs(1);
|
||||
packetWords->initialLength = receivedLength;
|
||||
packetWords->initialType = 0;
|
||||
@@ -1206,7 +1206,7 @@ wait_for_packet:
|
||||
memset(s_accessPointConfig,0,0x58);
|
||||
initialWait = waitIntervals.limits.connection;
|
||||
for (waitAttempt = 0; waitAttempt < (short)initialWait; waitAttempt++) {
|
||||
state = AOSSConnectAndAwaitHost(&settings,s_accessPointConfig);
|
||||
state = AOSS_814020CC(&settings,s_accessPointConfig);
|
||||
if (state == -1) {
|
||||
input->status = 0xf;
|
||||
if (s_accessPointConfig) {
|
||||
@@ -1611,7 +1611,7 @@ int AOSS_814001B4(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
(*count)++;
|
||||
return state;
|
||||
}
|
||||
if (AOSSDecryptMessage((AOSSDecryptionMessage*)&packet->message) > 0) {
|
||||
if (AOSS_81400830((AOSSDecryptionMessage*)&packet->message) > 0) {
|
||||
(*count)++;
|
||||
return state;
|
||||
}
|
||||
@@ -1652,7 +1652,7 @@ int AOSS_814002F0(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
manufacturerLength = strlen(s_manufacturer);
|
||||
reply = &packet->message.payload.reply;
|
||||
requestRecord = &request->records[0];
|
||||
AOSSXorBufferWithKey(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
AOSS_81401E80(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
compareResult = memcmp(requestRecord->address, packet->message.payload.manufacturerAddress, 6);
|
||||
if (compareResult != 0) {
|
||||
validationResult = -1;
|
||||
@@ -1724,7 +1724,7 @@ int AOSS_814004D0(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
operationResult = 0;
|
||||
reply = &packet->message.payload.reply;
|
||||
manufacturerLength = strlen(s_manufacturer);
|
||||
AOSSXorBufferWithKey(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
AOSS_81401E80(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
compareResult = memcmp(request->records[1].address,
|
||||
packet->message.payload.manufacturerAddress, 6);
|
||||
if (compareResult != 0) {
|
||||
@@ -1788,7 +1788,7 @@ int AOSS_814006A4(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
|
||||
errorCode = 0;
|
||||
manufacturerLength = strlen(s_manufacturer);
|
||||
AOSSXorBufferWithKey(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
AOSS_81401E80(&packet->message.payload.manufacturerAddress, 8, s_manufacturer, manufacturerLength);
|
||||
compareResult = memcmp(request->records[2].address,
|
||||
packet->message.payload.manufacturerAddress, 6);
|
||||
if (compareResult != 0) {
|
||||
@@ -1828,7 +1828,7 @@ int AOSS_814006A4(int state, AOSSReceiveBuffer* packet, int* count, AOSSRequestR
|
||||
return result;
|
||||
}
|
||||
|
||||
int AOSSDecryptMessage(AOSSDecryptionMessage* message) {
|
||||
int AOSS_81400830(AOSSDecryptionMessage* message) {
|
||||
u32 checksum;
|
||||
u8 manufacturerAddress[8];
|
||||
AOSSKeySchedule schedule;
|
||||
@@ -1850,7 +1850,7 @@ int AOSSDecryptMessage(AOSSDecryptionMessage* message) {
|
||||
int result;
|
||||
|
||||
memcpy(manufacturerAddress, message->manufacturerAddress, sizeof(manufacturerAddress));
|
||||
result = AOSSXorBufferWithKey(manufacturerAddress, sizeof(manufacturerAddress), s_manufacturer,
|
||||
result = AOSS_81401E80(manufacturerAddress, sizeof(manufacturerAddress), s_manufacturer,
|
||||
strlen(s_manufacturer));
|
||||
if (result == -1) {
|
||||
s_errorCode = 2;
|
||||
@@ -1886,7 +1886,7 @@ int AOSSDecryptMessage(AOSSDecryptionMessage* message) {
|
||||
} else {
|
||||
memcpy(s_packetState.keyNonce, &encrypted->keyNonce, sizeof(encrypted->keyNonce));
|
||||
memcpy(s_packetState.keyAddress, s_accessPointName, sizeof(s_accessPointName));
|
||||
AOSSInitKeySchedule(&schedule, s_packetState.keyNonce,
|
||||
AOSS_81401C9C(&schedule, s_packetState.keyNonce,
|
||||
sizeof(s_packetState.keyNonce) + sizeof(s_packetState.keyAddress), dataLength);
|
||||
|
||||
outputCursor = decryptedData;
|
||||
@@ -1906,7 +1906,7 @@ int AOSSDecryptMessage(AOSSDecryptionMessage* message) {
|
||||
}
|
||||
|
||||
crc = 0xffffffff;
|
||||
AOSSInitCrc32Table(0, s_crcTable);
|
||||
AOSS_81401DC0(0, s_crcTable);
|
||||
for (crcIndex = 0; crcIndex < (s32)dataLength; crcIndex++) {
|
||||
crc = (crc >> 8) ^ s_crcTable[(crc ^ decryptedData[crcIndex]) & 0xff];
|
||||
}
|
||||
@@ -2257,7 +2257,7 @@ int AOSS_81401574(void* packet, AOSSRequestRecords* request, int socket) {
|
||||
responsePayload = response->payload;
|
||||
memcpy(s_accessPointName, &request->records[0], 8);
|
||||
memcpy(accessPointName, s_accessPointName, 8);
|
||||
recordLength = AOSSBuildInterfaceOption(&requestRecord->record);
|
||||
recordLength = AOSS_81401BBC(&requestRecord->record);
|
||||
if (recordLength < 0) {
|
||||
s_errorCode = 3;
|
||||
if (requestRecord != 0) {
|
||||
@@ -2269,7 +2269,7 @@ int AOSS_81401574(void* packet, AOSSRequestRecords* request, int socket) {
|
||||
requestRecord->length = SOHtoNs(recordLength);
|
||||
requestLength = recordLength + 4;
|
||||
memcpy(responsePayload, requestRecord, requestLength);
|
||||
encryptionResult = AOSSXorBufferWithKey(accessPointName, 8, s_manufacturer, 6);
|
||||
encryptionResult = AOSS_81401E80(accessPointName, 8, s_manufacturer, 6);
|
||||
if (encryptionResult != 0) {
|
||||
s_errorCode = 2;
|
||||
if (requestRecord != 0) {
|
||||
@@ -2343,7 +2343,7 @@ int AOSS_81401778(void* packet, void* request, int socket) {
|
||||
const u32* crcTable;
|
||||
sequence = 1;
|
||||
checksum = 0xffffffff;
|
||||
AOSSInitCrc32Table(0, s_crcTable);
|
||||
AOSS_81401DC0(0, s_crcTable);
|
||||
crcTable = s_crcTable;
|
||||
{
|
||||
u32 part;
|
||||
@@ -2361,7 +2361,7 @@ int AOSS_81401778(void* packet, void* request, int socket) {
|
||||
memcpy(&payload->encrypted.key.nonce, &nonce, 2);
|
||||
memcpy(s_packetState.keyNonce, payload->encrypted.key.nonceBytes, 2);
|
||||
memcpy(s_packetState.keyAddress, s_accessPointName, 8);
|
||||
AOSSInitKeySchedule(&construction.schedule, s_packetState.keyNonce,
|
||||
AOSS_81401C9C(&construction.schedule, s_packetState.keyNonce,
|
||||
sizeof(s_packetState.keyNonce) + sizeof(s_packetState.keyAddress), 8);
|
||||
for (index = 0; index < 8; index++) {
|
||||
state = construction.schedule.bytes;
|
||||
@@ -2386,7 +2386,7 @@ int AOSS_81401778(void* packet, void* request, int socket) {
|
||||
}
|
||||
|
||||
memcpy(construction.accessPointName, &requestRecords->records[1], 8);
|
||||
encryptionResult = AOSSXorBufferWithKey(construction.accessPointName, 8, s_manufacturer, 6);
|
||||
encryptionResult = AOSS_81401E80(construction.accessPointName, 8, s_manufacturer, 6);
|
||||
if (encryptionResult != 0) {
|
||||
s_errorCode = 2;
|
||||
return -1;
|
||||
@@ -2415,7 +2415,7 @@ int AOSS_81401778(void* packet, void* request, int socket) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
s16 AOSSBuildInterfaceOption(void* buffer) {
|
||||
s16 AOSS_81401BBC(void* buffer) {
|
||||
AOSSOptionRecord* record = (AOSSOptionRecord*)buffer;
|
||||
u32 optionValue;
|
||||
s16 dataLength;
|
||||
@@ -2439,7 +2439,7 @@ s16 AOSSBuildInterfaceOption(void* buffer) {
|
||||
return (s16)(dataLength + 10);
|
||||
}
|
||||
|
||||
void AOSSInitKeySchedule(AOSSKeySchedule* schedule, const u8* key, u32 keyLength, u32 stateLength) {
|
||||
void AOSS_81401C9C(AOSSKeySchedule* schedule, const u8* key, u32 keyLength, u32 stateLength) {
|
||||
u32 index = 0;
|
||||
u32 keyIndex;
|
||||
u32 swapIndex;
|
||||
@@ -2471,7 +2471,7 @@ void AOSSInitKeySchedule(AOSSKeySchedule* schedule, const u8* key, u32 keyLength
|
||||
}
|
||||
}
|
||||
|
||||
void AOSSInitCrc32Table(u32 seed, u32* table) {
|
||||
void AOSS_81401DC0(u32 seed, u32* table) {
|
||||
u32 index;
|
||||
u32 value;
|
||||
|
||||
@@ -2488,7 +2488,7 @@ void AOSSInitCrc32Table(u32 seed, u32* table) {
|
||||
}
|
||||
}
|
||||
|
||||
int AOSSXorBufferWithKey(void* packet, s32 length, char* key, int keyLength) {
|
||||
int AOSS_81401E80(void* packet, s32 length, char* key, int keyLength) {
|
||||
u8* temporaryHalf;
|
||||
s32 halfLength = length / 2;
|
||||
u8* packetHalf;
|
||||
@@ -2542,7 +2542,7 @@ int AOSSXorBufferWithKey(void* packet, s32 length, char* key, int keyLength) {
|
||||
return result;
|
||||
}
|
||||
|
||||
int AOSSConnectAndAwaitHost(void* settings, void* config) {
|
||||
int AOSS_814020CC(void* settings, void* config) {
|
||||
s32 connectionAttempts = 0;
|
||||
u32 ticksPerMillisecond;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user