Sign in to follow this  
Followers 0
Digisoul

Debugging DllStructGetData

10 posts in this topic

Hello there,

I am working with DllCalls, and having trouble on runtime debugging.

Here is a sample code of my project

local $EDATA = DllStructCreate("byte[537]",$PHANDLE)
If @error Then error("Unable to pass the data.")
$fdata = DllStructGetData($EDATA,1)
if @error Then error("Unable to extract the data.")

now the "DllStructGetData($EDATA,1)" never return any error or something in special conditions which i want to debug and the "Don't Send" error occurs.

i want to know how can i control these types of conditions ?

Thanks in Advance


73 108 111 118 101 65 117 116 111 105 116

Share this post


Link to post
Share on other sites



What special conditions?


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

What special conditions?

I am making a Compiler Identifier, it works well for all PE32 except PE32 .NET Assembly.

When i tried to get its data the error occurs

Local $Aoep = 0x47EFBC11
Local $Smod = "D:\ZiPhoneGUI.exe"
Local $GHndle = DllCall("kernel32.dll", "hwnd", "GetModuleHandleW", "wstr", $SMod)
If @error Then
   error("Unable to call GetModuleHandleW")
EndIf
$PHANDLE = $GHndle[0]+$Aoep
local $EDATA = DllStructCreate("byte[537]",$PHANDLE)
If @error Then error("Unable to pass the data.")
$fdata = DllStructGetData($EDATA,1) ; Error in .NET Assembel Files
if @error Then error("Unable to extract the data.")

73 108 111 118 101 65 117 116 111 105 116

Share this post


Link to post
Share on other sites

And the error number is?


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

And the error number is?

No error number, Its Stop working at "DllStructGetData($EDATA,1)" call.


73 108 111 118 101 65 117 116 111 105 116

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

No error number, Its Stop working at "DllStructGetData($EDATA,1)" call.

You mean it's crashing?

You are likely out of range.

Are you sure that entry point address is correct?

Edited by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

You mean it's crashing?

You are likely out of range.

Are you sure that entry point address is correct?

100% sure about Entry Point , i checked it manually, and yes i mean its crash.

73 108 111 118 101 65 117 116 111 105 116

Share this post


Link to post
Share on other sites

100% sure about Entry Point , i checked it manually, and yes i mean its crash.

Show me ZiPhoneGUI.exe.

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Show me ZiPhoneGUI.exe.

Ah! :D my mistake, the file was infected, thats why its not working , now i clean that file and my app displaying the correct result.

But my question is still there what will i do if i have to analyse any invalid file?

I mean how can i stop my app to crash.

Now would you like to check the clean & infected files (In Invalid Format i mean i just change their MZ sig)?

Coz i also test my app on some other infected files and its work properly.


73 108 111 118 101 65 117 116 111 105 116

Share this post


Link to post
Share on other sites

But my question is still there what will i do if i have to analyse any invalid file?

I mean how can i stop my app to crash.

Now would you like to check the clean & infected files (In Invalid Format i mean i just change their MZ sig)?

Coz i also test my app on some other infected files and its work properly.

Your code should be aware of the change before you reach the point where it would crash.

Just add some more checkings and respond properly to errors (either return or do some modification to variables or whatever).


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0