Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12-30-2013, 21:22
zhgong007 zhgong007 is offline
Family
 
Join Date: May 2011
Posts: 239
Rept. Given: 17
Rept. Rcvd 300 Times in 46 Posts
Thanks Given: 26
Thanks Rcvd at 369 Times in 101 Posts
zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399
MFC100.dll export functions

HI, all
ask you guys a silly question:
I have an app which uses mfc100's export functions, but the function is exported as numbers instead of names, How could I quickly know the actually funtionality for each function ? many thanks

below show some extracted codes:

0018D9F8 |. FF15 68DA2700 call dword ptr ds:[<&mfc100.#7487>] ; mfc100.6736D7FF
0018D9FE |. 50 push eax
0018D9FF |. 8BCF mov ecx,edi
0018DA01 |. C745 FC 02000>mov [local.1],2
0018DA08 |. FF15 E4DA2700 call dword ptr ds:[<&mfc100.#1313>] ; mfc100.67363EB9
0018DA0E |. 8D4D 10 lea ecx,[arg.3]
0018DA11 |. FF15 CCDD2700 call dword ptr ds:[<&mfc100.#901>] ; mfc100.673682A2
Reply With Quote
  #2  
Old 12-30-2013, 22:39
sendersu sendersu is offline
VIP
 
Join Date: Oct 2010
Posts: 1,067
Rept. Given: 332
Rept. Rcvd 223 Times in 115 Posts
Thanks Given: 235
Thanks Rcvd at 513 Times in 288 Posts
sendersu Reputation: 200-299 sendersu Reputation: 200-299 sendersu Reputation: 200-299
here is my set of tools for fixing MFC XXX (4.2, 8.0, 9.0, 10.0) as *.idc for IDA
Entry point: FixMfcImports.idc and then answer questions as it asks
enjoy

http://www.sendspace.com/file/3iqgve

Note: the set if not full, if you wish to create some other MFCxxx support, here is the recipe:

1) dumpbin /exports mfc100u.lib > mfc100u.def
2) using following regex: ^\s+(\d+)\s+([^\s]{1,})(.*) -> \2 @ \1 NONAME
Reply With Quote
The Following 4 Users Gave Reputation+1 to sendersu For This Useful Post:
deepzero (12-31-2013), TechLord (12-31-2013), zeuscane (12-31-2013), zhgong007 (12-30-2013)
  #3  
Old 12-30-2013, 22:41
zhgong007 zhgong007 is offline
Family
 
Join Date: May 2011
Posts: 239
Rept. Given: 17
Rept. Rcvd 300 Times in 46 Posts
Thanks Given: 26
Thanks Rcvd at 369 Times in 101 Posts
zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399
all right, many thanks
Reply With Quote
  #4  
Old 12-31-2013, 08:00
zhgong007 zhgong007 is offline
Family
 
Join Date: May 2011
Posts: 239
Rept. Given: 17
Rept. Rcvd 300 Times in 46 Posts
Thanks Given: 26
Thanks Rcvd at 369 Times in 101 Posts
zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399
it is working well, but note that one line in the IDC file needs to be edited, i.e., changing
dll prefix name from MFC71 to mfc100.
minor issue: I produce a map file from IDA, and then load the map into olldbg using loadmap plugin, but the symbol info for MFC100.dll are not loaded into olldbg. I know it is not sendersu's tool issue though.
Reply With Quote
  #5  
Old 12-31-2013, 14:54
sendersu sendersu is offline
VIP
 
Join Date: Oct 2010
Posts: 1,067
Rept. Given: 332
Rept. Rcvd 223 Times in 115 Posts
Thanks Given: 235
Thanks Rcvd at 513 Times in 288 Posts
sendersu Reputation: 200-299 sendersu Reputation: 200-299 sendersu Reputation: 200-299
Hi, thanks
some questions
1) regarding MFC71, if you referring to line
>strPrefix = AskStr(strPrefix, "Check library version and postfix: U|D|UD (Ex.: MFC71UD)");
then it is not hardcoded, it is just an example for the end-user, user has to put his line by him/herself
2) have you tried mapimp plugin for importing *.map into Olly?
last time it was hosted here
http://code.google.com/p/mapimp/
but I can't reach it anymore...
Reply With Quote
The Following User Gave Reputation+1 to sendersu For This Useful Post:
zhgong007 (12-31-2013)
  #6  
Old 12-31-2013, 16:09
TechLord TechLord is offline
Banned User
 
Join Date: Mar 2005
Location: 10 Steps Ahead of You
Posts: 761
Rept. Given: 384
Rept. Rcvd 247 Times in 112 Posts
Thanks Given: 789
Thanks Rcvd at 2,022 Times in 571 Posts
TechLord Reputation: 200-299 TechLord Reputation: 200-299 TechLord Reputation: 200-299
Thumbs up MFC Fix

here is my set of tools for fixing MFC XXX (4.2, 8.0, 9.0, 10.0) as *.idc for IDA

@sendersu:

Was also struggling to find a way to achieve the fix of the MFC to names. Was afraid to ask as I thought that it would be a silly question

Am happy to know that it isn't such a silly question after all.

Was trying to create .sig files to achieve, but now I know that there is a better way (and maybe a more correct way) to achieve it.

Many thanks
Reply With Quote
  #7  
Old 12-31-2013, 21:25
zhgong007 zhgong007 is offline
Family
 
Join Date: May 2011
Posts: 239
Rept. Given: 17
Rept. Rcvd 300 Times in 46 Posts
Thanks Given: 26
Thanks Rcvd at 369 Times in 101 Posts
zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399
my question is actually quite common for sure
for beginners (like me), may spend years finding the solution, but for masters, it may be just seconds. however, the key thing is if those "masters" would like to share knowledges. although there is a tendency that the sharing spirit is now basically dead in the reverse community, there are still some good masters like Sendersu, zeuscane, and zementmischer( sorry your name is difficult to print), who are really helpful to help newbies and share reversing knowledges.

Last edited by zhgong007; 12-31-2013 at 21:40.
Reply With Quote
The Following User Gave Reputation+1 to zhgong007 For This Useful Post:
zeuscane (12-31-2013)
  #8  
Old 12-31-2013, 21:30
zhgong007 zhgong007 is offline
Family
 
Join Date: May 2011
Posts: 239
Rept. Given: 17
Rept. Rcvd 300 Times in 46 Posts
Thanks Given: 26
Thanks Rcvd at 369 Times in 101 Posts
zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399
Quote:
Originally Posted by sendersu View Post
Hi, thanks
some questions
1) regarding MFC71, if you referring to line
>strPrefix = AskStr(strPrefix, "Check library version and postfix: U|D|UD (Ex.: MFC71UD)");
then it is not hardcoded, it is just an example for the end-user, user has to put his line by him/herself
yes, I know that, and this is what I mean.

Quote:
Originally Posted by sendersu View Post
2) have you tried mapimp plugin for importing *.map into Olly?
last time it was hosted here
http://code.google.com/p/mapimp/
but I can't reach it anymore...
I'll try, and thanks again for this
Reply With Quote
  #9  
Old 01-01-2014, 02:18
zhgong007 zhgong007 is offline
Family
 
Join Date: May 2011
Posts: 239
Rept. Given: 17
Rept. Rcvd 300 Times in 46 Posts
Thanks Given: 26
Thanks Rcvd at 369 Times in 101 Posts
zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399
neither loadmap nor mapimp plugin is working for loading the mfc100 symbol info form IDA to olldbg. however, there is a different way to make it work. get a copy of mfc100.lib from vs2010, and put it somewhere in your olldbg folder. start your app using olldbg, and then click the menu-->debug-->select symbol path (i.e. the path where mfc100.lib). after you have set the path for the file, you can click "select imported lib" from the debug menu again, add mfc100 into the lib list, and then click "process". restart your app using olldbg, all symbol info for mfc100 dll can be loaded into your app.
sorry, my ollydbg is in chinese
Attached Images
File Type: jpg 1.jpg (93.8 KB, 16 views)
Reply With Quote
The Following User Gave Reputation+1 to zhgong007 For This Useful Post:
sendersu (01-01-2014)
  #10  
