PDA

View Full Version : enabling flash item


aeon
January 23rd, 2008, 05:44
HI

I would like to enable sort of toolbar button in partialy flash application(95% of GUI is flash).
It's a windows executable which contains flash as an overlay but it is not simple common projector. I decompiled overlay which contains all items (including
button I want to enable) BUT there is no actionscript.

My guess was that enabling is controled by exe itself(instead of flash) so I tried EnableMenuItem or EnableWindow APis but no break.

any ideas?

dELTA
January 23rd, 2008, 13:28
When you say "decompiled the overlay", do you mean that you extracted it as a .swf file to disk, and then decompiled it with a flash decompiler? If no actionscript was found in it this way, you probably have not extracted it from the executable properly, or the Flash file is protected itself.

More info here:

http://www.woodmann.com/forum/showthread.php?t=9572

And some possibly useful tools:

http://www.woodmann.com/collaborative/tools/index.php/Category:Flash_Unpackers

http://www.woodmann.com/collaborative/tools/index.php/Category:Flash_Decompilers

http://www.woodmann.com/collaborative/tools/index.php/Category:Flash_Disassemblers

aeon
January 23rd, 2008, 16:39
yes, I extracted swf (with PEID overlay extractor) and decompiled it in flash decompiler therefore I think it was properly extracted.
If it is as you are suggesting there has to be actionscript inside the swf?

thx, I'll check the links later and reply

aeon
February 3rd, 2008, 09:25
ok, I managed to enable the button even without actionscript(at least it looks like it is enabled) but still does not work there has to be an additional check somewhere which I have not idea right now how to find

Silkut
February 3rd, 2008, 11:05
Hi,
If you enabled the button so now you can click on it, but then nothing happen, I would look for some code behind that button.
Regards.

aeon
February 3rd, 2008, 12:39
Quote:
[Originally Posted by Silkut;72431]Hi,
If you enabled the button so now you can click on it, but then nothing happen, I would look for some code behind that button.
Regards.



question is how

I have no access to script , I found code called when the button is enabled by application itself, but this code is not called when I click on the button enabled by me. Which leads me to conclusion that either the button is not enabled completely or there is another check (probably in script).

btw: none of the decompilers(except one small which does not work either for this app) currently available support as3 but sothink has an ad for upcoming one

dELTA
February 3rd, 2008, 13:21
It seems you really need access to the action script then, so I guess you'd just have to wait for the new Sothink tool if none of the other decomilers supports AS3 yet (or, do it yourself, which might possibly be a little too hard though).

OHPen
February 4th, 2008, 09:26
hi,

based on what you describe it seems that you are probably able to enable the button, but like in many other crippled application the button is not really connected with the original function. in most cases this technique is applied if you have a real demo, not a one you can register. it's a big advantage, that the programmer of the software was so cute to remain to original function even though it is not needed. in each case you HAVE to alter the action script. due to success in locating the original button function is should be easy to insert a function call to this function by something like this "root->the_original_function(its_parameters, ...);".

Adios companiero,

OHPen.

aeon
February 4th, 2008, 17:00
I went thru some basics of AS3 and I think problem is in EventDispatchers. Enabling and disabling buttons(by enable and disable function) in AS3 means nothing , it only alters how button looks like. When someone needs to enable button (to make it responsive) he has to attach addEventListener to it, otherwise button won't work even if it is (visualy)enabled, and same applies for disabling button with exception that there has to be applied removeEventListener. This is nice to know but not exactly easy to deal with.

OHpen : yes, button is not connected to original fuction because addEventListener is removed

OHPen
February 5th, 2008, 05:11
@aeon: then you know everything you need. add a new eventlistener while the dialog is initializing. probably you can simply copy another addeventhandler call and just alter the function to be added.

PS: what about searching for the place where the other eventhandlers are added. the best will be to add your handler there...

aeon
February 6th, 2008, 03:18
ok, I've got enough , I created sample .swf in Flash 9, with remove and add events for buttons, found way to successfuly disable and enable those events in debugger BUT it does NOT work in my target application the same way, i.e button is probably disabled differently

I'm tired of guessing what could be the problem I'll wait for decompiler which hopefuly will be able to decompile whole thing.