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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53b52a
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x59a0a0]
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 ebx, ecx
mov dword [ebp - 0x230], ebx
push 0x20a
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.0049e130
add esp, 0xc
lea ecx, [ebp - 0x220]
call fcn.004e1100
mov dword [ebp - 4], 0
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x506a3a
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x506a4f
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x506a53
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x228], eax
mov byte [ebp - 4], 1
lea edi, [ebx + 0x434]
push dword [ebp - 0x220]
push str._sTempTxGameDownloadComponent
push edi
call fcn.004023f0
add esp, 0xc
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x506a92
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x506ab2
push ecx
mov esi, esp
mov dword [ebp - 0x23c], esi
mov ecx, dword [edi]
sub ecx, 0x10
call fcn.004021e0
add eax, 0x10
mov dword [esi], eax
call fcn.004e1680
add esp, 4
push 1
push 0x56538c
mov ecx, edi
call fcn.00402320
mov ecx, dword [0x59fb4c]
mov esi, dword [ecx - 0xc]
test esi, esi
jne 0x506b00
lea ecx, [ebp - 0x228]
call fcn.004e13e0
add ebx, 0x438
mov dword [ebp - 0x238], ebx
mov ecx, ebx
test eax, eax
je 0x506af8
lea eax, [ebp - 0x228]
push eax
call fcn.00401f90
jmp 0x506b48
push edi
call fcn.00401f90
jmp 0x506b48
mov edi, dword [ebx + 0x438]
lea edx, [ecx - 0x10]
add ebx, 0x438
sub edi, 0x10
mov dword [ebp - 0x238], ebx
cmp edx, edi
je 0x506b48
cmp dword [edi + 0xc], 0
jl 0x506b3f
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x506b3f
mov ecx, edx
call fcn.004021e0
mov ecx, edi
mov esi, eax
call fcn.00402e90
lea eax, [esi + 0x10]
mov dword [ebx], eax
jmp 0x506b48
push esi
push ecx
mov ecx, ebx
call fcn.00402d50
push 1
lea eax, [ebp - 0x224]
mov ecx, ebx
push eax
call fcn.004032e0
mov ecx, 0x5653dc
mov eax, dword [eax]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x506b86
test dx, dx
je 0x506b82
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x506b86
add eax, 4
add ecx, 4
test dx, dx
jne 0x506b60
xor eax, eax
jmp 0x506b8b
sbb eax, eax
or eax, 1
mov ecx, dword [ebp - 0x224]
test eax, eax
setne byte [ebp - 0x231]
or ebx, 0xffffffff
add ecx, 0xfffffff0
mov eax, ebx
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x506bcf
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x506bcb
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x506bcf
mov ecx, edx
call esi
cmp byte [ebp - 0x231], 0
mov edi, dword [ebp - 0x238]
je 0x506bec
push 1
push 0x5652d4
mov ecx, edi
call fcn.00402320
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x506c04
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x506c24
push ecx
mov esi, esp
mov dword [ebp - 0x23c], esi
mov ecx, dword [edi]
sub ecx, 0x10
call fcn.004021e0
add eax, 0x10
mov dword [esi], eax
call fcn.004e1680
add esp, 4
mov byte [ebp - 4], 0
mov eax, ebx
mov ecx, dword [ebp - 0x228]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x506c62
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x506c5e
mov eax, dword [edx + 4]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call edi
jmp 0x506c68
mov ecx, edx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov ecx, dword [ebp - 0x220]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x506ca3
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x506c9f
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call edi
jmp 0x506ca3
mov ecx, edx
call esi
xor edi, edi
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x244], edi
mov dword [ebp - 0x240], edi
mov dword [ebp - 4], 2
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x506cda
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x506cef
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x506cf3
mov ecx, edx
call esi
add eax, 0x10
mov dword [ebp - 0x224], eax
mov byte [ebp - 4], 3
mov eax, dword [0x59fb74]
mov dword [ebp - 0x228], 0x105
cmp dword [eax - 0xc], 0
jne 0x506d29
push 0x27
push 0x565560
lea ecx, [ebp - 0x224]
call fcn.00402d50
jmp 0x506d3e
push eax
lea eax, [ebp - 0x224]
push 0x565524
push eax
call fcn.004023f0
add esp, 0xc
mov esi, dword [ebp - 0x224]
lea eax, [ebp - 0x220]
push eax
push 0x2001f
push 0
push esi
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x220], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x506e6d
mov edi, dword [ebp - 0x220]
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x248], edi
push eax
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x220], 0x20a
push eax
push 0
push 0x565624
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x506e50
mov eax, dword [ebp - 0x22c]
cmp eax, 1
je 0x506dd1
cmp eax, 2
jne 0x506e50
mov ecx, dword [ebp - 0x220]
test ecx, ecx
je 0x506df1
test cl, 1
jne 0x506e50
mov eax, ecx
shr eax, 1
cmp word [ebp + eax*2 - 0x21e], 0
je 0x506dfa
jmp 0x506e50
xor eax, eax
mov word [ebp - 0x21c], ax
mov eax, ecx
shr eax, 1
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov ecx, dword [ebp - 0x230]
lea edx, [ebp - 0x21c]
lea eax, [edx + 2]
mov dword [ebp - 0x22c], eax
lea ecx, [ecx + 0x43c]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x506e30
sub edx, dword [ebp - 0x22c]
lea eax, [ebp - 0x21c]
sar edx, 1
push edx
push eax
call fcn.00402d50
test edi, edi
je 0x506e63
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x244], 0
mov eax, dword [ebp - 0x230]
mov eax, dword [eax + 0x43c]
cmp dword [eax - 0xc], 0
je 0x506ebb
mov byte [ebp - 4], 2
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x507306
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x507304
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
mov eax, dword [sym.imp.KERNEL32.dll_HeapFree]
call eax
jmp 0x507306
mov eax, dword [0x59fb74]
cmp dword [eax - 0xc], 0
jne 0x506eda
push 0x20
push 0x5655b0
lea ecx, [ebp - 0x224]
call fcn.00402d50
jmp 0x506eef
push eax
lea eax, [ebp - 0x224]
push 0x5655f4
push eax
call fcn.004023f0
add esp, 0xc
mov esi, dword [ebp - 0x224]
lea eax, [ebp - 0x220]
push eax
push 0x2001f
push 0
push esi
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x220], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x50702b
test edi, edi
je 0x506f2c
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x220]
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x244], 0
test eax, eax
jne 0x50702b
mov eax, dword [ebp - 0x228]
add eax, eax
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
push 0
push 0x565688
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x50700e
mov eax, dword [ebp - 0x22c]
cmp eax, 1
je 0x506f9d
cmp eax, 2
jne 0x50700e
mov ecx, dword [ebp - 0x220]
test ecx, ecx
je 0x506fbd
test cl, 1
jne 0x50700e
mov eax, ecx
shr eax, 1
cmp word [ebp + eax*2 - 0x21e], 0
je 0x506fc6
jmp 0x50700e
xor eax, eax
mov word [ebp - 0x21c], ax
mov eax, ecx
shr eax, 1
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x506fe6
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x230]
push eax
lea ecx, [ecx + 0x43c]
call fcn.00402d50
test edi, edi
je 0x507021
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x244], 0
mov ecx, dword [ebp - 0x230]
mov eax, dword [ecx + 0x43c]
cmp dword [eax - 0xc], 0
jne 0x506e7f
mov eax, dword [0x59fb74]
cmp dword [eax - 0xc], 0
jne 0x507060
push 0x23
push str.SoftwareTencentMobileGamePCVDI_0
lea ecx, [ebp - 0x224]
call fcn.00402d50
jmp 0x507075
push eax
lea eax, [ebp - 0x224]
push str.SoftwareTencent_sVDI_0
push eax
call fcn.004023f0
add esp, 0xc
mov esi, dword [ebp - 0x224]
lea eax, [ebp - 0x220]
push eax
push 0x2001f
push 0
push esi
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x220], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x507179
test edi, edi
je 0x5070b2
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x220]
mov dword [ebp - 0x248], edi
mov dword [ebp - 0x244], 0
test eax, eax
jne 0x507179
mov eax, dword [ebp - 0x228]
add eax, eax
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
push 0
push 0x565670
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x507179
mov eax, dword [ebp - 0x22c]
cmp eax, 1
je 0x507115
cmp eax, 2
jne 0x507179
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x507132
test al, 1
jne 0x507179
shr eax, 1
cmp word [ebp + eax*2 - 0x21e], 0
je 0x50713b
jmp 0x507179
xor eax, eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x507151
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x230]
push eax
lea ecx, [ecx + 0x43c]
call fcn.00402d50
mov ecx, dword [ebp - 0x230]
mov eax, dword [ecx + 0x43c]
mov eax, dword [eax - 0xc]
test eax, eax
jne 0x506e7f
lea ecx, [ebp - 0x23c]
call fcn.004e0250
mov ecx, dword [ebp - 0x230]
mov byte [ebp - 4], 4
mov edx, dword [eax]
mov ecx, dword [ecx + 0x43c]
sub ecx, 0x10
lea eax, [edx - 0x10]
mov dword [ebp - 0x228], ecx
mov dword [ebp - 0x22c], eax
cmp eax, ecx
je 0x507288
cmp dword [ecx + 0xc], 0
lea esi, [ecx + 0xc]
mov dword [ebp - 0x220], esi
mov esi, dword [ebp - 0x224]
jl 0x507273
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x507273
mov ecx, dword [ebp - 0x22c]
call fcn.004021e0
mov dword [ebp - 0x24c], eax
mov ecx, ebx
mov eax, dword [ebp - 0x220]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x50725c
mov edx, dword [ebp - 0x228]
push edx
mov eax, dword [edx]
mov ecx, dword [eax]
mov esi, dword [ecx + 4]
mov dword [ebp - 0x22c], esi
mov esi, dword [ebp - 0x224]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x507254
mov eax, dword [eax + 4]
push 0
push dword [eax + 4]
mov eax, dword [sym.imp.KERNEL32.dll_HeapFree]
call eax
mov ecx, dword [ebp - 0x230]
mov eax, dword [ebp - 0x24c]
add eax, 0x10
mov dword [ecx + 0x43c], eax
jmp 0x507288
mov ecx, eax
call dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x230]
mov eax, dword [ebp - 0x24c]
add eax, 0x10
mov dword [ecx + 0x43c], eax
jmp 0x507288
mov ecx, dword [ebp - 0x230]
push dword [edx - 0xc]
push edx
lea ecx, [ecx + 0x43c]
call fcn.00402d50
mov byte [ebp - 4], 3
mov eax, ebx
mov ecx, dword [ebp - 0x23c]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5072d4
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
mov dword [ebp - 0x24c], esi
mov esi, dword [ebp - 0x224]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5072cc
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5072d4
mov ecx, edx
call dword [ebp - 0x24c]
mov byte [ebp - 4], 2
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x507306
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x507304
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x507306
call edx
test edi, edi
je 0x507311
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 0x230]
mov dword [ebp - 0x220], 0
mov esi, dword [ebx + 0x43c]
lea ecx, [ebp - 0x220]
mov dword [ebp - 4], 5
call fcn.004071f0
test eax, eax
jns 0x507356
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x50737b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x50737b
push esi
mov esi, dword [ebp - 0x220]
push 0x565740
lea ecx, [esi + 0x24]
call fcn.004d0ae0
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x50737b
mov eax, dword [esi]
push esi
call dword [eax + 8]
push dword [ebx + 0x43c]
push str.InstallPath__s_
call fcn.004e78a0
push eax
call fcn.004e76a0
mov eax, dword [ebp - 0x238]
add esp, 0xc
push dword [eax]
push str.ComponentPath__s_
call fcn.004e78a0
push eax
call fcn.004e76a0
add esp, 0xc
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.0049aa22
mov esp, ebp
pop ebp
ret