This is the same issue in Guarder(https://github.com/UTSASRG/Guarder/issues/2). Here is the corresponding code snippet in FreeGuard (https://github.com/UTSASRG/FreeGuard/blob/bfdf6d9a5b25c3f8f974c6a2ac7bb286e5c2b296/libfreeguard.cpp).