replaced most kernel32 calls with native.