flat assembler
Message board for the users of flat assembler.

Index > Windows > trying to find out what sort of PRNG this is

Author
Thread Post new topic Reply to topic
adnimo



Joined: 18 Jul 2008
Posts: 49
adnimo 25 Jul 2008, 16:09
I have an exe that calls a PRNG but I don't know the name of this algorithm, could someone take a look at the asm dump of the exe and tell me if it rings a bell?, I know there are many advanced assembly programmers in here that could spot this sort of thing but I don't know how feasible it is since it might take some time to do so and time isn't cheap Confused

But just in case, this is the dump:
http://pastebin.com/f2a720984

To get you started, the decimal number 1000 is passed to the routine, so it all begins under SUB_L00402079.

From my limited experience and point of view, it doesn't look like a mersenne twister to me, but it seems to outperform many other PRNGs in both speed and output.

The reason I want to know what algorithm this is, is simply to read more about it, try to implement my own version of it, see how it goes.

Could it be an extended congruential algorithm?

Any clues onto what algo this is will be greatly appreciated Smile

Thanks.
Post 25 Jul 2008, 16:09
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4020
Location: vpcmpistri
bitRAKE 25 Jul 2008, 22:01
Might be a Park-Miller variant?
Nah, looks like two LCG's overlapped?

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 25 Jul 2008, 22:01
View user's profile Send private message Visit poster's website Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 26 Jul 2008, 16:34
It could just be a custom RNG, not too uncommon
Post 26 Jul 2008, 16:34
View user's profile Send private message Visit poster's website Reply with quote
adnimo



Joined: 18 Jul 2008
Posts: 49
adnimo 31 Jul 2008, 13:49
It's uniform spread is not that of a custom half-assed PRNG at all, it's also quite fast!.

That said, it's not very simple to make an efficient PRNG at all, you may get random numbers quite easily by using many known and simple methods, but the generated data at the end could not be uniform enough and/or the algorithm might not be fast enough for most real-world applications.

So I'm still wondering if anyone has a clue. On an IRC channel someone pointed e that this is a variant of the lagged-Fibonacci algorithm, but I'm not so sure about this.
Post 31 Jul 2008, 13:49
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 31 Jul 2008, 14:24
Why not try asking the person who wrote the program you snipped this from? Smile
Post 31 Jul 2008, 14:24
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 31 Jul 2008, 19:19
Isn't lagged-Fibonaci slow? (not that I've actually tested or anything...)
Post 31 Jul 2008, 19:19
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.