Function at 0x407ba2
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
push ebx
push esi
push edi
push 0x3b
pop edi
push edi
push dword [ebp + 8]
call fcn.0041c440
mov esi, eax
xor ebx, ebx
pop ecx
cmp esi, ebx
pop ecx
mov dword [ebp - 0x14], ebx
je 0x407cc9
push dword [ebp + 8]
lea eax, [ebp - 0x128]
mov byte [esi], bl
push eax
call fcn.0041bb30
inc esi
push edi
push esi
mov dword [ebp - 8], esi
call fcn.0041c440
add esp, 0x10
cmp eax, ebx
je 0x407cc9
mov byte [eax], bl
inc eax
push edi
push eax
mov dword [ebp - 0x20], eax
call fcn.0041c440
pop ecx
cmp eax, ebx
pop ecx
je 0x407cc9
lea esi, [eax + 1]
push edi
push esi
mov byte [eax], bl
mov dword [ebp - 0xc], esi
call fcn.0041c440
pop ecx
cmp eax, ebx
pop ecx
je 0x407cc9
cmp esi, ebx
mov byte [eax], bl
je 0x407c2f
cmp byte [esi], bl
jne 0x407c2f
mov dword [ebp - 0xc], ebx
lea esi, [eax + 1]
push edi
push esi
mov dword [ebp - 0x10], esi
call fcn.0041c440
pop ecx
cmp eax, ebx
pop ecx
je 0x407cc9
cmp esi, ebx
mov byte [eax], bl
je 0x407c53
cmp byte [esi], bl
jne 0x407c53
mov dword [ebp - 0x10], ebx
inc eax
push edi
push eax
mov dword [ebp - 4], eax
call fcn.0041c440
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
je 0x407cc9
push dword [ebp - 4]
mov byte [esi], bl
call fcn.0041c910
inc esi
push edi
push esi
mov dword [ebp + 8], eax
mov dword [ebp - 4], esi
call fcn.0041c440
mov esi, eax
add esp, 0xc
cmp esi, ebx
je 0x407cc9
push dword [ebp - 4]
mov byte [esi], bl
call fcn.0041c910
inc esi
push edi
push esi
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], esi
call fcn.0041c440
mov esi, eax
add esp, 0xc
cmp esi, ebx
je 0x407cc9
push dword [ebp - 4]
mov byte [esi], bl
call fcn.0041c910
inc esi
push edi
push esi
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], esi
call fcn.0041c440
mov esi, eax
add esp, 0xc
cmp esi, ebx
jne 0x407cd0
xor eax, eax
jmp 0x407de5
push dword [ebp - 4]
mov byte [esi], bl
call fcn.0041c910
inc esi
push edi
push esi
mov dword [ebp - 0x1c], eax
call fcn.0041c440
add esp, 0xc
cmp eax, ebx
je 0x407cf8
push esi
mov byte [eax], bl
call fcn.0041c910
pop ecx
mov dword [ebp - 0x14], eax
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
push 3
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
pop edi
push 2
cmp eax, ebx
pop esi
jne 0x407d21
push 1
mov dword [ebp + 8], 0x10
pop ecx
jmp 0x407d4a
push 1
pop ecx
cmp eax, ecx
jne 0x407d31
mov dword [ebp + 8], 0x20
jmp 0x407d4a
cmp eax, esi
jne 0x407d3a
mov dword [ebp + 8], ecx
jmp 0x407d53
cmp eax, edi
jne 0x407d43
mov dword [ebp + 8], esi
jmp 0x407d53
mov dword [ebp + 8], 0x10
cmp dword [ebp - 0x18], ebx
je 0x407d53
or byte [ebp + 9], 1
mov eax, dword [ebp - 0x24]
cmp eax, ebx
jne 0x407d5e
xor edi, edi
jmp 0x407d81
cmp eax, ecx
jne 0x407d66
mov edi, ecx
jmp 0x407d81
cmp eax, esi
jne 0x407d6e
mov edi, esi
jmp 0x407d81
cmp eax, edi
je 0x407d81
xor edx, edx
cmp eax, 4
setne dl
dec edx
and edx, esi
add edx, esi
mov edi, edx
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x407d9b
cmp eax, ecx
jne 0x407d90
mov esi, ecx
jmp 0x407d9d
cmp eax, esi
je 0x407d9d
push 3
pop esi
cmp eax, esi
je 0x407d9d
xor esi, esi
cmp dword [ebp - 0x14], ebx
je 0x407daf
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.00407b32
pop ecx
pop ecx
push dword [ebp - 0x10]
lea eax, [ebp - 0x128]
push dword [ebp - 0xc]
push ebx
push ebx
push ebx
push eax
push esi
push edi
push dword [ebp + 8]
push ebx
push dword [ebp - 0x20]
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push dword [ebp - 4]
call esi
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret