Function at 0x40f020
Capabilities:
Check if file exists
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x41cb48
mov eax, dword fs:[0]
push eax
sub esp, 0xa90
mov eax, dword [0x42c4fc]
xor eax, esp
mov dword [esp + 0xa8c], eax
push ebx
push esi
push edi
mov eax, dword [0x42c4fc]
xor eax, esp
push eax
lea eax, [esp + 0xaa0]
mov dword fs:[0], eax
mov ebx, dword [esp + 0xab0]
xor edi, edi
push 0x400
lea eax, [esp + 0x69e]
push edi
push eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov word [esp + 0x6a4], di
call sub.MSVCR80.dll_memset
add esp, 0xc
mov ecx, ebx
mov dword [esp + 0x1c], 0x200
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::clear_void_]
push 0x208
lea ecx, [esp + 0x492]
push edi
push ecx
mov word [esp + 0x498], di
call sub.MSVCR80.dll_memset
push 0x208
lea edx, [esp + 0x86]
push edi
push edx
mov word [esp + 0x8c], di
call sub.MSVCR80.dll_memset
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
add esp, 0x18
push 0x104
lea eax, [esp + 0x78]
push eax
push edi
call esi
test eax, eax
je 0x40f146
lea ecx, [esp + 0x74]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [esp + 0x74]
push edx
lea eax, [esp + 0x490]
push 0x104
push eax
call dword [sym.imp.MSVCR80.dll_wcscpy_s]
add esp, 0xc
push str.QMCommon.dll
lea ecx, [esp + 0x78]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [esp + 0x74]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40f146
lea eax, [esp + 0x48c]
push eax
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
lea eax, [edi + 1]
jmp 0x40f3be
xor eax, eax
push 0x1c
lea ecx, [esp + 0x24]
push ecx
push fcn.0040ee70
mov dword [esp + 0x2c], edi
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
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jbe 0x40f255
push 0x208
lea edx, [esp + 0x286]
push edi
push edx
mov word [esp + 0x28c], di
call sub.MSVCR80.dll_memset
mov ecx, dword [esp + 0x30]
add esp, 0xc
push 0x104
lea eax, [esp + 0x284]
push eax
push ecx
call esi
lea edx, [esp + 0x280]
push 0x5c
push edx
call fcn.0040ea40
mov esi, eax
add esp, 8
cmp esi, edi
je 0x40f255
lea esp, [esp]
lea eax, [esp + 0x280]
push eax
lea ecx, [esp + 0x40]
mov word [esi], di
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
push 0x4221f4
lea ecx, [esp + 0x40]
mov dword [esp + 0xaac], edi
call dword [0x41d224]
push str.QMCommon.dll
lea ecx, [esp + 0x40]
call dword [0x41d224]
cmp dword [esp + 0x54], 8
mov eax, dword [esp + 0x40]
jae 0x40f219
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f28a
lea ecx, [esp + 0x280]
push 0x5c
push ecx
call fcn.0040ea40
add esp, 8
lea ecx, [esp + 0x3c]
mov esi, eax
mov dword [esp + 0xaa8], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp esi, edi
jne 0x40f1d0
push str.IsWow64Process
push str.kernel32
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, edi
je 0x40f2bb
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
jne 0x40f2bb
jmp 0x40f2bf
lea edx, [esp + 0x280]
push edx
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
lea ecx, [esp + 0x3c]
mov esi, 1
mov dword [esp + 0xaa8], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, esi
jmp 0x40f3be
mov eax, dword [esp + 0x18]
neg eax
sbb eax, eax
and eax, 0x200
lea ecx, [esp + 0x14]
push ecx
mov esi, 1
add eax, esi
push eax
push edi
push str.SOFTWARETencentQQPCMgr
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
jne 0x40f372
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x69c]
push eax
push edi
push edi
push str.InstallDir
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40f35f
lea edx, [esp + 0x698]
push edx
lea eax, [esp + 0x78]
push 0x104
push eax
call dword [sym.imp.MSVCR80.dll_wcscpy_s]
add esp, 0xc
push str.QMCommon.dll
lea ecx, [esp + 0x78]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [esp + 0x74]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40f35f
lea eax, [esp + 0x698]
push eax
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
mov dword [esp + 0x10], esi
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
cmp eax, edi
jne 0x40f3be
lea ecx, [esp + 0x58]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
lea edx, [esp + 0x58]
push edx
mov dword [esp + 0xaac], esi
call fcn.0040f3f0
add esp, 4
test eax, eax
je 0x40f3a5
lea eax, [esp + 0x58]
push eax
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov dword [esp + 0x10], esi
lea ecx, [esp + 0x58]
mov dword [esp + 0xaa8], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xaa0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8c]
xor ecx, esp
call fcn.00416e92
add esp, 0xa9c
ret