Function at 0x4229d0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get program files directory
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x55b25b
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1003c
call fcn.00530550
mov eax, dword [0x5bc9cc]
xor eax, esp
mov dword [esp + 0x10038], eax
push ebx
push esi
push edi
mov eax, dword [0x5bc9cc]
xor eax, esp
push eax
lea eax, [esp + 0x10050]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 4], 0
je 0x422a2c
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
call edx
jmp 0x422d9e
mov eax, dword [esi + 8]
test eax, eax
je 0x422d9e
xor edi, edi
cmp dword [eax + 0x3d4], edi
jbe 0x422a89
xor ebx, ebx
lea ecx, [eax + 0x3cc]
mov eax, edi
call fcn.00447380
test eax, eax
je 0x422a75
mov eax, dword [esi + 8]
lea ecx, [eax + ebx]
movzx eax, word [ecx + 0x400]
test eax, 0x200
jne 0x422a75
test al, 8
je 0x422a75
test byte [ecx + 0x3f8], 1
je 0x422a90
mov eax, dword [esi + 8]
add edi, 1
add ebx, 0xa0
cmp edi, dword [eax + 0x3d4]
jb 0x422a43
mov eax, dword [esi + 8]
or dword [eax + 4], 0x40
mov ecx, dword [esi + 8]
mov ebx, 0x20000
test dword [ecx + 0x58], ebx
je 0x422aa3
push esi
call fcn.004232a0
mov edx, dword [esi + 8]
test byte [edx + 7], 1
je 0x422ab2
push esi
call fcn.00423980
mov eax, dword [esi + 8]
mov ecx, dword [eax + 0x1804]
xor edi, edi
test ecx, ecx
je 0x422b6a
test ecx, ecx
mov eax, ecx
je 0x422c81
mov eax, dword [eax + 8]
test eax, eax
mov ecx, dword [ecx]
je 0x422b22
mov edx, dword [eax + 0x68]
cmp edx, 8
je 0x422ae5
cmp edx, 9
jne 0x422b0c
cmp dword [eax + 0x1c], 0
je 0x422b0c
mov edx, dword [eax + 0xec]
test edx, 0x1000
je 0x422b0c
test dl, 1
jne 0x422b06
test edx, 0x400
je 0x422b0c
mov edx, dword [esi + 8]
or dword [edx + 4], ebx
mov eax, dword [eax + 0xf0]
test al, 1
je 0x422b22
test eax, 0x100000
je 0x422b22
mov edi, 1
test ecx, ecx
jne 0x422ac5
test edi, edi
je 0x422b6a
push ecx
mov ecx, esp
mov dword [esp + 0x44], esp
push 0x5703b8
call fcn.0040c150
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.RtHDVBg.exe
mov dword [esp + 0x10064], 0
call fcn.0040c150
mov dword [esp + 0x10060], 0xffffffff
call fcn.0041ddc0
add esp, 8
mov edx, dword [esi]
mov eax, dword [edx + 0x40]
mov ecx, esi
call eax
mov eax, dword [esi + 8]
test dword [eax + 0x80], 0x4000000
je 0x422bc6
lea ebx, [eax + 0x3cc]
test ebx, ebx
je 0x422bc6
mov edi, dword [ebx + 0x14]
cmp edi, 0xffffffff
je 0x422ba9
lea ecx, [edi + edi*4]
shl ecx, 5
cmp dword [ecx + ebx + 0xbc], 0
je 0x422ba9
call fcn.00447740
mov edi, dword [ebx + 0x1c]
cmp edi, 0xffffffff
je 0x422bc6
lea edx, [edi + edi*4]
shl edx, 5
cmp dword [edx + ebx + 0xbc], 0
je 0x422bc6
call fcn.00447740
push 0
push 0
call fcn.00429600
xor ebx, ebx
push ebx
push 1
call fcn.00429600
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
add esp, 0x10
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push 0x7fff
lea ecx, [esp + 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x422d41
lea eax, [esp + 0x44]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x422c30
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x42], 0x5c
jne 0x422c64
lea eax, [esp + 0x44]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x422c50
sub eax, edx
sar eax, 1
mov word [esp + eax*2 + 0x42], bx
mov edi, 9
cmp word [esp + 0x1c], di
jne 0x422c86
push str.RTKVAA64.EXE
push 0x7fff
lea edx, [esp + 0x4c]
push edx
jmp 0x422c95
jmp fcn.0050c9ad
push str.RTKVADDA.EXE
push 0x7fff
lea eax, [esp + 0x4c]
push eax
call fcn.0052a0c2
add esp, 0xc
push ecx
lea edx, [esp + 0x48]
mov ecx, esp
mov dword [esp + 0x18], esp
push edx
call fcn.0040c150
call fcn.0041d030
add esp, 4
cmp eax, ebx
jne 0x422d27
push 0xfffe
lea eax, [esp + 0x48]
push ebx
push eax
call fcn.0052d8f0
add esp, 0xc
lea ecx, [esp + 0x44]
push ecx
push ebx
push ebx
push 0x26
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x422d27
push str.RealtekAudioAP
lea edx, [esp + 0x48]
push 0x7fff
push edx
call fcn.0052a0c2
add esp, 0xc
cmp word [esp + 0x1c], di
jne 0x422d10
push str.RTKVAA64.EXE
push 0x7fff
lea eax, [esp + 0x4c]
push eax
jmp 0x422d1f
push str.RTKVADDA.EXE
push 0x7fff
lea ecx, [esp + 0x4c]
push ecx
call fcn.0052a0c2
add esp, 0xc
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x422d41
mov eax, dword [esi + 8]
or dword [eax + 4], 0x20000000
mov ecx, dword [esi + 8]
test dword [ecx + 0x8c], 0x400
je 0x422d8c
mov edx, dword [0x56b790]
sub esp, 0x10
mov eax, esp
mov dword [eax], edx
mov edx, dword [0x56b794]
mov dword [eax + 4], edx
mov edx, dword [0x56b798]
push 4
mov dword [eax + 8], edx
mov edx, dword [0x56b79c]
push 1
push 0x21
mov dword [eax + 0xc], edx
push ecx
lea edx, [esp + 0x38]
mov dword [esp + 0x38], ebx
call fcn.0041af50
mov eax, dword [esi + 8]
test dword [eax + 8], 0x2000
je 0x422d9e
push esi
call fcn.004241b0
mov ecx, dword [esp + 0x10050]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10038]
xor ecx, esp
call fcn.0052944d
mov esp, ebp
pop ebp
ret