Lukket

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

Dette prosjektet mottok 11 bud fra talentfulle frilansere med en gjennomsnittlig budpris på $196 USD.

Få gratis kostnadsberegning for et prosjekt som dette
Arbeidsgiver jobber
Prosjektbudsjett
$30 - $250 USD
Totale bud
11
Prosjektbeskrivelse

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!

Ønsker du å tjene litt penger?

  • Sett ditt budsjett og tidsramme
  • Skisser ditt forslag
  • Få betalt for ditt arbeid

Ansett frilansere som også har bydd på dette prosjektet

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online