Function at 0x10004f70
Capabilities:
Delete registry key
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001b238
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
push edi
mov eax, dword [0x1002b064]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.10002840
mov ecx, eax
test ecx, ecx
je 0x100053d3
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0
call fcn.10002840
mov ecx, eax
test ecx, ecx
je 0x100053dd
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x106
or eax, ecx
mov byte [ebp - 4], 1
jge 0x10004ffb
push 0x106
lea ecx, [ebp - 0x18]
call fcn.10002980
mov esi, dword [ebp - 0x18]
push 0x105
push esi
push dword [0x1002b9d8]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push dword [esi - 8]
push esi
call fcn.1000e15c
add esp, 8
test eax, eax
js 0x100053c9
cmp eax, dword [esi - 8]
jg 0x100053c9
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
call fcn.10002840
mov ecx, eax
test ecx, ecx
je 0x100053e7
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
push str.CLSID_
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.10002680
test al, al
jne 0x10005071
push 6
push str.CLSID_
lea ecx, [ebp - 0x10]
call fcn.10002a20
push str.3CAF6447_E4C6_4E72_83C6_F9ACAF79F65E
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.10004ab0
add esp, 0xc
mov edx, dword [eax]
lea ecx, [edi - 0x10]
or ebx, 0xffffffff
mov byte [ebp - 4], 4
mov dword [ebp - 0x20], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x1c], eax
cmp eax, ecx
je 0x100050f0
cmp dword [ecx + 0xc], 0
lea edi, [ecx + 0xc]
jl 0x100050e1
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x100050e1
push dword [ebp - 0x1c]
call fcn.10004c10
add esp, 4
mov dword [ebp - 0x1c], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x100050d9
mov edi, dword [ebp - 0x20]
push edi
mov ecx, dword [edi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
jmp 0x100050f0
push dword [edx - 0xc]
lea ecx, [ebp - 0x14]
push edx
call fcn.10002a20
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov eax, ebx
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1000510e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x10]
mov eax, ebx
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1000512c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 8], 0
je 0x10005345
push 0xf013f
push edi
push 0x80000000
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
call fcn.10004e40
test eax, eax
je 0x10005205
push 0
push 0
push 0xf013f
push 0
push 0
push edi
push 0x80000000
lea ecx, [ebp - 0x48]
call fcn.10004c80
test eax, eax
je 0x10005205
mov ebx, dword [ebp - 0x48]
test ebx, ebx
je 0x100051b9
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or ebx, 0xffffffff
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x100051d7
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x100051f3
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x48]
push 0x1a
push str.Butterflyimg
push 1
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0xf013f
push str.InprocServer32
push ebx
lea ecx, [ebp - 0x30]
call fcn.10004e40
test eax, eax
je 0x10005256
push 0
push 0
push 0xf013f
push 0
push 0
push str.InprocServer32
push ebx
lea ecx, [ebp - 0x30]
call fcn.10004c80
test eax, eax
jne 0x100052ec
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10005260
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push 1
push 0
push 0
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0x14
push str.Apartment
push 1
push 0
push str.ThreadingModel
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0xf013f
push str.SoftwareMicrosoftWindowsCurrentVersionShell_ExtensionsApproved
push 0x80000002
lea ecx, [ebp - 0x3c]
call fcn.10004e40
test eax, eax
je 0x10005303
push 0
push 0
push 0xf013f
push 0
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionShell_ExtensionsApproved
push 0x80000002
lea ecx, [ebp - 0x3c]
call fcn.10004c80
test eax, eax
je 0x10005303
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x100052ec
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x100051ae
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x100051ae
push 0x1a
push str.Butterflyimg
push 1
push 0
push str.3CAF6447_E4C6_4E72_83C6_F9ACAF79F65E
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x3c]
mov ecx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x10005332
push eax
call ecx
mov ecx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x100051ae
push eax
call ecx
jmp 0x100051ae
push str.InprocServer32
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.10004ab0
add esp, 0xc
push dword [eax]
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov edx, dword [ebp - 0x24]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10005381
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push edi
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
lea eax, [ebp - 0x10]
push eax
push 2
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionShell_ExtensionsApproved
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100051bc
push str.3CAF6447_E4C6_4E72_83C6_F9ACAF79F65E
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x100051bc
push 0x80070057
call fcn.10002660
push 0x80004005
call fcn.10002660
push 0x80004005
call fcn.10002660
push 0x80004005
call fcn.10002660
int3