Function at 0x5282d0
Capabilities:
Create service
Delete registry value
Persist via windows service
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x5d3974
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65d4e4]
xor eax, esp
push eax
lea eax, [esp + 0xdc]
mov dword fs:[0], eax
xor ebp, ebp
push 0xf003f
push ebp
push ebp
mov dword [esp + 0x28], ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [esp + 0x20], edi
cmp edi, ebp
mov dword [esp + 0xe4], ebp
jne 0x5283f4
push 1
push 2
lea ecx, [esp + 0x64]
call fcn.0040b040
mov byte [esp + 0xe4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x60]
push str.OpenSCManager:
push eax
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x60]
call fcn.004094f0
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0xe4], 2
jb 0x52837f
mov eax, dword [eax + 4]
jmp 0x528382
add eax, 4
push eax
push str.BaseLib::CNTServiceManager::Install
push 0x145
push str..commonNTServiceManager.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x3c], esi
jb 0x5283b6
mov edx, dword [esp + 0x28]
push edx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 0
call fcn.00409e00
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
or eax, 0xffffffff
jmp 0x528984
mov ecx, dword [esp + 0x104]
mov edx, dword [esp + 0x100]
mov ebx, dword [esp + 0xfc]
mov eax, dword [esp + 0xf8]
push ebp
mov esi, dword [esp + 0xf0]
push ebp
push ecx
mov ecx, dword [esp + 0x100]
push ebp
push edx
mov edx, dword [esp + 0x104]
push ebx
push 1
push eax
push ecx
push 0xf01ff
push edx
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x528541
call ebp
push 1
push 2
lea ecx, [esp + 0x64]
mov edi, eax
call fcn.0040b040
push edi
push 0x5f5b88
push esi
lea eax, [esp + 0x68]
push str.CreateService
push eax
mov byte [esp + 0xf8], 3
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x60]
call fcn.004094f0
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0xe4], 4
jb 0x5284b7
mov eax, dword [eax + 4]
jmp 0x5284ba
add eax, 4
push eax
push str.BaseLib::CNTServiceManager::Install
push 0x15a
push str..commonNTServiceManager.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x3c], 0x10
jb 0x5284ef
mov edx, dword [esp + 0x28]
push edx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 0
call fcn.00409e00
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
cmp edi, 0x431
je 0x52854a
cmp edi, 0x430
je 0x52854a
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
or eax, 0xffffffff
jmp 0x528984
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x52854e
mov edi, dword [esp + 0x20]
lea edx, [esp + 0x1c]
push edx
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetServices
push reloc.WS2_32.dll_bind
mov dword [esp + 0x30], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x5288bf
mov ecx, dword [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x5287db
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 4
lea edx, [esp + 0xfc]
push edx
push 4
push eax
mov eax, dword [esp + 0x28]
push str.Start
push eax
call esi
mov edx, dword [esp + 0x18]
push 4
lea ecx, [esp + 0xf8]
push ecx
push 4
push 0
push 0x5f7ec4
push edx
call esi
mov eax, dword [esp + 0x18]
push str.DeleteFlag
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push 1
push 2
lea ecx, [esp + 0x64]
call fcn.0040b040
lea ecx, [esp + 0x5c]
push ebx
push ecx
mov byte [esp + 0xec], 5
call fcn.00409b60
add esp, 8
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x60]
call fcn.004094f0
cmp dword [eax + 0x14], 3
jbe 0x52862c
cmp byte [ebx + 1], 0x3a
mov byte [esp + 0x17], 1
je 0x528631
mov byte [esp + 0x17], 0
lea ecx, [esp + 0x40]
call fcn.0040bf30
cmp byte [esp + 0x17], 0
je 0x5286cf
push 0x2e
push ebx
call fcn.005b2cd0
add esp, 8
test eax, eax
je 0x5286cf
mov ecx, str..sys
lea edi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x528660
sub ecx, edi
push ecx
push str..sys
push eax
call fcn.005b6c36
add esp, 0xc
test eax, eax
jne 0x5286cf
push 0x62b600
lea ecx, [esp + 0x28]
call fcn.0040be30
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0xe8], 6
call fcn.0047ecc0
lea ecx, [esp + 0x24]
mov byte [esp + 0xe4], 5
call fcn.0040bf30
push ebx
lea ecx, [esp + 0x60]
push 0x5f498c
push ecx
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
add esp, 8
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x60]
call fcn.004094f0
mov edi, eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0xe8], 7
call fcn.004094f0
mov edi, dword [edi + 0x14]
mov ebx, 0x10
cmp dword [eax + 0x18], ebx
jb 0x528707
mov eax, dword [eax + 4]
jmp 0x52870a
add eax, 4
mov ecx, dword [esp + 0x18]
push edi
push eax
push 2
push 0
push str.ImagePath
push ecx
call esi
cmp dword [esp + 0x3c], ebx
jb 0x52872f
mov edx, dword [esp + 0x28]
push edx
call fcn.00595eb8
add esp, 4
cmp dword [esp + 0x58], ebx
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], 0
mov byte [esp + 0x28], 0
jb 0x528757
mov eax, dword [esp + 0x44]
push eax
call fcn.00595eb8
add esp, 4
mov edx, dword [esp + 0x100]
test edx, edx
je 0x52878d
cmp byte [edx], 0
je 0x52878d
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x528770
mov ecx, dword [esp + 0x18]
sub eax, edi
push eax
push edx
push 1
push 0
push str.Group
push ecx
call esi
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 0
call fcn.00409e00
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.005cdcde
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x52897b
push 1
push 2
lea ecx, [esp + 0x64]
call fcn.0040b040
mov byte [esp + 0xe4], 8
call ebp
push eax
push 0x5f7cac
push esi
lea ecx, [esp + 0x68]
push str.RegCreateKey
push ecx
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x60]
call fcn.004094f0
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0xe4], 9
jb 0x528849
mov eax, dword [eax + 4]
jmp 0x52884c
add eax, 4
push eax
push str.BaseLib::CNTServiceManager::Install
push 0x18f
push str..commonNTServiceManager.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x58], esi
jb 0x528880
mov eax, dword [esp + 0x44]
push eax
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 0
call fcn.00409e00
lea ecx, [esp + 0xa8]
push ecx
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.005cdcde
mov edx, dword [esp + 0x20]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x52897b
push 1
push 2
lea ecx, [esp + 0x64]
call fcn.0040b040
mov byte [esp + 0xe4], 0xa
call ebp
push eax
lea eax, [esp + 0x60]
push str.RegOpenKey
push eax
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x60]
call fcn.004094f0
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0xe4], 0xb
jb 0x528915
mov eax, dword [eax + 4]
jmp 0x528918
add eax, 4
push eax
push str.BaseLib::CNTServiceManager::Install
push 0x196
push str..commonNTServiceManager.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x58], esi
jb 0x52894c
mov edx, dword [esp + 0x44]
push edx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 0
call fcn.00409e00
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
mov ecx, dword [esp + 0xdc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 0x1c