Function at 0x40638a
Capabilities:
Check if file exists
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59cd94
mov eax, dword fs:[0]
push eax
mov eax, 0x20cc
call fcn.0049d300
mov eax, dword [0x61e810]
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
lea eax, [ebx + 0x75c]
xor esi, esi
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x20d8], ebx
mov byte [ebp - 0x20b9], 0
mov dword [ebp - 0x20c8], eax
mov dword [eax + 0x10], esi
jb 0x4063e4
mov eax, dword [eax]
xor ecx, ecx
mov word [eax], cx
xor eax, eax
push 0xffe
mov word [ebp - 0x2010], ax
lea eax, [ebp - 0x200e]
push esi
push eax
call fcn.0048b3f0
push 0x2e
lea ecx, [ebp - 0x2064]
call fcn.00448d00
add esp, 0x10
mov dword [ebp - 4], esi
cmp dword [ebp - 0x2054], esi
je 0x4064bf
mov esi, str.DuoyiLauncher
push esi
call fcn.0048aa3a
pop ecx
mov edi, eax
push esi
lea eax, [ebp - 0x2064]
call fcn.00401664
mov esi, 0x5fdebc
push esi
call fcn.0048aa3a
pop ecx
mov edi, eax
push esi
lea eax, [ebp - 0x2064]
call fcn.00401664
cmp byte [ebx + 0x7b8], 0
mov eax, dword [ebp - 0x2064]
je 0x40648e
cmp dword [ebp - 0x2050], 8
jae 0x406475
lea eax, [ebp - 0x2064]
push eax
push 0x800
lea eax, [ebp - 0x2010]
push eax
push 0x5fc63c
push str.TestInstallPath
jmp 0x4064b4
cmp dword [ebp - 0x2050], 8
jae 0x40649d
lea eax, [ebp - 0x2064]
push eax
push 0x800
lea eax, [ebp - 0x2010]
push eax
push 0x5fc63c
push str.InstallPath
push 0x5fd8fc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x2010]
push 0x5fc63c
push eax
call fcn.0048b66b
pop ecx
pop ecx
test eax, eax
je 0x406565
lea eax, [ebp - 0x2010]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406565
lea eax, [ebp - 0x2010]
push eax
call fcn.0048aa3a
mov esi, dword [ebp - 0x20c8]
pop ecx
lea ecx, [ebp - 0x2010]
call fcn.00401741
push esi
lea ecx, [ebp - 0x2080]
call fcn.0040d4c1
pop ecx
mov ecx, eax
lea eax, [ebx + 0x740]
mov ebx, ecx
mov byte [ebp - 4], 1
call fcn.00401560
push 1
xor edi, edi
lea esi, [ebp - 0x2080]
call fcn.004019e2
mov bl, 1
push 1
xor edi, edi
lea esi, [ebp - 0x2064]
call fcn.004019e2
mov al, bl
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.00489dc1
leave
ret
lea eax, [ebp - 0x20c0]
push eax
push 0x20019
xor edi, edi
push edi
push str.SoftwareDuoyiLauncher
push reloc.WS2_32.dll_accept
mov dword [ebp - 0x20c0], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4067e7
push 0xffe
mov word [ebp - 0x1010], ax
lea eax, [ebp - 0x100e]
push edi
push eax
call fcn.0048b3f0
add esp, 0xc
push str.InstPath
lea eax, [ebp - 0x202c]
mov dword [ebp - 0x20d0], edi
mov dword [ebp - 0x20cc], 0x1000
call fcn.004017bc
mov byte [ebp - 4], 2
cmp byte [ebx + 0x7b8], 0
je 0x4065f4
mov esi, str.TestInstallPath
push esi
call fcn.0048aa3a
pop ecx
mov ecx, esi
lea esi, [ebp - 0x202c]
call fcn.00401741
cmp dword [ebp - 0x2018], 8
mov eax, dword [ebp - 0x202c]
jae 0x406609
lea eax, [ebp - 0x202c]
lea ecx, [ebp - 0x20cc]
push ecx
lea ecx, [ebp - 0x1010]
push ecx
lea ecx, [ebp - 0x20d0]
push ecx
push edi
push eax
push dword [ebp - 0x20c0]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor edi, edi
test eax, eax
jne 0x4067d6
inc edi
cmp dword [ebp - 0x20d0], edi
je 0x406647
push edi
xor edi, edi
jmp 0x4067d8
lea eax, [ebp - 0x1010]
push eax
call fcn.0048aa3a
pop ecx
test eax, eax
je 0x40663f
lea eax, [ebp - 0x1010]
push eax
call fcn.0048aa3a
pop ecx
lea esi, [ebx + 0x740]
lea ecx, [ebp - 0x1010]
mov dword [ebp - 0x20d4], esi
call fcn.00401741
push str.DuoyiLauncher.exe
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4066c9
lea eax, [ebp - 0x1010]
push eax
mov byte [ebp - 0x20b9], 1
call fcn.0048aa3a
mov esi, dword [ebp - 0x20c8]
pop ecx
lea ecx, [ebp - 0x1010]
call fcn.00401741
jmp 0x4067d4
push esi
lea esi, [ebp - 0x2080]
call fcn.004023ec
push edi
lea eax, [ebp - 0x20c4]
push eax
mov byte [ebp - 4], 3
mov eax, esi
mov dword [ebp - 0x20c4], 0x5c
call fcn.0040ac0c
cmp eax, 0xffffffff
je 0x4067c5
cmp byte [ebx + 0x7b8], 0
je 0x4067c5
push dword [ebp - 0x2070]
inc eax
push eax
mov dword [ebp - 0x20c4], eax
mov eax, esi
push eax
lea esi, [ebp - 0x209c]
call fcn.0040a121
mov ebx, eax
lea eax, [ebp - 0x2080]
mov byte [ebp - 4], 4
call fcn.00401560
push 1
xor edi, edi
mov byte [ebp - 4], 3
call fcn.004019e2
mov ebx, 0x5fd9c8
push ebx
call fcn.0048aa3a
pop ecx
mov edi, eax
mov eax, dword [ebp - 0x2070]
push ebx
lea ecx, [ebp - 0x2080]
call fcn.00402380
test eax, eax
je 0x4067bf
push dword [ebp - 0x20c4]
lea esi, [ebp - 0x20b8]
push 0
push dword [ebp - 0x20d4]
call fcn.0040a121
push ebx
push eax
lea eax, [ebp - 0x209c]
mov byte [ebp - 4], 5
call fcn.0040b69d
pop ecx
pop ecx
mov ebx, eax
mov eax, dword [ebp - 0x20d4]
mov byte [ebp - 4], 6
call fcn.00401560
push 1
xor edi, edi
lea esi, [ebp - 0x209c]
call fcn.004019e2
push 1
lea esi, [ebp - 0x20b8]
call fcn.004019e2
mov ebx, dword [ebp - 0x20d8]
push 1
xor edi, edi
lea esi, [ebp - 0x2080]
call fcn.004019e2
xor edi, edi
push 1
lea esi, [ebp - 0x202c]
mov byte [ebp - 4], 0
call fcn.004019e2
xor esi, esi
cmp dword [ebp - 0x20c0], esi
je 0x406803
push dword [ebp - 0x20c0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x20c0], esi
cmp byte [ebp - 0x20b9], 0
je 0x406817
mov bl, byte [ebp - 0x20b9]
jmp 0x40653a
push 0x23
lea ecx, [ebp - 0x2048]
call fcn.00448d00
pop ecx
mov byte [ebp - 4], 7
cmp dword [ebp - 0x2038], esi
je 0x4068b7
mov esi, 0x5fdebc
push esi
call fcn.0048aa3a
pop ecx
mov edi, eax
push esi
lea eax, [ebp - 0x2048]
call fcn.00401664
cmp byte [ebx + 0x7b8], 0
mov eax, dword [ebp - 0x2048]
je 0x406886
cmp dword [ebp - 0x2034], 8
jae 0x40686d
lea eax, [ebp - 0x2048]
push eax
push 0x800
lea eax, [ebp - 0x2010]
push eax
push 0x5fc63c
push str.TestInstallPath
jmp 0x4068ac
cmp dword [ebp - 0x2034], 8
jae 0x406895
lea eax, [ebp - 0x2048]
push eax
push 0x800
lea eax, [ebp - 0x2010]
push eax
push 0x5fc63c
push str.InstallPath
push 0x5fd8fc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x2010]
push 0x5fc63c
push eax
call fcn.0048b66b
pop ecx
pop ecx
test eax, eax
je 0x40693f
lea eax, [ebp - 0x2010]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40693f
lea eax, [ebp - 0x2010]
push eax
call fcn.0048aa3a
mov esi, dword [ebp - 0x20c8]
pop ecx
lea ecx, [ebp - 0x2010]
call fcn.00401741
push esi
lea ecx, [ebp - 0x20b8]
call fcn.0040d4c1
pop ecx
mov ecx, eax
lea eax, [ebx + 0x740]
mov ebx, ecx
mov byte [ebp - 4], 8
call fcn.00401560
xor ebx, ebx
inc ebx
push ebx
xor edi, edi
lea esi, [ebp - 0x20b8]
call fcn.004019e2
push ebx
lea esi, [ebp - 0x2048]
call fcn.004019e2
jmp 0x40653a
lea eax, [ebp - 0x20c0]
push eax
push 0x20019
xor edi, edi
push edi
push str.SOFTWAREDuoyiLauncher
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x406aa8
push 0xffe
mov word [ebp - 0x1010], ax
lea eax, [ebp - 0x100e]
push edi
push eax
call fcn.0048b3f0
add esp, 0xc
push str.InstPath
lea eax, [ebp - 0x202c]
mov dword [ebp - 0x20c4], 0x1000
call fcn.004017bc
mov byte [ebp - 4], 9
cmp byte [ebx + 0x7b8], 0
je 0x4069c2
mov esi, str.TestInstallPath
push esi
call fcn.0048aa3a
pop ecx
mov ecx, esi
lea esi, [ebp - 0x202c]
call fcn.00401741
cmp dword [ebp - 0x2018], 8
mov eax, dword [ebp - 0x202c]
jae 0x4069d7
lea eax, [ebp - 0x202c]
lea ecx, [ebp - 0x20c4]
push ecx
lea ecx, [ebp - 0x1010]
push ecx
lea ecx, [ebp - 0x20cc]
push ecx
push edi
push eax
push dword [ebp - 0x20c0]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor edi, edi
test eax, eax
je 0x406a07
push 1
jmp 0x406a9d
inc edi
cmp dword [ebp - 0x20cc], edi
jne 0x406a9a
lea eax, [ebp - 0x1010]
push eax
call fcn.0048aa3a
pop ecx
test eax, eax
je 0x406a9a
lea eax, [ebp - 0x1010]
push eax
call fcn.0048aa3a
pop ecx
lea esi, [ebx + 0x740]
lea ecx, [ebp - 0x1010]
call fcn.00401741
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x1010]
push eax
call esi
test eax, eax
je 0x406a9a
push str.DuoyiLauncher.exe
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x1010]
push eax
call esi
test eax, eax
je 0x406a9a
lea eax, [ebp - 0x1010]
push eax
mov byte [ebp - 0x20b9], 1
call fcn.0048aa3a
mov esi, dword [ebp - 0x20c8]
pop ecx
lea ecx, [ebp - 0x1010]
call fcn.00401741
push edi
xor edi, edi
lea esi, [ebp - 0x202c]
call fcn.004019e2
cmp dword [ebp - 0x20c0], 0
je 0x406ac4
push dword [ebp - 0x20c0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 0x20c0], 0
push 1
xor edi, edi
lea esi, [ebp - 0x2048]
call fcn.004019e2
jmp 0x40680c