Function at 0x402ec0
Capabilities:
Check if file exists
Get common file path
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x201c
call fcn.00432f70
mov eax, dword [0x46dec0]
push ebx
push esi
mov ebx, ecx
xor esi, esi
push edi
mov dword [esp + 0x2024], eax
mov byte [ebx + 5], 0
mov dword [esp + 0x18], esi
call fcn.00401430
mov byte [esp + 0x20], 0
xor eax, eax
mov ecx, 0x1ff
lea edi, [esp + 0x21]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
stosb byte es:[edi], al
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [esp + 0xc]
push eax
push 0x23
push esi
mov dword [esp + 0x18], esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x402f50
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x1820]
push ecx
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x402f50
xor eax, eax
jmp 0x402f40
mov cl, byte [esp + eax + 0x1820]
mov byte [esp + eax + 0x20], cl
inc eax
test cl, cl
jne 0x402f40
mov eax, dword [esp + 0xc]
cmp eax, esi
je 0x402f5f
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
call dword [sym.imp.ole32.dll_CoUninitialize]
lea eax, [esp + 0x20]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402f70
sub eax, edx
mov dword [esp + 0x14], eax
jne 0x402f94
xor eax, eax
mov ecx, dword [esp + 0x2024]
call fcn.00432fde
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendA]
xor eax, eax
mov byte [esp + 0x1020], 0
mov ecx, 0x1ff
lea edi, [esp + 0x1021]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push str.DuoyiLaucher.ini
lea eax, [esp + 0x24]
push eax
call esi
lea ecx, [esp + 0x20]
push ecx
push 0x800
lea edx, [esp + 0x1028]
push edx
push 0x454da4
push str.InstallPath
push str.Duoyi.com_Launcher
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, dword [0x46f490]
lea eax, [esp + 0x20]
push eax
push ecx
push str.InstallPath
push 0x454d80
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea edx, [esp + 0x1020]
push 0x454da4
push edx
call fcn.00433a76
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
add esp, 8
test eax, eax
je 0x40305c
lea eax, [esp + 0x1020]
push eax
call edi
test eax, eax
je 0x40305c
lea ecx, [esp + 0x1020]
push ecx
mov ecx, ebx
mov byte [ebx + 5], 1
call fcn.004016a0
mov eax, 1
mov ecx, dword [esp + 0x2024]
call fcn.00432fde
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x10]
push edx
push 0x20019
push 0
push str.SOFTWAREDuoyiLauncher
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403119
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x824]
push ecx
lea edx, [esp + 0x1c]
push edx
push 0
push str.InstPath
push eax
mov dword [esp + 0x34], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403119
cmp dword [esp + 0x14], 1
jne 0x403119
mov ecx, dword [esp + 0x1c]
push str.DuoyiLauncher.exe
lea edx, [esp + 0x824]
push edx
mov byte [esp + ecx + 0x828], 0
call esi
lea eax, [esp + 0x820]
push eax
call edi
test eax, eax
je 0x403119
lea eax, [esp + 0x820]
mov byte [ebx + 5], 1
mov dword [esp + 0x18], 1
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403100
sub eax, edx
push eax
lea ecx, [esp + 0x824]
push ecx
mov ecx, ebx
call fcn.004015c0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x403128
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x2024]
mov eax, dword [esp + 0x18]
call fcn.00432fde
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret