Retrieve locations of Exception handlers (from "catch" instruction) in a given PE file

Closed

Description

Hi,

I need a C/C++ function that returns the address of the Windows Exception handlers inside a specific memory range in a compiled PE file (32-bit, 64-bit).

Suppose the following code:

----

int x = 5;

try

{

if (x == 0) throw(1ULL);

else if (x % 2) throw("x must be even");

x *= 4;

}

catch (unsigned long long e)

{

std::cerr << e;

}

catch (const char *e)

{

std::cerr << e;

}

----

As you can see there are 2 exception handlers. Now the source code is compiled as an EXE/DLL.

Suppose that the above code starts at RVA = 0x401000 and ends at 0x401100. I will pass to your function something like:

GetNExceptionsInfoInBlock(filename, 0x401000, 0x401100, std::vector &info);

Your function will fill the vector with exception RVAs found in the given block of code.

This can be done by inspecting the MAGIC number where the exception handling is generated by Visual Studio. Please, refer to:

[url removed, login to view]

[url removed, login to view]

Attached you have a test example that you can compile and the expected output about handlers found inside a block (file "[url removed, login to view]")

If you need further information, let me know please.

NOTE: Your code should be implemented in C or C++ and compilable with Visual Studio.

Thanks!

Skills: C Programming, x86/x64 Assembler

See more: been tasked to design & develop the website for the club they have given you he following information to guide you on this web p, source code digital signature details given file, write program calculates crc given file, create linked list given txt file java, obfuscate pe file, catch swf file net, move file using java given path table, vb6 read instruction file, sql 2005 query ldf file locations, catch form csv file php, assembler instruction open file output mode, freeaspupload updateform catch file name, download file given authentication, check given file password protected cnet, create dll file given source code, select file handlers unix

Project ID: #12023163

10 freelancers are bidding on average $197 for this job

hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on client side, using c++ under windows envir More

$150 USD in 3 days
(70 Reviews)
6.4
LiangXiaoJin

Dear client, how are you? I am a C++ programmer and mathematician. Your meaning is clear for me. Seems task is VERY VERY APPROPRIATE for me. Please check my "Profile & Work List" and consider hiring me if my skill More

$300 USD in 3 days
(19 Reviews)
5.6
JinDongZhe

I've mastered software reverse engineering/C/C++/C#/Java/Win API/Assembly programming and helped many customers. Especially, I've rich experiences of unpacking Themida/WinLicense, VmProtect, and other packing modules More

$210 USD in 2 days
(19 Reviews)
5.1
$188 USD in 3 days
(27 Reviews)
4.7
catlet1

A little about me. I am a reverse engineer with 6+ years of experience. I'm also a c programmer with 7+ years under my belt I have made many application to modify assembly code (I've also made something to list out More

$144 USD in 5 days
(3 Reviews)
2.6
$277 USD in 3 days
(3 Reviews)
0.9
worldc584

Hi I have got your job posting and I am very interested in this project I have many experiences of c++ programming over 10 years. And I have an experience of reverse-engineering over 5 years. If you select me, I wi More

$222 USD in 2 days
(1 Review)
0.8
$133 USD in 1 day
(0 Reviews)
0.0
$155 USD in 10 days
(0 Reviews)
0.0
technologics2

Dear Prospect Hiring Manager. Thank you for giving me a chance to bid on your project. I am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I have c More

$155 USD in 3 days
(0 Reviews)
0.0
faisdesign

Hello, I have read all the requirements of this project and my team can provide high quality professional results at a low cost. Our team consists of 4 programmers/designers with over 6 years experience and a v More

$222 USD in 5 days
(0 Reviews)
0.0