Hi,

I have an Exe which accepts a 6 digit number and produces an output of another 6 digit number.

It is using hexa decimal conversion and it is a 32 bit signed Integer. It has 40 steps to produce an output and with shift left next number is calculated. Once the sum reaches the maximum limit,(Overflow Happens). At this place, the logic is changed. Instead of using shift left, some other process is used to max the result into a valid number(Falls in the range).

Any kind of help to sort out this is preferable.

Ex/.

If I enter Input as 1,

2 0

4 1

8 2

10 3

20 4

40 5

80 6

100 7

200 8

400 9

800 a

1000 b

2000 c

4000 d

8000 e

10000 f

20000 10

40000 11

80000 12

100000 13

200000 14

400000 15

800000 16

1000000 17

2000000 18

4000000 19

8000000 1a

10000000 1b

20000000 1c

40000000 1d

80000000 1e

77982990 1f

ef305320 20

a9f88fd0 21

24693630 22

48d26c60 23

91a4d8c0 24

54d19810 25

a9a33020 26

24de49d0 27

the output generated is, 547664(convert the 27th result into decimal, and the last 6 digits are taken as output).

Note : upto 1e, the sum is under the Integer range, once it is out of range, the algorithm changes and the number become positive, again shift left till overflow.

Thanks In Advance,

Kavitha

I have an Exe which accepts a 6 digit number and produces an output of another 6 digit number.

It is using hexa decimal conversion and it is a 32 bit signed Integer. It has 40 steps to produce an output and with shift left next number is calculated. Once the sum reaches the maximum limit,(Overflow Happens). At this place, the logic is changed. Instead of using shift left, some other process is used to max the result into a valid number(Falls in the range).

Any kind of help to sort out this is preferable.

Ex/.

If I enter Input as 1,

2 0

4 1

8 2

10 3

20 4

40 5

80 6

100 7

200 8

400 9

800 a

1000 b

2000 c

4000 d

8000 e

10000 f

20000 10

40000 11

80000 12

100000 13

200000 14

400000 15

800000 16

1000000 17

2000000 18

4000000 19

8000000 1a

10000000 1b

20000000 1c

40000000 1d

80000000 1e

77982990 1f

ef305320 20

a9f88fd0 21

24693630 22

48d26c60 23

91a4d8c0 24

54d19810 25

a9a33020 26

24de49d0 27

the output generated is, 547664(convert the 27th result into decimal, and the last 6 digits are taken as output).

Note : upto 1e, the sum is under the Integer range, once it is out of range, the algorithm changes and the number become positive, again shift left till overflow.

Thanks In Advance,

Kavitha

Sounds like you're cracking. Where are the board operators? I feel threatened...

Click the link "Report this post to a moderator" in his post, and notify the moderators.

Healthy paranoia? :grin:

**gkavi_tha**, at a very far leap of the imagination I could assume your talking about your own code and you have a question about it not functioning correctly -- even though we all are aware that what your doing is called reverse engineering. We know this because you didn't post any source code with this question. Let me see the algorithm your trying to diagnose and convince us that your goals are honourable.

Hi All,

Ya, the exe is mine and the person who wrote is not with us. This is working perfect with the defined logic. THere is no mistakes in it. Thats why I want to extend this..

Ya, the exe is mine and the person who wrote is not with us. This is working perfect with the defined logic. THere is no mistakes in it. Thats why I want to extend this..

Can you please post the source code of the algorithm so we can help answer the question?

Hi BitRake,

I dont have source code with me. May be I can help you to give some more examples. Attached doc will give you more details.

We have to trace based on the sequence of numbers generated before getting the output.

27 th s.no will give the output. Hex. have to convert to decimal and the last 6 digits are the result.

THanks for your help.

I dont have source code with me. May be I can help you to give some more examples. Attached doc will give you more details.

We have to trace based on the sequence of numbers generated before getting the output.

27 th s.no will give the output. Hex. have to convert to decimal and the last 6 digits are the result.

THanks for your help.

**gkavi_tha**, if the program is yours then this is the wrong way to approach the problem. It would be much easier to look at the source code to the algorithm. It is a waste of time to look at input<-->output dumps and I will not assist in that regaurd.

**The rules of this board**Just because you can see some linear correlation in the algorithm does not mean the algorithm is completely linear - you are wasting your time.

__do not__allow reverse engineering.Hi

>>>>if the program is yours then this is the wrong way to approach the problem. It would be much easier to look at the source code to the algorithm. <<<

Yes the program is mine(as I m responsible),but the person who wrote this is not with us and this was written long back. So no source code/documentation available as well as no clue about the algorithm. But we are using this.

Now due to extensibility of the exe, I am in position to implement the same algorithm. This is confidential exe and so I am not in position to post the exe too.

If I have the source code with me, I am knowlegde enough to understand it.

Anyways thanks for your help.

GK

>>>>if the program is yours then this is the wrong way to approach the problem. It would be much easier to look at the source code to the algorithm. <<<

Yes the program is mine(as I m responsible),but the person who wrote this is not with us and this was written long back. So no source code/documentation available as well as no clue about the algorithm. But we are using this.

Now due to extensibility of the exe, I am in position to implement the same algorithm. This is confidential exe and so I am not in position to post the exe too.

If I have the source code with me, I am knowlegde enough to understand it.

Anyways thanks for your help.

GK

If I have the source code with me, I am knowlegde enough to understand it.

Good luck on finding a solution.

To be honest, if you know enough assembly to understand source, then you should be able to re-create the exe yourself.

From the sounds of it it's not difficult, bar the definition of the second function its all simple code.

What more is there to it than that. If you give us any more information on the second function, then your private executable is pretty much public, there's not much more to tell us!

Mirno

From the sounds of it it's not difficult, bar the definition of the second function its all simple code.

```
```

mov eax, TheNumber

bsr ecx, eax

; jnz TheNumberIsZero

inc cl

ror eax, cl

; Insert your second function here

xor eax, eax

div eax, 1000000

; edx holds the result.

What more is there to it than that. If you give us any more information on the second function, then your private executable is pretty much public, there's not much more to tell us!

Mirno

Hi All,

I solved my problem..

Thanks for all your Help...

Kavitha

I solved my problem..

Thanks for all your Help...

Kavitha