Function at 0x40ec60
Capabilities:
Modify service

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x10]
push edi
xor edi, edi
cmp esi, edi
jne 0x40ec78
lea eax, [edi + 1]
pop edi
pop esi
add esp, 8
ret
mov eax, dword [esi + 0x8414]
and eax, 0x100
or eax, 0x10
mov dword [esi + 0x8414], eax
mov eax, dword [esi + 0x8400]
sub eax, 2
je 0x40ecb0
sub eax, 1
je 0x40eca6
mov dword [esp + 8], 2
jmp 0x40ecb8
mov dword [esp + 8], 4
jmp 0x40ecb8
mov dword [esp + 8], 3
cmp word [esi + 0x202], di
push ebx
lea ebx, [esi + 0x202]
jne 0x40ece1
lea ecx, [esi + 2]
push ecx
push 0x41d4b4
push 0xffffffffffffffff
push 0x100
push ebx
call fcn.00412731
add esp, 0x14
push ebp
xor ebp, ebp
mov dword [esp + 0x1c], edi
cmp dword [esi + 0x8408], edi
je 0x40ed1c
mov ebp, dword [esi + 0x8404]
lea edx, [esp + 0x1c]
push edx
push ebp
call fcn.00401580
add esp, 8
test eax, eax
jne 0x40edc1
cmp dword [esi + 0x8410], edi
je 0x40ed2c
mov edi, dword [esi + 0x840c]
jmp 0x40ed2c
cmp byte [esp + 0x20], 0
je 0x40ed2c
mov ebp, str.LocalSystem
mov dword [esp + 0x1c], ebp
mov eax, dword [esp + 0x1c]
push eax
call fcn.00401790
add esp, 4
test eax, eax
je 0x40edce
mov edi, 0x41e5d8
cmp dword [esi + 0x4040c], 0
mov eax, 0x41e5d8
je 0x40ed56
xor eax, eax
mov edx, dword [esp + 0x1c]
mov ecx, dword [esi + 0x8414]
push ebx
push edi
push edx
mov edx, dword [esi + 0x70494]
push eax
mov eax, dword [esp + 0x20]
push 0
push 0
push 0
push 0xffffffffffffffff
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
mov eax, dword [esp + 0x1c]
jne 0x40ee03
cmp eax, ebp
je 0x40ed9b
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004052c0
add esp, 4
push eax
push 0x4000020b
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00405470
add esp, 0xc
pop ebp
pop ebx
pop edi
mov eax, 5
pop esi
add esp, 8
ret
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.004017f0
add esp, 4
test eax, eax
je 0x40ed46
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x40edfb
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebp
push 0x40000205
jmp 0x40edb0
cmp eax, ebp
je 0x40ee17
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esi + 0x4040c], 0
je 0x40ee3e
mov eax, dword [esi + 0x40408]
mov ecx, dword [esi + 0x70494]
push eax
push ecx
lea edx, [esi + 2]
push edx
call fcn.0040ce10
add esp, 0xc
test eax, eax
jne 0x40edc1
cmp word [esi + 0x402], 0
lea eax, [esi + 0x402]
jne 0x40ee55
cmp byte [esp + 0x20], 0
je 0x40ee69
push eax
mov eax, dword [esi + 0x70494]
push eax
lea ecx, [esi + 2]
push ecx
call fcn.0040d4c0
add esp, 0xc
mov ecx, dword [esi + 0x70494]
xor edx, edx
cmp dword [esi + 0x8400], 1
lea eax, [esp + 0x14]
sete dl
push eax
push 3
push ecx
mov dword [esp + 0x20], edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x40eebb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7c
je 0x40eebb
push 0
push eax
call fcn.004052c0
add esp, 4
push eax
lea edx, [esi + 2]
push edx
push 0x40000429
push 1
call fcn.00405400
add esp, 0x14
cmp byte [esi], 0
jne 0x40eefe
mov eax, dword [esp + 0x20]
push eax
push esi
call fcn.0040b700
add esp, 8
test eax, eax
je 0x40eef5
push 0x4000021d
call fcn.0041257c
add eax, 0x40
push eax
call fcn.00405470
add esp, 8
pop ebp
pop ebx
pop edi
mov eax, 6
pop esi
add esp, 8
ret
push esi
call fcn.0040e450
add esp, 4
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 8
ret