Function at 0x4012d0
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x400
lea eax, [ebp - 0x504]
mov esi, ecx
push 0
push eax
call fcn.0040bf00
push pe_nt_image_headers32
lea eax, [ebp - 0x104]
push 0
push eax
call fcn.0040bf00
add esp, 0x18
test esi, esi
je 0x4015b6
cmp dword [esi + 4], 4
jne 0x4015b6
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4015b6
push 9
mov edx, str.vcruntime
call fcn.00408b60
add esp, 4
test eax, eax
je 0x4015b6
cmp dword [eax + 4], 5
jne 0x4015b6
push ebx
mov ebx, dword [eax + 8]
mov dword [ebp - 0x50c], ebx
test ebx, ebx
je 0x4015b5
push edi
push 0xf003f
push 0
push 0
mov dword [ebp - 0x508], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x401452
push 0xf01ff
push str.msiserver
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x401445
lea eax, [ebp - 0x508]
push eax
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x40143e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40143e
mov eax, dword [ebp - 0x508]
add eax, 0x20
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x40143e
lea eax, [ebp - 0x508]
push eax
push dword [ebp - 0x508]
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x401437
push dword [esi + 0x20]
lea eax, [esi + 0x14]
mov dword [esi + 4], 2
push 0
push dword [esi + 0x1c]
push dword [esi + 0x18]
push eax
push dword [esi + 0x10]
push dword [esi + 0xc]
push dword [esi + 8]
push 2
push dword [esi]
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
je 0x401437
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push edi
call esi
jmp 0x40144c
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [ebp - 0x50c]
mov esi, dword [ebx + 8]
mov dword [ebp - 0x508], esi
xor esi, esi
mov ecx, dword [ebp - 0x508]
test ecx, ecx
je 0x4015b4
nop dword [eax + eax]
cmp esi, dword [ebx + 8]
jae 0x4015ab
mov eax, dword [ebx + 4]
mov eax, dword [eax + esi*4]
test eax, eax
je 0x4015ab
cmp dword [eax + 4], 4
jne 0x4015ab
mov edi, dword [eax + 8]
test edi, edi
je 0x4015ab
push 3
mov edx, 0x42dd18
mov ecx, edi
call fcn.00408b60
add esp, 4
test eax, eax
je 0x4015a5
xor edx, edx
lea ecx, [eax + 8]
cmp dword [eax + 4], 2
cmovne ecx, edx
test ecx, ecx
je 0x4015a5
mov eax, dword [ecx]
test eax, eax
je 0x4015a5
push eax
mov edx, 0x200
lea ecx, [ebp - 0x504]
call fcn.004085d0
xor eax, eax
add esp, 4
mov word [ebp - 0x106], ax
cmp ax, word [ebp - 0x504]
je 0x4015a5
push 4
mov edx, str.uuid
mov ecx, edi
call fcn.00408b60
add esp, 4
test eax, eax
je 0x4015a5
xor edx, edx
lea ecx, [eax + 8]
cmp dword [eax + 4], 2
cmovne ecx, edx
test ecx, ecx
je 0x4015a5
mov eax, dword [ecx]
test eax, eax
je 0x4015a5
push eax
call dword [sym.imp.msi.dll_MsiRecordGetInteger]
cmp eax, 2
je 0x4015a5
cmp eax, 5
je 0x4015a5
push 5
mov edx, str.param
mov ecx, edi
call fcn.00408b60
add esp, 4
test eax, eax
je 0x401584
xor edx, edx
lea ecx, [eax + 8]
cmp dword [eax + 4], 2
cmovne ecx, edx
test ecx, ecx
je 0x401584
mov eax, dword [ecx]
test eax, eax
je 0x401584
push eax
mov edx, 0x80
lea ecx, [ebp - 0x104]
call fcn.004085d0
add esp, 4
xor eax, eax
mov word [ebp - 6], ax
jmp 0x40158d
xor eax, eax
mov word [ebp - 0x104], ax
push 0
push 1
lea edx, [ebp - 0x104]
lea ecx, [ebp - 0x504]
call section..text
add esp, 8
mov ecx, dword [ebp - 0x508]
inc esi
cmp esi, ecx
jb 0x401470
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040a851
mov esp, ebp
pop ebp
ret