Function at 0x10021720
Capabilities:
Delete registry key
Get common file path
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10043fb6
mov eax, dword fs:[0]
push eax
sub esp, 0x46c
mov eax, dword [0x10059084]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebp + 8]
xor bl, bl
mov ecx, edx
mov dword [ebp - 0x438], 0
xor eax, eax
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 7
mov word [ebp - 0x438], ax
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021780
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x438]
call fcn.100077a0
push 0x37
xor eax, eax
mov dword [ebp - 0x468], 0
push str.SYSTEMCurrentControlSetServicesEventlogApplication_
lea ecx, [ebp - 0x468]
mov dword [ebp - 4], 0
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x454], 7
mov word [ebp - 0x468], ax
call fcn.100077a0
push 0x32
xor eax, eax
mov dword [ebp - 0x450], 0
push str.SYSTEMCurrentControlSetServicesEventlogSystem_
lea ecx, [ebp - 0x450]
mov byte [ebp - 4], 1
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x43c], 7
mov word [ebp - 0x450], ax
call fcn.100077a0
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x438]
push dword [ebp - 0x428]
cmovae eax, dword [ebp - 0x438]
lea ecx, [ebp - 0x468]
push eax
mov byte [ebp - 4], 2
call fcn.100036f0
cmp dword [ebp - 0x424], 8
lea eax, [ebp - 0x438]
push dword [ebp - 0x428]
cmovae eax, dword [ebp - 0x438]
lea ecx, [ebp - 0x450]
push eax
call fcn.100036f0
cmp dword [ebp - 0x454], 8
lea ecx, [ebp - 0x470]
push ecx
lea ecx, [ebp - 0x46c]
mov dword [ebp - 0x470], 0
push ecx
push 0
push 0x2001f
push 0
push 0
lea eax, [ebp - 0x468]
mov dword [ebp - 0x46c], 0
cmovae eax, dword [ebp - 0x468]
push 0
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x10021a07
cmp dword [ebp - 0x470], 1
jne 0x100219f9
push 0x104
lea eax, [ebp - 0x420]
mov dword [ebp - 0x474], 7
push eax
mov dword [ebp - 0x478], 2
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.1002cf2a
push str.Seagull_EventMessages.dll
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.1002cfe8
lea ecx, [ebp - 0x218]
add esp, 0x18
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021930
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x218]
push eax
push 1
push 0
push str.EventMessageFile
push dword [ebp - 0x46c]
call esi
push 4
lea eax, [ebp - 0x474]
push eax
push 4
push 0
push str.TypesSupported
push dword [ebp - 0x46c]
call esi
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021990
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x218]
push eax
push 1
push 0
push str.CategoryMessageFile
push dword [ebp - 0x46c]
call esi
push 4
lea eax, [ebp - 0x478]
push eax
push 4
push 0
push str.CategoryCount
push dword [ebp - 0x46c]
call esi
cmp dword [ebp - 0x43c], 8
lea eax, [ebp - 0x450]
cmovae eax, dword [ebp - 0x450]
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push dword [ebp - 0x46c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov bl, 1
mov edx, dword [ebp - 0x43c]
cmp edx, 8
jb 0x10021a47
mov ecx, dword [ebp - 0x450]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10021a3d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10021b1a
push edx
push ecx
call fcn.10025ac5
add esp, 8
mov edx, dword [ebp - 0x454]
xor eax, eax
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x43c], 7
mov word [ebp - 0x450], ax
cmp edx, 8
jb 0x10021aa4
mov ecx, dword [ebp - 0x468]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10021a9a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10021b1a
push edx
push ecx
call fcn.10025ac5
add esp, 8
mov edx, dword [ebp - 0x424]
xor eax, eax
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x454], 7
mov word [ebp - 0x468], ax
cmp edx, 8
jb 0x10021afd
mov ecx, dword [ebp - 0x438]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10021af3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10021b1a
push edx
push ecx
call fcn.10025ac5
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10025a94
mov esp, ebp
pop ebp
ret
call fcn.1002a52f
int3