For those who are bored like me.

Convert this .exe to it's compilable source code.
Tell how long it took you. (And be HONEST)
Posted on 2004-03-31 16:03:59 by skywalker
cant get you. what does this exe do. it just seems to open up a console window.

And by converting to source what exactly do u mean?
Are we supposed to disassemble it or something???
Posted on 2004-03-31 22:50:10 by clippy
It's a DOS app.
Posted on 2004-03-31 22:58:58 by iblis
skywalker,

No any result with your DOS application :confused: How to use it?
Posted on 2004-04-01 03:40:31 by Vortex

cant get you. what does this exe do. it just seems to open up a console window.

And by converting to source what exactly do u mean?
Are we supposed to disassemble it or something???


Yes, dissassemble it to it's asm source. IDAFW is one app that can help you.

Good luck.
Posted on 2004-04-01 03:52:29 by skywalker

skywalker,

No any result with your DOS application :confused: How to use it?


It's designed to make it harder to just jump past code. I intentionally put no text messages in it to make dissassembly more difficult.
Posted on 2004-04-01 03:57:31 by skywalker
I was lazy


mov ax, 5
mov ds, ax
assume ds:nothing
xor eax, eax
mov ecx, 3D0900h
mov cs:dword_0, ecx
xor bx, bx
xor cx, cx

loc_220: ; CODE XREF: seg000:0242j
mov cx, cs:word_4
mov bx, cs:word_6

loc_22A: ; CODE XREF: seg000:0249j
add cx, bx
cmp cx, ds:4
jnz loc_233
inc cx

loc_233: ; CODE XREF: seg000:0230j
xor dx, dx
mov ds:2, cx
mov dx, cx
push dx
cmp dx, ds:6
jz loc_244
jmp short loc_220
; ???????????????????????????????????????????????????????????????????????????

loc_244: ; CODE XREF: seg000:0240j
pop dx
cmp dx, ds:2
jnz loc_22A
mov ax, 4C00h
int 21h
Posted on 2004-04-01 07:22:55 by roticv
Originally posted by roticv
I was lazy


mov ax, 5
mov ds, ax
assume ds:nothing
xor eax, eax
mov ecx, 3D0900h
mov cs:dword_0, ecx
xor bx, bx
xor cx, cx

You are close but short by 3 lines of code.
Posted on 2004-04-01 08:27:08 by skywalker
Disassembled with Borg V2.27:



;-----------------------------------------------------------------------
;Segment : 1000h Offset : 00h Size : 50h
;16-bit Code
;-----------------------------------------------------------------------
db 00h
db 00h
db 00h
db 00h
db 2ch ;','
db 01h
db 64h ;'d'
db 00h
start:
mov ax, 1005h
mov ds, ax
xor eax, eax
mov ecx, 3d0900h
mov cs:[00h], ecx
xor bx, bx
xor cx, cx
mov cx, cs:[04h]
mov bx, cs:[06h]
add cx, bx
cmp cx, [04h]
jnz loc_00000033
inc cx
; XREFS First: 1000:0030 Number : 1
loc_00000033:
xor dx, dx
mov [02h], cx
mov dx, cx
push dx
cmp dx, [06h]
jz loc_00000044
jmp 20h
; XREFS First: 1000:0040 Number : 1
loc_00000044:
pop dx
cmp dx, [02h]
jnz 2ah
mov ax, 4c00h
int 21h
;-----------------------------------------------------------------------
;Segment : 1005h Offset : 00h Size : 08h
;16-bit Code
;-----------------------------------------------------------------------
db 00h
db 00h
db 00h
db 00h
db 90h
db 01h
db 91h
db 01h
Posted on 2004-04-01 11:40:11 by Vortex
Originally posted by Vortex
Disassembled with Borg V2.27:



