Function at 0x420a40
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5032dd
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x569080]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x10], ebx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x30], 0x533468
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], 0
test eax, eax
jne 0x420bb2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0042b830
cmp byte [eax + 0x1c], 0
je 0x420baa
call fcn.0042b830
test byte [eax + 0x20], 8
je 0x420baa
call fcn.0042b830
mov dword [ebp - 0x20], eax
call fcn.004047f0
mov ebx, eax
test ebx, ebx
je 0x420fcc
mov edx, dword [ebx]
mov esi, dword [edx + 0xc]
mov ecx, esi
call dword [0x525578]
mov ecx, ebx
call esi
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x14]
push 0x1d
push str.Unable_to_open_SCM_error_code
call fcn.00402660
push edi
lea ecx, [ebp - 0x14]
call fcn.0042b4e0
mov ebx, eax
call fcn.004047f0
mov edi, eax
test edi, edi
je 0x420fcc
mov edx, dword [edi]
mov esi, dword [edx + 0xc]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x10]
push 0
push 0x530654
call fcn.00402660
push ecx
push ebx
push ecx
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x10]
push eax
call fcn.0042bba0
mov byte [ebp - 4], 3
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x10]
mov eax, ebx
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x420b82
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x420baa
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
mov ebx, dword [ebp - 0x18]
jmp 0x420f93
mov edi, dword [ebx + 0x28]
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
mov edi, dword [ebx + 0x28]
mov dword [ebp - 0x20], eax
mov edx, dword [edi]
mov esi, dword [edx + 4]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
mov edi, dword [ebp - 0x10]
mov ebx, eax
mov edi, dword [edi + 0x28]
mov edx, dword [edi]
mov esi, dword [edx]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
push 0
push 0
push 0
push 0
push 0
push dword [ebp - 0x20]
push 1
push 3
push 0x10
push 0xf01ff
push ebx
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, dword [ebp - 0x10]
mov edi, eax
mov ecx, dword [ebx + 4]
cmp edi, ecx
je 0x420c3a
mov ecx, dword [ebx]
mov esi, dword [ecx + 4]
mov ecx, esi
call dword [0x525578]
mov ecx, ebx
call esi
mov dword [ebx + 4], edi
mov ecx, edi
test ecx, ecx
jne 0x420d38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0042b830
cmp byte [eax + 0x1c], 0
je 0x420baa
call fcn.0042b830
test byte [eax + 0x20], 8
je 0x420baa
call fcn.0042b830
mov dword [ebp - 0x20], eax
call fcn.004047f0
mov ebx, eax
test ebx, ebx
je 0x420fcc
mov edx, dword [ebx]
mov esi, dword [edx + 0xc]
mov ecx, esi
call dword [0x525578]
mov ecx, ebx
call esi
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x10]
push 0x22
push str.Create_Service_failed_error_code:
call fcn.00402660
push edi
lea ecx, [ebp - 0x10]
call fcn.0042b4e0
mov ebx, eax
call fcn.004047f0
mov edi, eax
test edi, edi
je 0x420fcc
mov edx, dword [edi]
mov esi, dword [edx + 0xc]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x14]
push 0
push 0x530654
call fcn.00402660
push ecx
push ebx
push ecx
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x14]
push eax
call fcn.0042bba0
mov byte [ebp - 4], 0xd
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x14]
mov eax, ebx
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x420d2c
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x10]
jmp 0x420b89
call fcn.0042b830
or ebx, 0xffffffff
cmp byte [eax + 0x1c], 0
je 0x420e39
call fcn.0042b830
test byte [eax + 0x20], 8
je 0x420e39
call fcn.0042b830
mov dword [ebp - 0x20], eax
call fcn.004047f0
mov edi, eax
test edi, edi
je 0x420fcc
mov edx, dword [edi]
mov esi, dword [edx + 0xc]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0x17
lea ecx, [ebp - 0x18]
push 0x15
push str.CreateService_SUCCESS
call fcn.00402660
call fcn.004047f0
mov edi, eax
test edi, edi
je 0x420fcc
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 0x1a
lea ecx, [ebp - 0x14]
push 0
push 0x530654
call fcn.00402660
push ecx
lea eax, [ebp - 0x18]
push eax
push ecx
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x14]
push eax
call fcn.0042bba0
mov byte [ebp - 4], 0x17
mov eax, ebx
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x420e0f
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
mov byte [ebp - 4], 0
mov eax, ebx
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x420e39
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
mov edi, dword [ebp - 0x10]
mov edi, dword [edi + 0x28]
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push 1
push dword [esi + 4]
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x420f7d
call fcn.0042b830
cmp byte [eax + 0x1c], 0
je 0x420f7d
call fcn.0042b830
test byte [eax + 0x20], 8
je 0x420f7d
call fcn.0042b830
mov dword [ebp - 0x28], eax
call fcn.004047f0
mov edi, eax
test edi, edi
je 0x420fcc
mov edx, dword [edi]
mov esi, dword [edx + 0xc]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 0x21
lea ecx, [ebp - 0x14]
push 0x2e
push str.Unable_to_set_service_description_error_code:
call fcn.00402660
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x14]
call fcn.0042b4e0
mov dword [ebp - 0x20], eax
call fcn.004047f0
mov edi, eax
test edi, edi
je 0x420fcc
mov edx, dword [edi]
mov esi, dword [edx + 0xc]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0x24
lea ecx, [ebp - 0x18]
push 0
push 0x530654
call fcn.00402660
push ecx
push dword [ebp - 0x20]
lea eax, [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 0x28]
push eax
call fcn.0042bba0
mov byte [ebp - 4], 0x21
mov eax, ebx
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x420f52
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x420f7a
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
mov esi, dword [ebp - 0x10]
mov edi, dword [esi + 0x28]
mov eax, dword [edi]
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x525578]
mov ecx, edi
call esi
xor ebx, ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x30], 0x533468
test eax, eax
je 0x420fb6
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x2c], 0
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.004027d0
int3