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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2ec
push ebx
push esi
push edi
mov ecx, 0xc
mov esi, str.SOFTWARENational_InstrumentsLabVIEW_Run_Time_
lea edi, [esp + 0x128]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor eax, eax
mov ecx, 0x26
lea edi, [esp + 0x158]
rep stosd dword es:[edi], eax
push 0x104
lea eax, [esp + 0x1f4]
push eax
xor ebx, ebx
push ebx
call esi
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x401155
mov edx, dword [str..ini]
lea ecx, [esp + eax + 0x1ec]
mov al, byte [0x40621c]
mov dword [ecx], edx
mov byte [ecx + 4], al
lea ecx, [esp + 0x1f0]
push ecx
push 0x104
lea edx, [esp + 0x28]
push edx
push 0x406214
push str.DLLPath
push str.LVRT
mov byte [esp + 0x38], bl
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x20]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x401110
sub eax, edx
mov dword [esp + 0x1c], eax
je 0x401155
mov eax, dword [ebp + 8]
push eax
lea ebx, [esp + 0x24]
call fcn.00401000
add esp, 4
test eax, eax
je 0x401153
mov edx, dword [ebp + 0xc]
mov ecx, ebx
mov eax, ebx
sub edx, ecx
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401140
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
push 0x104
lea edx, [esp + 0x24]
push edx
push ebx
call esi
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x4011ba
cmp byte [esp + eax + 0x1f], 0x5c
je 0x401184
lea ecx, [esp + 0x20]
dec ecx
mov dl, byte [ecx + eax - 1]
dec eax
cmp dl, 0x5c
jne 0x401176
mov dword [esp + 0x14], eax
mov byte [esp + eax + 0x1f], bl
mov eax, dword [ebp + 8]
push eax
lea ebx, [esp + 0x24]
call fcn.00401000
add esp, 4
test eax, eax
je 0x4011b8
mov edx, dword [ebp + 0xc]
mov ecx, ebx
mov eax, ebx
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4011a5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
mov eax, dword [ebp + 0x10]
mov esi, eax
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4011c0
lea edi, [esp + 0x128]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x4011d1
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x10]
push edx
push 1
mov ecx, eax
push ebx
lea eax, [esp + 0x134]
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]
jne 0x4012ba
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 dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4012ba
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 0x401288
xor eax, eax
mov edi, edi
mov cl, byte [esp + eax + 0x20]
mov byte [esp + eax + 0x1f0], cl
inc eax
cmp cl, bl
jne 0x401260
push 0x104
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x1f8]
push ecx
call edi
mov dword [esp + 0x14], eax
mov edx, dword [ebp + 8]
push edx
lea ebx, [esp + 0x24]
call fcn.00401000
add esp, 4
test eax, eax
je 0x4012b8
mov edx, dword [ebp + 0xc]
mov ecx, ebx
mov eax, ebx
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4012a5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x4012c9
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 0x4012f4
cmp eax, 0x104
jg 0x4012f4
cmp byte [esp + 0x20], 0x25
jne 0x401358
lea eax, [esp + 0x10]
push eax
push 1
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call esi
test eax, eax
jne 0x401345
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 dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401345
lea edi, [esp + 0x20]
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x401331
mov ecx, 0xb
mov esi, str.National_InstrumentsSharedLabVIEW_Run_Time_
jmp 0x401353
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 0x401367
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0x10]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x401370
lea edi, [esp + 0x20]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x401380
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 [ebp + 8]
push esi
lea ebx, [esp + 0x24]
call fcn.00401000
mov edx, dword [ebp + 0xc]
add esp, 4
test eax, eax
je 0x4013c8
mov ecx, ebx
mov eax, ebx
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4013b5
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esi + 1]
sub edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4013d0
pop edi
pop esi
mov eax, 0x485
pop ebx
mov esp, ebp
pop ebp
ret