Function at 0x45e338
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 0x45e591
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 0x45e38b
mov byte [ebp - 0xd], 0
push ebx
call sub.advapi32.dll_LockServiceDatabase
mov dword [ebp - 0x14], eax
xor edx, edx
push ebp
push 0x45e56f
push dword fs:[edx]
mov dword fs:[edx], esp
cmp dword [ebp - 0x14], 0
jne 0x45e3e9
call sub.kernel32.dll_GetLastError
cmp eax, 0x41f
je 0x45e3b8
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 0x45e3e0
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 0x45e407
mov byte [ebp - 0xd], 0
xor edx, edx
push ebp
push 0x45e548
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0xc]
cmp eax, 4
ja case.default.0x45e41d
jmp dword [eax*4 + 0x45e424]
xor esi, esi
jmp case.default.0x45e41d
mov esi, 1
jmp case.default.0x45e41d
mov esi, 2
jmp case.default.0x45e41d
mov esi, 3
jmp case.default.0x45e41d
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 0x45e47d
mov byte [ebp - 0xd], 0
push 0x45e5a4
call sub.kernel32.dll_GetModuleHandleW_1
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
setne al
test al, al
jne 0x45e4a4
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x45e576
xor edx, edx
push ebp
push 0x45e52a
push dword fs:[edx]
mov dword fs:[edx], esp
push 0x45e5c0
mov eax, dword [ebp - 0x20]
push eax
call fcn.00401b80
mov ebx, eax
test ebx, ebx
setne al
test al, al
jne 0x45e4df
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
call sub.rtl120.bpl__System__TryFinallyExit_qqrv
jmp 0x45e576
cmp dword [ebp - 8], 0
je 0x45e4f2
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov dword [ebp - 0x24], eax
jmp 0x45e4f7
xor eax, eax
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x24]
mov edx, dword [0x780ff0]
mov eax, dword [ebp - 0x1c]
call ebx
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x45e513
mov byte [ebp - 0xd], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45e531
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 0x45e598
lea eax, [ebp - 8]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret