📄 main.cod
字号:
000d0 00000000 DCD |??_C@_0CL@KAFGOLIN@?$FL?$CFd?$FN?3?5Address?$DN0x?$CFx?5?5Length?$DN0x?$CFx?5@|
000d4 00000000 DCD |??_C@_0FC@PGPOMBFM@?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9?9@|
000d8 00000000 DCD |??_C@_0BP@BJOMPMIH@?$AN?6Download?5file?5information?3?$AN?6?$AA@|
000dc |$M45178|
ENDP ; |OEMDownloadFileNotify|
EXPORT |OEMPreDownload|
EXPORT |??_C@_1DC@KPAFGCMK@?$AAO?$AAE?$AAM?$AAP?$AAr?$AAe?$AAD?$AAo?$AAw?$AAn?$AAl?$AAo?$AAa?$AAd?$AA?5?$AAB?$AAL?$AA_?$AAJ?$AAU@| [ DATA ] ; `string'
EXPORT |??_C@_0BM@CPIMFCIL@OEMPreDownload?5Init?5ERROR?$AN?6?$AA@| [ DATA ] ; `string'
IMPORT |memset|
IMPORT |NKDbgPrintfW|
IMPORT |DL_Init|
00010 AREA |.bss|, NOINIT
|g_EbootCFG| % 0x3c
00000 AREA |.text| { |OEMPreDownload| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMPreDownload|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMPreDownload| } ; comdat associative
|$T45191| DCD |$L45190|
DCD 0x40002001
00000 AREA |.rdata| { |??_C@_0BM@CPIMFCIL@OEMPreDownload?5Init?5ERROR?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BM@CPIMFCIL@OEMPreDownload?5Init?5ERROR?$AN?6?$AA@| DCB "OEMPreDo"
DCB "wnload Init ERROR", 0xd, 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_1DC@KPAFGCMK@?$AAO?$AAE?$AAM?$AAP?$AAr?$AAe?$AAD?$AAo?$AAw?$AAn?$AAl?$AAo?$AAa?$AAd?$AA?5?$AAB?$AAL?$AA_?$AAJ?$AAU@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1DC@KPAFGCMK@?$AAO?$AAE?$AAM?$AAP?$AAr?$AAe?$AAD?$AAo?$AAw?$AAn?$AAl?$AAo?$AAa?$AAd?$AA?5?$AAB?$AAL?$AA_?$AAJ?$AAU@| DCB "O"
DCB 0x0, "E", 0x0, "M", 0x0, "P", 0x0, "r", 0x0, "e", 0x0, "D"
DCB 0x0, "o", 0x0, "w", 0x0, "n", 0x0, "l", 0x0, "o", 0x0, "a"
DCB 0x0, "d", 0x0, " ", 0x0, "B", 0x0, "L", 0x0, "_", 0x0, "J"
DCB 0x0, "U", 0x0, "M", 0x0, "P", 0x0, 0xd, 0x0, 0xa, 0x0, 0x0
DCB 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMPreDownload| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMPreDownload| PROC
; 898 : {
00000 |$L45190|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M45188|
; 899 : UINT32 DHCPLeaseTime = 0;
; 900 : UINT32 *pDHCPLeaseTime = &DHCPLeaseTime;
; 901 : UINT32 BootFlags = 0;
; 902 :
; 903 : // Create device name based on Ethernet address (this is how Platform Builder identifies this device).
; 904 : //
; 905 : // OALKitlCreateName(BSP_DEVICE_PREFIX, g_pBSPArgs->kitl.mac, g_pBSPArgs->deviceId);
; 906 : // EdbgOutputDebugString("INFO: Using device name: '%s'\n", g_pBSPArgs->deviceId);
; 907 :
; 908 :
; 909 : if (!g_DownloadImage)
00004 e59f3070 ldr r3, [pc, #0x70]
00008 e5d33000 ldrb r3, [r3]
0000c e3530000 cmp r3, #0
00010 1a000004 bne |$L44553|
; 910 : {
; 911 : RETAILMSG(1, (TEXT("OEMPreDownload BL_JUMP\r\n")));
00014 e59f005c ldr r0, [pc, #0x5C]
00018 eb000000 bl NKDbgPrintfW
; 912 : return(BL_JUMP);
0001c e3a00001 mov r0, #1
; 922 : }
00020 e49de004 ldr lr, [sp], #4
00024 e12fff1e bx lr
00028 |$L44553|
; 913 : }
; 914 :
; 915 : memset((BYTE*)0x80100000, 0xff, 0x3000000);
00028 e3a00102 mov r0, #2, 2
0002c e3800601 orr r0, r0, #1, 12
00030 e3a02403 mov r2, #3, 8
00034 e3a010ff mov r1, #0xFF
00038 eb000000 bl memset
; 916 : if(DL_Init(g_EbootCFG.DownloadMode) == FALSE)
0003c e59f3030 ldr r3, [pc, #0x30]
00040 e5930038 ldr r0, [r3, #0x38]
00044 eb000000 bl DL_Init
00048 e3500000 cmp r0, #0
0004c 1a000004 bne |$L44556|
; 917 : {
; 918 : EdbgOutputDebugString("OEMPreDownload Init ERROR\r\n");
00050 e59f0018 ldr r0, [pc, #0x18]
00054 eb000000 bl EdbgOutputDebugString
; 919 : return BL_ERROR;
00058 e3e00000 mvn r0, #0
; 922 : }
0005c e49de004 ldr lr, [sp], #4
00060 e12fff1e bx lr
00064 |$L44556|
; 920 : }
; 921 : return BL_DOWNLOAD;
00064 e3a00000 mov r0, #0
; 922 : }
00068 e49de004 ldr lr, [sp], #4
0006c e12fff1e bx lr
00070 |$L45193|
00070 00000000 DCD |??_C@_0BM@CPIMFCIL@OEMPreDownload?5Init?5ERROR?$AN?6?$AA@|
00074 00000000 DCD |g_EbootCFG|
00078 00000000 DCD |??_C@_1DC@KPAFGCMK@?$AAO?$AAE?$AAM?$AAP?$AAr?$AAe?$AAD?$AAo?$AAw?$AAn?$AAl?$AAo?$AAa?$AAd?$AA?5?$AAB?$AAL?$AA_?$AAJ?$AAU@|
0007c 00000000 DCD |g_DownloadImage|
00080 |$M45189|
ENDP ; |OEMPreDownload|
EXPORT |MyAlloc|
EXPORT |??_C@_0BH@CPJLNEAN@pTOC?9?$DOulRAMEnd?5?$DN?5?$CFX?4?$AN?6?$AA@| [ DATA ] ; `string'
IMPORT |pTOC|
00000 AREA |.text| { |MyAlloc| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$MyAlloc|, PDATA, SELECTION=5, ASSOC=|.text| { |MyAlloc| } ; comdat associative
|$T45203| DCD |$L45202|
DCD 0x40001a01
00000 AREA |.rdata| { |??_C@_0BH@CPJLNEAN@pTOC?9?$DOulRAMEnd?5?$DN?5?$CFX?4?$AN?6?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0BH@CPJLNEAN@pTOC?9?$DOulRAMEnd?5?$DN?5?$CFX?4?$AN?6?$AA@| DCB "pT"
DCB "OC->ulRAMEnd = %X.", 0xd, 0xa, 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |MyAlloc| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |MyAlloc| PROC
; 957 : {
00000 |$L45202|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M45200|
; 958 : static DWORD dwCurRAMBase = 0;
; 959 : LPVOID pAllocBase = NULL;
; 960 :
; 961 : // initialize the current allocation base if necessary
; 962 : if (dwCurRAMBase == 0)
00004 e59f0058 ldr r0, [pc, #0x58]
00008 e59fe050 ldr lr, [pc, #0x50]
0000c e3a04000 mov r4, #0
00010 e5902000 ldr r2, [r0]
00014 e3520000 cmp r2, #0
; 963 : {
; 964 : dwCurRAMBase = pTOC->ulRAMFree;
00018 059e3000 ldreq r3, [lr]
0001c 05932018 ldreq r2, [r3, #0x18]
; 965 : }
; 966 :
; 967 : // if there is enough free RAM, perform the allocation
; 968 : if ((pTOC->ulRAMEnd - dwCurRAMBase) > dwAllocSize)
00020 e59e3000 ldr r3, [lr]
00024 05802000 streq r2, [r0]
00028 e593301c ldr r3, [r3, #0x1C]
0002c e0433002 sub r3, r3, r2
00030 e1530001 cmp r3, r1
; 969 : {
; 970 : pAllocBase = (LPVOID) dwCurRAMBase;
; 971 : dwCurRAMBase += dwAllocSize;
00034 80823001 addhi r3, r2, r1
00038 85803000 strhi r3, [r0]
; 972 : }
; 973 : EdbgOutputDebugString("pTOC->ulRAMEnd = %X.\r\n", pTOC->ulRAMEnd);
0003c e59e3000 ldr r3, [lr]
00040 e59f0014 ldr r0, [pc, #0x14]
00044 81a04002 movhi r4, r2
00048 e593101c ldr r1, [r3, #0x1C]
0004c eb000000 bl EdbgOutputDebugString
; 974 :
; 975 : return pAllocBase;
00050 e1a00004 mov r0, r4
; 976 : }
00054 e8bd4010 ldmia sp!, {r4, lr}
00058 e12fff1e bx lr
0005c |$L45205|
0005c 00000000 DCD |??_C@_0BH@CPJLNEAN@pTOC?9?$DOulRAMEnd?5?$DN?5?$CFX?4?$AN?6?$AA@|
00060 00000000 DCD |pTOC|
00064 00000000 DCD |?dwCurRAMBase@?1??MyAlloc@@9@9|
00068 |$M45201|
ENDP ; |MyAlloc|
EXPORT |InitDecompressor|
IMPORT |BP_ReadData|
IMPORT |BP_SetDataPointer|
IMPORT |CeCompressDecodeCreate|
00000 AREA |.text| { |InitDecompressor| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$InitDecompressor|, PDATA, SELECTION=5, ASSOC=|.text| { |InitDecompressor| } ; comdat associative
|$T45216| DCD |$L45215|
DCD 0x40002201
; Function compile flags: /Ogsy
00000 AREA |.text| { |InitDecompressor| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |InitDecompressor| PROC
; 979 : {
00000 |$L45215|
00000 e92d4070 stmdb sp!, {r4 - r6, lr}
00004 |$M45213|
00004 e1a06001 mov r6, r1
00008 e1a05000 mov r5, r0
; 980 : // Allocate space for the compression header
; 981 : g_CompressionHeader = (PCOMPRESSED_RAMIMAGE_HEADER) MyAlloc(NULL, dwHeaderSize);
0000c e3a00000 mov r0, #0
00010 eb000000 bl MyAlloc
00014 e59f4068 ldr r4, [pc, #0x68]
00018 e3500000 cmp r0, #0
0001c e5840004 str r0, [r4, #4]
; 982 : if (g_CompressionHeader == NULL)
; 983 : {
; 984 : return(FALSE);
00020 0a000010 beq |$L45212|
; 985 : }
; 986 :
; 987 : // read the entire compression header into memory
; 988 : if (!BP_SetDataPointer(hPartition, 0))
00024 e3a01000 mov r1, #0
00028 e1a00005 mov r0, r5
0002c eb000000 bl BP_SetDataPointer
00030 e3500000 cmp r0, #0
; 989 : {
; 990 : return(FALSE);
00034 0a00000b beq |$L45212|
; 991 : }
; 992 :
; 993 : if (!BP_ReadData(hPartition, (LPVOID) g_CompressionHeader, dwHeaderSize))
00038 e5941004 ldr r1, [r4, #4]
0003c e1a02006 mov r2, r6
00040 e1a00005 mov r0, r5
00044 eb000000 bl BP_ReadData
00048 e3500000 cmp r0, #0
; 994 : {
; 995 : return(FALSE);
0004c e3a00000 mov r0, #0
00050 0a000008 beq |$L44595|
; 996 : }
; 997 :
; 998 : // now create a decode stream
; 999 : g_DecodeStream = CeCompressDecodeCreate(NULL, MyAlloc);
00054 e59f1024 ldr r1, [pc, #0x24]
00058 eb000000 bl CeCompressDecodeCreate
0005c e3500000 cmp r0, #0
00060 e5840000 str r0, [r4]
; 1000 : if (g_DecodeStream == NULL)
00064 1a000002 bne |$L44605|
00068 |$L45212|
; 1001 : {
; 1002 : return(FALSE);
00068 e3a00000 mov r0, #0
; 1006 : }
0006c e8bd4070 ldmia sp!, {r4 - r6, lr}
00070 e12fff1e bx lr
00074 |$L44605|
; 1003 : }
; 1004 :
; 1005 : return(TRUE);
00074 e3a00001 mov r0, #1
00078 |$L44595|
; 1006 : }
00078 e8bd4070 ldmia sp!, {r4 - r6, lr}
0007c e12fff1e bx lr
00080 |$L45218|
00080 00000000 DCD |MyAlloc|
00084 00000000 DCD |g_DecodeStream|
00088 |$M45214|
ENDP ; |InitDecompressor|
IMPORT |__security_cookie|
IMPORT |__security_check_cookie|
IMPORT |memcpy|
IMPORT |CeCompressDecode|
00000 AREA |.text| { |GetImageInfo| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$GetImageInfo|, PDATA, SELECTION=5, ASSOC=|.text| { |GetImageInfo| } ; comdat associative
|$T45236| DCD |$L45235|
DCD 0x40005d02
; Function compile flags: /Ogsy
00000 AREA |.text| { |GetImageInfo| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |GetImageInfo| PROC
; 1018 : {
00000 |$L45235|
00000 e92d40f0 stmdb sp!, {r4 - r7, lr}
00004 e24dd058 sub sp, sp, #0x58
00008 |$M45233|
00008 e1a05001 mov r5, r1
0000c e1a04000 mov r4, r0
00010 e59f3158 ldr r3, [pc, #0x158]
00014 e5933000 ldr r3, [r3]
00018 e58d3054 str r3, [sp, #0x54]
; 1019 : BYTE SectorData[PARTITION_HEADER_BYTES];
; 1020 : PCOMPRESSED_RAMIMAGE_HEADER pCompHeader = NULL;
; 1021 : DWORD dwTocLoc = 0, dwTocOffset = 0, dwBytesRead = 0;
; 1022 : WORD wBlockSize = 0;
; 1023 :
; 1024 : if (hPartition == INVALID_HANDLE_VALUE || ulImageStartAddr == NULL)
0001c e3740001 cmn r4, #1
00020 0a000048 beq |$L44623|
00024 e3550000 cmp r5, #0
00028 0a000046 beq |$L44623|
; 1027 : }
; 1028 :
; 1029 : // set the pointer to the beginning of the partition
; 1030 : if (!BP_SetDataPointer(hPartition, 0))
0002c e3a01000 mov r1, #0
00030 eb000000 bl BP_SetDataPointer
00034 e3500000 cmp r0, #0
; 1031 : {
; 1032 : return(FALSE);
00038 0a000042 beq |$L44623|
; 1033 : }
; 1034 :
; 1035 : // read the first page
; 1036 : if (!BP_ReadData(hPartition, SectorData, PARTITION_HEADER_BYTES))
0003c e3a0204c mov r2, #0x4C
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -