Function at 0x40e970
Capabilities:
Delete file
Delete registry key
Delete registry value
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x487a80
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x4bc1dc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov bl, byte [ebp + 0xc]
mov edi, dword [ebp + 8]
test bl, bl
je 0x40ed06
lea eax, [ebp - 0x58]
push 1
push eax
call fcn.0040ede0
add esp, 8
mov esi, dword [ebp - 0x58]
mov dword [ebp - 4], 0
test esi, esi
je 0x40ec6d
mov eax, dword [esi]
test eax, eax
je 0x40ec6d
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
je 0x40ec6d
lea eax, [ebp - 0x4c]
push eax
push 0x497570
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x40ec3d
mov dword [ebp - 0x54], eax
cmp byte [0x4bdfa9], al
je 0x40ea59
cmp byte [ebp + 0x10], al
jne 0x40eaac
lea eax, [ebp - 0x54]
push eax
push 0x457420
push edi
push 0x49796c
push dword [0x4be600]
call dword [sym.imp.USER32.dll_DialogBoxParamW]
test eax, eax
jne 0x40eaac
push 0x497570
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x58]
call fcn.004021d0
xor al, al
jmp 0x40ed0d
lea eax, [ebp - 0x64]
push eax
call fcn.0040e710
add esp, 4
cmp byte [ebp + 0x10], 0
mov byte [ebp - 4], 4
jne 0x40eaa0
push 0x497990
lea ecx, [ebp - 0x48]
call fcn.00402130
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x40ea87
mov eax, dword [eax]
jmp 0x40ea89
xor eax, eax
push 0x40
push 0x49794c
push eax
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
lea ecx, [ebp - 0x48]
call fcn.004021d0
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 0
call fcn.004021d0
movdqu xmm0, xmmword [0x497a18]
mov eax, dword [0x497a48]
push 0x497a4c
push dword [ebp - 0x4c]
movdqu xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x14], eax
movdqu xmm0, xmmword [0x497a28]
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 1
movdqu xmmword [ebp - 0x34], xmm0
movdqu xmm0, xmmword [0x497a38]
movdqu xmmword [ebp - 0x24], xmm0
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 0x60]
push 4
push eax
push 4
push 0
push 0x4975f0
push dword [ebp - 0x4c]
call esi
push 0x34
lea eax, [ebp - 0x44]
push eax
push 1
push 0
push 0x497a64
push dword [ebp - 0x4c]
call esi
push 4
lea eax, [ebp - 0x5c]
push eax
push 4
push 0
push 0x4975c8
push dword [ebp - 0x4c]
call esi
push 0x4974ac
lea ecx, [ebp - 0x64]
call fcn.00402130
push eax
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 5
push 0x497a70
push eax
call fcn.0040e630
add esp, 0xc
lea ecx, [ebp - 0x64]
call fcn.004021d0
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x40eb89
mov ecx, dword [eax]
test ecx, ecx
je 0x40eb7f
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov ecx, eax
mov eax, dword [ebp - 0x50]
jmp 0x40eb81
xor ecx, ecx
test eax, eax
je 0x40eb8b
mov edx, dword [eax]
jmp 0x40eb8d
xor ecx, ecx
xor edx, edx
lea eax, [ecx + ecx]
push eax
push edx
push 2
push 0
push 0x49760c
push dword [ebp - 0x4c]
call esi
cmp dword [ebp - 0x54], 0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x40ebb2
cmp dword [ebp + 0x14], 0xffffffff
je 0x40ec18
lea eax, [ebp - 0x48]
push eax
push 0x4977f8
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x40ec18
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x40ebef
xor edx, edx
mov eax, 0x989680
div ecx
push 4
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x54]
push eax
push 4
push 0
push 0x497a94
push dword [ebp - 0x48]
call esi
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40ec13
imul eax, eax, 0x989680
push 4
mov dword [ebp + 0x14], eax
lea eax, [ebp + 0x14]
push eax
push 4
push 0
push 0x497ab4
push dword [ebp - 0x48]
call esi
push dword [ebp - 0x48]
call edi
push dword [ebp - 0x4c]
call fcn.0040e770
add esp, 4
push dword [ebp - 0x4c]
call edi
lea ecx, [ebp - 0x50]
call fcn.004021d0
lea ecx, [ebp - 0x58]
call fcn.004021d0
jmp 0x40ed0b
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [ebp + 0x10], 0
jne 0x40ec5e
push 0x10
push 0x49794c
push 0x497ad4
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
lea ecx, [ebp - 0x58]
xor bl, bl
call fcn.004021d0
jmp 0x40ed0b
cmp byte [ebp + 0x10], 0
jne 0x40ecfa
push 0x497888
lea ecx, [ebp - 0x50]
call fcn.00402130
push 0x4974ac
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 1
call fcn.00402130
push eax
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 2
push 0x497860
push eax
call fcn.0040e630
add esp, 0xc
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 3
push ecx
lea ecx, [ebp - 0x48]
push ecx
mov ecx, eax
call fcn.0040e6a0
lea ecx, [ebp - 0x5c]
call fcn.004021d0
lea ecx, [ebp - 0x60]
call fcn.004021d0
lea ecx, [ebp - 0x50]
call fcn.004021d0
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x40ece1
mov eax, dword [eax]
jmp 0x40ece3
xor eax, eax
push 0x10
push 0x49794c
push eax
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
lea ecx, [ebp - 0x48]
call fcn.004021d0
lea ecx, [ebp - 0x58]
call fcn.004021d0
xor al, al
jmp 0x40ed0d
call fcn.0040e820
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00470e77
mov esp, ebp
pop ebp
ret