Inital commit

This commit is contained in:
Liliesh 2024-11-02 11:26:29 +01:00
commit f20bcac9a9
Signed by: liliesh
GPG key ID: 680387646C7BAE8E
4 changed files with 44 additions and 0 deletions

19
X570PG4/docs.adoc Normal file
View file

@ -0,0 +1,19 @@
= Reversing of the AsRock X570 Phantom Gaming 4 firmware image
== Steps
1. download fw
2. binwalk
== Mappings
=== 4456808
Compressed lzma
Contains boot images
|===
| Start, Length, Type, Description
| 4456808, 15525, LZMA Archive, Boot splash images
|===
4456808 = lzma = jpg images
4591952 = lzma = windows pe binaries - unknown usage
4633968 = lzma = win-pe bins, aes-s box

2
X570PG4/download_fw.sh Executable file
View file

@ -0,0 +1,2 @@
wget "https://download.asrock.com/BIOS/AM4/X570%20Phantom%20Gaming%204(5.60)ROM.zip" -O ASX570FW.zip
7z x ASX570FW.zip

16
X570PG4/extract.sh Normal file
View file

@ -0,0 +1,16 @@
mkdir sections
# Section 4456808
echo "Extracting 4456808"
mkdir sections/4456808
dd if=X570PG45.60 skip=4456808 bs=1 count=15525 of=sections/4456808/image.lzma
unlzma sections/4456808/image.lzma
dd if=sections/4456808/image skip=4 bs=1 count=12196 of=sections/4456808/4.jpeg
dd if=sections/4456808/image skip=12204 bs=1 count=5601 of=sections/4456808/12204.jpeg
# Section 4591952
echo "Extracting 4591952"
mkdir sections/4591952
dd if=X570PG45.60 skip=4591952 bs=1 count=41951 of=sections/4591952/image.lzma
unlzma sections/4591952/image.lzma
dd if=sections/4591952/image skip=204 bs=1 count=2020 of=sections/4591952/204.bin