I've done some RE on pspnet.prx (3.52) and i've discovered some interesting things. The first file I analysed was the "wlanscan" PSPSDK example. Then I've reversed the sceNetConfigUpInterface (also sceNet_lib_5216CBF5) function. In this function there are 2 IoCtls.
First the function saves the first argument $a0 (normally it's the string "wlan") to $s0. Then using memset it fills with 0 32 bytes from $a0 (so $a0 = 32 bytes). Using strncpy it inserts $s0 into the stack. then it does the first ioctl:
Code: Select all
a0 = 0 -> File Descriptor
a1 = (0xC020 << 16) | 0x6911 = 0xC0206911 -> Command
a2 = $sp -> Arguments (in the stack, with strncpy, the function saved the first argument, normally "wlan")
Code: Select all
a0 = 0 -> File Descriptor
a1 = (0x8020 << 16) | 0x6910 = 0x80206910 -> Command
a2 = $sp -> Arguments (normally "wlan")
a3 = 1
what do you think?
ab5000.