git subrepo clone --branch=develop https://github.com/m4xw/emuMMC emummc
subrepo: subdir: "emummc" merged: "e72e8f1c" upstream: origin: "https://github.com/m4xw/emuMMC" branch: "develop" commit: "e72e8f1c" git-subrepo: version: "0.4.0" origin: "https://github.com/ingydotnet/git-subrepo" commit: "5d6aba9"
This commit is contained in:
36
emummc/tools/fs_ida_nintendo_folder_xref_formatter.au3
Normal file
36
emummc/tools/fs_ida_nintendo_folder_xref_formatter.au3
Normal file
@@ -0,0 +1,36 @@
|
||||
ParseClipboard()
|
||||
|
||||
Func FormatLineData($sLineData)
|
||||
Local $lineData = StringReplace($sLineData, @TAB, " ")
|
||||
Local $isADRP = false
|
||||
$lineData = StringReplace($lineData, "Up o sub_71000" , "0x")
|
||||
$isADRP = StringInStr($lineData, "ADRP")
|
||||
|
||||
Local $targetRegister = StringSplit(StringSplit($lineData, "X")[2], ",")[1]
|
||||
$lineData = StringSplit($lineData, " ")[1]
|
||||
$lineDataAddr = StringSplit($lineData, "+")[1]
|
||||
$lineDataAddition = StringSplit($lineData, "+")[2]
|
||||
|
||||
$lineDataAddr = StringReplace($lineDataAddr, "0x" , "")
|
||||
$lineDataAddition = StringReplace($lineDataAddition, "0x" , "")
|
||||
|
||||
If $isADRP Then
|
||||
$lineData = "0x" & Hex(Dec($lineDataAddr) + Dec($lineDataAddition))
|
||||
Else
|
||||
Return ""
|
||||
EndIf
|
||||
|
||||
Return "{.opcode_reg = " & $targetRegister & ", .adrp_offset = " & $lineData & "}, \" & @LF
|
||||
EndFunc
|
||||
|
||||
Func ParseClipboard()
|
||||
Local $sData = ClipGet()
|
||||
Local $oData = ""
|
||||
Local $sLineData = StringSplit(StringReplace($sData, @CRLF, @LF), @LF)
|
||||
For $i = 2 to UBound($sLineData) - 2
|
||||
Local $lineData = FormatLineData($sLineData[$i])
|
||||
;ConsoleWrite($lineData)
|
||||
$oData = $oData & $lineData
|
||||
Next
|
||||
ClipPut($oData)
|
||||
EndFunc
|
||||
Reference in New Issue
Block a user