Function at 0x4521d0
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b217a
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x4e96d0]
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.0046c0e0
mov esi, eax
mov ecx, esi
call fcn.0046e8e0
cmp byte [0x4f3c36], 0
jne 0x45227e
push 0xf0
call fcn.0046e4f0
add esp, 4
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 1
xorps xmm0, xmm0
movsd qword [ebp - 0x40], xmm0
test eax, eax
je 0x452272
push 0x4f3c36
sub esp, 8
mov ecx, eax
movsd qword [esp], xmm0
push 0x4cea7a
push 0
push 0
push 0x121
push 0x4d3f08
push 0x48
call fcn.0046bf00
mov byte [ebp - 4], 0
mov dword [0x4f3bf8], eax
jmp 0x452286
xor eax, eax
mov byte [ebp - 4], al
mov dword [0x4f3bf8], eax
jmp 0x452286
xorps xmm0, xmm0
movsd qword [ebp - 0x40], xmm0
mov ecx, esi
call fcn.0046e8f0
mov ecx, dword [0x4f3bf8]
lea ecx, [ecx + 0xd0]
call fcn.0046e8e0
mov eax, dword [ebp + 0xc]
mov edi, eax
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x4522ac
mov edi, dword [ebx]
call fcn.0040d990
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4522c8
push 0x80004005
call fcn.0040abe0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 2
test edi, edi
je 0x452303
test edi, 0xffff0000
jne 0x452303
movzx edi, di
push 0
push edi
call fcn.0040ad60
add esp, 8
test eax, eax
je 0x45230f
push edi
push eax
lea ecx, [ebp - 0x1c]
call fcn.0041adc0
jmp 0x45230c
push edi
lea ecx, [ebp - 0x1c]
call fcn.00418c30
mov esi, dword [ebp - 0x1c]
mov byte [ebp - 4], 3
mov eax, dword [0x4f3bf8]
push esi
mov edi, dword [eax]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4d3f40
push dword [0x4f3bf8]
call dword [edi + 0x48]
add esi, 0xfffffff0
mov byte [ebp - 4], 0
add esp, 0x10
or eax, 0xffffffff
lea ecx, [esi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x452351
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [0x4f3bf8]
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x4f3bf8]
lea ecx, [ecx + 0xd0]
call fcn.0046e8f0
push dword [ebp + 8]
lea ecx, [ebp - 0x14]
call fcn.00418e40
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
jne 0x45241c
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x4523ae
push 0x104
lea ecx, [ebp - 0x14]
call fcn.0041a8d0
mov eax, dword [ebp - 0x14]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, dword [ebp - 0x14]
neg eax
sbb esi, esi
neg esi
push dword [ecx - 8]
push ecx
call fcn.004721a5
mov edx, eax
add esp, 8
test edx, edx
js 0x452412
mov ecx, dword [ebp - 0x14]
cmp edx, dword [ecx - 8]
jg 0x452412
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x14]
mov word [eax + edx*2], cx
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4523fd
movzx eax, ax
or eax, 0x80070000
test esi, esi
jne 0x45241c
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push 0x4e6654
push eax
call fcn.0047ad64
push 0x80070057
call fcn.0040abe0
call fcn.0046c0e0
mov esi, eax
mov ecx, esi
call fcn.0046e8e0
cmp byte [0x4f3b8d], 0
jne 0x452486
push 0xf0
call fcn.0046e4f0
add esp, 4
mov dword [ebp + 8], eax
mov byte [ebp - 4], 5
test eax, eax
je 0x45247b
movsd xmm0, qword [ebp - 0x40]
mov ecx, eax
push 0x4f3b8d
sub esp, 8
movsd qword [esp], xmm0
push 0x4cea7a
push 0
push 0
push 0x129
push 0x4d3f08
push 0x48
call fcn.0046bf00
jmp 0x45247d
xor eax, eax
mov byte [ebp - 4], 4
mov dword [0x4f3ba4], eax
mov ecx, esi
call fcn.0046e8f0
mov ecx, dword [0x4f3ba4]
lea ecx, [ecx + 0xd0]
call fcn.0046e8e0
mov edi, dword [ebx + 4]
call fcn.0040d990
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4524bd
push 0x80004005
call fcn.0040abe0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp + 8], esi
mov byte [ebp - 4], 6
test edi, edi
je 0x4524f8
test edi, 0xffff0000
jne 0x4524f8
movzx edi, di
push 0
push edi
call fcn.0040ad60
add esp, 8
test eax, eax
je 0x452504
push edi
push eax
lea ecx, [ebp + 8]
call fcn.0041adc0
jmp 0x452501
push edi
lea ecx, [ebp + 8]
call fcn.00418c30
mov esi, dword [ebp + 8]
mov byte [ebp - 4], 7
mov eax, dword [0x4f3ba4]
push esi
mov edi, dword [eax]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4d3f7c
push dword [0x4f3ba4]
call dword [edi + 0x48]
add esi, 0xfffffff0
mov byte [ebp - 4], 4
add esp, 0x10
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x452546
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [0x4f3ba4]
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x4f3ba4]
lea ecx, [ecx + 0xd0]
call fcn.0046e8f0
mov eax, dword [ebx + 4]
xor ecx, ecx
push 0xf003f
push ecx
cmp word [eax], cx
cmove eax, ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
xor eax, eax
mov byte [ebp - 4], 8
test ebx, ebx
setne al
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x45259f
movzx eax, ax
or eax, 0x80070000
cmp dword [ebp + 8], 0
jne 0x4525b6
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push 0x4e6654
push eax
call fcn.0047ad64
call fcn.0046c0e0
mov esi, eax
mov ecx, esi
call fcn.0046e8e0
cmp byte [0x4f3bb4], 0
jne 0x452620
push 0xf0
call fcn.0046e4f0
add esp, 4
mov dword [ebp + 8], eax
mov byte [ebp - 4], 9
test eax, eax
je 0x452615
movsd xmm0, qword [ebp - 0x40]
mov ecx, eax
push 0x4f3bb4
sub esp, 8
movsd qword [esp], xmm0
push 0x4cea7a
push 0
push 0
push 0x136
push 0x4d3f08
push 0x48
call fcn.0046bf00
jmp 0x452617
xor eax, eax
mov byte [ebp - 4], 8
mov dword [0x4f3c30], eax
mov ecx, esi
call fcn.0046e8f0
mov ecx, dword [0x4f3c30]
lea ecx, [ecx + 0xd0]
call fcn.0046e8e0
mov edi, dword [ebp - 0x18]
mov edi, dword [edi]
call fcn.0040d990
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x452659
push 0x80004005
call fcn.0040abe0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp + 8], esi
mov byte [ebp - 4], 0xa
test edi, edi
je 0x452694
test edi, 0xffff0000
jne 0x452694
movzx edi, di
push 0
push edi
call fcn.0040ad60
add esp, 8
test eax, eax
je 0x4526a0
push edi
push eax
lea ecx, [ebp + 8]
call fcn.0041adc0
jmp 0x45269d
push edi
lea ecx, [ebp + 8]
call fcn.00418c30
mov esi, dword [ebp + 8]
mov byte [ebp - 4], 0xb
mov eax, dword [0x4f3c30]
push esi
mov edi, dword [eax]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4d3f60
push dword [0x4f3c30]
call dword [edi + 0x48]
add esi, 0xfffffff0
mov byte [ebp - 4], 8
add esp, 0x10
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4526e2
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [0x4f3c30]
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x4f3c30]
lea ecx, [ecx + 0xd0]
call fcn.0046e8f0
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x452709
mov ecx, esi
jmp 0x45270e
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov eax, dword [ebp + 0x10]
push 0
push 0
push 0
push 0
push 0
push dword [ebp - 0x14]
neg eax
push 1
push dword [ebp + 0x14]
sbb eax, eax
push 0x20
and eax, 2
push eax
mov eax, dword [ebp - 0x18]
push ecx
push dword [eax]
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
mov dword [ebp - 0x34], edi
xor eax, eax
mov byte [ebp - 4], 0xc
test edi, edi
setne al
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x45275f
movzx eax, ax
or eax, 0x80070000
cmp dword [ebp + 8], 0
jne 0x452776
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push 0x4e6654
push eax
call fcn.0047ad64
call fcn.0046c0e0
mov ecx, eax
mov dword [ebp + 8], eax
call fcn.0046e8e0
cmp byte [0x4f3bff], 0
jne 0x4527e1
push 0xf0
call fcn.0046e4f0
add esp, 4
mov dword [ebp + 0x14], eax
mov byte [ebp - 4], 0xd
test eax, eax
je 0x4527d6
movsd xmm0, qword [ebp - 0x40]
mov ecx, eax
push 0x4f3bff
sub esp, 8
movsd qword [esp], xmm0
push 0x4cea7a
push 0
push 0
push 0x145
push 0x4d3f08
push 0x50
call fcn.0046bf00
jmp 0x4527d8
xor eax, eax
mov byte [ebp - 4], 0xc
mov dword [0x4f3c04], eax
mov ecx, dword [ebp + 8]
call fcn.0046e8f0
mov ecx, dword [0x4f3c04]
lea ecx, [ecx + 0xd0]
call fcn.0046e8e0
test esi, esi
jne 0x452806
mov eax, dword [ebp - 0x18]
mov esi, dword [eax]
mov dword [ebp - 0x20], esi
call fcn.0040d990
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x452822
push 0x80004005
call fcn.0040abe0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp + 8], esi
mov byte [ebp - 4], 0xe
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x452864
test eax, 0xffff0000
jne 0x452864
movzx eax, ax
push 0
push eax
mov dword [ebp + 0x14], eax
call fcn.0040ad60
add esp, 8
test eax, eax
je 0x452870
push dword [ebp + 0x14]
lea ecx, [ebp + 8]
push eax
call fcn.0041adc0
jmp 0x45286d
push eax
lea ecx, [ebp + 8]
call fcn.00418c30
mov esi, dword [ebp + 8]
mov byte [ebp - 4], 0xf
mov eax, dword [0x4f3c04]
push esi
mov eax, dword [eax]
add eax, 0x48
mov dword [ebp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov eax, dword [ebp + 0x14]
push 0x4d3fc0
push dword [0x4f3c04]
call dword [eax]
add esi, 0xfffffff0
mov byte [ebp - 4], 0xc
add esp, 0x10
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4528ba
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [0x4f3c04]
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x4f3c04]
lea ecx, [ecx + 0xd0]
call fcn.0046e8f0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x452a10
mov dword [ebp + 8], eax
call fcn.0046c0e0
mov esi, eax
mov ecx, esi
call fcn.0046e8e0
cmp byte [0x4f3bc8], 0
jne 0x45294e
push 0xf0
call fcn.0046e4f0
add esp, 4
mov dword [ebp + 0x10], eax
mov byte [ebp - 4], 0x10
test eax, eax
je 0x452943
movsd xmm0, qword [ebp - 0x40]
mov ecx, eax
push 0x4f3bc8
sub esp, 8
movsd qword [esp], xmm0
push 0x4cea7a
push 0
push 0
push 0x14a
push 0x4d3f08
push 0x48
call fcn.0046bf00
jmp 0x452945
xor eax, eax
mov byte [ebp - 4], 0xc
mov dword [0x4f3bbc], eax
mov ecx, esi
call fcn.0046e8f0
mov ecx, dword [0x4f3bbc]
lea ecx, [ecx + 0xd0]
call fcn.0046e8e0
mov eax, dword [ebp - 0x18]
lea ecx, [ebp + 0x10]
push dword [eax]
call fcn.00418b90
mov byte [ebp - 4], 0x11
mov ecx, dword [0x4f3bbc]
push dword [eax]
mov esi, dword [ecx]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4d3f9c
push dword [0x4f3bbc]
call dword [esi + 0x48]
mov byte [ebp - 4], 0xc
add esp, 0x10
mov edx, dword [ebp + 0x10]
or ecx, 0xffffffff
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4529ba
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [0x4f3bbc]
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [0x4f3bbc]
lea ecx, [ecx + 0xd0]
call fcn.0046e8f0
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 0x4529fb
movzx eax, ax
or eax, 0x80070000
test esi, esi
jne 0x452a10
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push 0x4e6654
push eax
call fcn.0047ad64
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x452a1d
push edi
call esi
test ebx, ebx
je 0x452a24
push ebx
call esi
mov byte [ebp - 4], 0
or ecx, 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x452a45
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