The bitmask is used to manipulate the value of the integer variable. From debugging, I guessed that the bitwise operation generates nearest even integer. Here is the assembly:
mov r8d, 0FFFFFFF8h jnz loc_x mov eax, [rsp+48] add eax, 7 and eax, r8d mov edi, eax mov r8d, eax mov [rsp+48], rdi call operator_new xor r8d, r8d mov rsi, rax test rax, rax jz loc_y
The interested pseudo-code is:
a = (b + 7) & 0xFFFFFFF8; c = a;
So, what does
0xFFFFFFF8 value do? And how can I determine the purpose behind that operation (and possibly any other in future)?