Function at 0x4d5f50
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x4d6438
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x16], 0
push 5
push 0x4d6448
push 0
call sub.advapi32.dll_OpenSCManagerW
mov ebx, eax
test ebx, ebx
jne 0x4d5fcf
call sub.kernel32.dll_GetLastError
mov esi, eax
mov eax, esi
xor edx, edx
push edx
push eax
mov eax, dword [0x4e6c5c]
mov edx, 0x4d6474
call fcn.004088c0
call fcn.0040d454
mov edx, 0x4d64c0
call fcn.004088c0
call main
call fcn.0040711c
mov eax, esi
call fcn.0040abbc
xor eax, eax
mov dword [ebp - 0x14], eax
push 0x5d1
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x4d5f28]
call fcn.0040da78
add esp, 4
mov eax, dword [ebp - 4]
test eax, eax
je 0x4d5ffb
sub eax, 4
mov eax, dword [eax]
imul edx, eax, 0x2c
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.00408134
mov esi, dword [ebp - 4]
test esi, esi
je 0x4d6014
sub esi, 4
mov esi, dword [esi]
push 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
imul eax, esi, 0x2c
push eax
mov eax, dword [ebp - 4]
push eax
push 3
push 0x30
push 0
push ebx
call sub.advapi32.dll_EnumServicesStatusExW
test eax, eax
jne 0x4d6135
call sub.kernel32.dll_GetLastError
mov esi, eax
cmp esi, 0xea
je 0x4d608d
push ebx
call sub.advapi32.dll_CloseServiceHandle
mov eax, esi
xor edx, edx
push edx
push eax
mov eax, dword [0x4e6c5c]
mov edx, 0x4d64d4
call fcn.004088c0
call fcn.0040d454
mov edx, 0x4d64c0
call fcn.004088c0
call main
call fcn.0040711c
mov eax, esi
call fcn.0040abbc
jmp 0x4d6135
push 0x1745
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x4d5f28]
call fcn.0040da78
add esp, 4
mov eax, dword [ebp - 4]
test eax, eax
je 0x4d60b4
sub eax, 4
mov eax, dword [eax]
imul edx, eax, 0x2c
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.00408134
mov esi, dword [ebp - 4]
test esi, esi
je 0x4d60cd
sub esi, 4
mov esi, dword [esi]
push 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
imul eax, esi, 0x2c
push eax
mov eax, dword [ebp - 4]
push eax
push 3
push 0x30
push 0
push ebx
call sub.advapi32.dll_EnumServicesStatusExW
test eax, eax
jne 0x4d6135
push ebx
call sub.advapi32.dll_CloseServiceHandle
call sub.kernel32.dll_GetLastError
mov esi, eax
mov eax, esi
xor edx, edx
push edx
push eax
mov eax, dword [0x4e6c5c]
mov edx, 0x4d64d4
call fcn.004088c0
call fcn.0040d454
mov edx, 0x4d64c0
call fcn.004088c0
call main
call fcn.0040711c
mov eax, esi
call fcn.0040abbc
push ebx
call sub.advapi32.dll_CloseServiceHandle
mov byte [ebp - 0x15], 0
mov eax, dword [ebp - 4]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4d6156
mov eax, dword [ebp - 0x1c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
mov esi, dword [ebp - 0x1c]
dec esi
test esi, esi
jl 0x4d61c6
inc esi
xor ebx, ebx
imul edi, ebx, 0xb
mov eax, dword [ebp - 4]
cmp dword [eax + edi*4], 0
je 0x4d61c6
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 4]
mov edx, dword [edx + edi*4]
call fcn.0040b87c
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x2c]
call fcn.00421084
mov eax, dword [ebp - 0x2c]
push eax
lea edx, [ebp - 0x34]
mov eax, 0x4d652c
call fcn.00421084
mov edx, dword [ebp - 0x34]
pop eax
call fcn.0040bba0
jne 0x4d61c2
mov byte [ebp - 0x15], 1
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
mov edx, dword [edx + edi*4]
call fcn.0040b87c
mov eax, dword [ebp - 4]
mov eax, dword [eax + edi*4 + 0x24]
mov dword [0x4ed8c0], eax
jmp 0x4d61c6
inc ebx
dec esi
jne 0x4d6161
cmp byte [ebp - 0x15], 0
jne 0x4d61ef
mov eax, dword [0x4e6c5c]
mov edx, 0x4d6550
call fcn.004088c0
call main
call fcn.0040711c
mov eax, 0x424
call fcn.0040abbc
cmp dword [0x4ed8c0], 0
jne 0x4d6243
cmp byte [ebp - 0x16], 0
je 0x4d6221
mov eax, dword [0x4e6c5c]
mov edx, 0x4d6594
call fcn.004088c0
call main
call fcn.0040711c
mov eax, 0x426
call fcn.0040abbc
mov edx, 2
mov eax, 0x4d652c
call fcn.004d5920
mov eax, 0x4d652c
call fcn.004d5d08
mov byte [ebp - 0x16], 1
jmp 0x4d5f7f
mov eax, dword [0x4ed8c0]
xor edx, edx
push edx
push eax
mov eax, dword [0x4e6c5c]
mov edx, 0x4d6604
call fcn.004088c0
call fcn.0040d454
mov edx, 0x4d64c0
call fcn.004088c0
call main
call fcn.0040711c
mov eax, 0x4ed8c4
mov edx, dword [0x4d4c88]
call fcn.0040db9c
mov eax, dword [ebp - 4]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x4d629b
mov eax, dword [ebp - 0x20]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
mov esi, dword [ebp - 0x20]
dec esi
test esi, esi
jl 0x4d6356
inc esi
xor ebx, ebx
imul edi, ebx, 0xb
mov eax, dword [ebp - 4]
cmp dword [eax + edi*4], 0
je 0x4d6356
mov eax, dword [ebp - 4]
mov eax, dword [eax + edi*4 + 0x24]
cmp eax, dword [0x4ed8c0]
jne 0x4d634e
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 4]
mov edx, dword [edx + edi*4]
call fcn.0040b87c
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 8]
call fcn.0040bba0
je 0x4d634e
mov eax, dword [0x4ed8c4]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x4d6301
mov eax, dword [ebp - 0x24]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
inc eax
push eax
mov eax, 0x4ed8c4
mov ecx, 1
mov edx, dword [0x4d4c88]
call fcn.0040da78
add esp, 4
mov eax, dword [0x4ed8c4]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x4d6337
mov eax, dword [ebp - 0x28]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
mov eax, dword [0x4ed8c4]
mov edx, dword [ebp - 0x28]
lea eax, [eax + edx*4 - 4]
mov edx, dword [ebp - 4]
mov edx, dword [edx + edi*4]
call fcn.0040b87c
inc ebx
dec esi
jne 0x4d62aa
mov eax, 0x4ed8c8
call fcn.0040ad5c
mov edi, dword [0x4ed8c4]
test edi, edi
je 0x4d636f
sub edi, 4
mov edi, dword [edi]
mov esi, edi
dec esi
test esi, esi
jl 0x4d63bd
inc esi
xor ebx, ebx
cmp dword [0x4ed8c8], 0
jne 0x4d6397
mov eax, 0x4ed8c8
mov edx, dword [0x4ed8c4]
mov edx, dword [edx + ebx*4]
call fcn.0040b14c
jmp 0x4d63b9
push dword [0x4ed8c8]
push 0x4d6648
mov eax, dword [0x4ed8c4]
push dword [eax + ebx*4]
mov eax, 0x4ed8c8
mov edx, 3
call fcn.0040baf0
inc ebx
dec esi
jne 0x4d6379
cmp dword [0x4ed8c8], 0
je 0x4d63ec
mov eax, dword [0x4e6c5c]
mov edx, 0x4d665c
call fcn.004088c0
mov edx, dword [0x4ed8c8]
call fcn.004088c0
call main
call fcn.0040711c
jmp 0x4d6405
mov eax, dword [0x4e6c5c]
mov edx, 0x4d66a0
call fcn.004088c0
call main
call fcn.0040711c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d643f
lea eax, [ebp - 0x38]
mov edx, 4
call fcn.0040adbc
lea eax, [ebp - 8]
call fcn.0040ad5c
lea eax, [ebp - 4]
mov edx, dword [0x4d5f28]
call fcn.0040db9c
pop eax
jmp eax