Function at 0x4164c0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f14cd
mov eax, dword fs:[0]
push eax
sub esp, 0x238
mov eax, dword [0x6b7e40]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
lea eax, [ebp - 0x220]
push eax
push 0x20019
push 0
push str.SoftwareSolidWorksIM
push SysReAllocStringLen
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x238], 4
mov dword [ebp - 0x22c], 0x400
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41658f
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x238]
push eax
push 0
push str.TempFolderOnly
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x220]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x41658f
cmp dword [ebp - 0x234], 1
jne 0x41658f
push esi
mov dl, 1
mov ecx, ebx
call fcn.00416060
add esp, 4
jmp 0x416878
push 1
push 0x1a
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x416782
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4165b3
sub ecx, edx
sar ecx, 1
cmp ecx, 4
jb 0x416782
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x224]
call fcn.004021e0
push str.SOLIDWORKSInstallation_Logs
lea ecx, [ebp - 0x220]
mov dword [ebp - 4], 6
call fcn.004021e0
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x220]
push 0
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x23c], esp
mov esi, esp
push eax
mov byte [ebp - 0x225], 1
call fcn.004046f0
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.004046f0
mov dl, byte [ebp - 0x225]
add eax, 0x10
mov dword [esi], eax
add esp, 4
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 7
call fcn.0041a740
add esp, 0xc
push eax
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 9
call fcn.00404570
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x22c]
add edx, 0xfffffff0
or edi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x416689
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4166ac
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41675c
mov eax, dword [ebp - 0x224]
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.004046f0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00415120
add esp, 4
test al, al
jne 0x41675c
lea ecx, [ebp - 0x220]
call fcn.00404540
lea eax, [ebp - 0x220]
push str.ERROR:_Unable_to_create_App_subdirectory_for_application
push eax
mov byte [ebp - 4], 0xa
call fcn.00404520
add esp, 4
mov ecx, esp
push 0x63bfdc
call fcn.004021e0
push 0
lea eax, [ebp - 0x220]
push eax
push 0x7dd
push str.C:_amintegration_tools_setupishield_sldim_baseUtilities.cpp
push 1
push 0
xor ecx, ecx
call fcn.004051a0
mov ecx, eax
call fcn.004022e0
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x224]
call fcn.00402190
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 6
call fcn.00401020
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff0
push eax
call fcn.004046f0
add eax, 0x10
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x224]
mov dword [ebx], eax
jmp 0x41685e
call fcn.004a4516
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x41679e
push 0x80004005
call fcn.00402040
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x220]
push str.ERROR:_Unable_to_get_Application_Data_directory
push eax
mov dword [ebp - 4], 4
call fcn.00404520
add esp, 8
lea ecx, [ebp - 0x22c]
push 0x63bfdc
call fcn.004021e0
xor ecx, ecx
call fcn.004051a0
mov edi, eax
push ecx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x22c]
add ecx, 0xfffffff0
mov esi, esp
push ecx
call fcn.004046f0
add esp, 4
add eax, 0x10
push 0
push 0
mov dword [esi], eax
lea eax, [ebp - 0x220]
push eax
push 0x7c0
push str.C:_amintegration_tools_setupishield_sldim_baseUtilities.cpp
push 1
push 1
mov ecx, edi
call fcn.004055a0
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x22c]
add edx, 0xfffffff0
or edi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x416846
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 1
mov dl, 1
mov ecx, ebx
call fcn.00416060
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
add esp, 4
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x416878
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005bc16b
mov esp, ebp
pop ebp
ret