Function at 0x403e00
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x549150
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x5ac7dc]
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
sub esp, 0x18
mov dword [ebp - 4], 0
mov ecx, esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 0x10
jb 0x403e4f
mov eax, dword [ecx]
jmp 0x403e51
mov eax, ecx
push 0xffffffffffffffff
mov byte [eax], 0
lea eax, [ebp + 8]
push 0
push eax
call fcn.004080e0
lea ecx, [ebp - 0x40]
call fcn.0040d510
add esp, 0x18
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x40]
mov esi, dword [ebp - 0x2c]
lea ebx, [ebp - 0x40]
mov edx, dword [ebp - 0x40]
lea edi, [ebp - 0x40]
mov eax, dword [ebp - 0x30]
cmp esi, 8
cmovae ecx, edx
cmovae ebx, edx
cmovae edi, edx
xor esi, esi
xor edx, edx
lea eax, [ecx + eax*2]
mov ecx, eax
sub ecx, ebx
inc ecx
shr ecx, 1
cmp ebx, eax
cmova ecx, edx
mov dword [ebp - 0x48], ecx
test ecx, ecx
je 0x403ec9
sub ebx, edi
nop word [eax + eax]
movzx eax, word [ebx + edi]
push eax
call fcn.004ddcff
inc esi
mov word [edi], ax
add esp, 4
lea edi, [edi + 2]
cmp esi, dword [ebp - 0x48]
jne 0x403eb0
xor esi, esi
push 4
push esi
push esi
mov dword [ebp - 0x48], esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x50], ebx
test ebx, ebx
jne 0x403efa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_fail__ld_
call fcn.004016a0
add esp, 8
jmp 0x4040f4
push ebx
push str.OpenSCManager____scHandle_p_n
call fcn.004016a0
add esp, 8
mov edi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
lea eax, [ebp - 0x44]
push 0
push 0
push eax
lea eax, [ebp - 0x4c]
push eax
push 0
push 0
push 3
push 0xb
push 0
push ebx
call edi
push dword [ebp - 0x44]
push dword [ebp - 0x4c]
push eax
push ebx
push str.EnumServicesStatusEx_scHandle_p____ret_d__pcbBytesNeeded_ld__servicesReturned_ld_n
call fcn.004016a0
mov esi, dword [ebp - 0x4c]
push esi
call fcn.004ae252
add esp, 0x18
mov dword [ebp - 0x5c], eax
test eax, eax
jne 0x403f66
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.lpServices__new_BYTE__ld_____fail__ld__n
call fcn.004016a0
add esp, 0xc
jmp 0x4040ea
push 0
push 0
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x4c]
push ecx
push esi
push eax
push 3
push 0xb
push 0
push ebx
call edi
cmp dword [ebp - 0x44], 0
mov dword [ebp - 0x54], 0
jbe 0x4040df
mov ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x58], ebx
push dword [ebx + 4]
push dword [ebx]
push str.service.lpServiceName_s__lpDisplayName_s_n
call fcn.00401510
mov edx, dword [ebx]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp word [edx], ax
je 0x403fd5
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403fc6
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x28]
call fcn.00407c40
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edi, dword [ebp - 0x28]
lea ebx, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
lea esi, [ebp - 0x28]
cmp ecx, 8
cmovae eax, edi
cmovae ebx, edi
cmovae esi, edi
xor edi, edi
lea eax, [eax + edx*2]
xor edx, edx
mov ecx, eax
sub ecx, ebx
inc ecx
shr ecx, 1
cmp ebx, eax
cmova ecx, edx
mov dword [ebp - 0x60], ecx
test ecx, ecx
je 0x404039
sub ebx, esi
nop dword [eax]
movzx eax, word [esi + ebx]
push eax
call fcn.004ddcff
inc edi
mov word [esi], ax
add esp, 4
lea esi, [esi + 2]
cmp edi, dword [ebp - 0x60]
jne 0x404020
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
mov ebx, dword [ebp - 0x14]
lea edx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x40]
cmp ebx, 8
mov esi, dword [ebp - 0x30]
cmovae edx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x18]
cmp edi, esi
cmovb esi, edi
test esi, esi
jne 0x4040a0
xor eax, eax
test eax, eax
jne 0x40406f
mov eax, dword [ebp - 0x30]
cmp edi, eax
jb 0x40406f
jbe 0x4040c1
cmp ebx, 8
jb 0x404083
lea eax, [ebx + 1]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.00408c90
mov esi, dword [ebp - 0x54]
mov ebx, dword [ebp - 0x58]
inc esi
add ebx, 0x2c
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x58], ebx
cmp esi, dword [ebp - 0x44]
jb 0x403f94
jmp 0x4040dc
mov ax, word [edx]
cmp ax, word [ecx]
jne 0x4040b3
add edx, 2
add ecx, 2
sub esi, 1
jmp 0x40405e
movzx eax, word [edx]
cmp ax, word [ecx]
sbb eax, eax
and eax, 0xfffffffe
inc eax
jmp 0x404062
mov dword [ebp - 0x48], 1
cmp ebx, 8
jb 0x4040dc
lea eax, [ebx + 1]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.00408c90
mov ebx, dword [ebp - 0x50]
push dword [ebp - 0x5c]
call fcn.004ae23f
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x40414d
mov ecx, dword [ebp - 0x40]
inc eax
cmp eax, 0x7fffffff
jbe 0x40410c
call fcn.004ef829
add eax, eax
cmp eax, 0x1000
jb 0x404144
test byte [ebp - 0x40], 0x1f
je 0x404120
call fcn.004ef829
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x40412c
call fcn.004ef829
sub ecx, eax
cmp ecx, 4
jae 0x404138
call fcn.004ef829
cmp ecx, 0x23
jbe 0x404142
call fcn.004ef829
mov ecx, eax
push ecx
call fcn.004ae222
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x30], 0
cmp eax, 0x10
jb 0x4041ab
mov ecx, dword [ebp + 8]
inc eax
cmp eax, 0x1000
jb 0x4041a2
test cl, 0x1f
je 0x40417e
call fcn.004ef829
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x40418a
call fcn.004ef829
sub ecx, eax
cmp ecx, 4
jae 0x404196
call fcn.004ef829
cmp ecx, 0x23
jbe 0x4041a0
call fcn.004ef829
mov ecx, eax
push ecx
call fcn.004ae222
add esp, 4
mov eax, esi
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.004ae22e
mov esp, ebp
pop ebp
ret