Function at 0x412810
Capabilities:
Create service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49b218
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x4cb06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
cmp dword [edi + 0x10], 0
lea ebx, [edi + 0x10]
jne 0x4128ef
lea ecx, [ebp - 0x4c]
call fcn.0044e680
mov dword [ebp - 4], 0
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x412865
mov eax, dword [eax]
push ecx
mov edx, eax
mov ecx, 0x4cf1e0
call fcn.0040bda0
add esp, 4
mov edx, str.d:jenkinsworkspace_a_mb4_mbsetup_srcmbsetupinstallerservicefactory.cpp
mov ecx, eax
call fcn.0040ab10
mov edx, str.:.
mov ecx, eax
call fcn.0040ab10
push 0x133
mov ecx, eax
call fcn.00407be0
mov edx, str.:_Error___empty_service_path
mov ecx, eax
call fcn.0040ab10
push eax
call fcn.0040ae80
mov edx, dword [ebp - 0x38]
add esp, 4
cmp edx, 8
jb 0x4128e8
mov ecx, dword [ebp - 0x4c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4128de
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412c55
push edx
push ecx
call fcn.0045d989
add esp, 8
xor al, al
jmp 0x412c37
push 0x60000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 4], 1
test esi, esi
jne 0x412986
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x4c]
mov esi, eax
call fcn.0044e680
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x41292d
mov eax, dword [eax]
push ecx
mov edx, eax
mov ecx, 0x4cf1e0
call fcn.0040bda0
add esp, 4
mov edx, str.d:jenkinsworkspace_a_mb4_mbsetup_srcmbsetupinstallerservicefactory.cpp
mov ecx, eax
call fcn.0040ab10
mov edx, str.:.
mov ecx, eax
call fcn.0040ab10
push 0x13b
mov ecx, eax
call fcn.00407be0
mov edx, 0x4b1c08
mov ecx, eax
call fcn.0040ab10
mov edx, str.Error_opening_SCM:
mov ecx, eax
call fcn.0040ab10
push esi
mov ecx, eax
call fcn.004167c0
jmp 0x4128a5
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 3
mov eax, edi
mov ecx, dword [edi + 0x14]
cmp ecx, 8
jb 0x4129aa
mov eax, dword [edi]
cmp word [eax], 0x22
jne 0x4129cb
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x4129fc
cmp ecx, 8
jb 0x4129be
mov edi, dword [edi]
push dword [ebx]
lea ecx, [ebp - 0x28]
push edi
call fcn.00407780
jmp 0x4129fc
push 1
push 0x4b20a8
lea ecx, [ebp - 0x28]
call fcn.00407780
cmp dword [edi + 0x14], 8
jb 0x4129e2
mov edi, dword [edi]
push dword [ebx]
lea ecx, [ebp - 0x28]
push edi
call fcn.00417a80
push 1
push 0x4b20a8
lea ecx, [ebp - 0x28]
call fcn.00417a80
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0x4b165c
cmovae eax, dword [ebp - 0x28]
push 0
push 0
push 0
push 0
push eax
push 1
push 2
push 0x10
push 0xf01ff
push 0x4b20ac
push str.MBAMInstallerService
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
mov dword [ebp - 0x30], edi
mov byte [ebp - 4], 4
test edi, edi
jne 0x412b22
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
push esi
call ebx
lea ecx, [ebp - 0x4c]
call fcn.0044e680
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x412a6a
mov eax, dword [eax]
push ecx
mov edx, eax
mov ecx, 0x4cf1e0
call fcn.0040bda0
add esp, 4
mov edx, str.d:jenkinsworkspace_a_mb4_mbsetup_srcmbsetupinstallerservicefactory.cpp
mov ecx, eax
call fcn.0040ab10
mov edx, str.:.
mov ecx, eax
call fcn.0040ab10
push 0x15f
mov ecx, eax
call fcn.00407be0
mov edx, 0x4b1c08
mov ecx, eax
call fcn.0040ab10
mov edx, str.Error_creating
mov ecx, eax
call fcn.0040ab10
mov edx, str.MBAMInstallerService
mov ecx, eax
call fcn.00416990
mov edx, str.__status:
mov ecx, eax
call fcn.0040ab10
push edi
mov ecx, eax
call fcn.004167c0
push eax
call fcn.0040ae80
mov edx, dword [ebp - 0x38]
add esp, 4
cmp edx, 8
jb 0x412b19
mov ecx, dword [ebp - 0x4c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x412b0f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412c55
push edx
push ecx
call fcn.0045d989
add esp, 8
mov byte [ebp - 0x31], 0
jmp 0x412be7
lea ecx, [ebp - 0x64]
call fcn.0044e680
mov byte [ebp - 4], 6
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x412b39
mov eax, dword [eax]
push ecx
mov edx, eax
mov ecx, 0x4cf1e0
call fcn.0040bda0
add esp, 4
mov edx, str.d:jenkinsworkspace_a_mb4_mbsetup_srcmbsetupinstallerservicefactory.cpp
mov ecx, eax
call fcn.0040ab10
mov edx, str.:.
mov ecx, eax
call fcn.0040ab10
push 0x164
mov ecx, eax
call fcn.00407be0
mov edx, 0x4b1c08
mov ecx, eax
call fcn.0040ab10
mov edx, str.Created_service
mov ecx, eax
call fcn.0040ab10
mov edx, str.MBAMInstallerService
mov ecx, eax
call fcn.00416990
push eax
call fcn.0040ae80
mov edx, dword [ebp - 0x50]
add esp, 4
cmp edx, 8
jb 0x412bd4
mov ecx, dword [ebp - 0x64]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x412bca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412c55
push edx
push ecx
call fcn.0045d989
add esp, 8
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call ebx
push esi
call ebx
push edi
mov byte [ebp - 0x31], 1
call ebx
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x412c1d
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x412c13
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412c55
push edx
push ecx
call fcn.0045d989
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
push esi
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call ebx
mov al, byte [ebp - 0x31]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045d468
mov esp, ebp
pop ebp
ret 4
call fcn.004786bc
int3