Function at 0x4036be
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
mov eax, 0x40b640
call fcn.0040adc0
sub esp, 0x118
push ebx
push esi
push edi
push str.SoftwareTENCENTQQGame_sys
lea ecx, [ebp - 0x1c]
call fcn.0040abe4
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x123]
mov byte [ebp - 0x124], bl
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x18]
mov edi, 0xf003f
push eax
push edi
push ebx
mov byte [ebp - 4], 1
push dword [ebp - 0x1c]
mov dword [ebp - 0x20], 0x104
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
push 0x80000002
call esi
cmp eax, ebx
jne 0x403793
lea ecx, [ebp - 0x10]
call fcn.004038b4
mov ecx, dword [ebp - 0x18]
cmp eax, ebx
mov dword [ebp - 0x10], ecx
jne 0x403793
lea eax, [ebp - 0x20]
mov dword [ebp - 0x18], ebx
push eax
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push str.halldirectory
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x403779
lea eax, [ebp - 0x124]
mov ecx, 0x40f834
push eax
call sub.MFC42.DLL_CString::operator_1
mov dword [ebp - 0x14], 1
cmp dword [ebp - 0x10], ebx
je 0x40378a
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x14], ebx
jne 0x403818
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], ebx
push eax
push edi
push ebx
push dword [ebp - 0x1c]
push 0x80000001
call esi
cmp eax, ebx
jne 0x403805
lea ecx, [ebp - 0x10]
call fcn.004038b4
mov ecx, dword [ebp - 0x14]
cmp eax, ebx
mov dword [ebp - 0x10], ecx
jne 0x403805
lea eax, [ebp - 0x20]
mov dword [ebp - 0x14], ebx
push eax
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push str.halldirectory
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
jne 0x403805
lea eax, [ebp - 0x124]
mov esi, 0x40f834
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::operator_1
cmp dword [ebp - 0x10], ebx
je 0x40381d
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x10], ebx
jmp 0x40381d
cmp dword [ebp - 0x10], ebx
je 0x403882
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x10], ebx
jmp 0x403882
mov esi, 0x40f834
mov eax, dword [0x40f834]
mov ecx, dword [eax - 8]
lea edi, [ecx - 1]
cmp edi, ebx
jl 0x403805
mov cl, byte [eax + edi]
cmp cl, 0x5c
je 0x403862
cmp cl, 0x2f
je 0x403862
push 0x5c
lea eax, [ebp - 0x14]
push esi
push eax
call sub.MFC42.DLL_operator_2
push eax
mov ecx, esi
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
mov eax, dword [0x40f834]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, 1
jne 0x403805
cmp dword [ebp - 0x10], ebx
je 0x40387f
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x10], ebx
push 1
pop ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, ebx
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret