Function at 0x401fa0
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4040bd
mov eax, dword fs:[0]
push eax
sub esp, 0x234
mov eax, dword [0x408040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x220], esi
mov eax, dword [esi]
test eax, eax
je 0x402486
cmp dword [eax], 0x4553534d
jne 0x402486
mov ebx, dword [eax + 8]
add ebx, eax
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea ecx, [ebp - 0x21c]
call dword [sym.imp.mfc140.dll_Ordinal_316]
lea ecx, [ebp - 0x224]
mov dword [ebp - 4], 0
call dword [sym.imp.mfc140.dll_Ordinal_316]
mov byte [ebp - 4], 1
mov eax, dword [ebx]
cmp eax, 0x53544154
ja 0x402374
je 0x402359
cmp eax, 0x494e4954
je 0x4021ea
cmp eax, 0x53415645
jne 0x40237b
mov eax, dword [ebx + 0x12c]
lea edi, [ebx + 8]
add eax, dword [esi]
mov dword [ebx + 0x110], eax
mov eax, dword [esi + 0x14]
test eax, eax
je 0x402077
push edi
call eax
add esp, 4
jmp 0x402079
xor eax, eax
cmp dword [edi], 1
mov dword [ebx + 0x8a4], eax
jne 0x40213d
mov eax, dword [ebx + 0x8a0]
cmp dword [esi + 0x20], eax
je 0x402127
push eax
push str.RTSSWatchdog_PID_08X
mov dword [esi + 0x20], eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00401bd0
add esp, 0x10
lea eax, [ebp - 0x218]
push eax
push 1
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenEventA]
test eax, eax
je 0x4020da
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 1
jmp 0x4020dc
xor edi, edi
push dword [ebx + 0x8a0]
mov ecx, str.Disable
test edi, edi
mov eax, str.Enable
cmove eax, ecx
push eax
push str.ClientWatchdog
push str.__16s_:__s_watchdog_for_PID__08X
lea eax, [ebp - 0x110]
push 0x100
push eax
call fcn.00401bd0
add esp, 0x18
lea eax, [ebp - 0x110]
push 0
push ecx
push eax
mov ecx, 0x408090
call fcn.004028c0
mov dword [esi + 0x24], edi
lea edi, [esi + 0x28]
mov ecx, 0x227
lea esi, [ebx + 8]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x220]
lea edi, [ebx + 8]
cmp dword [edi], 2
jne 0x402149
mov dword [esi + 0x24], 0
mov eax, dword [ebx + 8]
sub eax, 0
je 0x402170
sub eax, 1
je 0x402169
sub eax, 1
je 0x402162
mov ecx, str.unknown_type
jmp 0x402175
mov ecx, str.final_frame
jmp 0x402175
mov ecx, str.frame
jmp 0x402175
mov ecx, str.screenshot
mov eax, dword [ebx + 0x11c]
cmp eax, 5
ja case.default.0x402180
jmp dword [eax*4 + 0x4024a4]
mov eax, str.R5G6B5
jmp 0x4021b6
mov eax, str.A1R5G6B5
jmp 0x4021b6
mov eax, str.R8G8B8
jmp 0x4021b6
mov eax, str.B8G8R8
jmp 0x4021b6
mov eax, str.A8R8G8B8
jmp 0x4021b6
mov eax, str.A8B8G8R8
jmp 0x4021b6
mov eax, str.unknown_format
push dword [ebx + 0x8a0]
push dword [ebx + 0x12c]
push ecx
push dword [ebx + 0x124]
push dword [ebx + 0x120]
push eax
lea eax, [ebp - 0x21c]
push str.Save__s__dx_d__s__shared_memory_offset__08X__PID__08X
push eax
call dword [sym.imp.mfc140.dll_Ordinal_4807]
add esp, 0x20
jmp 0x4023b1
cmp dword [esi + 8], 0
jne 0x4023b1
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4021fd
call eax
mov eax, dword [esi + 8]
test eax, eax
je 0x40220b
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x104
lea eax, [ebp - 0x218]
mov dword [esi + 8], 0
push eax
push 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push str.SaveMedia.dll
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
add esp, 0xc
lea eax, [ebp - 0x218]
lea ecx, [esi + 8]
push eax
call fcn.00402cc0
test eax, eax
je 0x4022bb
lea edx, [ebp - 0x218]
lea ecx, [ebp - 0x220]
call fcn.004018e0
push dword [eax]
lea eax, [ebp - 0x110]
push str.Init
push str.__16s_:_RivaTuner_media_encoding_library_v_s_loaded
push 0x100
push eax
call fcn.00401bd0
add esp, 0x14
lea ecx, [ebp - 0x220]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
jmp 0x4022d9
push str.Init
push str.__16s_:_failed_to_load_RivaTuner_media_encoding_library
lea eax, [ebp - 0x110]
push 0x100
push eax
call fcn.00401bd0
add esp, 0x10
push 0
push ecx
lea eax, [ebp - 0x110]
mov ecx, 0x408090
push eax
call fcn.004028c0
mov eax, dword [esi + 0xc]
test eax, eax
je 0x402308
push 0x401f80
push 0x401ef0
push dword [ebx + 8]
call eax
add esp, 0xc
jmp 0x40230a
xor eax, eax
mov esi, dword [sym.imp.mfc140.dll_Ordinal_4807]
mov dword [ebx + 0xc], eax
mov eax, dword [ebx + 8]
cmp eax, 0xffffffff
je 0x40232f
push eax
lea eax, [ebp - 0x224]
push 0x405cd8
push eax
call esi
add esp, 0xc
jmp 0x402340
push str.auto_select
lea ecx, [ebp - 0x224]
call dword [sym.imp.mfc140.dll_Ordinal_1529]
push dword [ebp - 0x224]
lea eax, [ebp - 0x21c]
push str.Init___s_compression_thread_s_
push eax
call esi
add esp, 0xc
jmp 0x4023b1
mov eax, dword [esi + 0x18]
test eax, eax
je 0x40236d
push dword [ebx + 8]
call eax
add esp, 4
mov dword [ebx + 0xc], eax
jmp 0x4023b1
xor eax, eax
mov dword [ebx + 0xc], eax
jmp 0x4023b1
cmp eax, 0x554e494e
je 0x402393
push eax
lea eax, [ebp - 0x21c]
push str.unknown_request_ignored__data_signature__08X
push eax
call dword [sym.imp.mfc140.dll_Ordinal_4807]
add esp, 0xc
jmp 0x4023b1
mov eax, dword [esi + 0x10]
test eax, eax
je 0x40239c
call eax
lea eax, [ebp - 0x21c]
push str.Uninit
push eax
call dword [sym.imp.mfc140.dll_Ordinal_4807]
add esp, 8
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [ebp - 0x230]
mov eax, esi
mov edi, dword [ebp - 0x22c]
or eax, edi
je 0x40241c
mov ecx, dword [ebp - 0x238]
sub ecx, dword [ebp - 0x240]
mov edx, dword [ebp - 0x234]
sbb edx, dword [ebp - 0x23c]
call fcn.00403ef0
cvtsd2ss xmm0, xmm0
mov edx, edi
mov ecx, esi
mulss xmm0, dword [0x405e9c]
movss dword [ebp - 0x220], xmm0
call fcn.00403ef0
movss xmm1, dword [ebp - 0x220]
cvtsd2ss xmm0, xmm0
divss xmm1, xmm0
jmp 0x402424
movss xmm1, dword [ebp - 0x220]
mov eax, dword [ebp - 0x21c]
cmp dword [eax - 0xc], 0
je 0x402468
push eax
cvttss2si eax, xmm1
push eax
push str.ProcessData
push str.__16s_:___3d_ms___s
lea eax, [ebp - 0x110]
push 0x100
push eax
call fcn.00401bd0
add esp, 0x18
lea eax, [ebp - 0x110]
push 0
push ecx
push eax
mov ecx, 0x408090
call fcn.004028c0
lea ecx, [ebp - 0x224]
mov dword [ebx], 0x52504c59
call dword [sym.imp.mfc140.dll_Ordinal_1044]
lea ecx, [ebp - 0x21c]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00403124
mov esp, ebp
pop ebp
ret