Function at 0x4214d0
Capabilities:
Create service
Modify service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xbc
mov ebx, dword [ecx + 0x78]
test ebx, ebx
je 0x421ba0
mov eax, dword [ecx + 0x7c]
mov ebx, ecx
test eax, eax
je 0x421503
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebx + 0x7c], 0
sub esp, 4
mov esi, 0x6563
lea eax, [ebp - 0x28]
mov edi, 0x22
mov word [ebp - 0x20], si
mov esi, dword [ebx + 4]
mov word [ebp - 0x58], di
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x28], 0x732d2022
lea edi, [esi + 1]
mov dword [ebp - 0x24], 0x69767265
mov dword [ebp - 0x2c], 0xa
mov byte [ebp - 0x1e], 0
mov dword [ebp - 0x60], eax
cmp edi, 0xf
mov dword [ebp - 0x5c], 1
mov edx, dword [ebx]
ja 0x4219f2
test esi, esi
je 0x421570
cmp esi, 1
jne 0x421b04
movzx eax, byte [edx]
mov byte [ebp - 0x57], al
lea eax, [ebp - 0x58]
nop
lea esi, [esi]
mov dword [ebp - 0x5c], edi
mov byte [eax + esi + 1], 0
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x60]
cmp eax, ecx
je 0x421c10
lea esi, [ebp - 0x58]
mov ecx, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x60], esi
lea esi, [ebp - 0x40]
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x80], edi
add edi, ecx
mov dword [ebp - 0x44], ecx
cmp eax, esi
mov esi, 0xf
mov dword [ebp - 0x40], edx
mov byte [ebp - 0x58], 0
cmove edx, esi
cmp edi, edx
mov esi, dword [ebp - 0x30]
jbe 0x4218c2
cmp esi, dword [ebp - 0x7c]
mov edx, 0xf
cmovne edx, dword [ebp - 0x28]
cmp edi, edx
jbe 0x421ab0
mov edx, dword [ebp - 0x80]
lea eax, [ebp - 0x48]
mov dword [esp], ecx
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov ecx, eax
mov dword [ebp - 0x84], eax
mov dword [esp + 0xc], edx
call fcn.004ce110
mov eax, dword [ebp - 0x48]
mov esi, dword [ebp - 0x84]
sub esp, 0x10
mov dword [ebp - 0x44], edi
mov byte [eax + edi], 0
lea eax, [ebp - 0x70]
mov dword [ebp - 0x78], eax
mov edx, dword [esi]
lea eax, [esi + 8]
cmp edx, eax
je 0x421ae7
mov dword [ebp - 0x78], edx
mov edx, dword [esi + 8]
mov dword [ebp - 0x70], edx
mov edx, dword [esi + 4]
mov byte [esi + 8], 0
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x74], edx
mov dword [esi], eax
mov dword [esi + 4], 0
mov eax, dword [ebp - 0x48]
cmp eax, ecx
je 0x42165a
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x60]
lea ecx, [ebp - 0x58]
cmp eax, ecx
je 0x42166c
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x7c]
je 0x42167c
mov dword [esp], eax
call fcn.004ed8c0
call fcn.0042c430
mov edx, dword [ebp - 0x78]
lea esi, [ebp - 0x30]
mov edi, dword [ebp - 0x7c]
mov ecx, 0x6c61
mov dword [esp + 0x10], str.Install_path_is__s
mov dword [esp + 0xc], 0xc7
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp + 0x14], edx
mov dword [esp], eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x28], 0x74736e49
mov word [ebp - 0x24], cx
mov byte [ebp - 0x22], 0x6c
mov dword [ebp - 0x2c], 7
mov byte [ebp - 0x21], 0
call fcn.0042ce70
mov eax, dword [ebp - 0x30]
cmp eax, edi
je 0x4216e3
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x78]
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 1
mov dword [esp + 0x14], 2
mov dword [esp + 0x10], 0x110
mov dword [esp + 0xc], 0xf01ff
mov eax, dword [ebx + 0x30]
mov dword [esp + 8], eax
mov eax, dword [0x5510cc]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
sub esp, 0x34
test eax, eax
mov dword [ebx + 0x7c], eax
je 0x421a20
mov edx, dword [ebx + 0x48]
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [ebp - 0x48], edx
lea edx, [ebp - 0x48]
mov dword [esp + 8], edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
sub esp, 0xc
test eax, eax
jne 0x421920
call fcn.0042c430
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x7c]
mov edx, 0x6c61
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.ChangeServiceConfig2_failed__Error_Code:_d
mov dword [esp + 0xc], 0xdb
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp], edi
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x28], 0x74736e49
mov word [ebp - 0x24], dx
mov byte [ebp - 0x22], 0x6c
mov dword [ebp - 0x2c], 7
mov byte [ebp - 0x21], 0
call fcn.0042ce70
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x7c]
je 0x4217ef
mov dword [esp], eax
call fcn.004ed8c0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x7c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
sub esp, 0xc
test eax, eax
mov edi, eax
jne 0x421985
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x80], eax
call fcn.0042c430
mov edx, 0x6c61
mov ecx, dword [ebp - 0x7c]
mov dword [esp + 0x10], str.Error_creating_service:_s.Error_Code:_d
mov word [ebp - 0x24], dx
mov edx, dword [ebp - 0x80]
mov dword [esp + 0xc], 0xe2
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0x18], edx
mov edx, dword [0x5510cc]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x28], 0x74736e49
mov byte [ebp - 0x22], 0x6c
mov dword [ebp - 0x2c], 7
mov dword [esp + 0x14], edx
mov byte [ebp - 0x21], 0
call fcn.0042ce70
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x7c]
je 0x421890
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebx + 0x7c]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
sub esp, 4
mov dword [ebx + 0x7c], 0
mov eax, dword [ebp - 0x78]
lea ebx, [ebp - 0x70]
cmp eax, ebx
je 0x4218b8
mov dword [esp], eax
call fcn.004ed8c0
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp - 0x80]
test edx, edx
je 0x421906
add eax, ecx
cmp dword [ebp - 0x80], 1
jne 0x4218f0
movzx edx, byte [esi]
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x84], ecx
mov esi, ecx
mov byte [eax], dl
mov eax, dword [ebp - 0x48]
jmp 0x421612
mov ecx, dword [ebp - 0x80]
mov dword [esp + 4], esi
mov dword [esp], eax
mov dword [esp + 8], ecx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x48]
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x84], ecx
mov esi, ecx
jmp 0x421612
call fcn.0042c430
mov edx, dword [ebp - 0x48]
mov edi, dword [ebp - 0x7c]
mov ecx, 0x6c61
mov dword [esp + 0x10], str.Service_descpition_is__s
mov dword [esp + 0xc], 0xdd
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp + 0x14], edx
mov dword [esp], eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x28], 0x74736e49
mov word [ebp - 0x24], cx
mov byte [ebp - 0x22], 0x6c
mov dword [ebp - 0x2c], 7
mov byte [ebp - 0x21], 0
call fcn.0042ce70
mov eax, dword [ebp - 0x30]
cmp eax, edi
jne 0x4217e7
jmp 0x4217ef
call fcn.0042c430
mov edx, dword [ebx]
mov ebx, dword [ebp - 0x7c]
mov ecx, 0x6c61
mov dword [esp + 0x10], str.Install_service_:_s_successfully
mov dword [esp + 0xc], 0xe8
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp + 0x14], edx
mov dword [esp], eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x28], 0x74736e49
mov word [ebp - 0x24], cx
mov byte [ebp - 0x22], 0x6c
mov dword [ebp - 0x2c], 7
mov byte [ebp - 0x21], 0
call fcn.0042ce70
mov eax, dword [ebp - 0x30]
cmp eax, ebx
je 0x4219e8
mov dword [esp], eax
call fcn.004ed8c0
mov edi, 1
jmp 0x4218a6
lea ecx, [ebp - 0x60]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], 1
call fcn.004ce110
sub esp, 0x10
mov eax, dword [ebp - 0x60]
jmp 0x421570
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.0042c430
mov edx, 0x6c61
mov ecx, dword [ebp - 0x7c]
mov dword [esp + 0x18], edi
mov word [ebp - 0x24], dx
mov edx, dword [0x5510cc]
mov dword [esp + 0x10], str.Error_creating_service:_s.Error_Code:_d
mov dword [esp + 0xc], 0xcd
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp + 0x14], edx
mov dword [esp], eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x28], 0x74736e49
mov byte [ebp - 0x22], 0x6c
mov dword [ebp - 0x2c], 7
mov byte [ebp - 0x21], 0
call fcn.0042ce70
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x7c]
je 0x421a94
mov dword [esp], eax
call fcn.004ed8c0
cmp edi, 0x431
je 0x421b20
xor edi, edi
jmp 0x4218a6
mov dword [esp + 0xc], ecx
lea ecx, [ebp - 0x30]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.004cb7a0
mov esi, eax
lea eax, [ebp - 0x70]
sub esp, 0x10
mov dword [ebp - 0x78], eax
mov edx, dword [esi]
lea eax, [esi + 8]
cmp edx, eax
jne 0x42162c
mov edx, dword [esi + 8]
mov dword [ebp - 0x70], edx
mov edx, dword [esi + 0xc]
mov dword [ebp - 0x6c], edx
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x68], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x64], edx
jmp 0x421635
lea eax, [ebp - 0x57]
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
lea eax, [ebp - 0x58]
jmp 0x421570
mov ecx, ebx
call fcn.00420f90
cmp eax, 1
mov edi, eax
jne 0x421aa0
call fcn.0042c430
mov ebx, dword [ebp - 0x7c]
mov ecx, 0x6c61
mov dword [esp + 0x10], str.StartupService_successfully
mov dword [esp + 0xc], 0xd0
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x28], 0x74736e49
mov word [ebp - 0x24], cx
mov byte [ebp - 0x22], 0x6c
mov dword [ebp - 0x2c], 7
mov byte [ebp - 0x21], 0
call fcn.0042ce70
mov eax, dword [ebp - 0x30]
cmp eax, ebx
je 0x4218a6
mov dword [esp], eax
call fcn.004ed8c0
jmp 0x4218a6
call fcn.0042c430
lea edx, [ebp - 0x30]
lea ebx, [ebp - 0x28]
mov ecx, 0x6c61
mov dword [esp + 0x10], str.The_SCM_handle_is_nullptr.
mov dword [esp + 0xc], 0xbc
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x28], 0x74736e49
mov word [ebp - 0x24], cx
mov byte [ebp - 0x22], 0x6c
mov dword [ebp - 0x2c], 7
mov byte [ebp - 0x21], 0
call fcn.0042ce70
mov eax, dword [ebp - 0x30]
cmp eax, ebx
je 0x421c03
mov dword [esp], eax
call fcn.004ed8c0
lea esp, [ebp - 0xc]
xor edi, edi
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x5c]
mov edx, 0xf
mov dword [ebp - 0x5c], 0
mov byte [ebp - 0x58], 0
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x80], eax
lea edi, [eax + ecx]
lea eax, [ebp - 0x40]
jmp 0x4215c1