Function at 0x40375c
Capabilities:
Check if file exists
Get common file path
Get disk information
Get disk size
Query or enumerate registry value
Set environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x1a0]
sub esp, 0x220
mov eax, dword [0x410eec]
push ebx
push esi
push edi
push 0x104
xor ebx, ebx
push ebx
mov esi, 0x411c40
push esi
mov dword [ebp + 0x19c], eax
mov dword [ebp - 0x80], 1
call fcn.004044d0
add esp, 0xc
lea eax, [ebp - 0x7c]
push eax
push 0x2001f
push ebx
push str.SoftwareThunder_NetworkGameDCF_DL
push 0x80000002
mov dword [ebp - 0x7c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403801
mov word [ebp - 0x6c], bx
mov ecx, 0x81
lea edi, [ebp - 0x6a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x70]
push eax
push ebx
push str.InstDir
push dword [ebp - 0x7c]
mov dword [ebp - 0x74], 0x104
mov dword [ebp - 0x70], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403801
cmp dword [ebp - 0x70], 1
jne 0x403801
lea eax, [ebp - 0x6c]
push eax
push esi
call fcn.004046f5
pop ecx
pop ecx
cmp dword [ebp - 0x7c], ebx
je 0x40380f
push dword [ebp - 0x7c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp word [0x411c40], bx
jne 0x40392f
mov eax, dword [0x40cb78]
mov dword [ebp - 0x6c], eax
mov eax, dword [0x40cb7c]
mov dword [ebp - 0x68], eax
xor eax, eax
mov ecx, 0x80
lea edi, [ebp - 0x64]
push ebx
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push ebx
call edi
cmp eax, ebx
mov dword [ebp - 0x74], eax
jbe 0x403878
lea eax, [eax + eax + 4]
push eax
call fcn.004048b1
pop ecx
push dword [ebp - 0x74]
mov dword [ebp - 0x70], eax
push eax
call edi
push dword [ebp - 0x70]
lea eax, [ebp - 0x6c]
push eax
call fcn.004046f5
push dword [ebp - 0x70]
call fcn.0040478a
add esp, 0xc
mov word [ebp - 0x66], bx
mov edi, dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
push ebx
push ebx
call edi
mov dword [ebp - 0x74], eax
lea eax, [eax + eax + 2]
push eax
call fcn.004048b1
pop ecx
push eax
push dword [ebp - 0x74]
mov dword [ebp - 0x70], eax
call edi
test eax, eax
jbe 0x4038f8
mov edi, dword [ebp - 0x70]
cmp edi, ebx
je 0x4038f8
lea eax, [ebp - 0x6c]
push edi
push eax
call fcn.0040480d
test eax, eax
pop ecx
pop ecx
je 0x4038e7
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x4038e7
push ebx
push ebx
lea eax, [ebp - 0x78]
push eax
push edi
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x74], ebx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x4038e7
cmp dword [ebp - 0x74], ebx
jg 0x403914
jl 0x4038e7
cmp dword [ebp - 0x78], 0x6400000
ja 0x403914
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [edi + eax*2 + 2]
cmp edi, ebx
jne 0x4038a4
lea eax, [ebp - 0x6c]
push eax
push esi
call fcn.004046f5
pop ecx
pop ecx
call fcn.0040190c
test al, al
je 0x403917
push str.Program_Files__x86__
jmp 0x40391c
push edi
jmp 0x4038fc
push str.Program_Files_
push esi
call fcn.004046cb
pop ecx
pop ecx
push dword [ebp - 0x70]
call fcn.0040478a
pop ecx
jmp 0x403936
mov byte [0x411620], 1
mov edi, 0x40cb04
push edi
call fcn.00403434
test eax, eax
pop ecx
je 0x403966
push esi
push edi
call fcn.0040359b
push esi
call fcn.004046b5
lea eax, [eax*2 + 0x411c3e]
add esp, 0xc
cmp word [eax], 0x5c
jne 0x403966
mov word [eax], bx
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x403980
push esi
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
je 0x403980
mov dword [ebp - 0x80], ebx
push esi
push 0x40c2f4
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, dword [ebp + 0x19c]
mov eax, dword [ebp - 0x80]
pop edi
pop esi
pop ebx
call fcn.00403dcb
add ebp, 0x1a0
leave
ret