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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x513b94]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x228]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x422f08
lea eax, [ebp - 0x238]
push eax
push 0x4de730
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x422f08
mov eax, dword [ebp - 0x238]
mov ecx, dword [ebp - 0x234]
push 0
push 0
push 0x10
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x21c]
push eax
push 0
push dword [ebp - 0x228]
mov dword [ebp - 0x21c], 1
mov dword [ebp - 0x214], ecx
mov dword [ebp - 0x210], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x422efc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x220]
push eax
push 0x4de760
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x423108
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 0x224]
push 4
push eax
push 4
push 0
push 0x4de7b8
push dword [ebp - 0x220]
mov dword [ebp - 0x224], 2
call esi
push 4
lea eax, [ebp - 0x224]
mov dword [ebp - 0x224], 1
push eax
push 4
push 0
push 0x4de7c4
push dword [ebp - 0x220]
call esi
push 4
lea eax, [ebp - 0x224]
mov dword [ebp - 0x224], 3
push eax
push 4
push 0
push 0x4de7e0
push dword [ebp - 0x220]
call esi
push ebx
lea eax, [ebp - 0x20c]
push 0x4de7ec
push eax
call fcn.00402420
lea ecx, [ebp - 0x20c]
add esp, 0xc
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x422fc0
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push 0x4de7fc
push dword [ebp - 0x220]
call esi
push dword [ebp - 0x22c]
push dword [ebp - 0x220]
call fcn.004221f0
add esp, 8
push 0x4de810
push 0x4de57c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, 0x7a
mov dword [ebp - 0x23c], 0x4de820
mov word [ebp - 0x240], cx
lea ecx, [ebp - 0x240]
push ecx
call eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov ebx, eax
push 0x4de8a0
push reloc.WS2_32.dll_bind
call esi
push 0x4de908
push reloc.WS2_32.dll_bind
call esi
push 0x4de978
push reloc.WS2_32.dll_bind
call esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push 0x4de7b8
push dword [ebp - 0x220]
call esi
push 0x4de7c4
push dword [ebp - 0x220]
call esi
push 0x4de7e0
push dword [ebp - 0x220]
call esi
push 0x4de7fc
push dword [ebp - 0x220]
call esi
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
test ebx, ebx
je 0x4230f8
cmp ebx, 0xc000010e
je 0x4230f8
mov eax, dword [0x51807c]
test eax, eax
jne 0x4230d9
push 0x4de564
push 0x4de57c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x51807c], eax
push ebx
call eax
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a0e13
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp - 0x230]
call fcn.00423120
add esp, 8
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004a0e13
mov esp, ebp
pop ebp
ret