Function at 0x401590
Capabilities:
Query environment variable
Query or enumerate registry value
Read .ini file

Disassembly:
sub esp, 0x2e0
push ebx
push esi
push edi
push 0x104
lea eax, [esp + 0x124]
mov ecx, 0xc
mov esi, str.SOFTWARENational_InstrumentsLabVIEW_Run_Time_
lea edi, [esp + 0x228]
push eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor ebx, ebx
push ebx
call esi
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x40166c
mov edx, dword [str..ini]
lea ecx, [esp + eax + 0x11c]
mov al, byte [0x407318]
mov dword [ecx], edx
mov byte [ecx + 4], al
lea ecx, [esp + 0x120]
push ecx
push 0x104
lea edx, [esp + 0x24]
push edx
push 0x407310
push str.DLLPath
push str.LVRT
mov byte [esp + 0x34], bl
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x401620
sub eax, edx
mov dword [esp + 0x18], eax
je 0x40166c
mov eax, dword [esp + 0x2f0]
push eax
lea ebx, [esp + 0x20]
call fcn.00401520
add esp, 4
test eax, eax
je 0x40166a
mov edx, dword [esp + 0x2f4]
mov ecx, ebx
mov eax, ebx
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401654
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x2e0
ret
xor ebx, ebx
push 0x104
lea edx, [esp + 0x20]
push edx
push ebx
call esi
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x4016df
cmp byte [esp + eax + 0x1b], 0x5c
je 0x40169e
lea ecx, [esp + 0x1c]
dec ecx
lea ecx, [ecx]
mov dl, byte [ecx + eax - 1]
dec eax
cmp dl, 0x5c
jne 0x401690
mov dword [esp + 0x10], eax
mov byte [esp + eax + 0x1b], bl
mov eax, dword [esp + 0x2f0]
push eax
lea ebx, [esp + 0x20]
call fcn.00401520
add esp, 4
test eax, eax
je 0x4016dd
mov edx, dword [esp + 0x2f4]
mov ecx, ebx
mov eax, ebx
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4016c7
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x2e0
ret
xor ebx, ebx
mov eax, dword [esp + 0x2f8]
mov esi, eax
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4016e8
lea edi, [esp + 0x224]
sub eax, esi
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x401700
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push ebp
lea edx, [esp + 0x10]
push edx
push 1
mov ecx, eax
push ebx
lea eax, [esp + 0x234]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 0x80000002
mov dword [esp + 0x28], 0x104
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
call esi
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
jne 0x4017fa
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x20]
push eax
push ebx
push str.Path
push ecx
call ebp
test eax, eax
jne 0x4017fa
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x18], 2
mov dword [esp + 0x10], ebx
jne 0x4017bc
xor eax, eax
mov cl, byte [esp + eax + 0x20]
mov byte [esp + eax + 0x124], cl
inc eax
cmp cl, bl
jne 0x401794
push 0x104
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x12c]
push ecx
call edi
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x2f4]
push edx
lea ebx, [esp + 0x24]
call fcn.00401520
add esp, 4
test eax, eax
je 0x4017f8
mov edx, dword [esp + 0x2f8]
mov ecx, ebx
mov eax, ebx
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4017e1
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x2e0
ret
xor ebx, ebx
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x401809
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea edx, [esp + 0x24]
push edx
push str._ProgramFiles_National_InstrumentsSharedLabVIEW_Run_Time_
mov dword [esp + 0x1c], ebx
call edi
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x401834
cmp eax, 0x104
jg 0x401834
cmp byte [esp + 0x20], 0x25
jne 0x401897
lea eax, [esp + 0x10]
push eax
push 1
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call esi
test eax, eax
jne 0x401884
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x24]
push edx
push ebx
push ebx
push str.ProgramFilesDir
push eax
call ebp
test eax, eax
jne 0x401884
lea edi, [esp + 0x20]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x401870
mov ecx, 0xb
mov esi, str.National_InstrumentsSharedLabVIEW_Run_Time_
jmp 0x401892
mov ecx, 0xf
mov esi, str.c:Program_FilesNational_InstrumentsSharedLabVIEW_Run_Time_
lea edi, [esp + 0x20]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x4018a6
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x2fc]
mov edx, eax
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4018b0
lea edi, [esp + 0x20]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x4018c0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x2f4]
push esi
lea ebx, [esp + 0x24]
call fcn.00401520
mov edx, dword [esp + 0x2fc]
add esp, 4
test eax, eax
je 0x401917
mov ecx, ebx
mov eax, ebx
sub edx, ecx
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401900
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x2e0
ret
lea eax, [esi + 1]
sub edx, eax
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401920
pop ebp
pop edi
pop esi
mov eax, 0x485
pop ebx
add esp, 0x2e0
ret