Function at 0x413be7
Capabilities:
Check if file exists
Query environment variable
Query or enumerate registry value
Set environment variable

Disassembly:
push ebp
sub esp, 0x488
lea ebp, [esp - 4]
mov eax, dword [0x4490e8]
xor eax, ebp
mov dword [ebp + 0x488], eax
push 0x14
mov eax, 0x430c07
call fcn.00425cc9
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x24], ebx
jne 0x413edd
lea eax, [ebp - 0x14]
push eax
push str.SOFTWAREThunder_NetworkXmp
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jge 0x413c37
xor eax, eax
jmp 0x413ee0
xor eax, eax
push 0x206
mov word [ebp + 0x240], ax
lea eax, [ebp + 0x242]
push ebx
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 0x240]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push str.Path
push dword [ebp - 0x14]
mov dword [ebp - 0x1c], 0x104
mov dword [ebp - 0x18], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x14]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
jl 0x413c30
lea eax, [ebp + 0x240]
push eax
call dword [sym.imp.MSVCR90.dll_wcslen]
pop ecx
test eax, eax
jbe 0x413edd
lea eax, [ebp + 0x240]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x413edd
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str.....TP
lea eax, [ebp + 0x240]
push eax
call edi
push str.asyn_download_interface.dll
lea eax, [ebp + 0x240]
push eax
call edi
lea eax, [ebp + 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x24], eax
cmp eax, ebx
je 0x413c30
xor eax, eax
push 0x3e
mov word [ebp + 0x448], ax
lea eax, [ebp + 0x44a]
push ebx
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x20
lea eax, [ebp + 0x448]
push eax
push str.hasyn_download_interface
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp + 0x448]
push eax
call dword [sym.imp.MSVCR90.dll__wtol]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
pop ecx
test eax, eax
jne 0x413ecd
mov ebx, dword [esi + 0x24]
push str.register_callback_func
push ebx
call edi
test eax, eax
je 0x413d56
push 0x411e15
call eax
push str.init
push ebx
call edi
test eax, eax
je 0x413c30
push 0
call eax
test eax, eax
jne 0x413d93
push 0xa
lea eax, [ebp + 0x448]
push eax
push ebx
call dword [sym.imp.MSVCR90.dll__ultow]
add esp, 0xc
lea eax, [ebp + 0x448]
push eax
push str.hasyn_download_interface
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push str.set_product_version
push dword [esi + 0x24]
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0x10], eax
push 0x104
lea eax, [ebp + 0x38]
push eax
push dword [0x44c6b0]
call ebx
lea eax, [ebp + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x413dd2
push 0x104
lea eax, [ebp + 0x38]
push eax
push 0
call ebx
sub esp, 0x1c
lea eax, [ebp + 0x38]
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
lea eax, [ebp]
push eax
call fcn.00411bee
add esp, 0x20
and dword [ebp - 4], 0
lea ecx, [ebp]
call dword [sym.imp.MSVCP90.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::length_void_const]
test eax, eax
ja 0x413e0f
push str.5.0.0.0
lea ecx, [ebp]
call dword [0x434304]
lea ecx, [ebp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea eax, [ebp + 0x1c]
push eax
lea eax, [ebp]
push eax
mov byte [ebp - 4], 1
call fcn.00411d7c
mov ebx, str.CThunderDownloader::LoadDownloadInterfaceDll
push ebx
call fcn.0041240d
add esp, 0xc
test eax, eax
jne 0x413e96
push 1
lea ecx, [ebp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push str._version
push dword [ebp - 0x10]
push str.___set_product_version
push dword [esi + 0x24]
push str.asyn_download_interface_:
push esi
push ebx
call fcn.00410c48
pop ecx
pop ecx
mov ecx, eax
call fcn.004138f2
mov ecx, eax
call fcn.00412021
mov ecx, eax
call fcn.004138f2
mov ecx, eax
call fcn.00412021
mov ecx, eax
call fcn.004138f2
mov ecx, eax
call fcn.004138f2
mov ecx, eax
call fcn.00413815
cmp dword [ebp - 0x10], 0
je 0x413eb3
lea ecx, [ebp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::length_void_const]
push eax
lea ecx, [ebp + 0x1c]
call dword [sym.imp.MSVCP90.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [ebp - 0x10]
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push str.start_process_thread
push dword [esi + 0x24]
call edi
test eax, eax
je 0x413edd
call eax
mov eax, dword [esi + 0x24]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x488]
xor ecx, ebp
call fcn.00425cba
add ebp, 0x48c
leave
ret