Function at 0x40665d
Capabilities:
Get installed programs
Set registry value

Disassembly:
mov eax, 0x421d9f
call fcn.00418558
sub esp, 0x170
push ebx
push esi
push edi
mov edi, 0x42bf2c
push str._t_Registry_
mov ecx, edi
call fcn.00420821
push eax
call fcn.00404b04
mov eax, dword [0x42bdfc]
test eax, eax
pop ecx
jne 0x406695
xor ecx, ecx
jmp 0x406697
mov ecx, dword [eax]
cmp ecx, eax
mov dword [ebp - 0x18], ecx
je 0x406aff
mov esi, dword [ebp - 0x18]
add esi, 8
lea eax, [ebp - 0xcc]
push esi
push eax
call fcn.00404b1d
and dword [ebp - 4], 0
lea eax, [esi + 0x20]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00404b1d
lea eax, [esi + 0x3c]
push eax
xor ebx, ebx
lea eax, [ebp - 0x58]
inc ebx
push eax
mov byte [ebp - 4], bl
call fcn.00404b1d
add esp, 0x18
mov eax, dword [esi + 0x1c]
push str._t_t_RegValue_
mov ecx, edi
mov byte [ebp - 4], 2
mov dword [ebp - 0x14], eax
call fcn.00420821
push eax
call fcn.00404b04
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebp - 0x17c]
push eax
call fcn.00411fb0
add esp, 0xc
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 3
jb 0x40671d
mov eax, dword [eax + 4]
jmp 0x406720
add eax, 4
push str.__Key_
push eax
push str._t_t_t_Key_
mov ecx, edi
call fcn.00420821
mov ecx, eax
call fcn.00420821
mov ecx, eax
call fcn.00420821
push eax
call fcn.00404b04
pop ecx
push ebx
lea ecx, [ebp - 0x17c]
mov byte [ebp - 4], 2
call fcn.004017f4
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.00411fb0
pop ecx
pop ecx
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 4
jb 0x406778
mov eax, dword [eax + 4]
jmp 0x40677b
add eax, 4
push str.__Name_
push eax
push str._t_t_t_Name_
mov ecx, edi
call fcn.00420821
mov ecx, eax
call fcn.00420821
mov ecx, eax
call fcn.00420821
push eax
call fcn.00404b04
pop ecx
push ebx
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 2
call fcn.004017f4
push str._t_t__RegValue_
mov ecx, edi
call fcn.00420821
push eax
call fcn.00404b04
pop ecx
push 0xf
pop esi
push 0
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x7c], esi
call fcn.00401985
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0xcc]
push eax
mov byte [ebp - 4], 5
call fcn.0040650b
add esp, 0xc
test al, al
je 0x406a22
cmp dword [ebp - 0x7c], 0x10
mov eax, dword [ebp - 0x90]
jae 0x406810
lea eax, [ebp - 0x90]
lea ecx, [ebp - 0xec]
push ecx
lea ecx, [ebp - 0x10]
push ecx
xor ecx, ecx
push ecx
push 0xf003f
push ecx
push 0x425574
push ecx
push eax
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
xor edx, edx
cmp eax, edx
jne 0x406a53
cmp dword [ebp - 0x14], edx
jne 0x406870
cmp dword [ebp - 0x40], 0x10
mov ecx, dword [ebp - 0x54]
jae 0x40684f
lea ecx, [ebp - 0x54]
cmp dword [ebp - 0x20], 0x10
mov eax, dword [ebp - 0x34]
jae 0x40685b
lea eax, [ebp - 0x34]
push dword [ebp - 0x44]
push ecx
push ebx
push edx
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x4069d2
cmp dword [ebp - 0x14], ebx
jne 0x4068a3
cmp dword [ebp - 0x40], 0x10
mov eax, dword [ebp - 0x54]
jae 0x406881
lea eax, [ebp - 0x54]
push eax
call fcn.00416e18
cmp dword [ebp - 0x20], 0x10
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x34]
pop ecx
jae 0x406897
lea eax, [ebp - 0x34]
push 4
lea ecx, [ebp - 0x1c]
push ecx
push 4
push 0
jmp 0x406861
cmp dword [ebp - 0x14], 2
jne 0x406a84
push edx
lea ecx, [ebp - 0xe8]
mov dword [ebp - 0xd0], esi
call fcn.00401985
xor esi, esi
cmp dword [ebp - 0x44], esi
mov byte [ebp - 4], 0xa
jle 0x406990
cmp dword [ebp - 0x40], 0x10
mov eax, dword [ebp - 0x54]
jae 0x4068da
lea eax, [ebp - 0x54]
cmp byte [eax + esi], 0x20
je 0x406986
push 2
push esi
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x58]
call fcn.00401667
push eax
lea eax, [ebp - 0x160]
push eax
mov byte [ebp - 4], 0xb
call fcn.00411ed0
pop ecx
pop ecx
push ebx
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 0xd
call fcn.004017f4
cmp dword [ebp - 0x14c], 2
jne 0x406948
lea eax, [ebp - 0x1c]
push eax
lea ebx, [ebp - 0x160]
call fcn.004064d0
test al, al
pop ecx
je 0x406945
push dword [ebp - 0x1c]
lea ecx, [ebp - 0xe8]
push 1
call fcn.00409699
xor ebx, ebx
inc ebx
jmp 0x406975
xor ebx, ebx
inc ebx
push str.Binary_formatting_error_in_registry_value
lea ecx, [ebp - 0x10c]
call fcn.00401644
lea eax, [ebp - 0x10c]
push eax
mov byte [ebp - 4], 0xe
call fcn.004050e5
pop ecx
push ebx
lea ecx, [ebp - 0x10c]
call fcn.004017f4
push ebx
lea ecx, [ebp - 0x160]
inc esi
mov byte [ebp - 4], 0xa
call fcn.004017f4
inc esi
cmp esi, dword [ebp - 0x44]
jl 0x4068ce
cmp dword [ebp - 0xd0], 0x10
mov ecx, dword [ebp - 0xe4]
jae 0x4069a5
lea ecx, [ebp - 0xe4]
cmp dword [ebp - 0x20], 0x10
mov eax, dword [ebp - 0x34]
jae 0x4069b1
lea eax, [ebp - 0x34]
push dword [ebp - 0xd4]
push ecx
push 3
push 0
push eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push ebx
lea ecx, [ebp - 0xe8]
call fcn.004017f4
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x18]
mov esi, dword [eax]
push ebx
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x18], esi
call fcn.004017f4
push ebx
lea ecx, [ebp - 0x58]
call fcn.004017f4
push ebx
lea ecx, [ebp - 0x38]
call fcn.004017f4
or dword [ebp - 4], 0xffffffff
push ebx
lea ecx, [ebp - 0xcc]
call fcn.004017f4
cmp esi, dword [0x42bdfc]
jne 0x4066a2
jmp 0x406b02
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebp - 0xb0]
push str.Invalid_Key_
push eax
call fcn.004048d5
push 0x42559c
push eax
lea eax, [ebp - 0x78]
push eax
mov byte [ebp - 4], 6
call fcn.00404889
mov byte [ebp - 4], 7
jmp 0x406ab0
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebp - 0xb0]
push str.Failed_to_Create_Key_
push eax
call fcn.004048d5
push 0x42559c
push eax
lea eax, [ebp - 0x78]
push eax
mov byte [ebp - 4], 8
call fcn.00404889
mov byte [ebp - 4], 9
jmp 0x406ab0
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0xb0]
push str.Invalid_Key_Type_on_
push eax
call fcn.004048d5
push 0x42559c
push eax
lea eax, [ebp - 0x78]
push eax
mov byte [ebp - 4], 0xf
call fcn.00404889
mov byte [ebp - 4], 0x10
push eax
call fcn.004050e5
add esp, 0x1c
push ebx
lea ecx, [ebp - 0x78]
call fcn.004017f4
push ebx
lea ecx, [ebp - 0xb0]
call fcn.004017f4
push ebx
lea ecx, [ebp - 0x94]
call fcn.004017f4
push ebx
lea ecx, [ebp - 0x58]
call fcn.004017f4
push ebx
lea ecx, [ebp - 0x38]
call fcn.004017f4
push ebx
lea ecx, [ebp - 0xcc]
call fcn.004017f4
xor al, al
jmp 0x406ccc
xor ebx, ebx
inc ebx
push str.InstallName
lea ecx, [ebp - 0x10c]
call fcn.00401644
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x78]
push eax
mov ecx, 0x42bd70
mov dword [ebp - 4], 0x11
call fcn.0040eb90
push eax
lea eax, [ebp - 0x144]
push eax
mov byte [ebp - 4], 0x12
call fcn.00404b1d
pop ecx
pop ecx
push ebx
lea ecx, [ebp - 0x78]
call fcn.004017f4
push ebx
lea ecx, [ebp - 0x10c]
mov byte [ebp - 4], 0x14
call fcn.004017f4
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0x128]
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall_
push eax
call fcn.004048d5
add esp, 0xc
cmp dword [ebp - 0x110], 0x10
mov eax, dword [ebp - 0x124]
mov byte [ebp - 4], 0x16
jae 0x406b8e
lea eax, [ebp - 0x124]
lea ecx, [ebp - 0xf0]
push ecx
lea ecx, [ebp - 0x3c]
push ecx
xor esi, esi
push esi
push 0xf003f
push esi
push 0x425574
push esi
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406c45
lea eax, [ebp - 0x144]
push eax
lea ecx, [ebp - 0x38]
call fcn.00401625
cmp dword [ebp - 0x20], 0x10
mov eax, dword [ebp - 0x34]
mov byte [ebp - 4], 0x17
jae 0x406bdb
lea eax, [ebp - 0x34]
push dword [ebp - 0x24]
push eax
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push str.DisplayName
push dword [ebp - 0x3c]
call esi
lea eax, [ebp - 0x78]
push 0x42be60
push eax
call fcn.00404b1d
pop ecx
pop ecx
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0x18
call fcn.004016ad
push ebx
lea ecx, [ebp - 0x78]
call fcn.004017f4
cmp dword [ebp - 0x20], 0x10
mov eax, dword [ebp - 0x34]
jae 0x406c27
lea eax, [ebp - 0x34]
push dword [ebp - 0x24]
push eax
push ebx
push 0
push str.UninstallString
push dword [ebp - 0x3c]
call esi
push ebx
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0x16
call fcn.004017f4
push str._t__Registry_
mov ecx, edi
call fcn.00420821
push eax
call fcn.00404b04
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.00411fb0
add esp, 0xc
cmp dword [eax + 0x18], 0x10
mov byte [ebp - 4], 0x19
jb 0x406c7c
mov eax, dword [eax + 4]
jmp 0x406c7f
add eax, 4
push str.__UninstallDelRegKey_
push eax
push str._t_UninstallDelRegKey_HKLM_
mov ecx, edi
call fcn.00420821
mov ecx, eax
call fcn.00420821
mov ecx, eax
call fcn.00420821
push eax
call fcn.00404b04
pop ecx
push ebx
lea ecx, [ebp - 0xb0]
call fcn.004017f4
push ebx
lea ecx, [ebp - 0x128]
call fcn.004017f4
push ebx
lea ecx, [ebp - 0x144]
call fcn.004017f4
mov al, bl
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret