How does the nonlinear function of KeeLoq work?
Suppose you want to compute $F(0,0,0,1,0)$, then note that $00010_2 = 2_{10}$ so the result is bit $2$ (counted from $0$ from right to left) of 0x3A5C742E, or in C terms just (3A5C742E &gt;&gt; 2) &amp; 1 = 1 This is the standard convention when encoding such Boolean functions. 

As another example F(1,1,1,1,1) = (0x3A5C742E &gt;&gt; 31) &amp; 1 = 0 as $11111_2 = 31_{10}$ etc.