已关闭

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

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!

技能: C 编程, x86/x64 汇编

查看更多: catch swf file net, vb6 read instruction file, download file given authentication, select file handlers unix

About the Employer:
( 62 reviews ) Jerez de la Frontera, Spain

项目ID: #12023163

10名威客为此工作的平均竞标价是$197

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 更多

$150 USD 在3天内
(70条评论)
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 更多

$300 USD 在3天内
(19条评论)
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 更多

$210 USD 在2天内
(19条评论)
5.1
$188 USD 在3天内
(27条评论)
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 更多

$144 USD 在5天内
(3条评论)
2.6
$277 USD 在3天内
(3条评论)
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 更多

$222 USD 在2天内
(1条评论)
0.8
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 更多

$155 USD 在3天内
(0条评论)
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 更多

$222 USD 在5天内
(0条评论)
0.0
$155 USD 在10天内
(0条评论)
0.0
$133USD 在1天里
(0条评论)
0.0