Function at 0x629a34
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0xe
push 0
push 0
dec ecx
jne 0x629a3d
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov byte [ebp - 0x15], cl
mov esi, edx
mov edi, eax
xor eax, eax
push ebp
push 0x629f87
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10]
mov edx, 0x629fa4
call fcn.00407cf0
mov byte [0x6b26f6], 1
mov eax, 0x6b26f8
xor edx, edx
call fcn.00407c9c
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x2c], eax
push 4
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x629f52
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
push 0
mov eax, dword [ebp - 0x20]
push eax
push esi
push edi
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_EnumServicesStatusW
test eax, eax
jne 0x629f33
call sub.kernel32.dll_GetLastError_1
cmp eax, 0xea
jne 0x629f33
mov eax, dword [ebp - 0x24]
call fcn.00404368
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
push eax
push esi
push edi
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_EnumServicesStatusW
test eax, eax
je 0x629f2b
mov eax, dword [ebp - 0x28]
dec eax
test eax, eax
jns 0x629b18
call fcn.00405714
test eax, eax
jl 0x629f29
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x20]
test edx, edx
je 0x629b3a
cmp eax, dword [edx - 4]
jb 0x629b3f
call fcn.00405714
lea eax, [eax + eax*8]
lea eax, [edx + eax*4]
mov dword [ebp - 0x38], eax
xor ebx, ebx
lea eax, [ebp - 0x44]
mov edx, dword [ebp - 0x38]
mov esi, dword [edx]
mov edx, esi
call fcn.00407e58
push dword [ebp - 0x44]
push 0x629fc8
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 0x38]
mov edx, dword [edx + 4]
call fcn.00407e58
push dword [ebp - 0x48]
push 0x629fdc
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0xc]
dec eax
cmp eax, 6
jbe 0x629b88
call fcn.00405714
inc eax
push dword [eax*4 + 0x6aab38]
lea eax, [ebp - 0x40]
mov edx, 5
call fcn.00408264
mov edx, dword [ebp - 0x40]
lea eax, [ebp - 4]
mov ecx, 0
call fcn.00407ef0
push 1
push esi
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_OpenServiceW
mov edi, eax
xor esi, esi
lea eax, [ebp - 0x24]
push eax
push 0
push esi
push edi
call sub.advapi32.dll_QueryServiceConfigW
test eax, eax
jne 0x629e32
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x7a
jne 0x629e32
mov eax, dword [ebp - 0x24]
call fcn.00404368
mov esi, eax
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x24]
push eax
push esi
push edi
call sub.advapi32.dll_QueryServiceConfigW
test eax, eax
je 0x629e2b
cmp dword [esi + 4], 4
je 0x629e2b
push 0
push 1
push 1
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x50]
mov edx, dword [ebp - 0x38]
mov edx, dword [edx]
call fcn.00407e58
mov edx, dword [ebp - 0x50]
xor ecx, ecx
mov eax, dword [0x6b2658]
call fcn.0061f72c
cmp dword [ebp - 0x4c], 0
jne 0x629e2b
movzx eax, byte [0x629fe4]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x54]
call fcn.00671f20
mov eax, dword [ebp - 0x54]
push eax
lea eax, [ebp - 0x58]
mov edx, dword [esi + 0xc]
call fcn.00407e58
mov eax, dword [ebp - 0x58]
mov edx, 0x629ff4
pop ecx
call fcn.0041df78
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x629c89
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x629c89
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.00406d1c
test eax, eax
je 0x629c92
sub eax, 4
mov eax, dword [eax]
dec eax
jle 0x629d70
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x629cb6
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x629cb6
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.00406d1c
mov edx, 2
dec edx
test eax, eax
je 0x629cc5
cmp edx, dword [eax - 4]
jb 0x629cca
call fcn.00405714
inc edx
cmp word [eax + edx*2 - 2], 0x3f
je 0x629d10
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x629cf0
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x629cf0
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.00406d1c
mov edx, 2
dec edx
test eax, eax
je 0x629cff
cmp edx, dword [eax - 4]
jb 0x629d04
call fcn.00405714
inc edx
cmp word [eax + edx*2 - 2], 0x3a
setne al
jmp 0x629d12
xor eax, eax
test al, al
je 0x629d70
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x629d33
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x629d33
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.00406d1c
mov edx, 1
dec edx
test eax, eax
je 0x629d42
cmp edx, dword [eax - 4]
jb 0x629d47
call fcn.00405714
inc edx
cmp word [eax + edx*2 - 2], 0x5c
je 0x629d70
lea eax, [ebp - 0x5c]
call fcn.00671f20
push dword [ebp - 0x5c]
push 0x62a018
push dword [ebp - 0xc]
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00408264
mov edx, dword [ebp - 0xc]
mov eax, 0x62a028
call fcn.0040875c
test eax, eax
jle 0x629df2
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x629d9e
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x629d9e
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.00406d1c
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x629db2
mov eax, dword [ebp - 0x3c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0xc]
push eax
mov edx, dword [ebp - 0xc]
mov eax, 0x62a028
call fcn.0040875c
mov edx, eax
inc edx
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0xc]
call fcn.004083ec
lea eax, [ebp - 0xc]
push eax
mov edx, dword [ebp - 0xc]
mov eax, 0x62a028
call fcn.0040875c
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.004083ec
mov eax, dword [ebp - 0xc]
call fcn.004169e8
test al, al
je 0x629e2b
lea edx, [ebp - 8]
mov eax, dword [ebp - 0xc]
call fcn.0061f424
push 0x62a038
lea edx, [ebp - 0x14]
mov eax, 0x6b26f8
mov ecx, dword [ebp - 8]
call fcn.00623804
test al, al
je 0x629e2b
mov byte [0x6b26f6], 0
mov bl, 1
mov eax, esi
call fcn.00404384
test edi, edi
je 0x629e3c
push edi
call sub.advapi32.dll_CloseServiceHandle
test bl, bl
je 0x629f1d
cmp byte [ebp - 0x15], 0
je 0x629f1d
xor eax, eax
push ebp
push 0x629e83
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x60]
mov edx, dword [ebp - 0x38]
mov edx, dword [edx]
call fcn.00407e58
mov eax, dword [ebp - 0x60]
mov ecx, 0x7530
or edx, 0xffffffff
call fcn.00624c60
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x629e8d
xor eax, eax
push ebp
push 0x629f13
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x64]
mov edx, dword [ebp - 0x38]
mov edx, dword [edx]
call fcn.00407e58
mov eax, dword [ebp - 0x64]
call fcn.006298d8
movzx eax, byte [0x629fe4]
push eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x70]
call fcn.00671f20
lea eax, [ebp - 0x70]
mov edx, 0x62a04c
call fcn.004080c0
mov eax, dword [ebp - 0x70]
lea edx, [ebp - 0x6c]
call fcn.004152c8
mov eax, dword [ebp - 0x6c]
push eax
lea edx, [ebp - 0x74]
mov eax, dword [ebp - 0xc]
call fcn.004152c8
mov eax, dword [ebp - 0x74]
push eax
lea eax, [ebp - 0x78]
call fcn.0061db80
mov ecx, dword [ebp - 0x78]
pop eax
pop edx
call fcn.0041df78
mov eax, dword [ebp - 0x68]
call fcn.0061f520
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x629f1d
inc dword [ebp - 0x30]
dec dword [ebp - 0x34]
jne 0x629b2b
mov bl, 1
mov eax, dword [ebp - 0x20]
call fcn.00404384
cmp dword [ebp - 0x1c], 0
je 0x629f42
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_CloseServiceHandle
cmp byte [ebp - 0x15], 0
je 0x629f52
mov eax, 0x62a06c
call fcn.0061fda0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x629f8e
lea eax, [ebp - 0x78]
mov edx, 0xf
call fcn.00407c94
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00407c94
lea eax, [ebp - 8]
mov edx, 2
call fcn.00406b54
ret