Old 01-01-2014, 04:43
sendersu sendersu is offline
VIP
 
Join Date: Oct 2010
Posts: 1,067
Rept. Given: 332
Rept. Rcvd 223 Times in 115 Posts
Thanks Given: 235
Thanks Rcvd at 513 Times in 288 Posts
sendersu Reputation: 200-299 sendersu Reputation: 200-299 sendersu Reputation: 200-299
By the way, here is the latest edition of great mapimp OllyDbg plugin

https://www.dropbox.com/sh/zz2hranew0usqmn/wPL2w_Yr7l

@zhgong007
could you upload your *.map files that were Not OK with Olly?
just curious what is wrong (supposing you create these using IDA6.1, right?)

thanks
Reply With Quote
  #11  
Old 01-01-2014, 04:56
zhgong007 zhgong007 is offline
Family
 
Join Date: May 2011
Posts: 239
Rept. Given: 17
Rept. Rcvd 300 Times in 46 Posts
Thanks Given: 26
Thanks Rcvd at 369 Times in 101 Posts
zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399
yes, I create the map using IDA61. the only reason why both two plugins are not working, I think, are that they both didn't handle when an app may have variable OEP. maybe I am wrong. I didn't chek it for a PE with fixed entry point.
Reply With Quote
  #12  
Old 01-01-2014, 05:02
sendersu sendersu is offline
VIP
 
Join Date: Oct 2010
Posts: 1,067
Rept. Given: 332
Rept. Rcvd 223 Times in 115 Posts
Thanks Given: 235
Thanks Rcvd at 513 Times in 288 Posts
sendersu Reputation: 200-299 sendersu Reputation: 200-299 sendersu Reputation: 200-299
@all:
could you send me please the mfc110*.lib for Intel and amd64 dirs
same question goes to mfc70*.lib, mfc71*.lib and odl good mfc40*.lib

I'll create the complete tool and we'll close this issue once and forever, gentlemen
Thanks.
P.S. all those libs could be copied from correspondent Visual Studio installation.
Right now I've only VS2010 SP1 (which corresponds to mfc100xxx) and I'll update it as well.
Reply With Quote
  #13  
Old 01-01-2014, 05:13
zhgong007 zhgong007 is offline
Family
 
Join Date: May 2011
Posts: 239
Rept. Given: 17
Rept. Rcvd 300 Times in 46 Posts
Thanks Given: 26
Thanks Rcvd at 369 Times in 101 Posts
zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399
and one suggesition for your idc plugin:

the dll name seems to be Case-sensitive--I have tried it a number of times, until I realize it is due to case sensitive issue.
Reply With Quote
  #14  
Old 01-01-2014, 05:33
zhgong007 zhgong007 is offline
Family
 
Join Date: May 2011
Posts: 239
Rept. Given: 17
Rept. Rcvd 300 Times in 46 Posts
Thanks Given: 26
Thanks Rcvd at 369 Times in 101 Posts
zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399
free idc for MFC70, MFC71, and MFC80
link:
http://assarbad.net/en/stuff/IDA.idc/
Reply With Quote
  #15  
Old 01-01-2014, 05:39
zhgong007 zhgong007 is offline
Family
 
Join Date: May 2011
Posts: 239
Rept. Given: 17
Rept. Rcvd 300 Times in 46 Posts
Thanks Given: 26
Thanks Rcvd at 369 Times in 101 Posts
zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399 zhgong007 Reputation: 300-399
lib collections for MFC90 and MFC100, I have uploaded here:

http://www.4shared.com/zip/LklhV0km/mfc90x.html

http://www.4shared.com/zip/ZmIUDUKN/mfc100_lib.html
Reply With Quote
The Following 3 Users Gave Reputation+1 to zhgong007 For This Useful Post:
sendersu (01-01-2014), TechLord (01-01-2014), zeuscane (01-01-2014)
The Following User Says Thank You to zhgong007 For This Useful Post:
Fyyre (08-22-2017)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export Table Tester Nacho_dj Community Tools 3 08-13-2016 07:02
how to make DLL export these functions? dion General Discussion 2 02-21-2009 14:58


All times are GMT +8. The time now is 06:42.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )