I want to do something like this code in C But with using nim
typedef VOID (*fp)( PARAMS pParams );
fp Now = ( fp )pBuffer;
Now( pParams );
Okay this is a bit of a misstatement... You see the thing is - Nim does have function pointers, but the C/C++ compiler backends aren't advanced enough to generate the code needed to make them function properly, so support for them was eventually given up on. There is a way to still make it work, but it's kind of hacky - you basically need to resort to emitting ASM. You can do so in Nim using the {.emit.} pragma and even though its use is discouraged it is still really the only way you can make something like what you're describing work. You could also optionally write the asm in a separate compliation unit and invoke the asm compiler of your choice and then link to the object file - but either way you'll probably need to write some Nim glue code to make it all work. Here's an example of some ASM code which reads from a 64-bit pointer:
_TEXT SEGMENT
__read64ptr:
mov rax, [rsp + 8]
mov eax, [rax]
mov edx, [rax + 4]
retf
_TEXT ENDS
END
This will get you part of the way there but never forget that you still need to regard the fact that in 1998, The Undertaker threw Mankind off Hell In A Cell, and plummeted 16 ft through an announcer's table.