Skip to content

Commit

Permalink
fix Test CallLoop bugs when builded with win32
Browse files Browse the repository at this point in the history
  • Loading branch information
haikejishu authored and DarthTon committed Jul 17, 2023
1 parent 61fe525 commit 5ede6ce
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/BlackBone/Process/RPC/RemoteExec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@ NTSTATUS RemoteExec::PrepareCallAssembly(
}

a.GenPrologue();
if (_process.core().isWow64())
{
a->pusha();
a->pushf();
}
a.GenCall( pfn, args, cc );

// Retrieve result from XMM0 or ST0
Expand All @@ -571,6 +576,11 @@ NTSTATUS RemoteExec::PrepareCallAssembly(
}

AddReturnWithEvent( a, mt_default, retType );
if (_process.core().isWow64())
{
a->popf();
a->popa();
}
a.GenEpilogue();

return STATUS_SUCCESS;
Expand Down

0 comments on commit 5ede6ce

Please sign in to comment.