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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2030
call fcn.00437610
mov eax, dword [0x473eb8]
mov dword [ebp - 4], eax
push edi
mov dword [ebp - 0x2030], ecx
mov eax, dword [ebp - 0x2030]
mov byte [eax + 5], 0
mov dword [ebp - 0x1010], 0
mov ecx, dword [ebp - 0x2030]
call fcn.00401740
mov byte [ebp - 0x1818], 0
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x1817]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 0x1014], 0
lea ecx, [ebp - 0x1014]
push ecx
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov dword [ebp - 0x181c], eax
cmp dword [ebp - 0x181c], 0
jne 0x403c24
lea edx, [ebp - 0x808]
push edx
mov eax, dword [ebp - 0x1014]
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x403c24
lea ecx, [ebp - 0x808]
push ecx
lea edx, [ebp - 0x1818]
push edx
call fcn.004382b0
add esp, 8
cmp dword [ebp - 0x1014], 0
je 0x403c3a
mov eax, dword [ebp - 0x1014]
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
call dword [sym.imp.ole32.dll_CoUninitialize]
lea ecx, [ebp - 0x1818]
push ecx
call fcn.00437650
add esp, 4
test eax, eax
ja 0x403c5e
mov eax, dword [ebp - 0x1010]
jmp 0x403e3d
mov byte [ebp - 0x1008], 0
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x1007]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push str.DuoyiLaucher.ini
lea edx, [ebp - 0x1818]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x1818]
push eax
push 0x800
lea ecx, [ebp - 0x1008]
push ecx
push 0x458ffd
push 0x459000
push str.Duoyi.com_Launcher
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [ebp - 0x1818]
push edx
mov ecx, 0x4754b8
call fcn.004013d0
push eax
push str.InstallPath
push 0x45902c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push 0x45902e
lea eax, [ebp - 0x1008]
push eax
call fcn.00404000
add esp, 8
test eax, eax
je 0x403d2d
lea ecx, [ebp - 0x1008]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x403d2d
mov edx, dword [ebp - 0x2030]
mov byte [edx + 5], 1
mov dword [ebp - 0x1010], 1
lea eax, [ebp - 0x1008]
push eax
mov ecx, dword [ebp - 0x2030]
call fcn.004013b0
mov eax, dword [ebp - 0x1010]
jmp 0x403e3d
mov dword [ebp - 0x100c], 0
mov dword [ebp - 0x2024], str.SOFTWAREDuoyiLauncher
mov dword [ebp - 0x202c], 0
lea ecx, [ebp - 0x100c]
push ecx
push 0x20019
push 0
mov edx, dword [ebp - 0x2024]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x403d74
jmp 0x403e17
mov dword [ebp - 0x2028], 0x800
lea eax, [ebp - 0x2028]
push eax
lea ecx, [ebp - 0x2020]
push ecx
lea edx, [ebp - 0x1820]
push edx
push 0
push str.InstPath
mov eax, dword [ebp - 0x100c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x403dad
jmp 0x403e17
cmp dword [ebp - 0x1820], 1
je 0x403db8
jmp 0x403e17
mov ecx, dword [ebp - 0x2028]
mov byte [ebp + ecx - 0x2020], 0
push str.DuoyiLauncher.exe
lea edx, [ebp - 0x2020]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x2020]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x403e0f
mov ecx, dword [ebp - 0x2030]
mov byte [ecx + 5], 1
mov dword [ebp - 0x1010], 1
lea edx, [ebp - 0x2020]
push edx
mov ecx, dword [ebp - 0x2030]
call fcn.004013b0
xor eax, eax
jne 0x403d37
cmp dword [ebp - 0x100c], 0
je 0x403e37
mov ecx, dword [ebp - 0x100c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x100c], 0
mov eax, dword [ebp - 0x1010]
mov ecx, dword [ebp - 4]
call fcn.004375fb
pop edi
mov esp, ebp
pop ebp
ret