China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-25 03:28
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to generate a known EXE using a BAT View 2,913 Replies 10
Original Poster Posted 2008-03-29 19:11 ·  中国 北京 鹏博士BGP
新手上路
Credits 10
Posts 4
Joined 2008-03-29 18:44
18-year member
UID 114373
Gender Male
Status Offline
I saw a bat today, and the content is as follows:
@echo E100 4d 5a>>s&echo F102 7FF 00>>s&echo E13c b0>>s&echo E1b0 50 45 00 00 4c 01 01 00 a0 db 61 43>>s
@echo E1c4 E0 00 0f 01 0b 01 05 0c 00 06>>s&echo E1d8 b0 10 00 00 00 10>>s&echo E230 78 12 00 00 50>>s
@echo E1E1 20 00 00 00 00 14 13 00 10 00 00 00 02>>s&echo E2cc 20 00 04 c0 00 00 00 00 20 00 04 c0>>s
@echo E1f0 04>>s&echo E3d3 a3 58 12 14 13 68 5c 12 14 13 90 90 90 ff 35 58 12 14 13 e8 65 01>>s
@echo E1f8 04>>s&echo E457 a3 68 12 14 13 ff 35 6c 12 14 13 ff 35 74 12 14 13 ff 35 64 12 14>>s
@echo E200 0c 14 00 00 00 02>>s&echo E52e 18 10 14 13 ff 25 1c 10 14 13 ff 25 20 10 14 13 ff 25 24 10 14>>s
@echo E20c 02>>s&echo E3c2 e8 5f 01 00 00 6a 00 68 48 10 14 13 e8 77 01>>s&echo E212 10 00 00 10>>s
@echo E21a 10 00 00 10>>s&echo E543 13 ff 25 2c 10 14 13 ff 25 34 10 14 13 ff 25 38 10 14 13 cc cc>>s


...............Omitted in the middle...................

@echo rcx>>s&echo 60e>>s&echo n 0661>>s&echo w>>s&echo q>>s&debug<s>nul&del s&ren 0661 777.exe&777.exe

Actually, most of the previous part is to write to the s file, and the content of s is as follows:
E100 4d 5a
F102 7FF 00
E13c b0
E1b0 50 45 00 00 4c 01 01 00 a0 db 61 43
E1c4 E0 00 0f 01 0b 01 05 0c 00 06
E1d8 b0 10 00 00 00 10
E230 78 12 00 00 50
E1E1 20 00 00 00 00 14 13 00 10 00 00 00 02
E2cc 20 00 04 c0 00 00 00 00 20 00 04 c0
E1f0 04
E3d3 a3 58 12 14 13 68 5c 12 14 13 90 90 90 ff 35 58 12 14 13 e8 65 01
E1f8 04
E457 a3 68 12 14 13 ff 35 6c 12 14 13 ff 35 74 12 14 13 ff 35 64 12 14
E200 0c 14 00 00 00 02
E52e 18 10 14 13 ff 25 1c 10 14 13 ff 25 20 10 14 13 ff 25 24 10 14
E20c 02
E3c2 e8 5f 01 00 00 6a 00 68 48 10 14 13 e8 77 01
E212 10 00 00 10
E21a 10 00 00 10
E543 13 ff 25 2c 10 14 13 ff 25 34 10 14 13 ff 25 38 10 14 13 cc cc

...........Omitted in the middle......................

E5fc d6 13
E600 e4 13
rcx
60e
n 0661
w
q


Then use debug to generate the exe file.

I want to ask, how to convert the exe in my hand into this bat file, so that this bat can generate this exe??


http://upload.cn-dos.net/img/947.zip

───────────────── Moderation Record ─────────────────
Performed: HAT
Operation: Helped the owner upload the attachment
───────────────── Moderation Record ─────────────────


[ Last edited by HAT on 2008-10-15 at 20:18 ]
Floor 2 Posted 2008-03-29 19:52 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
exe2hex.exe

bin2txt and the like...
Floor 3 Posted 2008-03-29 19:56 ·  中国 北京 鹏博士BGP
新手上路
Credits 10
Posts 4
Joined 2008-03-29 18:44
18-year member
UID 114373
Gender Male
Status Offline
Experts upstairs

Can you be more detailed?
Floor 4 Posted 2008-03-29 19:58 ·  中国 北京 联通
银牌会员
★★★
Credits 1,287
Posts 634
Joined 2007-05-02 15:06
19-year member
UID 87277
Gender Male
From cmd.exe
Status Offline
Floor 5 Posted 2008-03-29 20:03 ·  中国 北京 鹏博士BGP
新手上路
Credits 10
Posts 4
Joined 2008-03-29 18:44
18-year member
UID 114373
Gender Male
Status Offline
exe2hex is to convert exe to hex, right?

bin2txt is to convert binary to txt?

How to get the bat I need?
Floor 6 Posted 2008-03-29 21:50 ·  中国 香港 腾讯云
银牌会员
★★★
Credits 1,436
Posts 739
Joined 2007-10-11 17:44
18-year member
UID 99469
Gender Male
Status Offline
The LZ means there is a batch script converted to EXE format. Now you want to convert it back to BAT format?
Floor 7 Posted 2008-03-29 23:23 ·  中国 湖北 武汉 电信
初级用户
Credits 97
Posts 33
Joined 2007-03-05 06:13
19-year member
UID 80815
Gender Male
Status Offline
The LZ means to disassemble XX.EXE into debug source code, and then use debug to generate a new XX.EXE
Floor 8 Posted 2008-03-29 23:31 ·  中国 北京 鹏博士BGP
新手上路
Credits 10
Posts 4
Joined 2008-03-29 18:44
18-year member
UID 114373
Gender Male
Status Offline
The person upstairs understands what I mean. Who can say the general implementation ideas?
Floor 9 Posted 2008-03-30 00:21 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
Floor 10 Posted 2009-04-28 07:10 ·  中国 福建 福州 电信
新手上路
Credits 2
Posts 2
Joined 2009-04-27 12:06
17-year member
UID 143929
Gender Male
Status Offline
Not all EXEs can be converted to BAT, right?

The landlord said it's about disassembled BATs, so you have to use disassembling.

And the disassembled stuff can't show the original source code.
Floor 11 Posted 2009-04-28 20:21 ·  中国 吉林 延边朝鲜族自治州 延吉市 电信
银牌会员
★★★
正在学习中的菜鸟...
Credits 1,039
Posts 897
Joined 2009-03-01 15:34
17-year member
UID 140302
Gender Male
From 在地狱中仰望天堂
Status Offline
Forum Jump: