Function at 0x1004715
Capabilities:
Create service
Delete service
Modify service

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
or dword [ebp - 0xc], 0xffffffff
xor ecx, ecx
push ebx
xor eax, eax
inc eax
push esi
push edi
mov dword [ebp - 0x10], 3
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 8], ecx
cmp dword [ebp + 0x14], ecx
jbe 0x1004b6c
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
mov dword [ebp - 4], eax
mov edi, dword [ebp - 8]
mov eax, dword [ebp + 0x10]
shl edi, 2
lea ebx, [edi + eax]
push 0x1001ae0
push dword [ebx]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004853
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 4], eax
jae 0x1004853
cmp dword [ebp - 0xc], 0xffffffff
jne 0x1004798
and dword [ebp - 0xc], 0
mov eax, dword [ebp + 0x10]
lea edi, [edi + eax + 4]
push 0x1001ad8
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10047b7
or dword [ebp - 0xc], 0x10
jmp 0x100483d
push 0x1001acc
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10047cc
or dword [ebp - 0xc], 0x20
jmp 0x100483d
push 0x1001ab8
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10047e4
or dword [ebp - 0xc], 0x100
jmp 0x100483d
push 0x1001aa8
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10047f9
or dword [ebp - 0xc], 1
jmp 0x100483d
push 0x1001a98
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x100480e
or dword [ebp - 0xc], 2
jmp 0x100483d
push 0x1001a90
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004823
or dword [ebp - 0xc], 8
jmp 0x100483d
push 0x1001a78
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004bb6
or dword [ebp - 0xc], 0x2f309a20
cmp dword [ebp - 0xc], 0
jne 0x1004b4e
mov dword [ebp - 0xc], 0x10
jmp 0x1004b4e
push 0x1001a68
push dword [ebx]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x100493d
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 4], eax
jae 0x100493d
mov eax, dword [ebp + 0x10]
lea edi, [edi + eax + 4]
push 0x1001a5c
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004890
and dword [ebp - 0x10], eax
jmp 0x1004b4e
push 0x1001a4c
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10048ab
mov dword [ebp - 0x10], 1
jmp 0x1004b4e
push 0x1001a40
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10048c6
mov dword [ebp - 0x10], 2
jmp 0x1004b4e
push 0x1001a30
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10048e1
mov dword [ebp - 0x10], 3
jmp 0x1004b4e
push 0x1001a1c
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10048fc
mov dword [ebp - 0x10], 4
jmp 0x1004b4e
push 0x1001a00
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x100491e
mov dword [ebp - 0x10], 2
mov dword [ebp - 0x34], 1
jmp 0x1004b4e
push 0x1001a78
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004bcc
mov dword [ebp - 0x10], 0xd0034911
jmp 0x1004b4e
push 0x10019f0
push dword [ebx]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10049ea
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 4], eax
jae 0x10049ea
mov eax, dword [ebp + 0x10]
lea edi, [edi + eax + 4]
push 0x10019e0
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x100497e
mov dword [ebp - 0x14], 1
jmp 0x1004b4e
push 0x10019d0
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004999
mov dword [ebp - 0x14], 2
jmp 0x1004b4e
push 0x10019ac
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10049b4
mov dword [ebp - 0x14], 3
jmp 0x1004b4e
push 0x10019c0
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x10049cb
and dword [ebp - 0x14], eax
jmp 0x1004b4e
push 0x1001a78
push dword [edi]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004bd3
mov dword [ebp - 0x14], 0xd74550
jmp 0x1004b4e
push 0x1001998
push dword [ebx]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004a10
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jae 0x1004a10
mov eax, dword [ebp + 0x10]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0x2c], eax
jmp 0x1004b4e
push 0x1001988
push dword [ebx]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004a36
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jae 0x1004a36
mov eax, dword [ebp + 0x10]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0x28], eax
jmp 0x1004b4e
push 0x100197c
push dword [ebx]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004a70
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 4], eax
jae 0x1004a70
mov eax, dword [ebp + 0x10]
push 0x1001974
push dword [edi + eax + 4]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004b4e
lea eax, [ebp - 0x38]
mov dword [ebp - 0x24], eax
jmp 0x1004b4e
push 0x1001928
push dword [ebx]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004a96
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jae 0x1004a96
mov eax, dword [ebp + 0x10]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0x30], eax
jmp 0x1004b4e
push 0x1001964
push dword [ebx]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004b06
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 4], eax
jae 0x1004b06
mov eax, dword [ebp + 0x10]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0x3c], eax
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x1004aba
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
lea edi, [eax + 2]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x1004bda
push dword [ebp - 0x3c]
push edi
push ebx
call fcn.01002c37
jmp 0x1004afe
cmp word [ebx], 0x2f
jne 0x1004afc
xor eax, eax
mov word [ebx], ax
inc ebx
inc ebx
cmp word [ebx], 0
jne 0x1004af1
jmp 0x1004b4e
push 0x1001958
push dword [ebx]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004b29
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jae 0x1004b29
mov eax, dword [ebp + 0x10]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0x1c], eax
jmp 0x1004b4e
push 0x1001944
push dword [ebx]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1004bc0
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jae 0x1004bc0
mov eax, dword [ebp + 0x10]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0x18], eax
inc dword [ebp - 8]
inc dword [ebp - 4]
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
inc dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jb 0x1004763
cmp dword [ebp - 0xc], 0xffffffff
jne 0x1004b73
mov dword [ebp - 0xc], 0x10
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push 0xf01ff
push dword [ebp - 0x30]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
jne 0x1004bed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1001c2c
jmp 0x1004be6
push 0x1001ae0
call fcn.010031a6
call fcn.0100307a
pop edi
pop esi
pop ebx
leave
ret 0x10
push 0x1001a68
jmp 0x1004bbb
push 0x10019f0
jmp 0x1004bbb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10018e8
call fcn.010030bb
jmp 0x1004bc5
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x1004c49
mov dword [ebp + 0x14], eax
lea eax, [ebp + 0x14]
push eax
push 3
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1004c49
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
mov ebx, eax
test ebx, ebx
je 0x1004c49
push ebx
push 0x1001800
call fcn.010030bb
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1004c3b
call esi
push eax
push 0x1001c10
call fcn.010030bb
mov ebx, eax
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
jmp 0x1004bc5
push 0x1001c2c
call fcn.010030a2
cmp dword [ebp - 0xc], 0xffffffff
je 0x1004c70
test dword [ebp - 0xc], 0x100
je 0x1004c70
lea eax, [ebp + 0xc]
push eax
push 0x84
call fcn.01002c72
xor ebx, ebx
jmp 0x1004c3b