question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in parse export for DLL profapi.dll

See original GitHub issue

Describe the bug When a BinHandler is created, the code in charge for parsing the Export table raise an exception. The problematic file is C:\Windows\SysWOW64\profapi.dll (MD5: 2545F5AA189DF907BC4A6E000E231A6D).

To Reproduce Steps to reproduce the behavior:

  1. Run code: BinHandler.Init(ISA.OfString "x86", @"C:\Windows\SysWOW64\profapi.dll")
  2. See error in PEHelper.getRawOffset, exception message: System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'

Environment (please complete the following information):

  • OS: Windows
  • B2R2 version: 0.1.1 (2019-03-22)

Additional context The DLL contains a uncommon Export directory table, an example of export is:

Ordinal        Function RVA   Name Ordinal    Name RVA    Name
00000066	00004560	N/A	      N/A	  N/A

This will raise an exception at the following code: let sHdr = headers.SectionHeaders.[idx] where idx has value -1.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sangkilccommented, May 27, 2019

44d2c8a7c3d92de270a9cfd886c99434b730d931 should fix the issue. Please close the issue if it works for you.

1reaction
sangkilccommented, May 27, 2019

Awesome. Will take a look at this ASAP.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Profapi.dll: What It Is & How To Fix Errors
Learn what profapi.dll is, common error messages, and how to fix them. Resolve issues related to this dynamic link library file efficiently.
Read more >
Delay imported function not in export table
EDIT: It looks like it was an issue with pefile parsing the DLL. I was indeed able to examine the export section using...
Read more >
profapi.dll was not found
Hi Laura That error refers to the user profile service in Windows 10, where exactly are you seeing this error and what are...
Read more >
x64 DLL export function names - c++
An option you have to export function names without any decoration (independently from the particular calling convention you used in x86, ...
Read more >
Windows 7 DLL File Information - profapi.dll
This means that when profapi.dll is loaded, the above files are automatically loaded too. If one of these files is corrupted or missing,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found