⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tstril.asm

📁 The Radio Interface Layer is the name for an interface that was developed especially for the Pocket
💻 ASM
📖 第 1 页 / 共 5 页
字号:
	TTL	C:\bins\tstril\tstril.cpp

	AREA	|.drectve|, DRECTVE
	DCB	"-defaultlib:coredll.lib "
	DCB	"-defaultlib:corelibc.lib "

	EXPORT	|?g_hInst@@3PAUHINSTANCE__@@A| [ DATA ]	; g_hInst
	EXPORT	|?g_hwndCB@@3PAUHWND__@@A| [ DATA ]	; g_hwndCB
	EXPORT	|?g_hwndEdit@@3PAUHWND__@@A| [ DATA ]	; g_hwndEdit
	EXPORT	|?g_hRil@@3KA| [ DATA ]			; g_hRil
	EXPORT	|?g_dwParam@@3KA| [ DATA ]		; g_dwParam

	AREA	|.bss|, NOINIT
|?g_hInst@@3PAUHINSTANCE__@@A| % 0x4			; g_hInst
|?g_hwndCB@@3PAUHWND__@@A| % 0x4			; g_hwndCB
|?g_hwndEdit@@3PAUHWND__@@A| % 0x4			; g_hwndEdit
|?g_hRil@@3KA| % 0x4					; g_hRil

	AREA	|.data|, DATA
|?g_dwParam@@3KA| DCD 0x55aa55aa			; g_dwParam
	EXPORT	|?hexdump@@YAPAGPAEH@Z|			; hexdump
	IMPORT	|_snwprintf|

	AREA	|.bss|, NOINIT
|?buf@?1??hexdump@@YAPAGPAEH@Z@4PAGA| % 0x7d0		; buf

	AREA	|.pdata|, PDATA
|$T27490| DCD	|?hexdump@@YAPAGPAEH@Z|
	DCD	0x40001f04

	AREA	|.data|, DATA
|$SG27199| DCB	" ", 0x0, "%", 0x0, "0", 0x0, "2", 0x0, "x", 0x0, 0x0, 0x0
; File C:\bins\tstril\tstril.cpp

	AREA	|.text|, CODE

|?hexdump@@YAPAGPAEH@Z| PROC				; hexdump

