I really like this refactor, but I wanted to comment briefly on the try
block.
I suspect that you kept the try
block to keep things simple, but alternatively you can also use a function try-block if you like the notational convenience that it provides.
A function try-block will save one level of indentation in the function body, which could be nice with a function body of this size.
Function try-blocks are not commonly used, but it is perfectly fine to use them (at least according to Stroustrup).
With a function-try block this function would look something like this:
0static bool AppInitLockBlockIndex(...) try
1{
2 ...
3 return true;
4} catch (std::exception& e)
5{
6 ...
7 return false;
8}
Of course this comment is not critical, feel free to ignore it.