The MASM Forum

General => The Campus => Topic started by: zin on April 02, 2020, 09:52:28 PM

Title: look inside .lib file is it possible?
Post by: zin on April 02, 2020, 09:52:28 PM
Hello everyone.
It is possible to reverse object file library to see the procedures and understand the code written there?
Title: Re: look inside .lib file is it possible?
Post by: hutch-- on April 02, 2020, 09:58:54 PM
Simplest way is to include a library in an executable and then disassemble it. This is not reverse engineering which will get you into legal problems, its just normal programming. You can also try the standard Microsoft tool like "dumpbin" and "editbin".
Title: Re: look inside .lib file is it possible?
Post by: zin on April 02, 2020, 10:19:45 PM
hutch--
ok now i understand  :thup: thenks for the help and for the worning!
Title: Re: look inside .lib file is it possible?
Post by: LiaoMi on April 02, 2020, 11:20:57 PM
Quote from: zin on April 02, 2020, 09:52:28 PM
Hello everyone.
It is possible to reverse object file library to see the procedures and understand the code written there?

Hi,

lib file is a zip archive, you can open it with any archiver  :icon_idea:
Title: Re: look inside .lib file is it possible?
Post by: Vortex on April 03, 2020, 01:43:21 AM
You can use Pelles polib to extract the object modules if the library belongs to you.
Title: Re: look inside .lib file is it possible?
Post by: TimoVJL on April 03, 2020, 02:20:19 AM
TLPEView + TLPEPlgZydis3 ?
Title: Re: look inside .lib file is it possible?
Post by: zin on April 03, 2020, 02:48:57 AM
Thenk you all for the help.
TimoVJL and Vortex i dont really understand how to use this tools
Title: Re: look inside .lib file is it possible?
Post by: mineiro on April 03, 2020, 03:49:18 AM
Quote from: zin on April 02, 2020, 09:52:28 PM
Hello everyone.
It is possible to reverse object file library to see the procedures and understand the code written there?
Yes.
go to https://osdn.net/projects/mingw/releases/70619
download binutils-2.32-1-mingw32-bin.tar.xz
uncompress/extract it
copy your lib file to uncompressed bin folder and execute in terminal/console "objdump -d library.lib".
Program have other switches, you should read and try.
Title: Re: look inside .lib file is it possible?
Post by: aw27 on April 06, 2020, 01:11:54 AM
It is just a Zip, so Open/Extract with 7-zip File Manager. Then disassemble with objconv.exe
Title: Re: look inside .lib file is it possible?
Post by: nidud on April 06, 2020, 01:54:02 AM
deleted
Title: Re: look inside .lib file is it possible?
Post by: Vortex on April 06, 2020, 02:02:21 AM
Hi zin,

The EXPLODE option of Pelles library manager Polib extracts all the object modules :

\PellesC\bin\polib.exe /EXPLODE crt.lib
Title: Re: look inside .lib file is it possible?
Post by: mineiro on April 06, 2020, 04:26:36 AM
Quote from: nidud on April 06, 2020, 01:54:02 AM
It's not a ZIP file but a Unix archive (ar) file.
yes, part of binutils package  :thumbsup:
"ar -t lib.lib" can list object files inside library
"ar -x lib.lib" can extrat object files inside library
Title: Re: look inside .lib file is it possible?
Post by: K_F on April 06, 2020, 06:11:48 PM
Quote from: Vortex on April 06, 2020, 02:02:21 AM
The EXPLODE option of ...
:badgrin: :badgrin: :badgrin:

Bet you've (we've) just spilt the coffee over some NSA quisling's keyboard.
:greensml: