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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53da52
mov eax, dword fs:[0]
push eax
sub esp, 0x234
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
mov eax, dword [ebp + 8]
push 0x208
mov dword [ebp - 0x22c], eax
lea eax, [ebp - 0x218]
push 0
push eax
mov dword [ebp - 0x234], 0
call fcn.0049e130
add esp, 0xc
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
lea eax, [ebp - 0x224]
mov dword [ebp - 4], 0
push eax
push 0x20019
push 0
push 0x5726b0
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x224], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x5258f0
mov edi, dword [ebp - 0x224]
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x23c], eax
call fcn.00401980
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x525562
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov esi, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x525577
lock inc dword [edx + 0x14]
lea eax, [edx + 8]
jmp 0x52557b
mov ecx, edx
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x224], esi
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [0x59fbc8]
cmp dword [edx - 0xc], 0
je 0x525630
lea eax, [edx - 0x10]
lea ecx, [esi - 0x10]
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x228], ecx
cmp eax, ecx
je 0x525648
cmp dword [ecx + 0xc], 0
lea esi, [ecx + 0xc]
jl 0x52562a
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x52562a
mov ecx, dword [ebp - 0x21c]
call fcn.004021e0
mov dword [ebp - 0x21c], eax
mov ecx, ebx
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x525619
mov edx, dword [ebp - 0x228]
push edx
mov esi, dword [edx]
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x525615
mov eax, dword [esi + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x21c]
add esi, 0x10
mov dword [ebp - 0x224], esi
jmp 0x525648
mov ecx, esi
call eax
mov esi, dword [ebp - 0x21c]
add esi, 0x10
mov dword [ebp - 0x224], esi
jmp 0x525648
push dword [edx - 0xc]
push edx
jmp 0x525637
push 0x10
push str.BlueStacks_tc_dt
lea ecx, [ebp - 0x224]
call fcn.00402d50
mov esi, dword [ebp - 0x224]
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0
push eax
push 0x20019
push 0
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x525882
test edi, edi
je 0x52567b
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x21c]
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x23c], 0
test eax, eax
jne 0x525882
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0x208
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x228]
push eax
push 0
push str.InstallDir
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x5256f5
mov eax, dword [ebp - 0x228]
cmp eax, 1
je 0x5256da
cmp eax, 2
jne 0x5256f5
mov eax, dword [ebp - 0x21c]
test eax, eax
je 0x52570e
test al, 1
jne 0x5256f5
shr eax, 1
cmp word [ebp + eax*2 - 0x21a], 0
je 0x525717
push 0x5727e8
push 0x5b2
push str.GameDownload::CMainUIInstallApkFromBS::GetBlockDeviceToolFullPath
push str.__s__Line__d___s
jmp 0x525892
xor eax, eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x220]
call fcn.00401ff0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x220]
mov edx, dword [eax - 0xc]
lea ecx, [edx - 1]
test ecx, ecx
js 0x525878
cmp ecx, edx
jg 0x525878
cmp word [eax + ecx*2], 0x5c
je 0x525762
push 1
push 0x57283c
lea ecx, [ebp - 0x220]
call fcn.00402320
push 0x16
push str.HD_BlockDeviceTool.exe
lea ecx, [ebp - 0x220]
call fcn.00402320
push dword [ebp - 0x220]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov eax, dword [ebp - 0x220]
je 0x525834
mov ebx, dword [ebp - 0x22c]
lea ecx, [eax - 0x10]
mov dword [ebp - 0x234], 1
mov ebx, dword [ebx]
sub ebx, 0x10
cmp ecx, ebx
je 0x525831
cmp dword [ebx + 0xc], 0
jl 0x52581c
mov edx, dword [ecx]
cmp edx, dword [ebx]
jne 0x52581c
call fcn.004021e0
mov dword [ebp - 0x228], eax
lea edx, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x525809
mov edx, dword [ebx]
push ebx
mov ecx, dword [edx]
mov eax, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x525805
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0x22c]
mov eax, dword [ebp - 0x228]
add eax, 0x10
mov dword [ecx], eax
jmp 0x52582b
mov ecx, edx
call eax
mov ecx, dword [ebp - 0x22c]
mov eax, dword [ebp - 0x228]
add eax, 0x10
mov dword [ecx], eax
jmp 0x52582b
push dword [eax - 0xc]
mov ecx, dword [ebp - 0x22c]
push eax
call fcn.00402d50
mov eax, dword [ebp - 0x220]
or ebx, 0xffffffff
lea ecx, [eax - 0x10]
mov byte [ebp - 4], 1
mov eax, ebx
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x5258b0
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edx, dword [eax + 4]
mov dword [ebp - 0x228], edx
mov edx, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x52586e
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5258b0
mov ecx, edx
call dword [ebp - 0x228]
jmp 0x5258b0
push 0x80070057
call fcn.00401b40
push esi
push 0x5aa
push 0x572840
push 0x572818
mov eax, dword [ebp - 0x230]
mov dword [eax + 0xa40], 2
add eax, 0xa48
push eax
call fcn.004023f0
add esp, 0x14
mov byte [ebp - 4], 0
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x5258e2
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5258e0
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5258e2
call edx
test edi, edi
je 0x52591d
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call eax
jmp 0x52591d
push str.HKEY_SOFTWARE
push 0x598
push 0x572748
lea ecx, [ebx + 0xa48]
mov dword [ebx + 0xa40], 2
push 0x572724
push ecx
call fcn.004023f0
add esp, 0x14
mov eax, dword [ebp - 0x234]
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 4