Function at 0x10065ba
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
and byte [ebp - 2], 0
push ebx
push esi
xor eax, eax
xor esi, esi
cmp dword [ebp + 0x14], eax
push edi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 2
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], eax
mov byte [ebp - 1], 1
mov dword [ebp - 0xc], eax
jbe 0x10067f2
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], 1
mov ebx, edi
add edi, 4
mov dword [ebp - 0x28], ebx
push 0x100263c
push dword [ebx]
call fcn.01007db0
pop ecx
test eax, eax
pop ecx
jne 0x100664f
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 8], eax
jae 0x100664f
push 0x1002628
push dword [edi]
call fcn.01007db0
pop ecx
test eax, eax
pop ecx
jne 0x100663b
or dword [ebp - 0x20], 0xffffffff
jmp 0x1006646
push dword [edi]
call fcn.01007d40
pop ecx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x2c], 1
jmp 0x100668f
push 0x1002618
push dword [ebx]
call fcn.01007db0
pop ecx
test eax, eax
pop ecx
jne 0x1006670
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x14]
jae 0x1006670
mov eax, dword [edi]
mov dword [ebp - 0x30], eax
jmp 0x100668f
push 0x1002604
push dword [ebx]
call fcn.01007db0
pop ecx
test eax, eax
pop ecx
jne 0x10066a0
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x14]
jae 0x10066a0
mov eax, dword [edi]
mov dword [ebp - 0x34], eax
inc dword [ebp - 0xc]
add ebx, 4
add edi, 4
inc dword [ebp - 8]
jmp 0x10067d5
push 0x10025f0
push dword [ebx]
call fcn.01007db0
pop ecx
test eax, eax
pop ecx
jne 0x10068e6
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 8], eax
jae 0x10068e6
mov eax, dword [edi]
mov cx, word [eax]
test cx, cx
je 0x10066d9
cmp cx, 0x2f
jne 0x10066d5
inc dword [ebp - 0x10]
inc eax
inc eax
jmp 0x10066c4
mov eax, dword [ebp - 0x10]
add eax, 2
shr eax, 1
shl eax, 3
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov dword [ebp - 0x24], eax
je 0x10068cf
mov esi, dword [edi]
push esi
mov dword [ebp - 0x14], esi
call fcn.01007ed0
and dword [ebp - 0x10], 0
mov word [esi + eax*2], 0x2f
mov ax, word [esi]
pop ecx
test ax, ax
je 0x10067bf
mov ebx, dword [ebp - 0x24]
cmp ax, 0x2f
jne 0x10067ae
and word [esi], 0
cmp byte [ebp - 1], 0
je 0x100678b
push 0x10025e0
push dword [ebp - 0x14]
call fcn.01007db0
pop ecx
test eax, eax
pop ecx
jne 0x1006750
or dword [ebp - 0x1c], 0x10
mov dword [ebx], 1
jmp 0x100679d
push 0x10025d0
push dword [ebp - 0x14]
call fcn.01007db0
pop ecx
test eax, eax
pop ecx
jne 0x100676f
mov dword [ebx], 2
mov byte [ebp - 2], 1
jmp 0x100679d
push 0x10025c8
push dword [ebp - 0x14]
call fcn.01007db0
neg eax
sbb eax, eax
pop ecx
and al, 0xfd
pop ecx
add eax, 3
mov dword [ebx], eax
jmp 0x100679d
push dword [ebp - 0x14]
call fcn.01007d40
inc dword [ebp - 0x10]
mov dword [ebx + 4], eax
pop ecx
add ebx, 8
xor eax, eax
cmp byte [ebp - 1], al
sete al
mov byte [ebp - 1], al
lea eax, [esi + 2]
mov dword [ebp - 0x14], eax
inc esi
inc esi
mov ax, word [esi]
test ax, ax
jne 0x100671d
mov ebx, dword [ebp - 0x28]
inc dword [ebp - 0xc]
mov esi, dword [ebp - 0x24]
add ebx, 4
add edi, 4
inc dword [ebp - 8]
mov dword [ebp - 0x14], 1
inc dword [ebp - 0xc]
add ebx, 4
mov eax, dword [ebp - 0xc]
add edi, 4
inc dword [ebp - 8]
cmp eax, dword [ebp + 0x14]
mov dword [ebp - 0x28], ebx
jb 0x1006609
xor eax, eax
mov ecx, dword [ebp - 0x14]
cmp dword [ebp - 0x2c], ecx
je 0x100680f
push 0x1002580
call fcn.01007d70
pop ecx
call fcn.01007af3
jmp 0x10068c6
cmp byte [ebp - 2], 0
je 0x1006836
lea ecx, [ebp + 0x10]
push ecx
push eax
push 1
push 0x13
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
test eax, eax
jge 0x1006836
push eax
push 0x1002544
call fcn.01007d70
pop ecx
jmp 0x10068aa
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ecx, dword [ebp + 0x18]
test eax, eax
mov dword [ecx], eax
jne 0x1006865
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.010072bf
push eax
push esi
push 0x1001b60
jmp 0x10068be
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x48], ecx
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x3c], ecx
lea ecx, [ebp - 0x48]
push ecx
push 2
push eax
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x100689a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x10068ad
push 0x10024cc
call fcn.01007d70
pop ecx
jmp 0x10068c6
push dword [ebp - 0x18]
call fcn.010072bf
push eax
push dword [ebp - 0x18]
push 0x10024a0
call fcn.01007d70
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x14
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.010072bf
push eax
push esi
push 0x100250c
jmp 0x10068be
push 0x10024f0
jmp 0x10067ff