;-----------------------------------------------------------------------
;Segment : 1000h Offset : 00h Size : 50h
;16-bit Code
;-----------------------------------------------------------------------
db 00h You are on the right track, with the first 4 db statements
db 00h What do you think it is specifically.
db 00h
db 00h

db 2ch ;',' What do you think these are.
db 01h
db 64h ;'d' Your dissassembler thinks it may be a 'd', close but no cigar
db 00h
Posted on 2004-04-01 11:59:56 by skywalker
...so what are trying to prove?
Posted on 2004-04-01 12:04:27 by Vortex

...so what are trying to prove?


Just seeing how close dissassemblers can get.
To make things harder to crack or modify, you have to get out of the box sometimes.

Have a good day.
Posted on 2004-04-01 12:14:51 by skywalker
seg000:0000 ; File Name : C:\tricky\TRICKY2.EXE
seg000:0000 ; Format : MS-DOS executable (EXE)
seg000:0000 ; Base Address: 0h Range: 0h-260h Loaded length: 58h
seg000:0000 ; Entry Point : 0:8
seg000:0000
seg000:0000
seg000:0000 ; ---------------------------------------------------------------------------
seg000:0000
seg000:0000 ; Segment type: Pure code
seg000:0000 seg000 segment byte public 'CODE' use16
seg000:0000 assume cs:seg000
seg000:0000 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing
seg000:0000 dword_0 dd 0 ; DATA XREF: start+Ew
seg000:0004 word_4 dw 12Ch ; DATA XREF: start+18r
seg000:0006 word_6 dw 64h ; DATA XREF: start+1Dr
seg000:0008 assume ss:seg002, ds:nothing
seg000:0008
seg000:0008 ; ??????????????? S U B R O U T I N E ???????????????????????????????????????
seg000:0008
seg000:0008
seg000:0008 public start
seg000:0008 start proc near
seg000:0008 mov ax, seg dseg
seg000:000B mov ds, ax
seg000:000D assume ds:dseg
seg000:000D xor eax, eax
seg000:0010 mov ecx, 3D0900h
seg000:0016 mov cs:dword_0, ecx
seg000:001C xor bx, bx
seg000:001E xor cx, cx
seg000:0020
seg000:0020 loc_20: ; CODE XREF: start+3Aj
seg000:0020 mov cx, cs:word_4
seg000:0025 mov bx, cs:word_6
seg000:002A
seg000:002A loc_2A: ; CODE XREF: start+41j
seg000:002A add cx, bx
seg000:002C cmp cx, word_54
seg000:0030 jnz loc_33
seg000:0032 inc cx
seg000:0033
seg000:0033 loc_33: ; CODE XREF: start+28j
seg000:0033 xor dx, dx
seg000:0035 mov word_52, cx
seg000:0039 mov dx, cx
seg000:003B push dx
seg000:003C cmp dx, word_56
seg000:0040 jz loc_44
seg000:0042 jmp short loc_20
seg000:0044 ; ---------------------------------------------------------------------------
seg000:0044
seg000:0044 loc_44: ; CODE XREF: start+38j
seg000:0044 pop dx
seg000:0045 cmp dx, word_52
seg000:0049 jnz loc_2A
seg000:004B mov ax, 4C00h
seg000:004E int 21h ; DOS - 2+ - QUIT WITH EXIT CODE (EXIT)
seg000:004E start endp ; AL = exit code
seg000:004E
seg000:004E seg000 ends
seg000:004E
dseg:0000 ; ---------------------------------------------------------------------------
dseg:0000
dseg:0000 ; Segment type: Pure data
dseg:0000 dseg segment para public 'DATA' use16
dseg:0000 assume cs:dseg
dseg:0000 db 0 ;
dseg:0001 db 0 ;
dseg:0002 word_52 dw 0 ; DATA XREF: start+2Dw
dseg:0002 ; start+3Dr
dseg:0004 word_54 dw 190h ; DATA XREF: start+24r
dseg:0006 word_56 dw 191h ; DATA XREF: start+34r
dseg:0008 align 10h
dseg:0008 dseg ends
dseg:0008
seg002:0000 ; ---------------------------------------------------------------------------
seg002:0000
seg002:0000 ; Segment type: Uninitialized
seg002:0000 seg002 segment byte stack 'STACK' use16
seg002:0000 assume cs:seg002
seg002:0000 assume es:nothing, ss:nothing, ds:dseg, fs:nothing, gs:nothing
seg002:0000 db 200h dup(?)
seg002:0000 seg002 ends
seg002:0000
seg002:0000
seg002:0000 end start
Posted on 2004-04-01 20:25:24 by HeXeN
Disassembly of File: C:\tricky\TRICKY2.EXE
Code Offset = 00000200, Code Size = 00000058
Data Offset = 00000000, Data Size = 00000000

