Function at 0x50ab90
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6be3e0
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x7adbc4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0
call fcn.00516890
mov esi, eax
mov ecx, esi
call fcn.00516630
cmp byte [0x7b8b2e], 0
jne 0x50ac35
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 1
xorps xmm0, xmm0
movsd qword [ebp - 0x38], xmm0
test eax, eax
je 0x50ac29
sub esp, 8
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8b2e
sub esp, 0xc
push 0x108
push 0x777b40
push 0x48
call fcn.00516700
mov byte [ebp - 4], 0
mov dword [0x7bbcc8], eax
jmp 0x50ac3d
xor eax, eax
mov byte [ebp - 4], al
mov dword [0x7bbcc8], eax
jmp 0x50ac3d
xorps xmm0, xmm0
movsd qword [ebp - 0x38], xmm0
mov ecx, esi
call fcn.00516640
mov ecx, dword [0x7bbcc8]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bbcc8]
mov eax, dword [eax]
mov edi, dword [eax + 0x48]
mov eax, dword [ebp + 0xc]
mov esi, eax
test eax, eax
jne 0x50ac6b
mov esi, dword [ebx + 4]
call fcn.00493480
mov ecx, eax
test ecx, ecx
je 0x50b421
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
push esi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.004990b0
test al, al
jne 0x50ac9f
push esi
lea ecx, [ebp - 0x1c]
call fcn.00498590
mov byte [ebp - 4], 3
mov esi, dword [ebp - 0x1c]
push esi
push str.Installing_service___s_...
push dword [0x7bbcc8]
call edi
add esp, 0xc
add esi, 0xfffffff0
or ebx, 0xffffffff
mov byte [ebp - 4], 4
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x50acd5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, dword [0x7bbcc8]
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bbcc8]
lea ecx, [ecx + 0xd0]
call fcn.00516640
push dword [ebp + 8]
lea ecx, [ebp - 0x14]
call fcn.00498dc0
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
jne 0x50ad9d
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x50ad36
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00499950
mov eax, dword [ebp - 0x14]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
neg eax
sbb esi, esi
neg esi
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x14]
push dword [ecx - 8]
push ecx
call fcn.00675480
mov edx, eax
add esp, 8
test edx, edx
js 0x50b441
mov ecx, dword [ebp - 0x14]
cmp edx, dword [ecx - 8]
jg 0x50b441
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 5
mov word [eax + edx*2], cx
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x50ad95
movzx eax, ax
or eax, 0x80070000
test esi, esi
je 0x50b42b
call fcn.00516890
mov esi, eax
mov ecx, esi
call fcn.00516630
cmp byte [0x7b8b31], 0
jne 0x50adfe
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp + 8], eax
mov byte [ebp - 4], 7
test eax, eax
je 0x50adf3
movsd xmm0, qword [ebp - 0x38]
sub esp, 8
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8b31
sub esp, 0xc
push 0x111
push 0x777b40
push 0x48
call fcn.00516700
jmp 0x50adf5
xor eax, eax
mov byte [ebp - 4], 5
mov dword [0x7bbcbc], eax
mov ecx, esi
call fcn.00516640
mov ecx, dword [0x7bbcbc]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bbcbc]
mov edx, dword [ebp - 0x18]
mov eax, dword [eax]
mov esi, dword [edx + 8]
mov edi, dword [eax + 0x48]
call fcn.00493480
mov ecx, eax
test ecx, ecx
je 0x50b44b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
push esi
lea ecx, [ebp + 8]
mov byte [ebp - 4], 8
call fcn.004990b0
test al, al
jne 0x50ae5a
push esi
lea ecx, [ebp + 8]
call fcn.00498590
mov byte [ebp - 4], 9
mov esi, dword [ebp + 8]
push esi
push str.Open_SCM_manager___s_...
push dword [0x7bbcbc]
call edi
add esp, 0xc
add esi, 0xfffffff0
mov byte [ebp - 4], 0xa
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x50ae8d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 5
mov ecx, dword [0x7bbcbc]
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bbcbc]
lea ecx, [ecx + 0xd0]
call fcn.00516640
mov eax, dword [ebp - 0x18]
push 0xf003f
push 0
mov ecx, dword [eax + 8]
call fcn.00507a60
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x1c], edi
xor ebx, ebx
mov byte [ebp - 4], 0xb
test edi, edi
setne bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x50aee8
movzx eax, ax
or eax, 0x80070000
test ebx, ebx
je 0x50b455
call fcn.00516890
mov esi, eax
mov ecx, esi
call fcn.00516630
cmp byte [0x7b8b2c], 0
jne 0x50af51
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0xc
test eax, eax
je 0x50af46
movsd xmm0, qword [ebp - 0x38]
sub esp, 8
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8b2c
sub esp, 0xc
push 0x11f
push 0x777b40
push 0x48
call fcn.00516700
jmp 0x50af48
xor eax, eax
mov byte [ebp - 4], 0xb
mov dword [0x7bbcc0], eax
mov ecx, esi
call fcn.00516640
mov ecx, dword [0x7bbcc0]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bbcc0]
mov eax, dword [eax]
mov ebx, dword [eax + 0x48]
mov eax, dword [ebp - 0x18]
mov esi, dword [eax + 4]
call fcn.00493480
mov ecx, eax
test ecx, ecx
je 0x50b46b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
push esi
lea ecx, [ebp + 8]
mov byte [ebp - 4], 0xd
call fcn.004990b0
test al, al
jne 0x50afad
push esi
lea ecx, [ebp + 8]
call fcn.00498590
mov byte [ebp - 4], 0xe
mov esi, dword [ebp + 8]
push esi
push str.Create_service___s_...
push dword [0x7bbcc0]
call ebx
add esp, 0xc
add esi, 0xfffffff0
mov byte [ebp - 4], 0xf
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x50afe1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
mov ecx, dword [0x7bbcc0]
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bbcc0]
lea ecx, [ecx + 0xd0]
call fcn.00516640
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
neg eax
mov edx, dword [ebp - 0x18]
sbb eax, eax
and eax, 2
test ecx, ecx
je 0x50b01a
mov edx, dword [edx + 4]
jmp 0x50b01f
mov ecx, dword [edx + 4]
mov edx, ecx
push 0
push 0
push 0
push 0
push 0
push dword [ebp - 0x14]
push 1
push dword [ebp + 0x14]
push 0x20
push eax
push ecx
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
mov dword [ebp + 0x14], edi
xor ebx, ebx
mov byte [ebp - 4], 0x10
test edi, edi
setne bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x50b05f
movzx eax, ax
or eax, 0x80070000
test ebx, ebx
je 0x50b475
call fcn.00516890
mov esi, eax
mov ecx, esi
call fcn.00516630
cmp byte [0x7b8b30], 0
jne 0x50b0c8
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0x11
test eax, eax
je 0x50b0bd
movsd xmm0, qword [ebp - 0x38]
sub esp, 8
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8b30
sub esp, 0xc
push 0x128
push 0x777b40
push 0x50
call fcn.00516700
jmp 0x50b0bf
xor eax, eax
mov byte [ebp - 4], 0x10
mov dword [0x7bbcb4], eax
mov ecx, esi
call fcn.00516640
mov ecx, dword [0x7bbcb4]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bbcb4]
mov esi, dword [ebp + 0xc]
mov eax, dword [eax]
mov ebx, dword [eax + 0x48]
test esi, esi
jne 0x50b0f7
mov eax, dword [ebp - 0x18]
mov esi, dword [eax + 4]
call fcn.00493480
mov ecx, eax
test ecx, ecx
je 0x50b48b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
push esi
lea ecx, [ebp + 8]
mov byte [ebp - 4], 0x12
call fcn.004990b0
test al, al
jne 0x50b12b
push esi
lea ecx, [ebp + 8]
call fcn.00498590
mov byte [ebp - 4], 0x13
mov esi, dword [ebp + 8]
push esi
push str.Create_service___s__:_OK
push dword [0x7bbcb4]
call ebx
add esp, 0xc
add esi, 0xfffffff0
or ebx, 0xffffffff
mov byte [ebp - 4], 0x14
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x50b161
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov ecx, dword [0x7bbcb4]
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bbcb4]
lea ecx, [ecx + 0xd0]
call fcn.00516640
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x50b2cf
mov dword [ebp + 8], eax
call fcn.00516890
mov esi, eax
mov ecx, esi
call fcn.00516630
cmp byte [0x7b8b2b], 0
jne 0x50b1f0
mov ecx, 0xf0
call fcn.00516ef0
mov dword [ebp + 0x10], eax
mov byte [ebp - 4], 0x15
test eax, eax
je 0x50b1e5
movsd xmm0, qword [ebp - 0x38]
sub esp, 8
mov ecx, eax
movsd qword [esp], xmm0
push 0x7b8b2b
sub esp, 0xc
push 0x12d
push 0x777b40
push 0x48
call fcn.00516700
jmp 0x50b1e7
xor eax, eax
mov byte [ebp - 4], 0x10
mov dword [0x7bbcc4], eax
mov ecx, esi
call fcn.00516640
mov ecx, dword [0x7bbcc4]
lea ecx, [ecx + 0xd0]
call fcn.00516630
mov eax, dword [0x7bbcc4]
mov eax, dword [eax]
mov ebx, dword [eax + 0x48]
mov eax, dword [ebp - 0x18]
mov esi, dword [eax + 4]
call fcn.00493480
mov ecx, eax
test ecx, ecx
je 0x50b495
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 0x10], eax
push esi
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0x16
call fcn.004990b0
test al, al
jne 0x50b24c
push esi
lea ecx, [ebp + 0x10]
call fcn.00498590
mov byte [ebp - 4], 0x17
mov esi, dword [ebp + 0x10]
push esi
push str.Change_service_config___s_...
push dword [0x7bbcc4]
call ebx
add esp, 0xc
add esi, 0xfffffff0
or ebx, 0xffffffff
mov byte [ebp - 4], 0x18
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x50b282
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov ecx, dword [0x7bbcc4]
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x7bbcc4]
lea ecx, [ecx + 0xd0]
call fcn.00516640
lea eax, [ebp + 8]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
neg eax
sbb esi, esi
neg esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x50b2c7
movzx eax, ax
or eax, 0x80070000
test esi, esi
je 0x50b49f
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x50b2dc
push edi
call esi
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x50b2e6
push eax
call esi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
mov byte [ebp - 4], 0x19
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x50b302
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x30
push 0x80004005
call fcn.00490960
push eax
lea ecx, [ebp - 0x20]
call fcn.00490940
push 0x7a719c
mov eax, ecx
push eax
call fcn.0066d7ed
push 0x80070057
call fcn.00490960
push 0x80004005
call fcn.00490960
push eax
lea ecx, [ebp - 0x24]
call fcn.00490940
push 0x7a719c
mov eax, ecx
push eax
call fcn.0066d7ed
push 0x80004005
call fcn.00490960
push eax
lea ecx, [ebp - 0x28]
call fcn.00490940
push 0x7a719c
mov eax, ecx
push eax
call fcn.0066d7ed
push 0x80004005
call fcn.00490960
push 0x80004005
call fcn.00490960
push eax
lea ecx, [ebp - 0x2c]
call fcn.00490940
push 0x7a719c
mov eax, ecx
push eax
call fcn.0066d7ed
int3