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

Disassembly:
push 0xffffffffffffffff
push 0x465e3d
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x485f50]
xor eax, esp
push eax
lea eax, [esp + 0xdc]
mov dword fs:[0], eax
xor esi, esi
push 0xf003f
push esi
push esi
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0xe4], esi
push esi
cmp ebx, esi
jne 0x414dd0
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
or eax, 0xffffffff
jmp 0x415196
mov eax, dword [esp + 0x108]
mov ecx, dword [esp + 0x104]
mov ebp, dword [esp + 0x100]
mov edx, dword [esp + 0xfc]
mov edi, dword [esp + 0xf0]
push esi
push eax
mov eax, dword [esp + 0x100]
push esi
push ecx
mov ecx, dword [esp + 0x104]
push ebp
push 1
push edx
push eax
push 0xf01ff
push ecx
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [esp + 0x1c], eax
mov byte [esp + 0xe4], 1
cmp eax, esi
jne 0x414f12
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 1
push 2
lea ecx, [esp + 0x64]
mov esi, eax
call fcn.00407d10
push esi
lea edx, [esp + 0x60]
push str.CreateService:
push edx
mov byte [esp + 0xf0], 2
call fcn.004052a0
add esp, 8
mov ecx, eax
call fcn.004011c0
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x60]
call fcn.004048a0
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0xe4], 3
jb 0x414e84
mov eax, dword [eax + 4]
jmp 0x414e87
add eax, 4
push eax
push str.BaseLib::CNTServiceManager::Install
push 0x14e
push str..commonNTServiceManager.cpp
push 0xf0000000
call fcn.00404cf0
mov ecx, eax
call fcn.004155d0
cmp dword [esp + 0x3c], 0x10
jb 0x414ebc
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0041f6a2
add esp, 4
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 1
call fcn.00405530
lea edx, [esp + 0xa8]
push edx
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.004563aa
add esp, 4
cmp esi, 0x431
je 0x414f10
cmp esi, 0x430
je 0x414f10
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0
call esi
push ebx
call esi
or eax, 0xffffffff
jmp 0x415196
xor esi, esi
lea eax, [esp + 0x18]
push eax
push 0xf003f
push esi
push 0x46b840
push reloc.WS2_32.dll_bind
mov dword [esp + 0x2c], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, esi
jne 0x415184
mov edx, dword [esp + 0x18]
push esi
lea ecx, [esp + 0x18]
push ecx
push esi
push 0xf003f
push esi
push esi
push esi
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x415179
mov ecx, dword [esp + 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 4
lea eax, [esp + 0xfc]
push eax
push 4
push esi
push 0x46b838
push ecx
call edi
mov eax, dword [esp + 0x14]
push 4
lea edx, [esp + 0xf8]
push edx
push 4
push esi
push 0x46b830
push eax
call edi
mov ecx, dword [esp + 0x14]
push str.DeleteFlag
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push 1
push 2
lea ecx, [esp + 0x64]
call fcn.00407d10
lea edx, [esp + 0x5c]
push ebp
push edx
mov byte [esp + 0xec], 4
call fcn.004052a0
add esp, 8
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x60]
call fcn.004048a0
cmp dword [eax + 0x14], 3
jbe 0x414fe5
cmp byte [ebp + 1], 0x3a
jne 0x414fe5
mov bl, 1
jmp 0x414fe7
xor bl, bl
lea ecx, [esp + 0x40]
call fcn.00408840
test bl, bl
je 0x41507d
push 0x2e
push ebp
call fcn.004420b0
add esp, 8
test eax, eax
je 0x41507d
mov ecx, 0x46b828
lea esi, [ecx + 1]
nop
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x415010
sub ecx, esi
push ecx
push 0x46b828
push eax
call fcn.004403d7
add esp, 0xc
test eax, eax
jne 0x41507d
push 0x4772d0
lea ecx, [esp + 0x28]
call fcn.00408210
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x60]
mov byte [esp + 0xe8], 5
call fcn.00401350
lea ecx, [esp + 0x24]
mov byte [esp + 0xe4], 4
call fcn.00408840
push ebp
lea edx, [esp + 0x60]
push 0x46aaf8
push edx
call fcn.004052a0
add esp, 8
push eax
call fcn.004052a0
add esp, 8
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x60]
call fcn.004048a0
mov esi, eax
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x60]
mov byte [esp + 0xe8], 6
call fcn.004048a0
mov esi, dword [esi + 0x14]
mov ebx, 0x10
cmp dword [eax + 0x18], ebx
jb 0x4150b5
mov eax, dword [eax + 4]
jmp 0x4150b8
add eax, 4
mov edx, dword [esp + 0x14]
push esi
push eax
push 2
push 0
push 0x46b7f0
push edx
call edi
cmp dword [esp + 0x3c], ebx
jb 0x4150dd
mov eax, dword [esp + 0x28]
push eax
call fcn.0041f6a2
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], 0
mov byte [esp + 0x28], 0
cmp dword [esp + 0x58], ebx
jb 0x415105
mov ecx, dword [esp + 0x44]
push ecx
call fcn.0041f6a2
add esp, 4
mov esi, dword [esp + 0x100]
test esi, esi
je 0x41513b
cmp byte [esi], 0
je 0x41513b
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x415120
sub eax, edx
mov edx, dword [esp + 0x14]
push eax
push esi
push 1
push 0
push str.Group
push edx
call edi
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 1
call fcn.00405530
lea ecx, [esp + 0xa8]
push ecx
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.004563aa
mov ebx, dword [esp + 0x24]
add esp, 4
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push ebx
call esi
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