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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa34
mov eax, dword [0x101b90ec]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push 0x208
lea eax, [ebp - 0x414]
mov esi, ecx
push 0
push eax
call fcn.1012b3b0
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.1012b3b0
push 0x208
lea eax, [ebp - 0x824]
push 0
push eax
call fcn.1012b3b0
lea eax, [esi + 0x9c]
add esp, 0x24
cmp dword [eax + 0x14], 8
jb 0x10040061
mov eax, dword [eax]
push str.WanNengWBInfo.ini
push eax
lea eax, [ebp - 0x824]
push 0x10183440
push eax
call fcn.10041b30
add esp, 0x10
lea eax, [ebp - 0x824]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x1018344c
push str.CfgUserPath
push str.AppInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
je 0x10040103
cmp word [ebp - 0x20c], 0
jne 0x100400c4
xor ecx, ecx
jmp 0x100400df
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100400d0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x24]
call fcn.10041f70
mov byte [esi + 0x21], 1
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10109ec2
mov esp, ebp
pop ebp
ret
push edi
push 0
push 0x2b
lea eax, [ebp - 0x414]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x414]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10040120
mov eax, dword [0x1018343c]
lea edx, [ebp - 0x414]
mov dword [edi], eax
add edx, 0xfffffffe
nop dword [eax]
mov cx, word [edx + 2]
lea edx, [edx + 2]
test cx, cx
jne 0x10040140
mov ecx, dword [str.WanNengWB]
lea edi, [ebp - 0x414]
mov dword [edx], ecx
add edi, 0xfffffffe
mov ecx, dword [0x1018342c]
mov dword [edx + 4], ecx
mov ecx, dword [0x10183430]
mov dword [edx + 8], ecx
mov ecx, dword [0x10183434]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x10183438]
mov dword [edx + 0x10], ecx
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x10040181
lea ecx, [ebp - 0x414]
mov dword [edi], eax
add ecx, 0xfffffffe
nop dword [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x100401a0
mov eax, dword [str.WanNengWB]
mov dword [ecx], eax
mov eax, dword [0x1018342c]
mov dword [ecx + 4], eax
mov eax, dword [0x10183430]
mov dword [ecx + 8], eax
mov eax, dword [0x10183434]
mov dword [ecx + 0xc], eax
mov eax, dword [0x10183438]
mov dword [ecx + 0x10], eax
lea ecx, [ebp - 0x414]
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x100401e0
mov eax, dword [str..ini]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov dword [ecx], eax
mov eax, dword [0x101832d0]
mov dword [ecx + 4], eax
mov ax, word [0x101832d4]
mov word [ecx + 8], ax
lea eax, [ebp - 0x414]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x1018344c
push str.CfgUserPath
push str.Globals
call edi
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
je 0x10040287
cmp word [ebp - 0x20c], 0
jne 0x1004024a
xor ecx, ecx
jmp 0x10040262
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10040253
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x24]
call fcn.10041f70
pop edi
mov byte [esi + 0x21], 1
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10109ec2
mov esp, ebp
pop ebp
ret
push 0x206
lea eax, [ebp - 0x61a]
push 0
push eax
call fcn.1012b3b0
movups xmm0, xmmword [str.SOFTWARE_]
mov eax, dword [0x101832f8]
lea ecx, [ebp - 0x61c]
add esp, 0xc
mov dword [ebp - 0x60c], eax
movups xmmword [ebp - 0x61c], xmm0
add ecx, 0xfffffffe
nop
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x100402c0
mov eax, dword [str.WanNengWB]
mov dword [ecx], eax
mov eax, dword [0x1018342c]
mov dword [ecx + 4], eax
mov eax, dword [0x10183430]
mov dword [ecx + 8], eax
mov eax, dword [0x10183434]
mov dword [ecx + 0xc], eax
mov eax, dword [0x10183438]
mov dword [ecx + 0x10], eax
lea eax, [ebp - 0xa30]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0x61c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10040385
lea eax, [ebp - 0xa34]
mov dword [ebp - 0xa34], 0x104
push eax
lea eax, [ebp - 0x20c]
push eax
push 0
push 0
push str.CfgUserPath
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10040385
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
je 0x10040385
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x24]
call fcn.10042070
pop edi
mov byte [esi + 0x21], 1
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10109ec2
mov esp, ebp
pop ebp
ret
push dword [ebp - 0xa30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0xa2c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0xa2c]
push 0x5c
push eax
call fcn.1012a364
xor ecx, ecx
push str.WanNengWBInfo.ini
mov word [eax + 2], cx
lea eax, [ebp - 0xa2c]
push eax
lea eax, [ebp - 0x824]
push 0x10183440
push eax
call fcn.10041b30
add esp, 0x18
lea eax, [ebp - 0x824]
push eax
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0x1018344c
push str.CfgUserPath
push str.AppInfo
call edi
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
jne 0x10040361
mov ecx, dword [ebp - 4]
pop edi
mov byte [esi + 0x21], al
xor ecx, ebp
pop esi
pop ebx
call fcn.10109ec2
mov esp, ebp
pop ebp
ret