No SSL [Fix94]
No SSL [Fix94]

This code will work on ALL Wii Games, not just MKWii.

This code changes any instance of https to http on the url writes of your game. This is a good code for users of DWC-Emulator servers. You can use this code instead of configuring the Private Server NoSSL option within USB Loader GX. 

C0000000 0000000E
3C004E80 60000020
900F0000 3D808000
618C3000 3C00017F
6000CFFC 7C0903A6
3D607474 616B7073
800C0000 7C005800
40A20034 394C0003
392C0002 7D455378
38600000 8C050001
2C000000 38630001
4082FFF4 8C0A0001
9C090001 3463FFFF
4082FFF4 398C0001
4200FFC0 4E800020


#Statements & Variables
.set asc_ii, 0x74747073 #The 'ttps' in https://

#Overwrite Code Handler Start Line
lis r0, 0x4E80 #This will make sure the code only executes once
ori r0, r0, 0x0020
stw r0, 0x0 (r15)

#Set Start Address
lis r12, 0x8000
ori r12, r12, 0x3000

#Set Countdown Register
lis r0, 0x017F #0x817FFFFC - 0x80003000 = 0x17FCFFC
ori r0, r0, 0xCFFC
mtctr r0

lis r11, asc_ii@h
ori r11, r11, asc_ii@l

#Main/Root Loop
lwz r0, 0x0 (r12)
cmpw r0, r11
bne+ not_found

#HandWritten Memmove
#r9 = Destination
#r10 = Source
#r3 = Length of String to be Moved
addi r10, r12, 3 #This will start at the s in https://
addi r9, r12, 2 #This will start at the p in https://
mr r5, r10

#Pre Subroutine Loop Config
#This will tell us the result for Memmove's r5 arg
li r3, 0

lbzu r0, 0x1 (r5)
cmpwi r0, 0
addi r3, r3, 1 #Increment r3 by 1 everytime is non-null byte is read, once a null byte is read, r3 will hold the correct string amount for memmove's 3rd argument
bne+ the_loop

#Call HandWritten Memmove Function
lbzu r0, 0x1 (r10)
stbu r0, 0x1 (r9)
subic. r3, r3, 1
bne+ another_loop

#Not_Found Label, 2nd Part of Main/Root Loop
addi r12, r12, 1
bdnz+ root_loop

#blr #Uncomment if not compiling with pyii


Code creator: Fix94
Code credits: Vega (all new source)
Bump. Went ahead and wrote my own source from scratch considering the original version had redundant instructions and had to have an F0 line at the end.

Forum Jump:

Users browsing this thread: 1 Guest(s)