Function at 0x489760
Capabilities:
Delete registry key
Persist via contextmenuhandlers registry key
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x4f37f8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x34], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov dword [esp + 0x18], edx
mov byte [esp + 0x17], cl
mov ebx, dword [esp + 0x5c]
test ebx, ebx
je 0x4897c7
cmp dword [0x523800], 0
jne 0x4897c7
push str.RegDeleteKeyExW
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x523800], eax
xorps xmm0, xmm0
mov dword [esp + 0x30], 0
push str.CLSID_
lea ecx, [esp + 0x2c]
movq qword [esp + 0x2c], xmm0
call fcn.00412700
push str.23170F69_40C1_278A_1000_000100020000
lea ecx, [esp + 0x2c]
mov dword [esp + 0x58], 0
call fcn.00412c30
cmp byte [esp + 0x17], 0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x4899ad
xor esi, esi
mov dword [esp + 0x34], esi
lea eax, [esp + 0x24]
mov byte [esp + 0x54], 1
mov ebp, dword [esp + 0x28]
or ebx, 0xf003f
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x20], esi
push eax
push esi
push ebx
push esi
push esi
push esi
push ebp
push SysReAllocStringLen
mov dword [esp + 0x5c], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x489932
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
mov dword [esp + 0x34], esi
test eax, eax
jne 0x489932
push str.FileExtr.actor_Shell_Extension
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push str.FileExtr.actor_Shell_Extension
push 1
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor edi, edi
mov dword [esp + 0x24], edi
lea eax, [esp + 0x20]
mov byte [esp + 0x54], 2
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x20], edi
push eax
push edi
push ebx
push edi
push edi
push edi
push 0x504700
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x48991d
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edi
test eax, eax
jne 0x48991d
mov ebx, dword [esp + 0x18]
mov ebx, dword [ebx]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 1
push 0
push 0
push edi
call ebx
push str.Apartment
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push str.Apartment
push 1
push 0
push str.ThreadingModel
push edi
call ebx
mov ebx, dword [esp + 0x38]
test edi, edi
je 0x48992c
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
jmp 0x489932
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x54], 0
test esi, esi
je 0x48993e
push esi
call edi
lea eax, [esp + 0x38]
mov dword [esp + 0x1c], 0
push eax
lea eax, [esp + 0x20]
push eax
push 0
push ebx
push 0
push 0
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionShell_ExtensionsApproved
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x489a4b
push str.FileExtr.actor_Shell_Extension
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [esp + 0x1c]
lea eax, [eax*2 + 2]
push eax
push str.FileExtr.actor_Shell_Extension
push 1
push 0
push 0x5045e8
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test esi, esi
je 0x489a4b
push esi
call edi
jmp 0x489a4b
lea eax, [esp + 0x28]
mov dword [esp + 0x44], 0
xorps xmm0, xmm0
lea ecx, [esp + 0x3c]
push eax
movq qword [esp + 0x40], xmm0
call fcn.00412780
push str.InprocServer32
lea ecx, [esp + 0x40]
mov byte [esp + 0x58], 3
call fcn.00412c30
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x3c]
test ebx, ebx
jne 0x489a07
mov ebx, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push esi
push SysReAllocStringLen
call ebx
push ebp
push SysReAllocStringLen
call ebx
mov dword [esp + 0x20], eax
jmp 0x489a3d
mov eax, dword [0x523800]
test eax, eax
je 0x489a35
push 0
push ebx
push esi
push SysReAllocStringLen
call eax
mov eax, dword [0x523800]
test eax, eax
je 0x489a35
push 0
push ebx
push ebp
push SysReAllocStringLen
call eax
mov dword [esp + 0x20], eax
jmp 0x489a3d
mov dword [esp + 0x20], 0x80004001
push esi
mov byte [esp + 0x58], 0
call fcn.004df97b
add esp, 4
push ebp
mov dword [esp + 0x58], 0xffffffff
call fcn.004df97b
add esp, 4
cmp byte [esp + 0x17], 0
je 0x489bff
xor eax, eax
mov ebx, 0x5008dc
mov dword [esp + 0x34], eax
mov ecx, str._shellexDragDropHandlersFileExtr.actor
jmp 0x489a80
test eax, eax
mov dword [esp + 0x24], ebx
mov edi, str._shellexContextMenuHandlersFileExtr.actor
cmovne edi, ecx
xor eax, eax
mov dword [esp + 0x18], eax
push dword [eax + 0x5200d0]
xorps xmm0, xmm0
mov dword [esp + 0x34], 0
lea ecx, [esp + 0x2c]
movq qword [esp + 0x2c], xmm0
call fcn.00412700
mov dword [esp + 0x54], 4
xor esi, esi
cmp byte [edi], 0
je 0x489aca
inc esi
cmp byte [esi + edi], 0
jne 0x489ac3
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
sub eax, edx
cmp esi, eax
jbe 0x489af6
lea ecx, [edx + esi]
mov eax, ecx
add ecx, 0x10
shr eax, 1
add eax, ecx
lea ecx, [esp + 0x28]
and eax, 0xfffffff0
dec eax
push eax
call fcn.00412180
mov edx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
lea ebx, [edx*2]
add ebx, ebp
xor ecx, ecx
test esi, esi
je 0x489b1d
lea esp, [esp]
movzx eax, byte [edi + ecx]
mov word [ebx + ecx*2], ax
inc ecx
cmp ecx, esi
jb 0x489b10
xor eax, eax
add edx, esi
mov word [ebx + esi*2], ax
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x2c], edx
cmp byte [ebx], al
je 0x489b94
mov dword [esp + 0x1c], eax
xor esi, esi
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x64]
push esi
or eax, 0xf003f
push eax
push esi
push esi
push esi
push ebp
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
push 0x5045e8
cmove esi, dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push 0x5045e8
push 1
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test esi, esi
je 0x489bbe
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x489bbe
mov ecx, dword [esp + 0x5c]
test ecx, ecx
jne 0x489baa
push ebp
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x489bbe
mov eax, dword [0x523800]
test eax, eax
je 0x489bbe
push 0
push ecx
push ebp
push SysReAllocStringLen
call eax
push ebp
mov dword [esp + 0x58], 0xffffffff
call fcn.004df97b
mov eax, dword [esp + 0x1c]
inc ebx
add eax, 4
mov dword [esp + 0x28], ebx
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, 0x10
jb 0x489a94
mov eax, dword [esp + 0x34]
mov ecx, str._shellexDragDropHandlersFileExtr.actor
inc eax
mov dword [esp + 0x34], eax
cmp eax, 2
jb 0x489a80
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.004df96c
add esp, 0x44
ret 4