Function at 0x401e38
Capabilities:
Check for time delay via gettickcount
Check mutex on windows
Check os version
Get common file path
Link many functions at runtime
Log keystrokes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
push ebx
push esi
push edi
xor ebx, ebx
push str.FrapsRunning
push ebx
push ebx
mov dword [ebp - 8], 4
call dword [sym.imp.KERNEL32.DLL_CreateMutexA]
cmp eax, ebx
mov dword [0x40d364], eax
je 0x401e84
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
jne 0x401e84
push dword [0x40d364]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
inc eax
jmp 0x40242b
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push str.SOFTWAREFraps
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp dword [ebp - 0x18], 2
jne 0x402007
lea eax, [ebp - 8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
lea eax, [ebp - 0xc]
push 0x40a0ac
push eax
push ebx
push str.Sampling_Rate
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40a0b0
push eax
push ebx
push str.Overlay_Style
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40d37c
push eax
push ebx
push str.Overlay_Corner
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40d384
push eax
push ebx
push str.Screen_Capture
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40d388
push eax
push ebx
push str.Manual_Logging
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40d38c
push eax
push ebx
push str.Second_Logging
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40d374
push eax
push ebx
push str.Capture_Key
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40d378
push eax
push ebx
push str.Log_Key
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40d390
push eax
push ebx
push str.Start_Minimised
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40d380
push eax
push ebx
push str.Movie_Capture
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40d370
push eax
push ebx
push str.Movie_Key
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40a0b4
push eax
push ebx
push str.Movie_Framerate
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40a0b8
push eax
push ebx
push str.Movie_Gamma
push dword [ebp - 4]
call edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push 0x40d394
push eax
push ebx
push str.Framerate_On_Screenshot
push dword [ebp - 4]
call edi
jmp 0x40204d
xor eax, eax
mov dword [0x40d37c], ebx
inc eax
mov dword [0x40d384], ebx
mov dword [0x40a0ac], eax
mov dword [0x40a0b0], eax
mov dword [0x40d388], ebx
mov dword [0x40d38c], ebx
mov dword [0x40d390], ebx
mov dword [0x40d380], ebx
mov dword [0x40a0b4], 0xa
mov dword [0x40a0b8], eax
mov dword [0x40d394], ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x40d374], ebx
jne 0x402068
mov dword [0x40d374], 0x890
cmp dword [0x40d378], ebx
jne 0x40207a
mov dword [0x40d378], 0x91
cmp dword [0x40d370], ebx
jne 0x40208c
mov dword [0x40d370], 0x78
mov esi, 0x100
mov edi, 0x40ce50
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
jmp 0x4020b3
cmp byte [ecx + 0x40ce50], 0x5c
je 0x4020ba
dec ecx
cmp ecx, ebx
jg 0x4020aa
jmp 0x4020c0
mov byte [ecx + 0x40ce50], bl
mov eax, dword [ebp + 8]
push str.FRAPS.DLL
mov dword [0x40d360], eax
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
cmp eax, ebx
mov dword [ebp - 0x10], eax
jne 0x4020f4
push ebx
push 0x40a450
push 0x40a434
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push 2
pop eax
jmp 0x40242b
mov edi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.FrapsSetup
push eax
call edi
push str.FrapsKey
mov dword [0x40d35c], eax
push dword [ebp - 0x10]
call edi
push str.FrapsCount
mov dword [0x40ce40], eax
push dword [ebp - 0x10]
call edi
push str.FrapsVersion
mov dword [0x40d358], eax
push dword [ebp - 0x10]
call edi
cmp eax, ebx
mov dword [0x40ce38], eax
jne 0x40213c
push 3
jmp 0x402147
call eax
cmp eax, 0x1940
je 0x402162
push 4
pop esi
push 0x10
push 0x40a3f4
push 0x40a320
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, esi
jmp 0x40242b
push esi
push 0x40cd38
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
lea eax, [ebp - 0xc8]
mov dword [ebp - 0xc8], 0x94
push eax
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
xor eax, eax
cmp dword [ebp - 0xb8], 2
mov dword [ebp - 0x14], ebx
setne al
mov dword [0x40d39c], eax
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
mov ecx, dword [ebp - 0x14]
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], esi
mov dword [ecx*4 + 0x40cf58], eax
jl 0x402199
push 0x6b
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadIconA]
push ebx
push 0x4016c5
push ebx
push 0x65
push dword [ebp + 8]
mov dword [0x40cd30], eax
call dword [sym.imp.USER32.dll_CreateDialogParamA]
push dword [0x40cd30]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
mov dword [ebp + 8], eax
push ebx
push 0x80
push eax
call esi
push dword [0x40cd30]
push 1
push 0x80
push dword [ebp + 8]
call esi
call fcn.004011a3
mov ecx, dword [ebp + 8]
call fcn.00401256
mov ecx, dword [ebp + 8]
call fcn.00401000
mov ecx, dword [ebp + 8]
call fcn.004012f4
cmp dword [0x40cd1c], ebx
jne 0x402239
push 0x30
push 0x40a310
push str.DirectInput
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
push dword [ebp - 0x10]
push str.FrapsProcCBT
push dword [ebp - 0x10]
call edi
mov esi, dword [sym.imp.USER32.dll_SetWindowsHookExA]
push eax
push 5
call esi
push ebx
mov dword [0x40ce44], eax
push dword [ebp - 0x10]
push str.FrapsProcCALLWND
push dword [ebp - 0x10]
call edi
push eax
push 4
call esi
mov dword [0x40ce3c], eax
call fcn.00401536
cmp dword [0x40ce44], ebx
je 0x402284
cmp dword [0x40ce3c], ebx
jne 0x402296
push ebx
push str.Fraps
push str.Hook_Error
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [ebp + 0x14]
cmp eax, ebx
je 0x4022bf
cmp eax, 6
je 0x4022bf
cmp dword [0x40d390], ebx
jne 0x4022bf
cmp eax, 2
je 0x4022bf
cmp eax, 7
je 0x4022bf
push 5
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_ShowWindow]
push 2
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.DLL_SetThreadPriority]
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov esi, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push ebx
mov edi, 0x403
push 0xff
push edi
push 0x407
push dword [ebp + 8]
mov dword [0x40ce48], eax
call esi
push ebx
push 0xff
push edi
push 0x408
push dword [ebp + 8]
call esi
push ebx
push 0xff
push edi
push 0x409
push dword [ebp + 8]
call esi
push ebx
add edi, 0xfffffffe
push dword [0x40d374]
push edi
push 0x407
push dword [ebp + 8]
call esi
push ebx
push dword [0x40d378]
push edi
push 0x408
push dword [ebp + 8]
call esi
push ebx
push dword [0x40d370]
push edi
push 0x409
push dword [ebp + 8]
call esi
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
mov dword [ebp + 8], 1
jmp 0x40237c
cmp dword [ebp - 0x30], 0x12
jne 0x402368
mov dword [ebp + 8], ebx
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push ebx
push ebx
lea eax, [ebp - 0x34]
push ebx
push eax
call edi
test eax, eax
jne 0x40235f
cmp dword [0x40d384], ebx
jne 0x4023a3
cmp dword [0x40d388], ebx
jne 0x4023a3
cmp dword [0x40d380], ebx
je 0x4023b0
cmp dword [0x40cd1c], ebx
je 0x4023b0
call fcn.0040109e
cmp dword [0x40d38c], ebx
je 0x4023fe
mov eax, dword [0x40ce48]
lea esi, [eax + 0x3e8]
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
cmp eax, esi
jb 0x4023fe
cmp dword [0x40d368], ebx
mov dword [0x40ce48], esi
je 0x4023e0
xor ecx, ecx
inc ecx
jmp 0x4023f9
push 1
call dword [0x40d358]
test eax, eax
je 0x4023fe
push 2
mov dword [0x40d368], 1
pop ecx
call fcn.00401d4c
push 5
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp dword [ebp + 8], ebx
jne 0x40237c
call fcn.004013ba
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
push dword [0x40cd30]
call dword [sym.imp.USER32.dll_DestroyIcon]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10