Function at 0x401760
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 0x477e96
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 0x4017a5
mov edx, dword [ecx]
jmp 0x4017a7
mov edx, ecx
mov eax, dword [esi + 0x14]
add eax, edx
cmp edi, 0x10
jb 0x4017b3
mov ecx, dword [ecx]
push eax
push ecx
lea eax, [esp + 0x24]
push eax
mov ecx, esi
call fcn.004013a0
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 0x401ab9
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 0x401ab9
mov esi, 0xf
cmp eax, ebx
jne 0x401a32
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 0x401a32
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 0x4018bb
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 0x4018e0
sub eax, edx
push eax
lea eax, [esp + 0x16c]
push eax
lea ecx, [esp + 0x4c]
call fcn.004015f0
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 0x401915
sub eax, edx
push eax
lea ecx, [esp + 0x64]
push ecx
lea ecx, [esp + 0x30]
call fcn.004015f0
cmp dword [esp + 0x58], ebx
mov byte [esp + 0x38c], 1
je 0x4019e2
cmp dword [esp + 0x3c], ebx
je 0x4019e2
mov eax, dword [esp + 0x40]
mov edi, 0x10
cmp eax, edi
mov eax, dword [esp + 0x2c]
jae 0x40195e
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4019ab
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], edi
jb 0x401977
mov eax, dword [eax + 4]
jmp 0x40197a
add eax, 4
cmp dword [esp + 0x5c], edi
mov ecx, dword [esp + 0x48]
jae 0x401988
lea ecx, [esp + 0x48]
push eax
push ecx
call fcn.0045f094
add esp, 8
test eax, eax
push 0xffffffffffffffff
lea ecx, [esp + 0x2c]
push ebx
push ecx
je 0x401a6d
mov ecx, dword [esp + 0x18]
call fcn.00401500
cmp dword [esp + 0x40], edi
jb 0x4019be
mov edx, dword [esp + 0x2c]
push edx
call fcn.00469348
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 0x401a26
mov eax, dword [esp + 0x48]
push eax
jmp 0x401a1e
mov eax, dword [esp + 0x40]
mov edi, 0x10
cmp eax, edi
jb 0x4019fc
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00469348
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 0x401a26
mov edx, dword [esp + 0x48]
push edx
call fcn.00469348
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 0x401826
jmp 0x401ab5
mov edi, dword [esp + 0x18]
mov ecx, edi
call fcn.00401500
mov eax, dword [esp + 0x40]
mov byte [edi + 0x1c], 1
mov edi, 0x10
cmp eax, edi
jb 0x401a96
mov edx, dword [esp + 0x2c]
push edx
call fcn.00469348
add esp, 4
cmp dword [esp + 0x5c], edi
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
jb 0x401ab5
mov eax, dword [esp + 0x48]
push eax
call fcn.00469348
add esp, 4
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x401ac8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
cmp byte [ebp + 0xc], bl
je 0x401adc
mov edx, dword [esi + 0x14]
xor ecx, ecx
cmp ecx, edx
sbb eax, eax
neg eax
jmp 0x401adf
mov al, byte [esi + 0x1c]
mov ecx, dword [esp + 0x384]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x37c]
call fcn.0044e944
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8