Function at 0x407a6b
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42b13c
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
push ebx
push esi
push edi
mov eax, dword [0x43637c]
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 0x407b48
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x58]
push eax
call fcn.0040d24d
mov esi, eax
lea eax, [esp + 0x24]
push 0x517
push eax
mov dword [esp + 0xe0], edi
call fcn.0040d24d
push 0x42eacc
push eax
xor ebx, ebx
lea eax, [esp + 0x50]
inc ebx
push eax
mov byte [esp + 0xec], bl
call fcn.00402a83
mov ecx, esp
mov dword [esp + 0x30], esp
push esi
push eax
push ecx
mov byte [esp + 0xf8], 2
call fcn.00402ac9
add esp, 0xc
push 2
call fcn.0040cf44
add esp, 0x20
push edi
push ebx
lea esi, [esp + 0x40]
call fcn.004023e7
push edi
push ebx
lea esi, [esp + 0x24]
call fcn.004023e7
lea esi, [esp + 0x54]
push edi
push ebx
call fcn.004023e7
xor al, al
jmp 0x407cfc
cmp dword [esi + 0x34], 8
jb 0x407b53
mov eax, dword [esi + 0x20]
jmp 0x407b56
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 0x407c08
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.0040d24d
mov esi, eax
lea eax, [esp + 0x24]
push 0x518
push eax
mov dword [esp + 0xe0], 3
call fcn.0040d24d
push 0x42eacc
push eax
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0xec], 4
call fcn.00402a83
mov ecx, esp
mov dword [esp + 0x34], esp
push esi
push eax
push ecx
mov byte [esp + 0xf8], 5
call fcn.00402ac9
add esp, 0xc
push 2
call fcn.0040cf44
add esp, 0x20
xor ebx, ebx
push edi
inc ebx
push ebx
lea esi, [esp + 0x5c]
call fcn.004023e7
push edi
push ebx
lea esi, [esp + 0x24]
call fcn.004023e7
push edi
push ebx
lea esi, [esp + 0x40]
call fcn.004023e7
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x407b41
cmp dword [esi + 0x50], 8
jb 0x407c13
mov ecx, dword [esi + 0x3c]
jmp 0x407c16
lea ecx, [esi + 0x3c]
cmp dword [esi + 0x18], 8
jb 0x407c21
mov eax, dword [esi + 4]
jmp 0x407c24
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 0x407ce7
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.0040d24d
mov esi, eax
lea eax, [esp + 0x94]
push 0x593
push eax
mov dword [esp + 0xe0], 6
call fcn.0040d24d
push 0x42eacc
push eax
lea eax, [esp + 0x88]
push eax
mov byte [esp + 0xec], 7
call fcn.00402a83
mov ecx, esp
mov dword [esp + 0x34], esp
push esi
push eax
push ecx
mov byte [esp + 0xf8], 8
call fcn.00402ac9
xor ebx, ebx
add esp, 0xc
inc ebx
push ebx
call fcn.0040cf44
add esp, 0x20
push edi
push ebx
lea esi, [esp + 0x78]
call fcn.004023e7
push edi
push ebx
lea esi, [esp + 0x94]
call fcn.004023e7
lea esi, [esp + 0xa8]
jmp 0x407b3a
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push dword [esp + 0x14]
call edi
mov ecx, esi
call fcn.0040729e
mov ecx, dword [esp + 0xc8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret