Function at 0x10040a40
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, 0x1050
call fcn.1010bb90
mov eax, dword [0x101ba0ec]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
lea eax, [ebp - 0x824]
mov dword [ebp - 0x1048], ecx
push 0
push eax
call fcn.1012bcf0
push 0x208
lea eax, [ebp - 0xe3c]
push 0
push eax
call fcn.1012bcf0
push 0x208
lea eax, [ebp - 0xa2c]
push 0
push eax
call fcn.1012bcf0
push 0x208
lea eax, [ebp - 0x1044]
push 0
push eax
call fcn.1012bcf0
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.1012bcf0
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.1012bcf0
add esp, 0x48
lea eax, [ebp - 0x824]
push 0
push 0x2b
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x824]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10040af1
mov eax, dword [0x1018443c]
lea edx, [ebp - 0x824]
mov dword [edi], eax
add edx, 0xfffffffe
nop dword [eax]
mov cx, word [edx + 2]
lea edx, [edx + 2]
test cx, cx
jne 0x10040b10
mov esi, dword [str.WanNengWB]
lea edi, [ebp - 0x824]
mov ebx, dword [0x1018442c]
add edi, 0xfffffffe
mov ecx, dword [0x10184430]
mov dword [edx], esi
mov dword [edx + 4], ebx
mov dword [edx + 8], ecx
mov ecx, dword [0x10184434]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x10184438]
mov dword [edx + 0x10], ecx
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x10040b51
lea ecx, [ebp - 0x824]
mov dword [edi], eax
add ecx, 0xfffffffe
nop dword [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10040b70
mov eax, dword [0x10184430]
mov dword [ecx], esi
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov eax, dword [0x10184434]
mov dword [ecx + 0xc], eax
mov eax, dword [0x10184438]
mov dword [ecx + 0x10], eax
lea ecx, [ebp - 0x824]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10040ba2
mov eax, dword [str..ini]
mov dword [ecx], eax
mov eax, dword [0x101842d0]
mov dword [ecx + 4], eax
mov ax, word [0x101842d4]
mov word [ecx + 8], ax
lea eax, [ebp - 0x824]
push eax
push 0x104
lea eax, [ebp - 0xe3c]
push eax
push 0x1018444c
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xe3c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x10040bf1
xor ecx, ecx
nop dword [eax + eax]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x10040c10
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x414]
push eax
call ebx
test eax, eax
je 0x10040d35
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.1012bcf0
add esp, 0xc
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x10040c60
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10040c81
mov ecx, 6
lea eax, [ebp - 0x61c]
mov esi, str.WnConfig.exe
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
call ebx
test eax, eax
je 0x10040d35
cmp word [ebp - 0x20c], 0
jne 0x10040cba
xor ecx, ecx
jmp 0x10040cd2
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10040cc3
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x20c]
push ecx
push eax
lea ecx, [esi + 0x84]
call fcn.10041f80
cmp word [ebp - 0x414], 0
jne 0x10040cf9
xor ecx, ecx
jmp 0x10040d11
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10040d02
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
push eax
lea ecx, [esi + 0x9c]
call fcn.10041f80
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1010a7f2
mov esp, ebp
pop ebp
ret
push 0x206
lea eax, [ebp - 0xc32]
push 0
push eax
call fcn.1012bcf0
movups xmm0, xmmword [str.SOFTWARE_]
mov eax, dword [0x101842f8]
lea ecx, [ebp - 0xc34]
add esp, 0xc
mov dword [ebp - 0xc24], eax
movups xmmword [ebp - 0xc34], xmm0
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10040d70
mov eax, dword [str.WanNengWB]
mov dword [ecx], eax
mov eax, dword [0x1018442c]
mov dword [ecx + 4], eax
mov eax, dword [0x10184430]
mov dword [ecx + 8], eax
mov eax, dword [0x10184434]
mov dword [ecx + 0xc], eax
mov eax, dword [0x10184438]
mov dword [ecx + 0x10], eax
lea eax, [ebp - 0x104c]
push eax
push 0x20019
push 0
lea eax, [ebp - 0xc34]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10040eb9
lea eax, [ebp - 0x1050]
mov dword [ebp - 0x1050], 0x104
push eax
lea eax, [ebp - 0x1044]
push eax
push 0
push 0
push str.InstallPath
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10040eb9
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x1044]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x10040e02
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x10040e20
lea eax, [ebp - 0x414]
push eax
call ebx
test eax, eax
je 0x10040eb9
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.1012bcf0
add esp, 0xc
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x10040e60
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10040e81
mov ecx, 6
lea eax, [ebp - 0x61c]
mov esi, str.WnConfig.exe
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
call ebx
test eax, eax
je 0x10040eb9
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x100411e8
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0x26
lea eax, [ebp - 0xa2c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0xa2c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10040ee1
mov eax, dword [0x1018443c]
lea edx, [ebp - 0xa2c]
mov dword [edi], eax
add edx, 0xfffffffe
nop dword [eax]
mov cx, word [edx + 2]
lea edx, [edx + 2]
test cx, cx
jne 0x10040f00
mov ecx, dword [str.WanNengWB]
lea edi, [ebp - 0xa2c]
mov dword [edx], ecx
add edi, 0xfffffffe
mov ecx, dword [0x1018442c]
mov dword [edx + 4], ecx
mov ecx, dword [0x10184430]
mov dword [edx + 8], ecx
mov ecx, dword [0x10184434]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x10184438]
mov dword [edx + 0x10], ecx
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x10040f41
mov dword [edi], eax
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xa2c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x10040f51
xor ecx, ecx
nop dword [eax + eax]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x10040f70
lea eax, [ebp - 0x414]
push eax
call ebx
test eax, eax
je 0x10041086
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.1012bcf0
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x10040fb1
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10040fd2
mov ecx, 6
lea eax, [ebp - 0x61c]
mov esi, str.WnConfig.exe
rep movsd dword es:[edi], dword [esi]
push eax
movsw word es:[edi], word [esi]
call ebx
test eax, eax
je 0x10041086
cmp word [ebp - 0x20c], 0
jne 0x1004100b
xor ecx, ecx
jmp 0x10041023
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10041014
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x20c]
push ecx
push eax
lea ecx, [esi + 0x84]
call fcn.10041f80
cmp word [ebp - 0x414], 0
jne 0x1004104a
xor ecx, ecx
jmp 0x10041062
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10041053
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
push eax
lea ecx, [esi + 0x9c]
call fcn.10041f80
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1010a7f2
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xe3c]
push eax
call ebx
test eax, eax
je 0x10041163
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0xe3c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x100410a0
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x100410c0
cmp word [ebp - 0x20c], ax
jne 0x100410e5
xor ecx, ecx
jmp 0x100410ff
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100410f0
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x20c]
push ecx
push eax
lea ecx, [esi + 0x84]
call fcn.10041f80
cmp word [ebp - 0x414], 0
jne 0x10041126
xor ecx, ecx
jmp 0x1004113f
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10041130
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
push eax
lea ecx, [esi + 0x9c]
call fcn.10041f80
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1010a7f2
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x1044]
push eax
call ebx
xor ecx, ecx
test eax, eax
je 0x100411b0
movzx eax, word [ebp + ecx - 0x1044]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x10041172
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x10041190
jmp 0x100411e8
movzx eax, word [ebp + ecx - 0xa2c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x100411b0
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x100411d0
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x84]
call fcn.10042080
lea eax, [ebp - 0x414]
push eax
lea ecx, [esi + 0x9c]
call fcn.10042080
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1010a7f2
mov esp, ebp
pop ebp
ret