Function at 0x401730
Capabilities:
Check if file exists
Get file attributes
Get installed programs
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x477fa6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x378
mov eax, dword [0x4bc364]
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [esi + 0x18]
cmp edi, 0x10
mov dword [esp + 0x37c], eax
mov dword [esp + 0xc], esi
lea ecx, [esi + 4]
jb 0x401775
mov edx, dword [ecx]
jmp 0x401777
mov edx, ecx
mov eax, dword [esi + 0x14]
add eax, edx
cmp edi, 0x10
jb 0x401783
mov ecx, dword [ecx]
push eax
push ecx
lea eax, [esp + 0x24]
push eax
mov ecx, esi
call fcn.00401370
lea ecx, [esp + 0x10]
push ecx
push 0x20019
xor ebx, ebx
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [esi + 0x1c], bl
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401a89
mov ecx, dword [esp + 0x10]
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x284]
push eax
push ebx
push ecx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
je 0x401a89
mov esi, 0xf
cmp eax, ebx
jne 0x401a02
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 0x20019
push ebx
lea eax, [esp + 0x27c]
push eax
push ecx
mov dword [esp + 0x28], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401a02
mov ecx, 0x41
lea edi, [esp + 0x168]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x60]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, 0x103
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x16c]
push eax
push ebx
push ebx
push str.ConsoleBrand
push ecx
call edi
cmp eax, ebx
jne 0x40188b
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x64]
push eax
push ebx
push ebx
push str.ConsoleExePath
push ecx
call edi
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x168]
mov dword [esp + 0x5c], esi
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4018b0
sub eax, edx
push eax
lea eax, [esp + 0x16c]
push eax
lea ecx, [esp + 0x4c]
call fcn.004015c0
lea eax, [esp + 0x60]
mov dword [esp + 0x38c], ebx
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4018e5
sub eax, edx
push eax
lea ecx, [esp + 0x64]
push ecx
lea ecx, [esp + 0x30]
call fcn.004015c0
cmp dword [esp + 0x58], ebx
mov byte [esp + 0x38c], 1
je 0x4019b2
cmp dword [esp + 0x3c], ebx
je 0x4019b2
mov eax, dword [esp + 0x40]
mov edi, 0x10
cmp eax, edi
mov eax, dword [esp + 0x2c]
jae 0x40192e
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40197b
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], edi
jb 0x401947
mov eax, dword [eax + 4]
jmp 0x40194a
add eax, 4
cmp dword [esp + 0x5c], edi
mov ecx, dword [esp + 0x48]
jae 0x401958
lea ecx, [esp + 0x48]
push eax
push ecx
call fcn.0045f174
add esp, 8
test eax, eax
push 0xffffffffffffffff
lea ecx, [esp + 0x2c]
push ebx
push ecx
je 0x401a3d
mov ecx, dword [esp + 0x18]
call fcn.004014d0
cmp dword [esp + 0x40], edi
jb 0x40198e
mov edx, dword [esp + 0x2c]
push edx
call fcn.00469458
add esp, 4
cmp dword [esp + 0x5c], edi
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
mov dword [esp + 0x38c], 0xffffffff
jb 0x4019f6
mov eax, dword [esp + 0x48]
push eax
jmp 0x4019ee
mov eax, dword [esp + 0x40]
mov edi, 0x10
cmp eax, edi
jb 0x4019cc
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00469458
add esp, 4
cmp dword [esp + 0x5c], edi
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
mov dword [esp + 0x38c], 0xffffffff
jb 0x4019f6
mov edx, dword [esp + 0x48]
push edx
call fcn.00469458
add esp, 4
mov dword [esp + 0x5c], esi
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
mov eax, dword [esp + 0x1c]
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x28]
push ecx
inc eax
lea edx, [esp + 0x284]
push edx
push eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x2c]
push eax
mov dword [esp + 0x38], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
jne 0x4017f6
jmp 0x401a85
mov edi, dword [esp + 0x18]
mov ecx, edi
call fcn.004014d0
mov eax, dword [esp + 0x40]
mov byte [edi + 0x1c], 1
mov edi, 0x10
cmp eax, edi
jb 0x401a66
mov edx, dword [esp + 0x2c]
push edx
call fcn.00469458
add esp, 4
cmp dword [esp + 0x5c], edi
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
jb 0x401a85
mov eax, dword [esp + 0x48]
push eax
call fcn.00469458
add esp, 4
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x401a98
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp byte [ebp + 0xc], bl
je 0x401aac
mov edx, dword [esi + 0x14]
xor ecx, ecx
cmp ecx, edx
sbb eax, eax
neg eax
jmp 0x401aaf
mov al, byte [esi + 0x1c]
mov ecx, dword [esp + 0x384]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x37c]
call fcn.0044ea24
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8