Function at 0x100549a
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
xor ebx, ebx
and byte [ebp - 2], bl
push edi
xor edi, edi
cmp dword [ebp + 0x14], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], 2
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x10], edi
mov byte [ebp - 1], 1
mov dword [ebp - 0xc], edi
jbe 0x100572f
mov dword [ebp - 8], 1
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp + 0x10]
shl esi, 2
lea edi, [esi + eax]
push 0x1002a8c
push dword [edi]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x1005539
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 8], eax
jae 0x1005539
mov eax, dword [ebp + 0x10]
lea esi, [esi + eax + 4]
push 0x1002a78
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x1005521
or dword [ebp - 0x18], 0xffffffff
jmp 0x100552d
push dword [esi]
call dword [sym.imp.msvcrt.dll__wtol]
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], 1
jmp 0x10056a9
push 0x1002a68
push dword [edi]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x1005563
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x14]
jae 0x1005563
mov eax, dword [ebp + 0x10]
mov eax, dword [esi + eax + 4]
mov dword [ebp - 0x24], eax
jmp 0x10056a9
push 0x1002a54
push dword [edi]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x100558d
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0x14]
jae 0x100558d
mov eax, dword [ebp + 0x10]
mov eax, dword [esi + eax + 4]
mov dword [ebp - 0x28], eax
jmp 0x10056a9
push 0x1002a40
push dword [edi]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x10056f9
mov eax, dword [ebp + 0x14]
cmp dword [ebp - 8], eax
jae 0x10056f9
mov eax, dword [ebp + 0x10]
lea esi, [esi + eax + 4]
mov eax, dword [esi]
jmp 0x10055c4
cmp cx, 0x2f
jne 0x10055c2
inc ebx
inc eax
inc eax
mov cx, word [eax]
test cx, cx
jne 0x10055bb
add ebx, 2
shr ebx, 1
shl ebx, 3
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov dword [ebp - 0x10], eax
je 0x10056df
mov esi, dword [esi]
push esi
mov edi, esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov word [esi + eax*2], 0x2f
xor ebx, ebx
jmp 0x1005698
cmp word [esi], 0x2f
jne 0x1005696
and word [esi], 0
cmp byte [ebp - 1], 0
je 0x1005679
push 0x1002a30
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x1005637
mov eax, dword [ebp - 0x10]
or dword [ebp - 0x14], 0x10
mov dword [eax + ebx*8], 1
jmp 0x1005689
push 0x1002a20
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x1005659
mov eax, dword [ebp - 0x10]
mov dword [eax + ebx*8], 2
mov byte [ebp - 2], 1
jmp 0x1005689
push 0x1002a18
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
neg eax
sbb eax, eax
pop ecx
and eax, 0xfffffffd
pop ecx
mov ecx, dword [ebp - 0x10]
add eax, 3
mov dword [ecx + ebx*8], eax
jmp 0x1005689
push edi
call dword [sym.imp.msvcrt.dll__wtol]
pop ecx
mov ecx, dword [ebp - 0x10]
mov dword [ecx + ebx*8 + 4], eax
inc ebx
cmp byte [ebp - 1], 0
lea edi, [esi + 2]
sete al
mov byte [ebp - 1], al
inc esi
inc esi
cmp word [esi], 0
jne 0x1005601
mov dword [ebp - 0x1c], 1
inc dword [ebp - 0xc]
inc dword [ebp - 8]
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
inc dword [ebp - 8]
cmp eax, dword [ebp + 0x14]
jb 0x10054da
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0x20], eax
je 0x1005700
push 0x10029d0
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
call fcn.01004de7
jmp 0x10057b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.010046fc
push eax
push esi
push 0x1002998
jmp 0x10057b0
push 0x100297c
jmp 0x10056ce
cmp byte [ebp - 2], 0
je 0x100572d
lea eax, [ebp - 3]
push eax
push 0
push 1
push 0x13
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
test eax, eax
jge 0x100572d
push eax
push 0x1002940
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
jmp 0x10057b9
xor edi, edi
push dword [ebp - 0x14]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, edi
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
jne 0x100575e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.010046fc
push eax
push esi
push 0x1001674
jmp 0x10057b0
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x2c], ecx
lea ecx, [ebp - 0x3c]
push ecx
push 2
push eax
mov dword [ebp - 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1005796
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, edi
jne 0x10057a3
push 0x100291c
call dword [sym.imp.msvcrt.dll_printf]
jmp 0x1005727
push esi
call fcn.010046fc
push eax
push esi
push 0x10028f0
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x14