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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59ec35
mov eax, dword fs:[0]
push eax
mov eax, 0x20cc
call fcn.0049f020
mov eax, dword [0x621810]
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 + 0x728]
xor esi, esi
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x20d0], ebx
mov byte [ebp - 0x20b9], 0
mov dword [ebp - 0x20c4], eax
mov dword [eax + 0x10], esi
jb 0x405753
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.0048cf80
push 0x2e
lea ecx, [ebp - 0x202c]
call fcn.004480f0
add esp, 0x10
mov dword [ebp - 4], esi
cmp dword [ebp - 0x201c], esi
je 0x405904
mov esi, str.DuoyiLauncher
push esi
call fcn.0048c5ca
pop ecx
mov edi, eax
push esi
lea eax, [ebp - 0x202c]
call fcn.00401757
cmp dword [ebp - 0x2018], 8
mov eax, dword [ebp - 0x202c]
jae 0x4057c1
lea eax, [ebp - 0x202c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405811
cmp dword [ebp - 0x2018], 8
mov eax, dword [ebp - 0x202c]
jae 0x4057e1
lea eax, [ebp - 0x202c]
push eax
lea eax, [ebp - 0x2064]
call fcn.004018af
lea eax, [ebp - 0x2064]
push eax
mov byte [ebp - 4], 1
call fcn.0044aa40
pop ecx
push 1
xor edi, edi
lea esi, [ebp - 0x2064]
mov byte [ebp - 4], 0
call fcn.00401ad5
mov esi, 0x5ffbb8
push esi
call fcn.0048c5ca
pop ecx
mov edi, eax
push esi
lea eax, [ebp - 0x202c]
call fcn.00401757
lea eax, [ebp - 0x202c]
call fcn.0044c3d0
mov eax, dword [ebx + 0x760]
lea esi, [ebp - 0x2064]
call fcn.00445910
mov esi, eax
mov byte [ebp - 4], 2
cmp dword [ebp - 0x2018], 8
mov edi, dword [ebp - 0x202c]
jae 0x405862
lea edi, [ebp - 0x202c]
call fcn.00448020
cmp dword [eax + 0x14], 8
jb 0x40586f
mov eax, dword [eax]
cmp dword [esi + 0x14], 8
jb 0x405879
mov ecx, dword [esi]
jmp 0x40587b
mov ecx, esi
push edi
push eax
push str.InstallPath
push ecx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push 1
xor edi, edi
lea esi, [ebp - 0x2064]
mov byte [ebp - 4], 0
call fcn.00401ad5
cmp byte [ebx + 0x784], 0
mov eax, dword [ebp - 0x202c]
je 0x4058d3
cmp dword [ebp - 0x2018], 8
jae 0x4058ba
lea eax, [ebp - 0x202c]
push eax
push 0x800
lea eax, [ebp - 0x2010]
push eax
push 0x5fe734
push str.TestInstallPath
jmp 0x4058f9
cmp dword [ebp - 0x2018], 8
jae 0x4058e2
lea eax, [ebp - 0x202c]
push eax
push 0x800
lea eax, [ebp - 0x2010]
push eax
push 0x5fe734
push str.InstallPath
push 0x5ff8f8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x2010]
push 0x5fe734
push eax
call fcn.0048d1fb
pop ecx
pop ecx
test eax, eax
je 0x4059aa
lea eax, [ebp - 0x2010]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4059aa
lea eax, [ebp - 0x2010]
push eax
call fcn.0048c5ca
mov esi, dword [ebp - 0x20c4]
pop ecx
lea ecx, [ebp - 0x2010]
call fcn.00401834
push esi
lea ecx, [ebp - 0x2064]
call fcn.0040c2b8
pop ecx
mov ecx, eax
lea eax, [ebx + 0x70c]
mov ebx, ecx
mov byte [ebp - 4], 3
call fcn.004016e5
xor ebx, ebx
inc ebx
lea esi, [ebp - 0x2064]
push ebx
xor edi, edi
call fcn.00401ad5
push 1
xor edi, edi
lea esi, [ebp - 0x202c]
call fcn.00401ad5
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.0048b951
leave
ret
lea eax, [ebp - 0x20c0]
push eax
push 0x20019
xor esi, esi
push esi
push str.SoftwareDuoyiLauncher
push reloc.WS2_32.dll_accept
mov dword [ebp - 0x20c0], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405c2d
push 0xffe
mov word [ebp - 0x1010], ax
lea eax, [ebp - 0x100e]
push esi
push eax
call fcn.0048cf80
add esp, 0xc
push str.InstPath
lea eax, [ebp - 0x2048]
mov dword [ebp - 0x20d8], esi
mov dword [ebp - 0x20cc], 0x1000
call fcn.004018af
mov byte [ebp - 4], 4
cmp byte [ebx + 0x784], 0
je 0x405a39
mov esi, str.TestInstallPath
push esi
call fcn.0048c5ca
pop ecx
mov ecx, esi
lea esi, [ebp - 0x2048]
call fcn.00401834
cmp dword [ebp - 0x2034], 8
mov eax, dword [ebp - 0x2048]
jae 0x405a4e
lea eax, [ebp - 0x2048]
lea ecx, [ebp - 0x20cc]
push ecx
lea ecx, [ebp - 0x1010]
push ecx
lea ecx, [ebp - 0x20d8]
push ecx
push 0
push eax
push dword [ebp - 0x20c0]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor edi, edi
test eax, eax
jne 0x405c1c
inc edi
cmp dword [ebp - 0x20d8], edi
je 0x405a8d
push edi
xor edi, edi
jmp 0x405c1e
lea eax, [ebp - 0x1010]
push eax
call fcn.0048c5ca
pop ecx
test eax, eax
je 0x405a85
lea eax, [ebp - 0x1010]
push eax
call fcn.0048c5ca
pop ecx
lea esi, [ebx + 0x70c]
lea ecx, [ebp - 0x1010]
mov dword [ebp - 0x20d4], esi
call fcn.00401834
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 0x405b0f
lea eax, [ebp - 0x1010]
push eax
mov byte [ebp - 0x20b9], 1
call fcn.0048c5ca
mov esi, dword [ebp - 0x20c4]
pop ecx
lea ecx, [ebp - 0x1010]
call fcn.00401834
jmp 0x405c1a
push esi
lea esi, [ebp - 0x2064]
call fcn.004024df
push edi
lea eax, [ebp - 0x20c8]
push eax
mov byte [ebp - 4], 5
mov eax, esi
mov dword [ebp - 0x20c8], 0x5c
call fcn.00409ba9
cmp eax, 0xffffffff
je 0x405c0b
cmp byte [ebx + 0x784], 0
je 0x405c0b
push dword [ebp - 0x2054]
inc eax
push eax
mov dword [ebp - 0x20c8], eax
mov eax, esi
push eax
lea esi, [ebp - 0x209c]
call fcn.00409135
mov ebx, eax
lea eax, [ebp - 0x2064]
mov byte [ebp - 4], 6
call fcn.004016e5
push 1
xor edi, edi
mov byte [ebp - 4], 5
call fcn.00401ad5
mov ebx, 0x5ff9c0
push ebx
call fcn.0048c5ca
pop ecx
mov edi, eax
mov eax, dword [ebp - 0x2054]
push ebx
lea ecx, [ebp - 0x2064]
call fcn.00402473
test eax, eax
je 0x405c05
push dword [ebp - 0x20c8]
lea esi, [ebp - 0x20b8]
push 0
push dword [ebp - 0x20d4]
call fcn.00409135
push ebx
push eax
lea eax, [ebp - 0x209c]
mov byte [ebp - 4], 7
call fcn.0040a4f4
pop ecx
pop ecx
mov ebx, eax
mov eax, dword [ebp - 0x20d4]
mov byte [ebp - 4], 8
call fcn.004016e5
push 1
xor edi, edi
lea esi, [ebp - 0x209c]
call fcn.00401ad5
push 1
lea esi, [ebp - 0x20b8]
call fcn.00401ad5
mov ebx, dword [ebp - 0x20d0]
push 1
xor edi, edi
lea esi, [ebp - 0x2064]
call fcn.00401ad5
xor edi, edi
push 1
lea esi, [ebp - 0x2048]
mov byte [ebp - 4], 0
call fcn.00401ad5
xor esi, esi
cmp dword [ebp - 0x20c0], esi
je 0x405c49
push dword [ebp - 0x20c0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x20c0], esi
cmp byte [ebp - 0x20b9], 0
je 0x405c5d
mov bl, byte [ebp - 0x20b9]
jmp 0x40597f
push 0x23
lea ecx, [ebp - 0x2080]
call fcn.004480f0
pop ecx
mov byte [ebp - 4], 9
cmp dword [ebp - 0x2070], esi
je 0x405cfd
mov esi, 0x5ffbb8
push esi
call fcn.0048c5ca
pop ecx
mov edi, eax
push esi
lea eax, [ebp - 0x2080]
call fcn.00401757
cmp byte [ebx + 0x784], 0
mov eax, dword [ebp - 0x2080]
je 0x405ccc
cmp dword [ebp - 0x206c], 8
jae 0x405cb3
lea eax, [ebp - 0x2080]
push eax
push 0x800
lea eax, [ebp - 0x2010]
push eax
push 0x5fe734
push str.TestInstallPath
jmp 0x405cf2
cmp dword [ebp - 0x206c], 8
jae 0x405cdb
lea eax, [ebp - 0x2080]
push eax
push 0x800
lea eax, [ebp - 0x2010]
push eax
push 0x5fe734
push str.InstallPath
push 0x5ff8f8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x2010]
push 0x5fe734
push eax
call fcn.0048d1fb
pop ecx
pop ecx
test eax, eax
je 0x405d7f
lea eax, [ebp - 0x2010]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405d7f
lea eax, [ebp - 0x2010]
push eax
call fcn.0048c5ca
mov esi, dword [ebp - 0x20c4]
pop ecx
lea ecx, [ebp - 0x2010]
call fcn.00401834
push esi
lea ecx, [ebp - 0x20b8]
call fcn.0040c2b8
pop ecx
mov ecx, eax
lea eax, [ebx + 0x70c]
mov ebx, ecx
mov byte [ebp - 4], 0xa
call fcn.004016e5
xor ebx, ebx
inc ebx
push ebx
xor edi, edi
lea esi, [ebp - 0x20b8]
call fcn.00401ad5
lea esi, [ebp - 0x2080]
jmp 0x405977
lea eax, [ebp - 0x20c0]
push eax
push 0x20019
push 0
push str.SOFTWAREDuoyiLauncher
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405ee8
push 0xffe
push eax
mov word [ebp - 0x1010], ax
lea eax, [ebp - 0x100e]
push eax
call fcn.0048cf80
add esp, 0xc
push str.InstPath
lea eax, [ebp - 0x2048]
mov dword [ebp - 0x20c8], 0x1000
call fcn.004018af
mov byte [ebp - 4], 0xb
cmp byte [ebx + 0x784], 0
je 0x405e01
mov esi, str.TestInstallPath
push esi
call fcn.0048c5ca
pop ecx
mov ecx, esi
lea esi, [ebp - 0x2048]
call fcn.00401834
cmp dword [ebp - 0x2034], 8
mov eax, dword [ebp - 0x2048]
jae 0x405e16
lea eax, [ebp - 0x2048]
lea ecx, [ebp - 0x20c8]
push ecx
lea ecx, [ebp - 0x1010]
push ecx
lea ecx, [ebp - 0x20cc]
push ecx
push 0
push eax
push dword [ebp - 0x20c0]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor edi, edi
test eax, eax
je 0x405e47
push 1
jmp 0x405edd
inc edi
cmp dword [ebp - 0x20cc], edi
jne 0x405eda
lea eax, [ebp - 0x1010]
push eax
call fcn.0048c5ca
pop ecx
test eax, eax
je 0x405eda
lea eax, [ebp - 0x1010]
push eax
call fcn.0048c5ca
pop ecx
lea esi, [ebx + 0x70c]
lea ecx, [ebp - 0x1010]
call fcn.00401834
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x1010]
push eax
call esi
test eax, eax
je 0x405eda
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 0x405eda
lea eax, [ebp - 0x1010]
push eax
mov byte [ebp - 0x20b9], 1
call fcn.0048c5ca
mov esi, dword [ebp - 0x20c4]
pop ecx
lea ecx, [ebp - 0x1010]
call fcn.00401834
push edi
xor edi, edi
lea esi, [ebp - 0x2048]
call fcn.00401ad5
cmp dword [ebp - 0x20c0], 0
je 0x405f04
push dword [ebp - 0x20c0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 0x20c0], 0
push 1
xor edi, edi
lea esi, [ebp - 0x2080]
call fcn.00401ad5
jmp 0x405c52