Function at 0x40984e
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42d6d3
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
push ebx
push esi
push edi
mov eax, dword [0x43931c]
xor eax, esp
push eax
lea eax, [esp + 0xc8]
mov dword fs:[0], eax
mov esi, ecx
push 0xf003f
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [esp + 0x14], eax
cmp eax, edi
jne 0x40992b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x58]
push eax
call fcn.0040f625
mov esi, eax
lea eax, [esp + 0x24]
push 0x517
push eax
mov dword [esp + 0xe0], edi
call fcn.0040f625
push 0x431adc
push eax
xor ebx, ebx
lea eax, [esp + 0x50]
inc ebx
push eax
mov byte [esp + 0xec], bl
call fcn.00404724
mov ecx, esp
mov dword [esp + 0x30], esp
push esi
push eax
push ecx
mov byte [esp + 0xf8], 2
call fcn.0040476a
add esp, 0xc
push 2
call fcn.0040f31c
add esp, 0x20
push edi
push ebx
lea esi, [esp + 0x40]
call fcn.004036ef
push edi
push ebx
lea esi, [esp + 0x24]
call fcn.004036ef
lea esi, [esp + 0x54]
push edi
push ebx
call fcn.004036ef
xor al, al
jmp 0x409adf
cmp dword [esi + 0x34], 8
jb 0x409936
mov eax, dword [esi + 0x20]
jmp 0x409939
lea eax, [esi + 0x20]
push 2
push eax
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
cmp ebx, edi
jne 0x4099eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040f625
mov esi, eax
lea eax, [esp + 0x24]
push 0x518
push eax
mov dword [esp + 0xe0], 3
call fcn.0040f625
push 0x431adc
push eax
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0xec], 4
call fcn.00404724
mov ecx, esp
mov dword [esp + 0x34], esp
push esi
push eax
push ecx
mov byte [esp + 0xf8], 5
call fcn.0040476a
add esp, 0xc
push 2
call fcn.0040f31c
add esp, 0x20
xor ebx, ebx
push edi
inc ebx
push ebx
lea esi, [esp + 0x5c]
call fcn.004036ef
push edi
push ebx
lea esi, [esp + 0x24]
call fcn.004036ef
push edi
push ebx
lea esi, [esp + 0x40]
call fcn.004036ef
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x409924
cmp dword [esi + 0x50], 8
jb 0x4099f6
mov ecx, dword [esi + 0x3c]
jmp 0x4099f9
lea ecx, [esi + 0x3c]
cmp dword [esi + 0x18], 8
jb 0x409a04
mov eax, dword [esi + 4]
jmp 0x409a07
lea eax, [esi + 4]
push ecx
push edi
push edi
push edi
push edi
push edi
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
push ebx
test eax, eax
jne 0x409aca
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [esp + 0x14]
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0xac]
push eax
call fcn.0040f625
mov esi, eax
lea eax, [esp + 0x94]
push 0x593
push eax
mov dword [esp + 0xe0], 6
call fcn.0040f625
push 0x431adc
push eax
lea eax, [esp + 0x88]
push eax
mov byte [esp + 0xec], 7
call fcn.00404724
mov ecx, esp
mov dword [esp + 0x34], esp
push esi
push eax
push ecx
mov byte [esp + 0xf8], 8
call fcn.0040476a
xor ebx, ebx
add esp, 0xc
inc ebx
push ebx
call fcn.0040f31c
add esp, 0x20
push edi
push ebx
lea esi, [esp + 0x78]
call fcn.004036ef
push edi
push ebx
lea esi, [esp + 0x94]
call fcn.004036ef
lea esi, [esp + 0xa8]
jmp 0x40991d
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push dword [esp + 0x14]
call edi
mov ecx, esi
call fcn.00409081
mov ecx, dword [esp + 0xc8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret