Function at 0x409e77
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea eax, [ebp - 0x10c]
push pe_nt_image_headers32
push eax
push dword [ebp + 0x18]
push dword [esi + 4]
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0x210]
push 0x104
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.ole32.dll_StringFromCLSID]
mov eax, dword [ebp - 8]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp + 0x18], eax
jne 0x409ed0
xor edi, edi
jmp 0x409efe
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and al, 0xfc
call fcn.00420f40
mov esi, esp
push ebx
push ebx
push edi
push esi
push 0xffffffffffffffff
push dword [ebp + 0x18]
mov byte [esi], bl
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, esi
lea eax, [ebp - 0x10c]
push eax
push dword [ebp + 0x10]
push edi
call fcn.0040a17d
add esp, 0xc
cmp eax, ebx
mov dword [ebp + 0xc], eax
jne 0x409f2e
lea eax, [ebp - 0x10c]
push eax
push dword [ebp + 0x14]
push edi
call fcn.0040a17d
add esp, 0xc
mov dword [ebp + 0xc], eax
xor esi, esi
cmp dword [ebp + 0xc], ebx
jne 0x40a0a6
mov esi, 0x2001f
lea ecx, [ebp + 0x18]
push esi
push str.CLSID
push SysReAllocStringLen
mov dword [ebp + 0x18], ebx
call fcn.0040a0d4
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40a095
lea eax, [ebp - 0xc]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 4]
push eax
push ebx
push esi
push ebx
push ebx
push ebx
push edi
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebx
jne 0x409f93
xor eax, eax
cmp dword [ebp + 0x18], ebx
je 0x409f8d
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov dword [ebp + 0x18], ecx
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40a095
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x10c]
push eax
push 1
push ebx
push ebx
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push ebx
lea ecx, [ebp + 0x18]
push dword [ebp + 0x10]
push str.ProgID
call fcn.0040a112
push ebx
lea ecx, [ebp + 0x18]
push dword [ebp + 0x14]
push str.VersionIndependentProgID
call fcn.0040a112
mov esi, dword [ebp + 8]
cmp dword [esi + 4], ebx
je 0x40a03e
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp dword [esi + 4], eax
je 0x40a03e
test byte [ebp + 0x1c], 4
mov eax, str.AUTPRX32.DLL
jne 0x40a008
lea eax, [ebp - 0x210]
push ebx
mov esi, 0x446824
push eax
push esi
lea ecx, [ebp + 0x18]
call fcn.0040a112
mov eax, dword [ebp + 0x1c]
test al, 2
je 0x40a026
mov eax, str.both
jmp 0x40a031
and al, 1
neg al
sbb eax, eax
and eax, 0x446810
cmp eax, ebx
je 0x40a095
push 0x446800
push eax
push esi
jmp 0x40a08d
mov esi, 0x104
lea eax, [ebp - 0x314]
push esi
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
cmp eax, esi
jne 0x40a071
cmp dword [ebp + 0x18], ebx
je 0x40a06a
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x8007000e
jmp 0x40a0c7
cmp eax, ebx
je 0x40a080
cmp eax, 0x57
lea eax, [ebp - 0x314]
jne 0x40a086
lea eax, [ebp - 0x210]
push ebx
push eax
push 0x4467f0
lea ecx, [ebp + 0x18]
call fcn.0040a112
cmp dword [ebp + 0x18], ebx
je 0x40a0a3
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 4]
push dword [ebp - 8]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp esi, ebx
je 0x40a0c4
jle 0x40a0c1
and esi, 0xffff
or esi, 0x80070000
mov dword [ebp + 0xc], esi
mov eax, dword [ebp + 0xc]
lea esp, [ebp - 0x320]
pop edi
pop esi
pop ebx
leave
ret 0x18