Function at 0x401730
Capabilities:
Enumerate services

Disassembly:
jmp 0x4fc700
push 0xffffffffffffffff
push 0x78a2fb
mov eax, dword fs:[0]
push eax
mov eax, 0x20fc
call fcn.00564f40
mov eax, dword [0x856918]
xor eax, esp
mov dword [esp + 0x20f8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x856918]
xor eax, esp
push eax
lea eax, [esp + 0x2110]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x2120]
xor edi, edi
mov dword [esp + 0x14], edi
push 0xb
mov esi, ecx
xor eax, eax
push str.intservices
lea ecx, [esp + 0x90]
mov dword [esp + 0x38], ebp
mov dword [esp + 0xa8], 7
mov dword [esp + 0xa4], edi
mov word [esp + 0x94], ax
call fcn.00405ef2
lea ecx, [esp + 0x88]
push ecx
mov dword [esp + 0x211c], 1
call fcn.00407e1e
add esp, 4
cmp eax, 1
sete bl
cmp dword [esp + 0xa0], 8
mov byte [esp + 0x2118], 0
jb 0x4fc7c4
mov edx, dword [esp + 0x8c]
push edx
call fcn.00564155
add esp, 4
xor ecx, ecx
mov eax, 7
mov dword [esp + 0xa0], eax
mov dword [esp + 0x9c], edi
mov word [esp + 0x8c], cx
test bl, bl
jne 0x4fc844
push 0x15
xor edx, edx
push 0x7bc3bc
lea ecx, [esp + 0x120]
mov dword [esp + 0x138], eax
mov dword [esp + 0x134], edi
mov word [esp + 0x124], dx
call fcn.00405ef2
mov dword [esp + 0x2118], 2
mov dword [esp + 0x14], 1
cmp byte [esi + 5], bl
je 0x4fc82d
mov al, byte [esi + 4]
jmp 0x4fc83c
lea eax, [esp + 0x118]
push eax
mov ecx, esi
call fcn.004045b6
test al, al
je 0x4fc844
xor bl, bl
jmp 0x4fc846
mov bl, 1
test byte [esp + 0x14], 1
mov dword [esp + 0x2118], edi
je 0x4fc873
and dword [esp + 0x14], 0xfffffffe
cmp dword [esp + 0x130], 8
jb 0x4fc873
mov ecx, dword [esp + 0x11c]
push ecx
call fcn.00564155
add esp, 4
test bl, bl
je 0x4fc899
push edi
mov dword [ebp + 0x18], 0xf
mov dword [ebp + 0x14], edi
push 0x7bb9ed
mov ecx, ebp
mov byte [ebp + 4], 0
call fcn.00405920
mov eax, ebp
jmp 0x4fd1e8
lea edx, [esp + 0x1b]
push edx
lea eax, [esp + 0x1f]
push eax
lea ecx, [esp + 0x70]
call fcn.00404110
push 0xf003f
push edi
push edi
mov dword [esp + 0x2124], 3
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [esp + 0x20], ebx
cmp ebx, edi
jne 0x4fc907
push 0x28
mov dword [ebp + 0x18], 0xf
mov dword [ebp + 0x14], edi
push str.CWFP::CheckServices___Failed_to_open_SCM
mov ecx, ebp
mov byte [ebp + 4], 0
call fcn.00405920
or dword [esp + 0x14], 2
lea ecx, [esp + 0x68]
mov byte [esp + 0x2118], 0
call fcn.00401adc
mov eax, ebp
jmp 0x4fd1e8
mov esi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x40]
push eax
push 0x24
lea ecx, [esp + 0x104]
push ecx
push 3
push 0x30
push ebx
mov dword [esp + 0x58], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x64], edi
call esi
cmp eax, edi
jne 0x4fcebb
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xea
jne 0x4fcf1a
mov edx, dword [esp + 0x38]
push edx
call fcn.00563dd8
add esp, 4
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x40]
lea ecx, [esp + 0x6c]
push ecx
push edx
push eax
push 3
push 0x30
push ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x84], 0
call esi
test eax, eax
jne 0x4fca22
call edi
push eax
lea eax, [esp + 0x154]
push eax
call fcn.004083af
push eax
lea ecx, [esp + 0x140]
push str.CWFP::CheckServices___failed_to_call_EnumServicesStatus_with_error:
push ecx
mov byte [esp + 0x212c], 4
call fcn.00404cfa
add esp, 0x14
lea ecx, [esp + 0x150]
mov byte [esp + 0x2118], 6
call fcn.00402ed7
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [esp + 0x1c]
push edx
call fcn.00565caa
add esp, 4
lea eax, [esp + 0x134]
push eax
mov ecx, ebp
call fcn.0040521d
or dword [esp + 0x14], 2
lea ecx, [esp + 0x134]
call fcn.00402ed7
lea ecx, [esp + 0x68]
mov byte [esp + 0x2118], 0
call fcn.00401adc
mov eax, ebp
jmp 0x4fd1e8
xor ebp, ebp
mov dword [esp + 0x3c], ebp
cmp dword [esp + 0x28], ebp
jbe 0x4fcea5
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x34], esi
jmp 0x4fca44
mov esi, dword [esp + 0x34]
mov ecx, dword [esi]
push 1
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [esp + 0x40], eax
cmp eax, ebp
jne 0x4fcb57
mov edx, dword [esi]
push edx
lea ecx, [esp + 0x138]
call fcn.00403706
mov byte [esp + 0x2118], 7
call edi
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.004083af
mov esi, eax
lea ecx, [esp + 0x13c]
push ecx
lea edx, [esp + 0xb0]
push edx
mov byte [esp + 0x2128], 8
call fcn.00407662
push eax
lea eax, [esp + 0xec]
push str.CWFP::CheckServices___Failed_to_open_service:
push eax
mov byte [esp + 0x2134], 9
call fcn.00404cfa
push 0x7bc460
push eax
lea ecx, [esp + 0x13c]
push ecx
mov byte [esp + 0x2140], 0xa
call fcn.00405939
push esi
push eax
lea edx, [esp + 0x180]
push edx
mov byte [esp + 0x214c], 0xb
call fcn.00402fd1
add esp, 0x34
push ebp
push eax
mov byte [esp + 0x2120], 0xc
call fcn.004024eb
mov ecx, eax
call fcn.004020ae
lea ecx, [esp + 0x150]
call fcn.00402ed7
lea ecx, [esp + 0x118]
call fcn.00402ed7
lea ecx, [esp + 0xd8]
call fcn.00402ed7
lea ecx, [esp + 0xa4]
call fcn.00402ed7
lea ecx, [esp + 0x48]
call fcn.00402ed7
lea ecx, [esp + 0x134]
mov byte [esp + 0x2118], 3
call fcn.00403a26
jmp 0x4fce8d
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
lea ecx, [esp + 0x2c]
push ecx
push ebp
push ebp
push eax
mov dword [esp + 0x3c], ebp
call esi
test eax, eax
jne 0x4fcbab
call edi
cmp eax, 0x7a
je 0x4fcbab
call edi
push eax
lea edx, [esp + 0xa8]
push edx
call fcn.004083af
push eax
lea eax, [esp + 0x54]
push str.Couldnt_call_QueryServiceConfig_with_error:
push eax
mov byte [esp + 0x212c], 0xd
call fcn.00404cfa
add esp, 0x14
mov byte [esp + 0x2118], 0xe
jmp 0x4fcbfb
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x44]
push edx
lea eax, [esp + 0x174]
push eax
push ecx
call esi
test eax, eax
jne 0x4fcc2b
call edi
push eax
lea edx, [esp + 0xa8]
push edx
call fcn.004083af
push eax
lea eax, [esp + 0x54]
push str.Couldnt_call_second_QueryServiceConfig_with_error:
push eax
mov byte [esp + 0x212c], 0xf
call fcn.00404cfa
add esp, 0x14
mov byte [esp + 0x2118], 0x10
push ebp
push eax
call fcn.004024eb
mov ecx, eax
call fcn.004020ae
lea ecx, [esp + 0x48]
call fcn.00402ed7
lea ecx, [esp + 0xa4]
mov byte [esp + 0x2118], 3
call fcn.00402ed7
jmp 0x4fce82
mov eax, 7
xor ecx, ecx
mov dword [esp + 0x14c], eax
mov dword [esp + 0x148], ebp
mov word [esp + 0x138], cx
xor edx, edx
mov dword [esp + 0x130], eax
mov dword [esp + 0x12c], ebp
mov word [esp + 0x11c], dx
mov eax, dword [esp + 0x178]
push eax
lea ecx, [esp + 0x154]
mov byte [esp + 0x211c], 0x12
call fcn.00403706
or dword [esp + 0x14], 4
lea ecx, [esp + 0x118]
push ecx
lea edx, [esp + 0x138]
push edx
lea eax, [esp + 0x158]
push eax
push 0x5c
mov byte [esp + 0x2128], 0x13
call fcn.00408233
add esp, 0x10
test al, al
je 0x4fccbc
cmp dword [esp + 0x12c], ebp
je 0x4fccbc
mov bl, 1
jmp 0x4fccbe
xor bl, bl
test byte [esp + 0x14], 4
mov dword [esp + 0x2118], 0x12
je 0x4fcce1
and dword [esp + 0x14], 0xfffffffb
lea ecx, [esp + 0x150]
call fcn.00403a26
test bl, bl
je 0x4fce5c
lea ecx, [esp + 0x118]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.00407a09
add esp, 8
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x124]
mov byte [esp + 0x2124], 0x14
call fcn.00406f1e
lea ecx, [esp + 0x48]
mov byte [esp + 0x2118], 0x12
call fcn.00403a26
push 4
lea eax, [esp + 0x11c]
push eax
lea ecx, [esp + 0x50]
push ecx
call fcn.0040696f
push 0x7bc508
push eax
mov byte [esp + 0x212c], 0x15
call fcn.00404764
add esp, 0x14
lea ecx, [esp + 0x48]
mov bl, al
mov byte [esp + 0x2118], 0x12
call fcn.00403a26
test bl, bl
je 0x4fcd94
lea edx, [esp + 0x118]
push edx
lea eax, [esp + 0x4c]
push eax
call fcn.00407a09
add esp, 8
push eax
lea ecx, [esp + 0xd0]
mov byte [esp + 0x211c], 0x16
push ecx
jmp 0x4fce4a
mov eax, dword [esp + 0x11c]
mov esi, 8
cmp dword [esp + 0x130], esi
jae 0x4fcdb0
lea eax, [esp + 0x11c]
push 0x7bc514
push eax
call fcn.00568b96
add esp, 8
test eax, eax
je 0x4fce5c
mov ecx, dword [esp + 0x11c]
cmp dword [esp + 0x130], esi
jae 0x4fcddd
lea ecx, [esp + 0x11c]
sub eax, ecx
sar eax, 1
add eax, 4
push eax
lea edx, [esp + 0x11c]
push edx
lea eax, [esp + 0x50]
push eax
call fcn.00406041
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x124]
mov byte [esp + 0x2124], 0x17
call fcn.00406f1e
lea ecx, [esp + 0x48]
mov byte [esp + 0x2118], 0x12
call fcn.00403a26
lea ecx, [esp + 0x118]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.00407a09
add esp, 8
push eax
lea eax, [esp + 0xc4]
mov byte [esp + 0x211c], 0x18
push eax
lea ecx, [esp + 0x70]
call fcn.004015b4
lea ecx, [esp + 0x48]
call fcn.00403a26
lea ecx, [esp + 0x118]
call fcn.00403a26
lea ecx, [esp + 0x134]
mov byte [esp + 0x2118], 3
call fcn.00403a26
mov ebx, dword [esp + 0x20]
xor ebp, ebp
mov ecx, dword [esp + 0x40]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x3c]
add dword [esp + 0x34], 0x24
inc eax
mov dword [esp + 0x3c], eax
cmp eax, dword [esp + 0x28]
jb 0x4fca40
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [esp + 0x1c]
push edx
call fcn.00565caa
add esp, 4
xor edi, edi
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push edi
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], edi
push 0x7bb9ee
mov byte [ecx + 4], 0
call fcn.00405920
push 3
mov byte [esp + 0x2138], 0x1c
call fcn.00408a76
mov ecx, eax
mov byte [esp + 0x2138], 3
call fcn.00408819
mov ebp, eax
test ebp, ebp
jne 0x4fcf95
mov esi, dword [esp + 0x30]
push str.CWFP::CheckServices___Failed_to_call_GetDataForReplace
mov ecx, esi
call fcn.004062df
jmp 0x4fd1d0
call edi
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.004083af
push eax
lea ecx, [esp + 0x15c]
push str.CWFP::CheckServices___Failed_to_call_EnumServicesStatus_with_error:
push ecx
mov byte [esp + 0x212c], 0x19
call fcn.00404cfa
add esp, 0x14
lea ecx, [esp + 0x48]
mov byte [esp + 0x2118], 0x1b
call fcn.00402ed7
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea edx, [esp + 0x150]
push edx
mov ecx, ebp
call fcn.0040521d
or dword [esp + 0x14], 2
lea ecx, [esp + 0x150]
call fcn.00402ed7
lea ecx, [esp + 0x68]
mov byte [esp + 0x2118], 0
call fcn.00401adc
mov eax, ebp
jmp 0x4fd1e8
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x7bb9ef
mov byte [esp + 0x3b], 0
call fcn.004062df
push 0xa
mov byte [esp + 0x2138], 0x1d
call fcn.00408a76
mov ecx, eax
mov byte [esp + 0x2138], 3
call fcn.004033e1
mov esi, dword [esp + 0x68]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x80]
mov eax, dword [eax]
mov ebx, eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], ebx
jmp 0x4fcff0
mov edi, dword [esp + 0x80]
test esi, esi
je 0x4fd001
cmp esi, dword [esp + 0x68]
je 0x4fd006
call fcn.00565471
cmp ebx, edi
je 0x4fd0ad
test esi, esi
jne 0x4fd09e
call fcn.00565471
xor eax, eax
cmp ebx, dword [eax + 0x18]
jne 0x4fd027
call fcn.00565471
mov edx, dword [ebp]
mov eax, dword [edx + 0x5c]
lea edi, [ebx + 0xc]
push edi
mov ecx, ebp
call eax
test al, al
jne 0x4fd088
cmp dword [esp + 0x1c], 0
je 0x4fd065
test esi, esi
jne 0x4fd0a5
call fcn.00565471
xor eax, eax
cmp ebx, dword [eax + 0x18]
jne 0x4fd055
call fcn.00565471
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x5c]
push edi
call eax
test al, al
jne 0x4fd088
test esi, esi
jne 0x4fd0a9
call fcn.00565471
cmp ebx, dword [esi + 0x18]
jne 0x4fd078
call fcn.00565471
mov edx, dword [ebp]
mov eax, dword [edx + 0x44]
push edi
mov ecx, ebp
call eax
mov byte [esp + 0x1b], 1
lea ecx, [esp + 0x20]
call fcn.00407063
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
jmp 0x4fcff0
mov eax, dword [esi]
jmp 0x4fd01d
mov eax, dword [esi]
jmp 0x4fd04b
mov esi, dword [esi]
jmp 0x4fd06e
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4fd0c0
mov edx, dword [ecx + 8]
mov eax, dword [edx + 4]
add ecx, 8
call eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0
mov edi, 0xf
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], 0
push 0x7bba9a
mov byte [ecx + 4], 0
call fcn.00405920
push ebp
push 3
mov byte [esp + 0x213c], 0x1e
call fcn.00408a76
mov ecx, eax
mov byte [esp + 0x213c], 3
call fcn.004057d1
cmp byte [esp + 0x1b], 0
je 0x4fd1b0
cmp byte [esp + 0x2124], 0
jne 0x4fd1b0
push 1
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x40], esp
push str.CWFP::CheckServices
call fcn.004062df
lea ecx, [esp + 0x138]
push ecx
mov byte [esp + 0x213c], 0x1f
call fcn.00408a76
mov ecx, eax
mov byte [esp + 0x213c], 3
call fcn.00406cd5
mov esi, dword [esp + 0x30]
push eax
push esi
mov byte [esp + 0x2120], 0x20
call fcn.00407662
or dword [esp + 0x1c], 2
add esp, 8
cmp dword [esp + 0x130], 8
jb 0x4fd18e
mov edx, dword [esp + 0x11c]
push edx
call fcn.00564155
add esp, 4
xor eax, eax
mov dword [esp + 0x130], 7
mov dword [esp + 0x12c], 0
mov word [esp + 0x11c], ax
jmp 0x4fd1d5
mov esi, dword [esp + 0x30]
push 0
mov dword [esi + 0x18], edi
mov dword [esi + 0x14], 0
push 0x7bba9b
mov ecx, esi
mov byte [esi + 4], 0
call fcn.00405920
or dword [esp + 0x14], 2
lea ecx, [esp + 0x68]
mov byte [esp + 0x2118], 0
call fcn.00401adc
mov eax, esi
mov ecx, dword [esp + 0x2110]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x20f8]
xor ecx, esp
call fcn.00564b24
add esp, 0x2108
ret 8