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

Disassembly:
sub rsp, 0xab8
mov rax, qword [0x0042a560]
xor rax, rsp
mov qword [rsp + 0xa90], rax
mov qword [rsp + 0xad8], rsi
mov rsi, rcx
lea rcx, [rsp + 0x252]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x250], 0
call fcn.0040e3f0
lea rcx, [rsp + 0x42]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x40], 0
call fcn.0040e3f0
lea rcx, [rsp + 0x462]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x460], 0
call fcn.0040e3f0
cmp qword [rsi + 0xf0], 8
jb 0x40a85e
mov r8, qword [rsi + 0xd8]
jmp 0x40a865
lea r8, [rsi + 0xd8]
mov qword [rsp + 0xac8], rbx
mov qword [rsp + 0xad0], rbp
lea r9, str.WanNengWBInfo.ini
lea rdx, str._s_s
lea rcx, [rsp + 0x460]
mov qword [rsp + 0xab0], rdi
mov qword [rsp + 0xaa8], r12
call fcn.0040e620
lea rdx, [rsp + 0x460]
mov qword [rsp + 0x28], rdx
lea r9, [rsp + 0x40]
lea r8, [0x00421e14]
lea rdx, str.CfgUserPath
lea rcx, str.AppInfo
mov dword [rsp + 0x20], 0x104
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40aa0b
mov rdx, qword [rsi + 0x28]
xor eax, eax
lea rdi, [rsp + 0x40]
mov rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
cmp rdx, 8
not rcx
lea rbp, [rcx - 1]
jb 0x40a914
mov rax, qword [rsi + 0x10]
lea rdi, [rsi + 0x10]
jmp 0x40a91b
lea rdi, [rsi + 0x10]
mov rax, rdi
lea rcx, [rsp + 0x40]
cmp rcx, rax
jb 0x40a972
cmp rdx, 8
jb 0x40a930
mov rcx, qword [rdi]
jmp 0x40a933
mov rcx, rdi
mov rax, qword [rsi + 0x20]
lea rcx, [rcx + rax*2]
lea rax, [rsp + 0x40]
cmp rcx, rax
jbe 0x40a972
cmp rdx, 8
jb 0x40a94e
mov rdi, qword [rdi]
lea r8, [rsp + 0x40]
lea rdx, [rsi + 8]
lea rcx, [rsi + 8]
sub r8, rdi
mov r9, rbp
sar r8, 1
call fcn.00401a30
mov byte [rsi + 1], 1
jmp 0x40afd6
movabs rax, 0x7ffffffffffffffe
cmp rbp, rax
jbe 0x40a986
call fcn.0040e230
mov rax, qword [rsi + 0x28]
cmp rax, rbp
jae 0x40a9b3
mov r8, qword [rsi + 0x20]
lea rcx, [rsi + 8]
mov rdx, rbp
call fcn.00401420
test rbp, rbp
je 0x40aa02
mov rdx, qword [rsi + 0x28]
cmp rdx, 8
jb 0x40a9d5
mov rcx, qword [rdi]
jmp 0x40a9d8
test rbp, rbp
jne 0x40a99f
xor r12d, r12d
cmp rax, 8
mov qword [rsi + 0x20], r12
jb 0x40a9c8
mov rdi, qword [rdi]
mov word [rdi], r12w
mov byte [rsi + 1], 1
jmp 0x40afd6
mov rcx, rdi
lea r12, [rbp + rbp]
lea r8, [rsp + 0x40]
add rdx, rdx
mov r9, r12
call fcn.0040e710
mov qword [rsi + 0x20], rbp
cmp qword [rsi + 0x28], 8
jb 0x40a9fb
mov rdi, qword [rdi]
mov word [rdi + r12], 0
mov byte [rsi + 1], 1
jmp 0x40afd6
xor r9d, r9d
lea rdx, [rsp + 0x250]
xor ecx, ecx
lea r8d, [r9 + 0x2c]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov edx, dword [0x004219d4]
xor eax, eax
lea rdi, [rsp + 0x250]
mov rcx, 0xffffffffffffffff
lea r9, [rsp + 0x40]
repne scasw ax, word [rdi]
mov rcx, 0xffffffffffffffff
lea r8, [0x00421e14]
mov dword [rdi - 2], edx
lea rdi, [rsp + 0x250]
repne scasw ax, word [rdi]
mov rax, qword [str.WanNengWBInput]
mov rcx, 0xffffffffffffffff
mov qword [rdi - 2], rax
mov rax, qword [0x00421fe0]
mov qword [rdi + 6], rax
mov rax, qword [0x00421fe8]
mov qword [rdi + 0xe], rax
mov eax, dword [0x00421ff0]
mov dword [rdi + 0x16], eax
movzx eax, word [0x00421ff4]
mov word [rdi + 0x1a], ax
xor eax, eax
lea rdi, [rsp + 0x250]
repne scasw ax, word [rdi]
mov rcx, 0xffffffffffffffff
mov dword [rdi - 2], edx
lea rdi, [rsp + 0x250]
lea rdx, str.CfgUserPath
repne scasw ax, word [rdi]
mov rax, qword [str.WanNengWB]
mov rcx, 0xffffffffffffffff
mov qword [rdi - 2], rax
mov rax, qword [0x004229b8]
mov qword [rdi + 6], rax
mov eax, dword [0x004229c0]
mov dword [rdi + 0xe], eax
xor eax, eax
lea rdi, [rsp + 0x250]
repne scasw ax, word [rdi]
mov rax, qword [str..ini]
lea rcx, str.Globals
mov qword [rdi - 2], rax
movzx eax, word [0x004229a8]
mov word [rdi + 6], ax
lea rax, [rsp + 0x250]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x104
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ac38
mov rdx, qword [rsi + 0x28]
xor eax, eax
lea rdi, [rsp + 0x40]
mov rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
cmp rdx, 8
not rcx
lea rbp, [rcx - 1]
jb 0x40ab6c
mov rax, qword [rsi + 0x10]
lea rdi, [rsi + 0x10]
jmp 0x40ab73
lea rdi, [rsi + 0x10]
mov rax, rdi
lea rcx, [rsp + 0x40]
cmp rcx, rax
jb 0x40abca
cmp rdx, 8
jb 0x40ab88
mov rcx, qword [rdi]
jmp 0x40ab8b
mov rcx, rdi
mov rax, qword [rsi + 0x20]
lea rcx, [rcx + rax*2]
lea rax, [rsp + 0x40]
cmp rcx, rax
jbe 0x40abca
cmp rdx, 8
jb 0x40aba6
mov rdi, qword [rdi]
lea r8, [rsp + 0x40]
lea rdx, [rsi + 8]
lea rcx, [rsi + 8]
sub r8, rdi
mov r9, rbp
sar r8, 1
call fcn.00401a30
mov byte [rsi + 1], 1
jmp 0x40afd6
movabs rax, 0x7ffffffffffffffe
cmp rbp, rax
jbe 0x40abde
call fcn.0040e230
mov rax, qword [rsi + 0x28]
cmp rax, rbp
jae 0x40ac16
mov r8, qword [rsi + 0x20]
lea rcx, [rsi + 8]
mov rdx, rbp
call fcn.00401420
test rbp, rbp
je 0x40aa02
mov rdx, qword [rsi + 0x28]
cmp rdx, 8
jb 0x40a9d5
mov rcx, qword [rdi]
jmp 0x40a9d8
test rbp, rbp
jne 0x40abf7
xor r12d, r12d
cmp rax, 8
mov qword [rsi + 0x20], r12
jb 0x40ac2b
mov rdi, qword [rdi]
mov word [rdi], r12w
mov byte [rsi + 1], 1
jmp 0x40afd6
lea rcx, [rsp + 0x672]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x670], 0
call fcn.0040e3f0
xor r12d, r12d
mov rcx, r12
lea rdx, str.SOFTWARE_
movzx eax, word [rcx + rdx]
add rcx, 2
test ax, ax
mov word [rsp + rcx + 0x66e], ax
jne 0x40ac64
xor eax, eax
lea rdi, [rsp + 0x670]
mov rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
mov rax, qword [str.WanNengWBInput]
lea rdx, [rsp + 0x670]
mov qword [rdi - 2], rax
mov rax, qword [0x00421fe0]
mov r9d, 0xf003f
mov qword [rdi + 6], rax
mov rax, qword [0x00421fe8]
xor r8d, r8d
mov qword [rdi + 0xe], rax
mov eax, dword [0x00421ff0]
mov rcx, 0xffffffff80000002
mov dword [rdi + 0x16], eax
movzx eax, word [0x00421ff4]
mov word [rdi + 0x1a], ax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40ae41
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
lea rdx, str.CfgUserPath
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x38], 0x104
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40ae41
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ae41
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rsi + 0x28]
xor eax, eax
lea rdi, [rsp + 0x40]
mov rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
cmp rdx, 8
not rcx
lea rbp, [rcx - 1]
jb 0x40ad78
mov rax, qword [rsi + 0x10]
lea rdi, [rsi + 0x10]
jmp 0x40ad7f
lea rdi, [rsi + 0x10]
mov rax, rdi
lea rcx, [rsp + 0x40]
cmp rcx, rax
jb 0x40add6
cmp rdx, 8
jb 0x40ad94
mov rcx, qword [rdi]
jmp 0x40ad97
mov rcx, rdi
mov rax, qword [rsi + 0x20]
lea rcx, [rcx + rax*2]
lea rax, [rsp + 0x40]
cmp rcx, rax
jbe 0x40add6
cmp rdx, 8
jb 0x40adb2
mov rdi, qword [rdi]
lea r8, [rsp + 0x40]
lea rdx, [rsi + 8]
lea rcx, [rsi + 8]
sub r8, rdi
mov r9, rbp
sar r8, 1
call fcn.00401a30
mov byte [rsi + 1], 1
jmp 0x40afd6
movabs rax, 0x7ffffffffffffffe
cmp rbp, rax
jbe 0x40adea
call fcn.0040e230
mov rax, qword [rsi + 0x28]
cmp rax, rbp
jae 0x40ae22
mov r8, qword [rsi + 0x20]
lea rcx, [rsi + 8]
mov rdx, rbp
call fcn.00401420
test rbp, rbp
je 0x40aa02
mov rdx, qword [rsi + 0x28]
cmp rdx, 8
jb 0x40a9d5
mov rcx, qword [rdi]
jmp 0x40a9d8
test rbp, rbp
jne 0x40ae03
cmp rax, 8
mov qword [rsi + 0x20], r12
jb 0x40ae34
mov rdi, qword [rdi]
mov word [rdi], r12w
mov byte [rsi + 1], 1
jmp 0x40afd6
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rdx, [rsp + 0x880]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x880]
mov dx, 0x5c
call fcn.0040e5f0
lea r9, str.WanNengWBInfo.ini
lea r8, [rsp + 0x880]
lea rdx, str._s_s
lea rcx, [rsp + 0x460]
mov word [rax + 2], r12w
call fcn.0040e620
lea rax, [rsp + 0x460]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea r8, [0x00421e14]
lea rdx, str.CfgUserPath
lea rcx, str.AppInfo
mov dword [rsp + 0x20], 0x104
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40afd2
mov rdx, qword [rsi + 0x28]
xor eax, eax
lea rdi, [rsp + 0x40]
mov rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
cmp rdx, 8
not rcx
lea rbp, [rcx - 1]
jb 0x40af0f
mov rax, qword [rsi + 0x10]
lea rdi, [rsi + 0x10]
jmp 0x40af16
lea rdi, [rsi + 0x10]
mov rax, rdi
lea rcx, [rsp + 0x40]
cmp rcx, rax
jb 0x40af6a
cmp rdx, 8
jb 0x40af2b
mov rcx, qword [rdi]
jmp 0x40af2e
mov rcx, rdi
mov rax, qword [rsi + 0x20]
lea rcx, [rcx + rax*2]
lea rax, [rsp + 0x40]
cmp rcx, rax
jbe 0x40af6a
cmp rdx, 8
jb 0x40af49
mov rdi, qword [rdi]
lea r8, [rsp + 0x40]
lea rdx, [rsi + 8]
lea rcx, [rsi + 8]
sub r8, rdi
mov r9, rbp
sar r8, 1
call fcn.00401a30
mov byte [rsi + 1], 1
jmp 0x40afd6
movabs rax, 0x7ffffffffffffffe
cmp rbp, rax
jbe 0x40af7e
call fcn.0040e230
mov rax, qword [rsi + 0x28]
cmp rax, rbp
jae 0x40afb6
mov r8, qword [rsi + 0x20]
lea rcx, [rsi + 8]
mov rdx, rbp
call fcn.00401420
test rbp, rbp
je 0x40aa02
mov rdx, qword [rsi + 0x28]
cmp rdx, 8
jb 0x40a9d5
mov rcx, qword [rdi]
jmp 0x40a9d8
test rbp, rbp
jne 0x40af97
cmp rax, 8
mov qword [rsi + 0x20], r12
jb 0x40afc8
mov rdi, qword [rdi]
mov word [rdi], r12w
mov byte [rsi + 1], 1
jmp 0x40afd6
mov byte [rsi + 1], r12b
mov r12, qword [rsp + 0xaa8]
mov rdi, qword [rsp + 0xab0]
mov rsi, qword [rsp + 0xad8]
mov rbp, qword [rsp + 0xad0]
mov rbx, qword [rsp + 0xac8]
mov rcx, qword [rsp + 0xa90]
xor rcx, rsp
call fcn.0040e5d0
add rsp, 0xab8
ret