Except as provided in section
312
(k)(4), for purposes of this subpart, the earnings and profits of any foreign corporation, and the deficit in earnings and profits of any foreign corporation, for any taxable year shall be determined according to rules substantially similar to those applicable to domestic corporations, under regulations prescribed by the Secretary. In determining such earnings and profits, or the deficit in such earnings and profits, the amount of any illegal bribe, kickback, or other payment (within the meaning of section
162
(c)) shall not be taken into account to decrease such earnings and profits or to increase such deficit. The payments referred to in the preceding sentence are payments which would be unlawful under the Foreign Corrupt Practices Act of 1977 if the payor were a United States person.