Number of Objects = 0001 (dec), Imagebase = 00000000h

Object01: RVA: 00000000 Offset: 00000200 Size: 00000058 Flags: 00000000


Number of Imported Modules = 0 (decimal)


+++++++++++++++++++ IMPORT MODULE DETAILS +++++++++++++++

+++++++++++++++++++ EXPORTED FUNCTIONS ++++++++++++++++++
Number of Exported Functions = 0000 (decimal)




+++++++++++++++++++ ASSEMBLY CODE LISTING ++++++++++++++++++
//********************** Start of Code in Object BinaryCode **************
Program Entry Point = 0001:0008



//********************** Start of Code in Segment: 1 **************

:0001.0000 00000000 BYTE 4 DUP(0)


:0001.0004 2C01 sub al, 01
:0001.0006 6400 BYTE 0



//******************** Program Entry Point ********
:0001.0008 B80500 mov ax, 0005
:0001.000B 8ED8 mov ds, ax
:0001.000D 6633C0 xor eax, eax
:0001.0010 66B900093D00 mov ecx, 003D0900
:0001.0016 662E890E0000 mov cs:[0000], ecx
:0001.001C 33DB xor bx, bx
:0001.001E 33C9 xor cx, cx

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0001.0042(U)
|
:0001.0020 2E8B0E0400 mov cx, cs:[0004]
:0001.0025 2E8B1E0600 mov bx, cs:[0006]

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0001.0049(C)
|
:0001.002A 03CB add cx, bx
:0001.002C 3B0E0400 cmp cx, [0004]
:0001.0030 7501 jne 0033
:0001.0032 41 inc cx

* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0001.0030(C)
|
:0001.0033 33D2 xor dx, dx
:0001.0035 890E0200 mov [0002], cx
:0001.0039 8BD1 mov dx, cx
:0001.003B 52 push dx
:0001.003C 3B160600 cmp dx, [0006]
:0001.0040 7402 je 0044
:0001.0042 EBDC jmp 0020



* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:0001.0040(C)
|
:0001.0044 5A pop dx
:0001.0045 3B160200 cmp dx, [0002]
:0001.0049 75DF jne 002A
:0001.004B B8004C mov ax, 4C00
:0001.004E CD21 int 21
:0001.0050 00000000 BYTE 4 DUP(0)


:0001.0054 90 nop
:0001.0055 01910100 add , dx
Posted on 2004-04-01 20:32:37 by HeXeN
Originally posted by HeXeN
Disassembly of File: C:\tricky\TRICKY2.EXE
Code Offset = 00000200, Code Size = 00000058
Data Offset = 00000000, Data Size = 00000000


//********************** Start of Code in Segment: 1 **************

:0001.0000 00000000 BYTE 4 DUP(0)


:0001.0004 2C01 sub al, 01
:0001.0006 6400 BYTE 0

Here is the actual code for these three.

.code

big dd 0 ; takes up 4 bytes
a dw 300 ; put some data in the code section
d dw 100
Posted on 2004-04-01 21:17:35 by skywalker