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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1a8c
call fcn.00432710
push ebx
push esi
mov esi, ecx
push edi
xor edx, edx
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x1472]
mov word [ebp - 0x1474], dx
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
lea eax, [ebp - 0x1474]
push 0x17
push eax
push edx
call ebx
test eax, eax
je 0x41f0ab
push 0x46429c
lea eax, [ebp - 0x1474]
push 0x463b60
push eax
lea eax, [esi + 0x10]
push 0x464800
push eax
call fcn.00409c93
add esp, 0x14
xor edx, edx
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x167a]
mov word [ebp - 0x167c], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x167c]
push 2
push eax
push edx
call ebx
test eax, eax
je 0x41f0f8
push 0x46429c
lea eax, [ebp - 0x167c]
push 0x463b60
push eax
lea eax, [esi + 0x14]
push 0x464800
push eax
call fcn.00409c93
add esp, 0x14
xor edx, edx
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0xe5a]
mov word [ebp - 0xe5c], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0xe5c]
push 0x16
push eax
push edx
call ebx
test eax, eax
je 0x41f14c
lea eax, [ebp - 0xe5c]
lea edi, [esi + 0x18]
test eax, eax
je 0x41f13d
lea eax, [ebp - 0xe5c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp - 0xe5c]
push ecx
push eax
mov ecx, edi
call fcn.00404cc7
and word [ebp - 0xc54], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0xc52]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
lea eax, [ebp - 0xc54]
push 0xb
push eax
push 0
call ebx
test eax, eax
je 0x41f1a1
lea eax, [ebp - 0xc54]
lea edi, [esi + 0x1c]
test eax, eax
je 0x41f192
lea eax, [ebp - 0xc54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp - 0xc54]
push ecx
push eax
mov ecx, edi
call fcn.00404cc7
and word [ebp - 0x126c], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x126a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
lea eax, [ebp - 0x126c]
push 0x19
push eax
push 0
call ebx
test eax, eax
je 0x41f1f6
lea eax, [ebp - 0x126c]
lea edi, [esi + 0x20]
test eax, eax
je 0x41f1e7
lea eax, [ebp - 0x126c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp - 0x126c]
push ecx
push eax
mov ecx, edi
call fcn.00404cc7
and word [ebp - 0x1064], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x1062]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 1
lea eax, [ebp - 0x1064]
push 0x10
push eax
push 0
call ebx
test eax, eax
je 0x41f24b
lea eax, [ebp - 0x1064]
lea edi, [esi + 0x24]
test eax, eax
je 0x41f23c
lea eax, [ebp - 0x1064]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp - 0x1064]
push ecx
push eax
mov ecx, edi
call fcn.00404cc7
and word [ebp - 0x1884], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x1882]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor edi, edi
lea eax, [ebp - 0x1884]
push edi
push 0x1a
push eax
push edi
call ebx
test eax, eax
je 0x41f294
lea eax, [ebp - 0x1884]
push 0x4647ac
push eax
lea eax, [esi + 0x28]
push 0x43d538
push eax
call fcn.00409c93
add esp, 0x10
mov word [ebp - 0xa4c], di
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0xa4a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
lea eax, [ebp - 0xa4c]
push 6
push eax
push 0
call ebx
test eax, eax
je 0x41f2e8
lea eax, [ebp - 0xa4c]
lea edi, [esi + 0x2c]
test eax, eax
je 0x41f2d9
lea eax, [ebp - 0xa4c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp - 0xa4c]
push ecx
push eax
mov ecx, edi
call fcn.00404cc7
and word [ebp - 0x844], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x842]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor edi, edi
lea eax, [ebp - 0x844]
push edi
push 0x1a
push eax
push edi
call ebx
test eax, eax
je 0x41f32c
lea eax, [ebp - 0x844]
push eax
lea eax, [esi + 0xc]
push 0x43caa8
push eax
call fcn.00409c93
add esp, 0xc
mov eax, dword [0x43c4ec]
mov word [ebp - 0x434], di
mov dword [ebp - 4], eax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x432]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x24]
xor edi, edi
push eax
lea eax, [ebp - 0x434]
push 0x103
push eax
mov ecx, esi
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x18], 0x104
mov dword [esi + 0x53bc], edi
mov dword [ebp - 0x24], edi
call fcn.0041ecca
cmp eax, edi
mov dword [ebp - 8], eax
je 0x41f57e
cmp dword [esi + 4], 6
jle 0x41f3e0
mov word [ebp - 0x63c], di
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x63a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x844]
push eax
push 0x43caa8
lea eax, [ebp - 0x63c]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
lea eax, [ebp - 0x844]
mov ecx, esi
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.0041edf6
mov dword [ebp - 8], eax
xor edi, edi
cmp dword [ebp - 8], edi
je 0x41f57e
lea eax, [esi + 0x58]
push edi
push 0x26
push eax
push edi
call ebx
push edi
lea eax, [esi + 0x260]
push 0x24
push eax
push edi
call ebx
push edi
lea eax, [esi + 0x468]
push 0x25
push eax
push edi
call ebx
push edi
lea eax, [esi + 0x670]
push 0x1a
push eax
push edi
call ebx
push edi
lea eax, [esi + 0x878]
push 0x10
push eax
push edi
call ebx
mov word [ebp - 0x22c], di
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x22a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x434]
push eax
push 0x43caa8
lea eax, [ebp - 0x22c]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov edi, dword [sym.imp.MSVCRT.dll_wcslen]
lea eax, [ebp - 0x22c]
push eax
call edi
cmp word [ebp + eax*2 - 0x22e], 0x5c
pop ecx
jne 0x41f49b
lea eax, [ebp - 0x22c]
push eax
call edi
and word [ebp + eax*2 - 0x22e], 0
pop ecx
lea eax, [ebp - 0x22c]
push eax
call edi
cmp eax, 4
pop ecx
jg 0x41f514
cmp eax, 2
jne 0x41f4b9
cmp word [ebp - 0x22a], 0x3a
je 0x41f4f5
cmp eax, 3
jne 0x41f4d2
cmp word [ebp - 0x22a], 0x3a
jne 0x41f514
cmp word [ebp - 0x228], 0x5c
je 0x41f4f5
cmp eax, 4
jne 0x41f514
cmp word [ebp - 0x22a], 0x3a
jne 0x41f514
cmp word [ebp - 0x228], 0x5c
jne 0x41f514
cmp word [ebp - 0x226], 0x5c
jne 0x41f514
mov ax, word [ebp - 0x22c]
cmp ax, 0x5a
ja 0x41f508
cmp ax, 0x41
jae 0x41f55d
cmp ax, 0x7a
ja 0x41f514
cmp ax, 0x61
jae 0x41f55d
xor ecx, ecx
lea eax, [esi + 0x58]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], ecx
je 0x41f53c
push dword [ebp - 0xc]
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.MSVCRT.dll__wcsicmp]
pop ecx
test eax, eax
pop ecx
je 0x41f54e
xor ecx, ecx
inc dword [ebp - 0x10]
add dword [ebp - 0xc], 0x208
cmp dword [ebp - 0x10], 0xa
jl 0x41f51f
jmp 0x41f554
and dword [ebp - 8], 0
xor ecx, ecx
cmp dword [ebp - 8], ecx
jne 0x41f644
lea eax, [ebp - 0x434]
push eax
push 0x43caa8
push 0x103
push 0x469e68
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
xor edi, edi
cmp dword [esi + 4], 6
mov dword [ebp - 8], edi
jg 0x41f801
mov word [ebp - 0x22c], di
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x22a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x20], 1
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x467084
push 0x46472c
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x18], 0x104
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x41f7b3
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
test eax, eax
pop ecx
jbe 0x41f7b3
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41f7b3
mov edi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x22c]
push eax
call edi
lea eax, [ebp - 0x22c]
push eax
call edi
lea eax, [ebp - 0x22c]
push str.360se
push eax
lea eax, [ebp - 4]
push 0x43d538
push eax
call fcn.00409c93
add esp, 0x10
xor edi, edi
jmp 0x41f81a
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], ecx
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x434]
push eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0xc], ecx
call fcn.00424295
add esp, 0x14
lea ebx, [esi + 0x30]
push dword [ebp - 0xc]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp - 0x10]
push 0x464714
push ebx
call fcn.00409c93
add esp, 0x18
cmp dword [ebp - 0x10], 5
jl 0x41f69c
mov dword [esi + 0x14f4], 1
mov ebx, dword [ebx]
push str.5.0.9.5
push ebx
call fcn.0042435b
pop ecx
test eax, eax
pop ecx
jge 0x41f6b8
mov dword [ebp - 8], 1
jmp 0x41f6c4
xor ecx, ecx
test eax, eax
setne cl
inc ecx
inc ecx
mov dword [ebp - 8], ecx
mov ebx, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x434]
push eax
call ebx
lea eax, [ebp - 0x434]
push eax
call edi
cmp word [ebp + eax*2 - 0x436], 0x5c
pop ecx
jne 0x41f6fb
lea eax, [ebp - 0x434]
push eax
call edi
and word [ebp + eax*2 - 0x436], 0
pop ecx
cmp dword [esi + 4], 6
jg 0x41f78a
cmp dword [ebp - 0x24], 0
je 0x41f78a
lea eax, [ebp - 0x434]
push eax
call ebx
and word [ebp - 0x22c], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x22a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x434]
push str.360se
mov edi, 0x43d538
push eax
push edi
lea eax, [ebp - 0x22c]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x14
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 4]
push 0x43caa8
push eax
call fcn.00409c93
add esp, 0xc
lea eax, [ebp - 0x434]
push 0x463d80
push eax
lea eax, [esi + 0x50]
push edi
push eax
call fcn.00409c93
add esp, 0x10
jmp 0x41f87e
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 4]
push 0x43caa8
push eax
call fcn.00409c93
add esp, 0xc
lea eax, [ebp - 4]
lea ecx, [esi + 0x50]
push eax
call fcn.00404768
jmp 0x41f87e
xor edx, edx
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x63a]
mov word [ebp - 0x63c], dx
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x63c]
push 0x26
push eax
push edx
call ebx
push str.360se
lea eax, [ebp - 0x63c]
push 0x46470c
push eax
lea eax, [ebp - 4]
push 0x464800
push eax
call fcn.00409c93
add esp, 0x14
jmp 0x41f63d
push 0x4646f8
lea eax, [ebp - 4]
push dword [esi + 0xc]
push 0x43d538
push eax
call fcn.00409c93
add esp, 0x10
cmp dword [0x469634], edi
je 0x41f87e
mov ebx, 0x469a54
mov eax, ebx
test eax, eax
je 0x41f87e
cmp word [0x469a54], di
je 0x41f87e
push ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
cmp word [eax*2 + 0x469a52], 0x5c
pop ecx
je 0x41f85c
push ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
cmp word [eax*2 + 0x469a52], 0x2f
pop ecx
jne 0x41f86c
push ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
pop ecx
mov word [eax*2 + 0x469a52], di
push ebx
lea eax, [ebp - 4]
push 0x4646e4
push eax
call fcn.00409c93
add esp, 0xc
mov ecx, esi
call fcn.0041e5e9
mov eax, dword [ebp - 8]
lea edi, [esi + 0x4c]
mov dword [esi + 0x1514], eax
lea eax, [ebp - 4]
push eax
mov ecx, edi
call fcn.00404768
push edi
mov ecx, 0x46a72c
call fcn.00404768
mov ebx, str.360se
lea edi, [esi + 0x44]
push ebx
push dword [esi + 0xc]
push 0x43d538
push edi
call fcn.00409c93
push dword [edi]
call fcn.004244cb
add esp, 0x14
lea edi, [esi + 0x3c]
push 0x4646d0
push ebx
push dword [esi + 0xc]
push 0x464800
push edi
call fcn.00409c93
add esp, 0x14
lea eax, [esi + 0x34]
push 0x4646b8
push ebx
push dword [esi + 0xc]
push 0x464800
push eax
call fcn.00409c93
add esp, 0x14
lea eax, [esi + 0x40]
push 0x46469c
push ebx
push dword [esi + 0xc]
push 0x464800
push eax
call fcn.00409c93
add esp, 0x14
push dword [edi]
push 1
push 0x464500
push str.option
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [esi + 0x14c0], eax
mov ax, word [0x467084]
mov word [ebp - 0x1a8c], ax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x1a8a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x1a8c]
push 0x103
push eax
call fcn.00426724
cmp dword [esi + 4], 5
pop ecx
pop ecx
jne 0x41f97b
cmp word [ebp - 0x1a8c], 0x36
jne 0x41f97b
mov dword [esi + 0x1524], 1
mov ecx, esi
call fcn.0041f98f
lea ecx, [ebp - 4]
call fcn.00404beb
pop edi
pop esi
pop ebx
leave
ret