Function at 0x401980
Capabilities:
Check if file exists
Query or enumerate registry value
Read .ini file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x441c6b
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x278
mov eax, dword [0x45c070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x284], ecx
push 0x208
lea eax, [ebp - 0x240]
push 0
push eax
call fcn.00421ce0
add esp, 0xc
mov dword [ebp - 0x248], 0
xor eax, eax
mov dword [ebp - 0x244], 0x208
lea ecx, [ebp - 0x260]
mov byte [ebp - 0x27d], 0
mov dword [ebp - 0x24c], 7
push 0x40
push str.SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall_
mov dword [ebp - 0x250], 0
mov word [ebp - 0x260], ax
call fcn.00406ac0
push 0xffffffffffffffff
push 0
push 0x45e1e8
lea ecx, [ebp - 0x260]
mov dword [ebp - 4], 0
call fcn.00406180
cmp dword [ebp - 0x24c], 8
lea ecx, [ebp - 0x27c]
push ecx
push 0x20019
lea eax, [ebp - 0x260]
cmovae eax, dword [ebp - 0x260]
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, 0x45e248
test eax, eax
jne 0x401bdf
push 0x208
lea eax, [ebp - 0x240]
mov dword [ebp - 0x244], 0x208
push 0
push eax
call fcn.00421ce0
add esp, 0xc
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x248]
push eax
push 0
push str.InstallLocation
push dword [ebp - 0x27c]
call edi
test eax, eax
jne 0x401bc6
cmp word [ebp - 0x240], ax
jne 0x401adc
xor ecx, ecx
jmp 0x401af4
lea ecx, [ebp - 0x240]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401ae5
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x240]
mov ecx, 0x45e1a0
push eax
call fcn.00406ac0
push str.SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionApp_Paths_
lea ecx, [ebp - 0x2c]
call fcn.00405c60
push 0xffffffffffffffff
push 0
push 0x45e110
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.00406180
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x27c]
push ecx
push 0x20019
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401bad
push 0x208
push eax
lea eax, [ebp - 0x240]
mov dword [ebp - 0x244], 0x208
push eax
call fcn.00421ce0
add esp, 0xc
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x248]
push eax
push 0
push 0x452884
push dword [ebp - 0x27c]
call edi
test eax, eax
jne 0x401bad
lea eax, [ebp - 0x240]
mov ecx, esi
push eax
call fcn.00405b90
mov byte [ebp - 0x27d], 1
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x401bc6
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00407820
push dword [ebp - 0x27c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x27d], 0
jne 0x401d79
push 0x34
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall_
lea ecx, [ebp - 0x260]
call fcn.00406ac0
push 0xffffffffffffffff
push 0
push 0x45e1e8
lea ecx, [ebp - 0x260]
call fcn.00406180
cmp dword [ebp - 0x24c], 8
lea ecx, [ebp - 0x27c]
push ecx
push 0x20019
lea eax, [ebp - 0x260]
cmovae eax, dword [ebp - 0x260]
push 0
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401d79
push 0x208
push eax
lea eax, [ebp - 0x240]
mov dword [ebp - 0x244], 0x208
push eax
call fcn.00421ce0
add esp, 0xc
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x248]
push eax
push 0
push str.InstallLocation
push dword [ebp - 0x27c]
call edi
test eax, eax
jne 0x401d6d
cmp word [ebp - 0x240], ax
jne 0x401c93
xor ecx, ecx
jmp 0x401caf
lea ecx, [ebp - 0x240]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401ca0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x240]
mov ecx, 0x45e1a0
push eax
call fcn.00406ac0
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_
lea ecx, [ebp - 0x2c]
call fcn.00405c60
push 0xffffffffffffffff
push 0
push 0x45e110
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.00406180
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x27c]
push ecx
push 0x20019
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push 0
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401d61
push 0x208
push eax
lea eax, [ebp - 0x240]
mov dword [ebp - 0x244], 0x208
push eax
call fcn.00421ce0
add esp, 0xc
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x248]
push eax
push 0
push 0x452884
push dword [ebp - 0x27c]
call edi
test eax, eax
jne 0x401d61
lea eax, [ebp - 0x240]
mov ecx, esi
push eax
call fcn.00405b90
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.004078f0
push dword [ebp - 0x27c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x45e25c], 8
cmovae esi, dword [0x45e248]
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call esi
test eax, eax
jne 0x401da1
xor al, al
mov byte [ebp - 0x27d], al
jmp 0x401e85
push str.ver.ini
mov edx, 0x45e1a0
lea ecx, [ebp - 0x278]
call fcn.004062b0
add esp, 4
lea eax, [ebp - 0x278]
cmp dword [ebp - 0x264], 8
cmovae eax, dword [ebp - 0x278]
push eax
call esi
test eax, eax
je 0x401e3c
xor eax, eax
xorps xmm0, xmm0
cmp dword [ebp - 0x264], 8
mov word [ebp - 0x34], ax
mov dword [ebp - 0x1a], eax
mov word [ebp - 0x16], ax
lea eax, [ebp - 0x278]
cmovae eax, dword [ebp - 0x278]
push eax
push 0xf
lea eax, [ebp - 0x34]
movq qword [ebp - 0x22], xmm0
push eax
push 0x452b24
push 0x452b28
push 0x452b30
movups xmmword [ebp - 0x32], xmm0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x34]
push eax
call fcn.00427782
mov ecx, dword [ebp - 0x284]
add esp, 4
test eax, eax
setg byte [ebp - 0x27d]
mov dword [ecx], eax
jmp 0x401e44
xor al, al
mov byte [ebp - 0x27d], al
mov eax, dword [ebp - 0x264]
cmp eax, 8
jb 0x401e62
inc eax
lea ecx, [ebp - 0x278]
push eax
push dword [ebp - 0x278]
call fcn.00407820
xor eax, eax
mov dword [ebp - 0x264], 7
mov word [ebp - 0x278], ax
mov al, byte [ebp - 0x27d]
mov dword [ebp - 0x268], 0
mov ecx, dword [ebp - 0x24c]
cmp ecx, 8
jb 0x401ea9
inc ecx
push ecx
push dword [ebp - 0x260]
lea ecx, [ebp - 0x260]
call fcn.00407820
mov al, byte [ebp - 0x27d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041e8a6
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret