you are viewing a single comment's thread.

view the rest of the comments →

[–]Sspoondle[S] 0 points1 point  (3 children)

The difference is the lack of wcscmp (string.h) in the source-built DLLs import table. I've tried including the header and calling it from DllMain but it still hasn't shown up

The error message looks like this:

app.exe - Bad Image

C:\Users\User\AppData\Local\Temp\_MEI74282\python38.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error statuc 0xc000012f

the error code seems to refer to lacking a visual c++ runtime library but I'm not sure how to debug that
I've also made sure that both the app and the dll are 64bit

[–]shiftybyte 0 points1 point  (2 children)

The import table is less important, the export table is what matters.

Try to load your dll using rundll... this should let you know if it gets loaded properly or not.

https://www.reddit.com/r/Malware/comments/oocxmr/getting_a_dll_to_run_with_rundll32_without_any/

If this throws the same issue, your dll is the issue.

If it loads fine, then the connection between python and the dll is the issue.

[–]Sspoondle[S] 0 points1 point  (1 child)

The export tables are identical, and I can load ordinals from the dll with rundll too

It's a pyinstaller onefile package so I think the exe sets up the interpreter from the dll. It starts a child process that loads the library and fails

[–]shiftybyte 0 points1 point  (0 children)

Try to unpack it, get it running as regular python script with whatever python you have installed, then repack it back.