The following code should write a call to codecave at a specific address. It does write a call but the call points to somewhere else instead of my codecave address.
Dim allocMem As Binarysharp.MemoryManagement.Memory.RemoteAllocation = MSharp.Memory.Allocate(1024, Binarysharp.MemoryManagement.Native.Enums.MemoryProtectionFlags.ExecuteReadWrite, True) Dim callStr As String = $"use32 & {vbnewline} call {allocMem.BaseAddress}" MSharp.Assembly.Inject(callStr, scriptInjectionAddress)