Hey Guys,
It doesn't seem to work here for me.
I am getting the GoASM files from:
http://www.beaengine.org/downloadsThan declaring the following in my project:
#include BeaEngineGoAsm64.inc
Disasm = BeaEngine64.lib:Disasm
Structure and other definitions in DATA section:
MyDisasm _Disasm <>
szoutofblock DB 'Security alert. Disasm tries to read unreadable memory', 0
i DD 100
invoke BeaEngine64.lib:Disasm, offset MyDisasm //crashes
invoke Disasm, offset MyDisasm //crashes
Using LoadLibrary to load BeaEngine64.dll from the same package and than using GetProcAddress to retrieve pointer to Disasm function all is working perfectly fine.
The following crash occurs when linking the .lib and invoking it:
(b04.1350): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
00000000`40007739 ?? ???
Function is being called from:
00000001`4003ce55 488b442430 mov rax,qword ptr [rsp+30h]
00000001`4003ce5a 4889c1 mov rcx,rax
00000001`4003ce5d 488b80f0010000 mov rax,qword ptr [rax+1F0h]
00000001`4003ce64 480fb600 movzx rax,byte ptr [rax]
00000001`4003ce68 488d1549510000 lea rdx,[image00000001_40000000!opcode_map1 (00000001`40041fb8)]
00000001`4003ce6f ff14c2 call qword ptr [rdx+rax*8] //call that crashes
so that is why I believe there is something with the .lib