Function at 0x407830
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408b80
mov eax, dword fs:[0]
push eax
mov eax, 0x5444
call fcn.00408940
mov eax, dword [0x40c024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [ebp - 0x541c]
mov dword [ebp - 0x5414], 0x400
push eax
push 0x20019
push 0
push str.SOFTWARETencentQQNT
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407aa4
lea eax, [ebp - 0x5414]
push eax
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x5418]
push eax
push 0
push str.Install
push dword [ebp - 0x541c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407a60
push str.QQ.exe
lea eax, [ebp - 0x410]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x410]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40795a
test al, 0x10
jne 0x40795a
lea ecx, [ebp - 0x410]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4078f4
mov eax, dword [esi + 0x14]
sub ecx, edx
sar ecx, 1
cmp ecx, eax
ja 0x407937
mov edi, esi
cmp eax, 8
jb 0x407913
mov edi, dword [esi]
mov dword [esi + 0x10], ecx
lea eax, [ebp - 0x410]
lea esi, [ecx + ecx]
push esi
push eax
push edi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
xor eax, eax
mov word [esi + edi], ax
mov al, 1
jmp 0x407adc
lea eax, [ebp - 0x410]
mov byte [ebp - 0x5420], 0
push eax
push dword [ebp - 0x5420]
push ecx
mov ecx, esi
call fcn.004070e0
mov al, 1
jmp 0x407adc
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x5450]
call fcn.004051a0
lea edx, [ebp - 0x5450]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x5438]
call fcn.00407210
cmp dword [eax + 0x14], 0x10
jb 0x40798c
mov eax, dword [eax]
push eax
push str.File_not_exists__path:__s
lea eax, [ebp - 0x2c10]
push 0x2800
push eax
call fcn.00404670
mov ecx, dword [ebp - 0x5424]
add esp, 0x10
cmp ecx, 0x10
jb 0x4079dc
mov edx, dword [ebp - 0x5438]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4079d2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407a29
push ecx
push edx
call fcn.00407c0f
add esp, 8
mov ecx, dword [ebp - 0x543c]
mov dword [ebp - 0x5428], 0
mov dword [ebp - 0x5424], 0xf
mov byte [ebp - 0x5438], 0
cmp ecx, 8
jb 0x407a39
mov edx, dword [ebp - 0x5450]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x407a2f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x407a2f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407c0f
add esp, 8
lea eax, [ebp - 0x2c10]
mov edx, 0xbc
push eax
mov ecx, str.util::GetQQExePath
call fcn.00407570
add esp, 4
push dword [ebp - 0x541c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x407ada
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RegQueryValueExW_fail:_d
lea eax, [ebp - 0x2c10]
push 0x2800
push eax
call fcn.00404670
lea eax, [ebp - 0x2c10]
mov edx, 0xc0
push eax
mov ecx, str.util::GetQQExePath
call fcn.00407570
add esp, 0x14
push dword [ebp - 0x541c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x407ada
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RegOpenKeyExW_fail:_d
lea eax, [ebp - 0x5410]
push 0x2800
push eax
call fcn.00404670
lea eax, [ebp - 0x5410]
mov edx, 0xc5
push eax
mov ecx, str.util::GetQQExePath
call fcn.00407570
add esp, 0x14
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00407bd1
mov esp, ebp
pop ebp
ret