Function at 0x408a3d
Capabilities:
Modify service

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
xor ebx, ebx
mov dword [ebp - 0x34], edx
push esi
mov esi, ebx
mov dword [ebp - 0x38], ecx
push edi
mov edi, ebx
mov dword [ebp - 0x18], ebx
push 2
pop eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0xc], esi
mov byte [ebp - 1], 1
mov byte [ebp - 2], bl
cmp dword [ebp + 0xc], ebx
jbe 0x408d0c
mov esi, dword [ebp + 8]
add esi, 4
mov dword [ebp - 8], 1
mov dword [ebp - 0x20], esi
push 0x4044b8
push dword [esi - 4]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x408adb
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 8], eax
jae 0x408adb
push 0x4044c8
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x408ac1
or dword [ebp - 0x24], 0xffffffff
jmp 0x408acd
push dword [esi]
call dword [sym.imp.msvcrt.dll__wtol]
pop ecx
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x14]
xor edx, edx
inc edx
mov dword [ebp - 0x18], edx
jmp 0x408c81
push 0x4044dc
push dword [esi - 4]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x408afe
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jae 0x408afe
mov ecx, dword [esi]
mov dword [ebp - 0x28], ecx
jmp 0x408b1f
push 0x4044ec
push dword [esi - 4]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x408b2a
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jae 0x408b2a
mov ecx, dword [esi]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
jmp 0x408c84
push 0x404500
push dword [esi - 4]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x408ce9
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 8], eax
jae 0x408ce9
mov ecx, dword [esi]
movzx eax, word [ecx]
test ax, ax
je 0x408b73
push 0x2f
mov edx, eax
pop esi
cmp dx, si
jne 0x408b63
inc edi
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x408b5d
mov esi, dword [ebp - 0x20]
lea eax, [edi + 2]
shr eax, 1
shl eax, 3
push eax
push 0x40
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x408cd2
mov edi, dword [esi]
mov ecx, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x408b9c
sub ecx, edx
sar ecx, 1
push 0x2f
lea eax, [edi + ecx*2]
mov dword [ebp - 0x30], eax
pop ecx
mov word [eax], cx
cmp edi, eax
ja 0x408c75
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
cmp word [edi], cx
jne 0x408c65
xor eax, eax
mov word [edi], ax
cmp byte [ebp - 1], al
je 0x408c3c
push 0x40455c
push ebx
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x408bfa
mov eax, dword [ebp - 0xc]
or dword [ebp - 0x1c], 0x10
mov dword [eax + esi*8], 1
jmp 0x408c54
push 0x40456c
push ebx
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x408c1c
mov eax, dword [ebp - 0xc]
mov byte [ebp - 2], 1
mov dword [eax + esi*8], 2
jmp 0x408c54
push 0x40457c
push ebx
call dword [sym.imp.msvcrt.dll__wcsicmp]
neg eax
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
sbb eax, eax
and eax, 0xfffffffd
add eax, 3
mov dword [ecx + esi*8], eax
jmp 0x408c54
push ebx
call dword [sym.imp.msvcrt.dll__wtol]
mov edx, dword [ebp - 0x10]
pop ecx
mov ecx, dword [ebp - 0xc]
mov dword [ecx + edx*8 + 4], eax
inc edx
mov dword [ebp - 0x10], edx
mov esi, edx
cmp byte [ebp - 1], 0
lea ebx, [edi + 2]
mov eax, dword [ebp - 0x30]
push 0x2f
sete byte [ebp - 1]
pop ecx
add edi, 2
cmp edi, eax
jbe 0x408bc5
mov esi, dword [ebp - 0x20]
xor ebx, ebx
mov edi, dword [ebp - 0x10]
xor ecx, ecx
mov edx, dword [ebp - 0x18]
inc ecx
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 8]
add eax, 2
add esi, 8
mov dword [ebp - 8], eax
dec eax
mov dword [ebp - 0x20], esi
cmp eax, dword [ebp + 0xc]
jb 0x408a8c
cmp edx, ecx
je 0x408cab
cmp byte [0x40ebc4], 1
jne 0x408cfc
push 0x6e
jmp 0x408cf4
cmp byte [ebp - 2], 0
je 0x408d06
lea eax, [ebp - 3]
push eax
push ebx
push 1
push 0x13
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
test eax, eax
jns 0x408d06
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, 0x404588
jmp 0x408cdd
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, 0x404518
mov edx, eax
call fcn.0040889b
jmp 0x408d88
cmp byte [0x40ebc4], 1
jne 0x408cfc
push 0x6a
xor edx, edx
pop ecx
call fcn.0040a4ce
call fcn.0040899c
jmp 0x408d88
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0xc]
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call dword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
mov ecx, eax
mov eax, dword [ebp + 0x10]
mov dword [eax], ecx
test ecx, ecx
jne 0x408d31
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, 0x401478
jmp 0x408cdd
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x4c]
push eax
push 2
push ecx
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], esi
call dword [sym.imp.api_ms_win_service_management_l2_1_0.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x408d74
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
test ebx, ebx
je 0x408d74
mov edx, ebx
mov ecx, 0x40448c
call fcn.0040889b
jmp 0x408d86
push 0x64
lea edx, [ebp - 0x38]
mov dword [ebp - 0x38], 0x40448c
pop ecx
call fcn.0040a4ce
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc