Function at 0x40b070
Capabilities:
Get common file path
Query or enumerate registry value
Read .ini file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59ed1b
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1298
call fcn.00573790
mov eax, dword [0x629a40]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x12a0], esi
push 0x208
lea eax, [ebp - 0x630]
push 0
push eax
call fcn.00578b50
add esp, 0xc
lea eax, [ebp - 0xa40]
push 0x208
push 0
push eax
call fcn.00578b50
add esp, 0xc
lea eax, [ebp - 0xc48]
push 0x208
push 0
push eax
call fcn.00578b50
add esp, 0xc
lea eax, [ebp - 0x428]
push 0x208
push 0
push eax
call fcn.00578b50
add esp, 0xc
lea eax, [ebp - 0x220]
push 0x208
push 0
push eax
call fcn.00578b50
add esp, 0xc
lea eax, [ebp - 0x1260]
push 0x208
push 0
push eax
call fcn.00578b50
add esp, 0xc
lea eax, [ebp - 0xe4e]
push 0x206
push 0
push eax
call fcn.00578b50
movups xmm0, xmmword [0x61b828]
mov eax, dword [0x61b838]
lea ecx, [ebp - 0xe50]
add esp, 0xc
mov dword [ebp - 0xe40], eax
movups xmmword [ebp - 0xe50], xmm0
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40b180
mov eax, dword [0x61b71c]
mov dword [ecx], eax
mov eax, dword [str.iNengPY]
mov dword [ecx + 4], eax
mov eax, dword [0x61b724]
mov dword [ecx + 8], eax
mov eax, dword [0x61b728]
mov dword [ecx + 0xc], eax
mov eax, dword [0x61b72c]
mov dword [ecx + 0x10], eax
lea eax, [ebp - 0x12a4]
push eax
push 0x20019
push 0
lea eax, [ebp - 0xe50]
push eax
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40b30f
lea eax, [ebp - 0x12a8]
mov dword [ebp - 0x12a8], 0x208
push eax
lea eax, [ebp - 0x1260]
push eax
push 0
push 0
push str.InstallPath
push dword [ebp - 0x12a4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40b30f
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x1260]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x42a], ax
test ax, ax
jne 0x40b212
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x428]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40b230
lea ecx, [ebp - 0x220]
call fcn.00421ed0
test al, al
je 0x40b30f
push 0x208
lea eax, [ebp - 0x838]
push 0
push eax
call fcn.00578b50
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x220]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x83a], ax
test ax, ax
jne 0x40b273
lea ecx, [ebp - 0x838]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40b294
mov eax, dword [str.Config.exe]
mov dword [ecx], eax
mov eax, dword [0x61b858]
mov dword [ecx + 4], eax
mov eax, dword [0x61b85c]
mov dword [ecx + 8], eax
mov eax, dword [0x61b860]
mov dword [ecx + 0xc], eax
mov eax, dword [0x61b864]
mov dword [ecx + 0x10], eax
mov ax, word [0x61b868]
mov word [ecx + 0x14], ax
lea ecx, [ebp - 0x838]
call fcn.00421ed0
test al, al
je 0x40b30f
push dword [ebp - 0x12a4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x428]
push eax
lea ecx, [esi + 0x44]
call fcn.00403c40
lea eax, [ebp - 0x220]
push eax
lea ecx, [esi + 0x74]
call fcn.00403c40
jmp 0x40ba0d
push dword [ebp - 0x12a4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0x2b
lea eax, [ebp - 0x630]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x630]
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x40b340
mov eax, dword [0x61b718]
lea edx, [ebp - 0x630]
mov dword [edi], eax
add edx, 0xfffffffe
nop dword [eax]
mov cx, word [edx + 2]
lea edx, [edx + 2]
test cx, cx
jne 0x40b360
mov esi, dword [0x61b71c]
lea edi, [ebp - 0x630]
mov ecx, dword [str.iNengPY]
add edi, 0xfffffffe
mov dword [edx], esi
mov dword [edx + 4], ecx
mov ecx, dword [0x61b724]
mov dword [edx + 8], ecx
mov ecx, dword [0x61b728]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x61b72c]
mov dword [edx + 0x10], ecx
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x40b3a1
lea ecx, [ebp - 0x630]
mov dword [edi], eax
add ecx, 0xfffffffe
nop dword [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40b3c0
mov eax, dword [str.iNengPY]
mov dword [ecx], esi
mov dword [ecx + 4], eax
mov eax, dword [0x61b724]
mov dword [ecx + 8], eax
mov eax, dword [0x61b728]
mov dword [ecx + 0xc], eax
mov eax, dword [0x61b72c]
mov dword [ecx + 0x10], eax
lea ecx, [ebp - 0x630]
add ecx, 0xfffffffe
nop word [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40b400
mov eax, dword [str..ini]
mov dword [ecx], eax
mov eax, dword [0x61b734]
mov dword [ecx + 4], eax
mov ax, word [0x61b738]
mov word [ecx + 8], ax
lea eax, [ebp - 0x630]
push eax
push 0x104
lea eax, [ebp - 0xa40]
push eax
push 0x61b488
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor ecx, ecx
nop
movzx eax, word [ebp + ecx - 0xa40]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x42a], ax
test ax, ax
jne 0x40b450
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b471
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x40b5a9
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x428]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40b490
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x40b5a9
lea eax, [ebp - 0x1284]
mov dword [ebp - 0x1264], 0
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x220]
push 0
push eax
movups xmmword [ebp - 0x1284], xmm0
movups xmmword [ebp - 0x1274], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
setne al
test al, al
je 0x40b5a9
push 0x208
lea eax, [ebp - 0x838]
push 0
push eax
call fcn.00578b50
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x220]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x83a], ax
test ax, ax
jne 0x40b513
lea ecx, [ebp - 0x838]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40b534
mov eax, dword [str.Config.exe]
mov dword [ecx], eax
mov eax, dword [0x61b858]
mov dword [ecx + 4], eax
mov eax, dword [0x61b85c]
mov dword [ecx + 8], eax
mov eax, dword [0x61b860]
mov dword [ecx + 0xc], eax
mov eax, dword [0x61b864]
mov dword [ecx + 0x10], eax
mov ax, word [0x61b868]
mov word [ecx + 0x14], ax
lea ecx, [ebp - 0x838]
call fcn.00421ed0
test al, al
je 0x40b5a9
mov esi, dword [ebp - 0x12a0]
lea eax, [ebp - 0x428]
push eax
lea ecx, [esi + 0x44]
call fcn.00403c40
lea eax, [ebp - 0x220]
push eax
lea ecx, [esi + 0x74]
call fcn.00403c40
jmp 0x40ba0d
sub esp, 0x18
mov ecx, esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 8
jb 0x40b5c6
mov eax, dword [ecx]
jmp 0x40b5c8
mov eax, ecx
push 7
xor edx, edx
push str.roaming
mov word [eax], dx
call fcn.00404030
lea ecx, [ebp - 0x129c]
call fcn.00426160
add esp, 0x18
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x129c]
cmp dword [ebp - 0x1288], 8
lea edx, [ebp - 0xc48]
cmovae ecx, dword [ebp - 0x129c]
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x40b610
lea edi, [ebp - 0xc48]
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40b630
mov ecx, 7
mov esi, str.ZhiNengPYInput
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea edi, [ebp - 0xc48]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x40b653
mov eax, dword [0x61b718]
xor ecx, ecx
mov dword [edi], eax
nop dword [eax + eax]
movzx eax, word [ebp + ecx - 0xc48]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x42a], ax
test ax, ax
jne 0x40b670
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x428]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40b690
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp - 0x220]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jle 0x40b830
lea eax, [ebp - 0x1284]
mov dword [ebp - 0x1264], 0
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x220]
push 0
push eax
movups xmmword [ebp - 0x1284], xmm0
movups xmmword [ebp - 0x1274], xmm0
call edi
test eax, eax
setne al
test al, al
je 0x40b830
push 0x208
lea eax, [ebp - 0x1058]
push 0
push eax
call fcn.00578b50
add esp, 0xc
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x220]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x105a], ax
test ax, ax
jne 0x40b720
lea ecx, [ebp - 0x1058]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40b741
mov eax, dword [str.Config.exe]
mov dword [ecx], eax
mov eax, dword [0x61b858]
mov dword [ecx + 4], eax
mov eax, dword [0x61b85c]
mov dword [ecx + 8], eax
mov eax, dword [0x61b860]
mov dword [ecx + 0xc], eax
mov eax, dword [0x61b864]
mov dword [ecx + 0x10], eax
mov ax, word [0x61b868]
mov word [ecx + 0x14], ax
lea eax, [ebp - 0x1058]
push eax
call esi
test eax, eax
jle 0x40b830
lea eax, [ebp - 0x1284]
mov dword [ebp - 0x1264], 0
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x1058]
push 0
push eax
movups xmmword [ebp - 0x1284], xmm0
movups xmmword [ebp - 0x1274], xmm0
call edi
test eax, eax
setne al
test al, al
je 0x40b830
cmp word [ebp - 0x428], 0
jne 0x40b7d3
xor ecx, ecx
jmp 0x40b7ef
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b7e0
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x12a0]
lea eax, [ebp - 0x428]
push ecx
push eax
lea ecx, [esi + 0x44]
call fcn.00404030
cmp word [ebp - 0x220], 0
jne 0x40b816
xor ecx, ecx
jmp 0x40b9df
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b820
jmp 0x40b9db
lea ecx, [ebp - 0xa40]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b840
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x40b940
lea eax, [ebp - 0xa40]
push eax
call esi
test eax, eax
jle 0x40b940
lea eax, [ebp - 0x1284]
mov dword [ebp - 0x1264], 0
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0xa40]
push 0
push eax
movups xmmword [ebp - 0x1284], xmm0
movups xmmword [ebp - 0x1274], xmm0
call edi
test eax, eax
setne al
test al, al
je 0x40b940
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xa40]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x42a], ax
test ax, ax
jne 0x40b8a4
xor ecx, ecx
nop
movzx eax, word [ebp + ecx - 0x428]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40b8c0
cmp word [ebp - 0x428], ax
jne 0x40b8e5
xor ecx, ecx
jmp 0x40b8ff
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b8f0
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x12a0]
lea eax, [ebp - 0x428]
push ecx
push eax
lea ecx, [esi + 0x44]
call fcn.00404030
cmp word [ebp - 0x220], 0
jne 0x40b926
xor ecx, ecx
jmp 0x40b9df
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b930
jmp 0x40b9db
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xc48]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x42a], ax
test ax, ax
jne 0x40b942
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x428]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x222], ax
test ax, ax
jne 0x40b960
cmp word [ebp - 0x428], ax
jne 0x40b985
xor ecx, ecx
jmp 0x40b99f
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b990
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x12a0]
lea eax, [ebp - 0x428]
push ecx
push eax
lea ecx, [esi + 0x44]
call fcn.00404030
cmp word [ebp - 0x220], 0
jne 0x40b9c3
xor ecx, ecx
jmp 0x40b9df
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b9d0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x220]
push eax
lea ecx, [esi + 0x74]
call fcn.00404030
mov eax, dword [ebp - 0x1288]
cmp eax, 8
jb 0x40ba0d
inc eax
lea ecx, [ebp - 0x129c]
push eax
push dword [ebp - 0x129c]
call fcn.004043b0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00572ac9
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret