Function at 0x1004f14
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
or dword [ebp - 0xc], 0xffffffff
or dword [ebp - 0x10], 0xffffffff
or dword [ebp - 0x14], 0xffffffff
push ebx
xor ebx, ebx
cmp dword [ebp + 0x14], ebx
push esi
push edi
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 8], ebx
jbe 0x100533a
mov esi, dword [sym.imp.msvcrt.dll__wcsicmp]
mov dword [ebp - 4], 1
mov edi, dword [ebp - 8]
mov eax, dword [ebp + 0x10]
shl edi, 2
lea ebx, [edi + eax]
push 0x10028e4
push dword [ebx]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x100505b
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 4], eax
jae 0x100505b
cmp dword [ebp - 0xc], 0xffffffff
jne 0x1004f8e
and dword [ebp - 0xc], 0
mov eax, dword [ebp + 0x10]
lea edi, [edi + eax + 4]
push 0x10028dc
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1004fad
or dword [ebp - 0xc], 0x10
jmp 0x1005048
push 0x10028d0
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1004fc5
or dword [ebp - 0xc], 0x20
jmp 0x1005048
push 0x10028bc
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1004fda
or byte [ebp - 0xb], 1
jmp 0x1005048
push 0x10028ac
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1004fef
or dword [ebp - 0xc], 1
jmp 0x1005048
push 0x100289c
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005004
or dword [ebp - 0xc], 2
jmp 0x1005048
push 0x1002894
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005019
or dword [ebp - 0xc], 8
jmp 0x1005048
push 0x1002888
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x100502e
or dword [ebp - 0xc], 4
jmp 0x1005048
push 0x100287c
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x100536b
or dword [ebp - 0xc], 0x2f309a20
cmp dword [ebp - 0xc], 0
jne 0x1005320
or dword [ebp - 0xc], 0xffffffff
jmp 0x1005320
push 0x100286c
push dword [ebx]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005123
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 4], eax
jae 0x1005123
mov eax, dword [ebp + 0x10]
lea edi, [edi + eax + 4]
push 0x1002860
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005098
and dword [ebp - 0x10], eax
jmp 0x1005320
push 0x1002850
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10050b3
mov dword [ebp - 0x10], 1
jmp 0x1005320
push 0x1002844
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10050ce
mov dword [ebp - 0x10], 2
jmp 0x1005320
push 0x1002834
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10050e9
mov dword [ebp - 0x10], 3
jmp 0x1005320
push 0x1002820
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005104
mov dword [ebp - 0x10], 4
jmp 0x1005320
push 0x100287c
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005381
mov dword [ebp - 0x10], 0xd0034911
jmp 0x1005320
push 0x1002810
push dword [ebx]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10051d0
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 4], eax
jae 0x10051d0
mov eax, dword [ebp + 0x10]
lea edi, [edi + eax + 4]
push 0x1002800
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005164
mov dword [ebp - 0x14], 1
jmp 0x1005320
push 0x10027f0
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x100517f
mov dword [ebp - 0x14], 2
jmp 0x1005320
push 0x10027e0
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005196
and dword [ebp - 0x14], eax
jmp 0x1005320
push 0x10027cc
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10051b1
mov dword [ebp - 0x14], 3
jmp 0x1005320
push 0x100287c
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005388
mov dword [ebp - 0x14], 0xd74550
jmp 0x1005320
push 0x10027b8
push dword [ebx]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10051f6
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jae 0x10051f6
mov eax, dword [ebp + 0x10]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0x30], eax
jmp 0x1005320
push 0x10027a8
push dword [ebx]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x100521c
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jae 0x100521c
mov eax, dword [ebp + 0x10]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0x2c], eax
jmp 0x1005320
push 0x100279c
push dword [ebx]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005256
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 4], eax
jae 0x1005256
mov eax, dword [ebp + 0x10]
push 0x1002794
push dword [edi + eax + 4]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005320
lea eax, [ebp - 0x34]
mov dword [ebp - 0x28], eax
jmp 0x1005320
push 0x1002784
push dword [ebx]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10052b9
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 4], eax
jae 0x10052b9
mov eax, dword [ebp + 0x10]
mov edi, dword [edi + eax + 4]
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [eax + eax + 2]
pop ecx
add eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x24], ebx
je 0x100538f
push edi
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
xor eax, eax
jmp 0x10052b2
cmp word [ebx], 0x2f
jne 0x10052b0
mov word [ebx], ax
inc ebx
inc ebx
cmp word [ebx], ax
jne 0x10052a7
jmp 0x1005320
push 0x1002778
push dword [ebx]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10052dc
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jae 0x10052dc
mov eax, dword [ebp + 0x10]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0x20], eax
jmp 0x1005320
push 0x1002764
push dword [ebx]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x10052ff
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jae 0x10052ff
mov eax, dword [ebp + 0x10]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0x1c], eax
jmp 0x1005320
push 0x1002748
push dword [ebx]
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005377
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x14]
jae 0x1005377
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 0x1004f59
xor ebx, ebx
push 2
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
jne 0x10053a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.010046fc
push eax
push esi
push 0x1001674
jmp 0x1005408
push 0x1002730
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
call fcn.01004d8f
jmp 0x1005411
push 0x1002718
jmp 0x1005370
push 0x1002700
jmp 0x1005370
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.010046fc
push eax
push esi
push 0x10026c8
jmp 0x1005408
push dword [ebp - 0x18]
mov edi, dword [ebp - 0x28]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push edi
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x10053dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jne 0x10053fb
mov esi, dword [sym.imp.msvcrt.dll_printf]
push 0x10026a4
call esi
cmp edi, ebx
pop ecx
je 0x1005411
push dword [edi]
push 0x1002694
call esi
pop ecx
pop ecx
jmp 0x1005411
push esi
call fcn.010046fc
push eax
push esi
push 0x1002668
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x14