; 33   : {

	mov       r12, sp
	stmdb     sp!, {r0, r1}  ; stmfd
	stmdb     sp!, {r12, lr}  ; stmfd
	sub       sp, sp, #4
|$M27488|

; 34   :     static TCHAR buf[1000];
; 35   :     TCHAR *p;
; 36   :     p=buf;

	ldr       r3, [pc, #0x54]  ;  pc+8+84 = 0000006C
	str       r3, [sp]
|$L27197|

; 37   :     while (n--)

	ldr       r2, [sp, #0x10]  ; 0x10 = 16
	cmp       r2, #0
	ldr       r1, [sp, #0x10]  ; 0x10 = 16
	sub       r0, r1, #1
	str       r0, [sp, #0x10]  ; 0x10 = 16
	beq       |$L27198|  ; 00000070

; 38   :     {
; 39   :         p += _sntprintf(p, 4, TEXT(" %02x"), *data++);

	ldr       lr, [sp, #0xC]  ; 0xC = 12
	ldrb      r3, [lr]
	ldr       r2, [pc, #0x28]  ;  pc+8+40 = 00000068
	mov       r1, #4
	ldr       r0, [sp]
	ldr       lr, [sp, #0xC]  ; 0xC = 12
	add       lr, lr, #1
	str       lr, [sp, #0xC]  ; 0xC = 12
	bl        _snwprintf  ; 00000058
	mov       r3, r0, lsl #1
	ldr       r2, [sp]
	add       r1, r2, r3
	str       r1, [sp]

; 40   :     }

	b         |$L27197|  ; 00000018
|$L27491|
	DCD       |$SG27199|
	DCD       |?buf@?1??hexdump@@YAPAGPAEH@Z@4PAGA|
|$L27198|

; 41   :     return buf;

	ldr       r0, [pc, #-0xC]  ;  pc+8-12 = 0000006C

; 42   : }

	add       sp, sp, #4
	ldmia     sp, {sp, pc}  ; ldmfd
|$M27489|

	ENDP  ; |?hexdump@@YAPAGPAEH@Z|, hexdump

	EXPORT	|?DoError@@YAXPAG@Z|			; DoError
	IMPORT	|GetLastError|
	IMPORT	|FormatMessageW|
	IMPORT	|MessageBoxW|
	IMPORT	|LocalFree|

	AREA	|.pdata|, PDATA
|$T27495| DCD	|?DoError@@YAXPAG@Z|
	DCD	0x40001a04

	AREA	|.text|, CODE

|?DoError@@YAXPAG@Z| PROC				; DoError

; 45   : {

	mov       r12, sp
	stmdb     sp!, {r0}  ; stmfd
	stmdb     sp!, {r12, lr}  ; stmfd
	sub       sp, sp, #0x14  ; 0x14 = 20
|$M27493|

; 46   :     TCHAR *msgbuf;
; 47   : 
; 48   :     int msglen= FormatMessage(
; 49   :             FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
; 50   :             NULL, GetLastError(), 0, (LPTSTR) &msgbuf, 0, NULL);

	bl        GetLastError  ; 00000094
	mov       r2, r0
	mov       r3, #0
	str       r3, [sp, #8]
	mov       r1, #0
	str       r1, [sp, #4]
	add       r0, sp, #0x10  ; 0x10 = 16
	str       r0, [sp]
	mov       r3, #0
	mov       r1, #0
	mov       r0, #0x13, 24  ; 0x1300 = 4864
	bl        FormatMessageW  ; 000000C0
	str       r0, [sp, #0xC]  ; 0xC = 12

; 51   : 
; 52   : 	MessageBox(NULL, msgbuf, where, MB_OK);

	mov       r3, #0
	ldr       r2, [sp, #0x1C]  ; 0x1C = 28
	ldr       r1, [sp, #0x10]  ; 0x10 = 16
	mov       r0, #0
	bl        MessageBoxW  ; 000000D8

; 53   :     LocalFree(msgbuf);

	ldr       r0, [sp, #0x10]  ; 0x10 = 16
	bl        LocalFree  ; 000000E0

; 54   : }

	add       sp, sp, #0x14  ; 0x14 = 20
	ldmia     sp, {sp, pc}  ; ldmfd
|$M27494|

	ENDP  ; |?DoError@@YAXPAG@Z|, DoError

	EXPORT	|?GetDateAndTime@@YAHPAU_SYSTEMTIME@@PAG1K@Z| ; GetDateAndTime
	IMPORT	|GetDateFormatW|
	IMPORT	|GetTimeFormatW|

	AREA	|.pdata|, PDATA
|$T27499| DCD	|?GetDateAndTime@@YAHPAU_SYSTEMTIME@@PAG1K@Z|
	DCD	0x40002704

	AREA	|.data|, DATA
|$SG27221| DCB	"G", 0x0, "e", 0x0, "t", 0x0, "D", 0x0, "a", 0x0, "t", 0x0
	DCB	"e", 0x0, "F", 0x0, "o", 0x0, "r", 0x0, "m", 0x0, "a", 0x0
	DCB	"t", 0x0, 0x0, 0x0
|$SG27231| DCB	"G", 0x0, "e", 0x0, "t", 0x0, "T", 0x0, "i", 0x0, "m", 0x0
	DCB	"e", 0x0, "F", 0x0, "o", 0x0, "r", 0x0, "m", 0x0, "a", 0x0
	DCB	"t", 0x0, 0x0, 0x0

	AREA	|.text|, CODE

|?GetDateAndTime@@YAHPAU_SYSTEMTIME@@PAG1K@Z| PROC	; GetDateAndTime

; 57   : {

	mov       r12, sp
	stmdb     sp!, {r0 - r3}  ; stmfd
	stmdb     sp!, {r12, lr}  ; stmfd
	sub       sp, sp, #8
|$M27497|

; 58   : 
; 59   : 	if (!GetDateFormat(LOCALE_NEUTRAL, DATE_SHORTDATE, st, NULL, szDate, dwSize)) {

	ldr       r3, [sp, #0x1C]  ; 0x1C = 28
	str       r3, [sp, #4]
	ldr       r2, [sp, #0x14]  ; 0x14 = 20
	str       r2, [sp]
	mov       r3, #0
	ldr       r2, [sp, #0x10]  ; 0x10 = 16
	mov       r1, #1
	mov       r0, #0
	bl        GetDateFormatW  ; 0000011C
	movs      r1, r0
	bne       |$L27220|  ; 00000134

; 60   : 		DoError(L"GetDateFormat");

	ldr       r0, [pc, #8]  ;  pc+8+8 = 00000130
	bl        |?DoError@@YAXPAG@Z|  ; 0000012C

; 61   : 		return FALSE;

	mov       r0, #0
	b         |$L27211|  ; 00000178
|$L27500|
	DCD       |$SG27221|
|$L27220|

; 62   : 	}
; 63   : 
; 64   : 	if (!GetTimeFormat(LOCALE_NEUTRAL, TIME_NOSECONDS, st, NULL, szTime, dwSize)) {

	ldr       r0, [sp, #0x1C]  ; 0x1C = 28
	str       r0, [sp, #4]
	ldr       lr, [sp, #0x18]  ; 0x18 = 24
	str       lr, [sp]
	mov       r3, #0
	ldr       r2, [sp, #0x10]  ; 0x10 = 16
	mov       r1, #2
	mov       r0, #0
	bl        GetTimeFormatW  ; 0000015C
	movs      r3, r0
	bne       |$L27230|  ; 00000174

; 65   : 		DoError(L"GetTimeFormat");

	ldr       r0, [pc, #8]  ;  pc+8+8 = 00000170
	bl        |?DoError@@YAXPAG@Z|  ; 0000016C

; 66   : 		return FALSE;

	mov       r0, #0
	b         |$L27211|  ; 00000178
|$L27501|
	DCD       |$SG27231|
|$L27230|

; 67   : 	}
; 68   : 
; 69   : 
; 70   : 	return TRUE;

	mov       r0, #1
|$L27211|

; 71   : }

	add       sp, sp, #8
	ldmia     sp, {sp, pc}  ; ldmfd
|$M27498|

	ENDP  ; |?GetDateAndTime@@YAHPAU_SYSTEMTIME@@PAG1K@Z|, GetDateAndTime

	EXPORT	|?DisplayDCS@@YAXPAURILMSGDCS@@@Z|	; DisplayDCS
	IMPORT	|wsprintfW|
	IMPORT	|SendMessageW|

	AREA	|.pdata|, PDATA
|$T27505| DCD	|?DisplayDCS@@YAXPAURILMSGDCS@@@Z|
	DCD	0x40007704

	AREA	|.data|, DATA
|$SG27236| DCB	" ", 0x0, " ", 0x0, " ", 0x0, " ", 0x0, "D", 0x0, "C", 0x0
	DCB	"S", 0x0, " ", 0x0, "c", 0x0, "b", 0x0, "S", 0x0, "i", 0x0
	DCB	"z", 0x0, "e", 0x0, ":", 0x0, " ", 0x0, "0", 0x0, "x", 0x0
	DCB	"%", 0x0, "0", 0x0, "x", 0x0, ",", 0x0, " ", 0x0, "%", 0x0
	DCB	"d", 0x0, 0x0, 0x0
|$SG27238| DCB	" ", 0x0, " ", 0x0, " ", 0x0, " ", 0x0, "D", 0x0, "C", 0x0
	DCB	"S", 0x0, " ", 0x0, "d", 0x0, "w", 0x0, "P", 0x0, "a", 0x0
	DCB	"r", 0x0, "a", 0x0, "m", 0x0, "s", 0x0, ":", 0x0, " ", 0x0
	DCB	"0", 0x0, "x", 0x0, "%", 0x0, "0", 0x0, "x", 0x0, ",", 0x0
	DCB	" ", 0x0, "%", 0x0, "d", 0x0, 0x0, 0x0
|$SG27240| DCB	" ", 0x0, " ", 0x0, " ", 0x0, " ", 0x0, "D", 0x0, "C", 0x0
	DCB	"S", 0x0, " ", 0x0, "d", 0x0, "w", 0x0, "T", 0x0, "y", 0x0
	DCB	"p", 0x0, "e", 0x0, ":", 0x0, " ", 0x0, "0", 0x0, "x", 0x0
	DCB	"%", 0x0, "0", 0x0, "x", 0x0, ",", 0x0, " ", 0x0, "%", 0x0
	DCB	"d", 0x0, 0x0, 0x0
|$SG27242| DCB	" ", 0x0, " ", 0x0, " ", 0x0, " ", 0x0, "D", 0x0, "C", 0x0
	DCB	"S", 0x0, " ", 0x0, "d", 0x0, "w", 0x0, "F", 0x0, "l", 0x0
	DCB	"a", 0x0, "g", 0x0, "s", 0x0, ":", 0x0, " ", 0x0, "0", 0x0
	DCB	"x", 0x0, "%", 0x0, "0", 0x0, "x", 0x0, ",", 0x0, " ", 0x0
	DCB	"%", 0x0, "d", 0x0, 0x0, 0x0
	%	2
|$SG27244| DCB	" ", 0x0, " ", 0x0, " ", 0x0, " ", 0x0, "D", 0x0, "C", 0x0
	DCB	"S", 0x0, " ", 0x0, "d", 0x0, "w", 0x0, "M", 0x0, "s", 0x0
	DCB	"g", 0x0, "C", 0x0, "l", 0x0, "a", 0x0, "s", 0x0, "s", 0x0
	DCB	":", 0x0, " ", 0x0, "0", 0x0, "x", 0x0, "%", 0x0, "0", 0x0
	DCB	"x", 0x0, ",", 0x0, " ", 0x0, "%", 0x0, "d", 0x0, 0x0, 0x0
|$SG27246| DCB	" ", 0x0, " ", 0x0, " ", 0x0, " ", 0x0, "D", 0x0, "C", 0x0
	DCB	"S", 0x0, " ", 0x0, "d", 0x0, "w", 0x0, "A", 0x0, "l", 0x0
	DCB	"p", 0x0, "h", 0x0, "a", 0x0, "b", 0x0, "e", 0x0, "t", 0x0
	DCB	":", 0x0, " ", 0x0, "0", 0x0, "x", 0x0, "%", 0x0, "0", 0x0
	DCB	"x", 0x0, ",", 0x0, " ", 0x0, "%", 0x0, "d", 0x0, 0x0, 0x0
|$SG27248| DCB	" ", 0x0, " ", 0x0, " ", 0x0, " ", 0x0, "D", 0x0, "C", 0x0
	DCB	"S", 0x0, " ", 0x0, "d", 0x0, "w", 0x0, "I", 0x0, "n", 0x0
	DCB	"d", 0x0, "i", 0x0, "c", 0x0, "a", 0x0, "t", 0x0, "i", 0x0
	DCB	"o", 0x0, "n", 0x0, ":", 0x0, " ", 0x0, "0", 0x0, "x", 0x0
	DCB	"%", 0x0, "0", 0x0, "x", 0x0, ",", 0x0, " ", 0x0, "%", 0x0
	DCB	"d", 0x0, 0x0, 0x0
|$SG27250| DCB	" ", 0x0, " ", 0x0, " ", 0x0, " ", 0x0, "D", 0x0, "C", 0x0
	DCB	"S", 0x0, " ", 0x0, "d", 0x0, "w", 0x0, "L", 0x0, "a", 0x0
	DCB	"n", 0x0, "g", 0x0, "u", 0x0, "a", 0x0, "g", 0x0, "e", 0x0
	DCB	":", 0x0, " ", 0x0, "0", 0x0, "x", 0x0, "%", 0x0, "0", 0x0
	DCB	"x", 0x0, ",", 0x0, " ", 0x0, "%", 0x0, "d", 0x0, 0x0, 0x0

	AREA	|.text|, CODE

|?DisplayDCS@@YAXPAURILMSGDCS@@@Z| PROC			; DisplayDCS

; 75   : {

	mov       r12, sp
	stmdb     sp!, {r0}  ; stmfd
	stmdb     sp!, {r12, lr}  ; stmfd
	sub       sp, sp, #2, 24  ; 0x200 = 512
|$M27503|

; 76   : 	TCHAR szString[256];
; 77   : 
; 78   : 	wsprintf(szString, L"    DCS cbSize: 0x%0x, %d", prmDCS->cbSize, prmDCS->cbSize);

	ldr       r3, [sp, #0x208]  ; 0x208 = 520
	ldr       r3, [r3]
	ldr       r2, [sp, #0x208]  ; 0x208 = 520
	ldr       r2, [r2]
	ldr       r1, [pc, #0x1B0]  ;  pc+8+432 = 00000358
	add       r0, sp, #0
	bl        wsprintfW  ; 000001B0

; 79   : 	SendMessage(g_hwndEdit, LB_ADDSTRING, 0, (LPARAM) szString);

	add       r3, sp, #0
	mov       r2, #0
	mov       r1, #6, 26  ; 0x180 = 384
	ldr       r0, [pc, #0x178]  ;  pc+8+376 = 00000338
	ldr       r0, [r0]
	bl        SendMessageW  ; 000001C8

; 80   : 	wsprintf(szString, L"    DCS dwParams: 0x%0x, %d", prmDCS->dwParams, prmDCS->dwParams);

	ldr       lr, [sp, #0x208]  ; 0x208 = 520
	ldr       r3, [lr, #4]
	ldr       r2, [sp, #0x208]  ; 0x208 = 520
	ldr       r2, [r2, #4]
	ldr       r1, [pc, #0x178]  ;  pc+8+376 = 00000354
	add       r0, sp, #0
	bl        wsprintfW  ; 000001E4

; 81   : 	SendMessage(g_hwndEdit, LB_ADDSTRING, 0, (LPARAM) szString);

	add       r3, sp, #0
	mov       r2, #0
	mov       r1, #6, 26  ; 0x180 = 384
	ldr       r0, [pc, #0x144]  ;  pc+8+324 = 00000338
	ldr       r0, [r0]
	bl        SendMessageW  ; 000001FC

; 82   : 	wsprintf(szString, L"    DCS dwType: 0x%0x, %d", prmDCS->dwType, prmDCS->dwType);

	ldr       lr, [sp, #0x208]  ; 0x208 = 520
	ldr       r3, [lr, #8]
	ldr       r2, [sp, #0x208]  ; 0x208 = 520
	ldr       r2, [r2, #8]
	ldr       r1, [pc, #0x140]  ;  pc+8+320 = 00000350
	add       r0, sp, #0
	bl        wsprintfW  ; 00000218

; 83   : 	SendMessage(g_hwndEdit, LB_ADDSTRING, 0, (LPARAM) szString);

	add       r3, sp, #0
	mov       r2, #0
	mov       r1, #6, 26  ; 0x180 = 384
	ldr       r0, [pc, #0x110]  ;  pc+8+272 = 00000338
	ldr       r0, [r0]
	bl        SendMessageW  ; 00000230

; 84   : 	wsprintf(szString, L"    DCS dwFlags: 0x%0x, %d", prmDCS->dwFlags, prmDCS->dwFlags);

	ldr       lr, [sp, #0x208]  ; 0x208 = 520
	ldr       r3, [lr, #0xC]  ; 0xC = 12
	ldr       r2, [sp, #0x208]  ; 0x208 = 520
	ldr       r2, [r2, #0xC]  ; 0xC = 12
	ldr       r1, [pc, #0x108]  ;  pc+8+264 = 0000034C
	add       r0, sp, #0
	bl        wsprintfW  ; 0000024C

; 85   : 	SendMessage(g_hwndEdit, LB_ADDSTRING, 0, (LPARAM) szString);

	add       r3, sp, #0
	mov       r2, #0
	mov       r1, #6, 26  ; 0x180 = 384
	ldr       r0, [pc, #0xDC]  ;  pc+8+220 = 00000338
	ldr       r0, [r0]
	bl        SendMessageW  ; 00000264

; 86   : 	wsprintf(szString, L"    DCS dwMsgClass: 0x%0x, %d", prmDCS->dwMsgClass, prmDCS->dwMsgClass);

	ldr       lr, [sp, #0x208]  ; 0x208 = 520
	ldr       r3, [lr, #0x10]  ; 0x10 = 16
	ldr       r2, [sp, #0x208]  ; 0x208 = 520
	ldr       r2, [r2, #0x10]  ; 0x10 = 16
	ldr       r1, [pc, #0xD0]  ;  pc+8+208 = 00000348
	add       r0, sp, #0
	bl        wsprintfW  ; 00000280

; 87   : 	SendMessage(g_hwndEdit, LB_ADDSTRING, 0, (LPARAM) szString);

	add       r3, sp, #0
	mov       r2, #0
	mov       r1, #6, 26  ; 0x180 = 384
	ldr       r0, [pc, #0xA8]  ;  pc+8+168 = 00000338
	ldr       r0, [r0]
	bl        SendMessageW  ; 00000298

; 88   : 	wsprintf(szString, L"    DCS dwAlphabet: 0x%0x, %d", prmDCS->dwAlphabet, prmDCS->dwAlphabet);

	ldr       lr, [sp, #0x208]  ; 0x208 = 520
	ldr       r3, [lr, #0x14]  ; 0x14 = 20
	ldr       r2, [sp, #0x208]  ; 0x208 = 520
	ldr       r2, [r2, #0x14]  ; 0x14 = 20
	ldr       r1, [pc, #0x98]  ;  pc+8+152 = 00000344
	add       r0, sp, #0
	bl        wsprintfW  ; 000002B4

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -