Function at 0x40b416
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
cmp dword [edi], 7
jne 0x40b6d5
push dword [edi + 4]
call fcn.004074cc
mov esi, dword [sym.imp.USER32.dll_SetDlgItemTextW]
push eax
push 0x41d
mov dword [ebp - 0x18], eax
push dword [ebp + 8]
call esi
push dword [0x41fea4]
push 0x41e
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x50]
push 0x38
push eax
push 0
push 7
push dword [edi + 4]
call fcn.004049ab
test eax, eax
jne 0x40b6d5
and byte [ebp - 0x250], al
cmp dword [ebp - 0x50], eax
jne 0x40b493
lea eax, [ebp - 0x250]
push 0x423590
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40b4ff
test byte [ebp - 0x50], 0x10
je 0x40b4ac
lea eax, [ebp - 0x250]
push str.Permanent_
push eax
call fcn.00414f40
pop ecx
pop ecx
test byte [ebp - 0x50], 8
je 0x40b4c5
lea eax, [ebp - 0x250]
push str.Exclusive_
push eax
call fcn.00414f40
pop ecx
pop ecx
lea eax, [ebp - 0x250]
lea esi, [ebp - 0x250]
push 0x42356c
push eax
sub esi, 3
call fcn.00414a60
pop ecx
add eax, esi
push eax
call fcn.00415310
pop ecx
test eax, eax
pop ecx
jne 0x40b4ff
lea eax, [ebp - 0x250]
push eax
call fcn.00414a60
and byte [eax + esi], 0
pop ecx
mov esi, dword [sym.imp.USER32.dll_SetDlgItemTextA]
lea eax, [ebp - 0x250]
push eax
push 0x41f
push dword [ebp + 8]
call esi
push dword [ebp - 0x44]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, 0x41f1bc
lea eax, [ebp - 0x250]
push ebx
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x250]
push eax
push 0x420
push dword [ebp + 8]
call esi
push dword [ebp - 0x48]
lea eax, [ebp - 0x250]
push ebx
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x250]
push eax
push 0x421
push dword [ebp + 8]
call esi
push dword [ebp - 0x40]
lea eax, [ebp - 0x250]
push ebx
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x250]
push eax
push 0x422
push dword [ebp + 8]
call esi
push dword [ebp - 0x3c]
lea eax, [ebp - 0x250]
push ebx
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x250]
push eax
push 0x423
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x10]
push 4
push eax
mov eax, dword [ebp + 0xc]
push 4
push 7
push dword [eax + 4]
call fcn.004049ab
test eax, eax
jne 0x40b609
mov eax, dword [ebp - 0x10]
mov ebx, str.0x_08X
add eax, 0xffffffe8
push eax
lea eax, [ebp - 0x250]
push ebx
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x250]
push eax
push 0x428
push dword [ebp + 8]
call esi
push dword [ebp - 0x10]
lea eax, [ebp - 0x250]
push ebx
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x250]
push eax
push 0x42c
push dword [ebp + 8]
call esi
xor ebx, ebx
push 4
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x40b6d5
lea ecx, [ebp - 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
push ecx
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp + 0xc]
push ecx
push ebx
push ebx
push 3
push 0x3b
push eax
mov dword [ebp + 0xc], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x40b6cc
mov eax, dword [ebp + 0xc]
lea edi, [eax + 0x64]
push edi
call fcn.0040505d
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x40b6c4
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp + 0xc]
push ecx
push edi
push eax
push 3
push 0x3b
push dword [ebp - 0xc]
call esi
test eax, eax
je 0x40b6c4
mov edi, dword [ebp - 4]
cmp edi, ebx
je 0x40b6c4
mov esi, dword [ebp - 8]
push dword [ebp - 0x18]
push dword [esi]
call fcn.00415020
pop ecx
test eax, eax
pop ecx
je 0x40b6a3
dec edi
add esi, 0x24
cmp edi, ebx
jne 0x40b689
jmp 0x40b6c4
push dword [esi + 4]
push dword [esi]
call fcn.00415020
pop ecx
test eax, eax
pop ecx
je 0x40b6c4
push dword [esi + 4]
push 0x461
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
push dword [ebp - 8]
call fcn.00405081
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebx
leave
ret 8