Function at 0x4edb38
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrAddRef_qqrpv
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x4edd91
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 1
xor esi, esi
xor eax, eax
mov dword [ebp - 0x1c], eax
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov ebx, eax
test ebx, ebx
jne 0x4edb8b
mov byte [ebp - 0xd], 0
push ebx
call sub.advapi32.dll_LockServiceDatabase
mov dword [ebp - 0x14], eax
xor edx, edx
push ebp
push 0x4edd6f
push dword fs:[edx]
mov dword fs:[edx], esp
cmp dword [ebp - 0x14], 0
jne 0x4edbe9
call sub.kernel32.dll_GetLastError
cmp eax, 0x41f
je 0x4edbb8
mov byte [ebp - 0xd], 0
push 0x10c
push 0x40
call sub.kernel32.dll_LocalAlloc_1
mov edi, eax
test edi, edi
lea eax, [ebp - 0x18]
push eax
push 0x10c
push edi
push ebx
call sub.advapi32.dll_QueryServiceLockStatusW
test eax, eax
jne 0x4edbe0
mov byte [ebp - 0xd], 0
cmp dword [edi], 0
push edi
call sub.kernel32.dll_LocalFree
push 2
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push ebx
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4edc07
mov byte [ebp - 0xd], 0
xor edx, edx
push ebp
push 0x4edd48
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0xc]
cmp eax, 4
ja case.default.0x4edc1d
jmp dword [eax*4 + 0x4edc24]
xor esi, esi
jmp case.default.0x4edc1d
mov esi, 1
jmp case.default.0x4edc1d
mov esi, 2
jmp case.default.0x4edc1d
mov esi, 3
jmp case.default.0x4edc1d
mov esi, 4
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push esi
push 0x110
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_ChangeServiceConfigW
test eax, eax
jne 0x4edc7d
mov byte [ebp - 0xd], 0
push 0x4edda4
call sub.kernel32.dll_GetModuleHandleW_1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
setne al
test al, al
jne 0x4edca4
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x4edd76
xor edx, edx
push ebp
push 0x4edd2a
push dword fs:[edx]
mov dword fs:[edx], esp
push 0x4eddc0
mov eax, dword [ebp - 0x20]
push eax
call fcn.00401c48
mov ebx, eax
test ebx, ebx
setne al
test al, al
jne 0x4edcdf
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x4edd76
cmp dword [ebp - 8], 0
je 0x4edcf2
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov dword [ebp - 0x24], eax
jmp 0x4edcf7
xor eax, eax
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x24]
mov edx, dword [0x597e6c]
mov eax, dword [ebp - 0x1c]
call ebx
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4edd13
mov byte [ebp - 0xd], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4edd31
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_FreeLibrary
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4edd98
lea eax, [ebp - 8]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret