Function at 0x401710
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 0x475ae6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x380
mov eax, dword [0x4b9314]
push ebx
xor eax, ebp
push esi
mov esi, ecx
mov edx, dword [esi + 0x18]
cmp edx, 0x10
mov dword [esp + 0x380], eax
mov eax, dword [ebp + 8]
push edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x28], eax
lea ecx, [esi + 4]
jb 0x40175e
mov edi, dword [ecx]
jmp 0x401760
mov edi, ecx
mov eax, dword [esi + 0x14]
add eax, edi
cmp edx, 0x10
jb 0x40176c
mov ecx, dword [ecx]
push eax
push ecx
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.00401350
lea edx, [esp + 0x14]
push edx
push 0x20019
xor ebx, ebx
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [esi + 0x1c], bl
mov dword [esp + 0x28], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401a7a
mov edx, dword [esp + 0x14]
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x28c]
push ecx
push ebx
push edx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
je 0x401a7a
mov esi, 0xf
nop
cmp eax, ebx
jne 0x4019ee
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push 0x20019
push ebx
lea ecx, [esp + 0x284]
push ecx
push edx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4019ee
mov edx, dword [esp + 0x18]
mov ecx, 0x41
lea edi, [esp + 0x170]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, 0x103
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x174]
push ecx
push ebx
push ebx
push str.ConsoleBrand
push edx
call edi
cmp eax, ebx
jne 0x401875
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x6c]
push ecx
push ebx
push ebx
push str.ConsoleExePath
push edx
call edi
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x170]
mov dword [esp + 0x64], esi
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x401896
sub eax, edx
push eax
lea ecx, [esp + 0x174]
push ecx
lea ecx, [esp + 0x54]
call fcn.004015a0
lea eax, [esp + 0x68]
mov dword [esp + 0x394], ebx
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
lea edx, [eax + 1]
jmp 0x4018d0
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4018d0
sub eax, edx
push eax
lea edx, [esp + 0x6c]
push edx
lea ecx, [esp + 0x38]
call fcn.004015a0
cmp dword [esp + 0x60], ebx
mov byte [esp + 0x394], 1
je 0x40199e
cmp dword [esp + 0x44], ebx
je 0x40199e
mov eax, dword [esp + 0x48]
mov edi, 0x10
cmp eax, edi
mov eax, dword [esp + 0x34]
jae 0x401919
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401967
mov eax, dword [esp + 0x28]
cmp dword [eax + 0x18], edi
jb 0x401933
mov eax, dword [eax + 4]
jmp 0x401936
add eax, 4
cmp dword [esp + 0x64], edi
mov ecx, dword [esp + 0x50]
jae 0x401944
lea ecx, [esp + 0x50]
push eax
push ecx
call fcn.0045c864
add esp, 8
test eax, eax
push 0xffffffffffffffff
push ebx
je 0x401a29
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x38]
push edx
call fcn.004014b0
cmp dword [esp + 0x48], edi
jb 0x40197a
mov eax, dword [esp + 0x34]
push eax
call fcn.00466c9d
add esp, 4
cmp dword [esp + 0x64], edi
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
mov dword [esp + 0x394], 0xffffffff
jb 0x4019e2
mov ecx, dword [esp + 0x50]
push ecx
jmp 0x4019da
mov eax, dword [esp + 0x48]
mov edi, 0x10
cmp eax, edi
jb 0x4019b8
mov edx, dword [esp + 0x34]
push edx
call fcn.00466c9d
add esp, 4
cmp dword [esp + 0x64], edi
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
mov dword [esp + 0x394], 0xffffffff
jb 0x4019e2
mov eax, dword [esp + 0x50]
push eax
call fcn.00466c9d
add esp, 4
mov dword [esp + 0x64], esi
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
mov eax, dword [esp + 0x20]
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x2c]
push ecx
inc eax
lea edx, [esp + 0x28c]
push edx
push eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x30]
push eax
mov dword [esp + 0x3c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, 0x103
jne 0x4017e0
jmp 0x401a76
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x38]
push ecx
mov ecx, edi
call fcn.004014b0
mov eax, dword [esp + 0x48]
mov byte [edi + 0x1c], 1
mov edi, 0x10
cmp eax, edi
jb 0x401a57
mov edx, dword [esp + 0x34]
push edx
call fcn.00466c9d
add esp, 4
cmp dword [esp + 0x64], edi
mov dword [esp + 0x48], esi
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
jb 0x401a76
mov eax, dword [esp + 0x50]
push eax
call fcn.00466c9d
add esp, 4
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x401a89
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp byte [ebp + 0xc], bl
je 0x401a9d
mov edx, dword [esi + 0x14]
xor ecx, ecx
cmp ecx, edx
sbb eax, eax
neg eax
jmp 0x401aa0
mov al, byte [esi + 0x1c]
mov ecx, dword [esp + 0x38c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x384]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044c1c4
mov esp, ebp
pop ebp
ret 8