Function at 0x10155680
Capabilities:
Enumerate services
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x660
mov eax, dword [0x102519c8]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x650], ecx
mov dword [ebp - 0x660], 0
mov dword [ebp - 0x65c], 0
call fcn.10009c50
mov dword [ebp - 0x644], eax
test eax, eax
je 0x101556e1
push 8
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x101556d3
mov ecx, eax
call fcn.10120260
jmp 0x101556d5
xor eax, eax
push eax
lea ecx, [ebp - 0x660]
call fcn.10032660
push ebx
push esi
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
call fcn.10002d70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
push 0x208
push 0
lea esi, [eax + 0x10]
lea eax, [ebp - 0x414]
mov dword [ebp - 0x624], esi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x414]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x9000
call sub.msvcrt.dll_malloc
mov ebx, eax
add esp, 4
mov dword [ebp - 0x654], ebx
test ebx, ebx
je 0x10155ba5
push 0x9000
push 0
push ebx
call sub.msvcrt.dll_memset
add esp, 0xc
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ecx, eax
mov dword [ebp - 0x658], ecx
test ecx, ecx
je 0x10155b9c
lea eax, [ebp - 0x63c]
mov dword [ebp - 0x640], 0
push eax
lea eax, [ebp - 0x630]
mov dword [ebp - 0x630], 0
push eax
lea eax, [ebp - 0x640]
mov dword [ebp - 0x63c], 0
push eax
movzx eax, byte [ebp + 8]
neg eax
push 0x9000
sbb eax, eax
push ebx
and eax, 0xffffffdb
push 3
add eax, 0x30
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
test eax, eax
je 0x10155b90
cmp dword [ebp - 0x630], 0
mov dword [ebp - 0x634], 0
jbe 0x10155b90
push edi
mov edi, ebx
mov dword [ebp - 0x62c], ebx
jmp 0x10155800
push dword [edi]
lea eax, [ebp - 0x624]
push str.SYSTEMCurrentControlSetServices
push str._s_sParameters
push eax
call fcn.10002cb0
push 0x208
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x620], 1
push 0
push eax
mov dword [ebp - 0x628], 0x208
call sub.msvcrt.dll_memset
mov esi, dword [ebp - 0x624]
lea eax, [ebp - 0x628]
add esp, 0x1c
mov dword [ebp - 0x638], esi
push 0x20219
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x620]
push eax
push str.ServiceDll
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.100585c0
test eax, eax
jne 0x1015589d
mov eax, dword [ebp - 0x620]
cmp eax, 1
je 0x10155923
cmp eax, 2
je 0x10155923
cmp eax, 7
je 0x10155923
mov dword [ebp - 0x620], 1
lea eax, [ebp - 0x624]
mov dword [ebp - 0x628], 0x208
push dword [edi]
push str.SYSTEMCurrentControlSetServices
push 0x102040c0
push eax
call fcn.10002cb0
add esp, 0x10
lea eax, [ebp - 0x628]
push 0x20219
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x620]
push eax
mov eax, dword [ebp - 0x624]
push str.ImagePath
push eax
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x638], eax
call fcn.100585c0
test eax, eax
jne 0x10155b61
mov eax, dword [ebp - 0x620]
cmp eax, 1
je 0x10155923
cmp eax, 2
je 0x10155923
cmp eax, 7
jne 0x10155b61
cmp word [ebp - 0x20c], 0
je 0x10155b61
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.10155560
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.10155c00
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call sub.msvcrt.dll_wcschr
add esp, 0x18
test eax, eax
jne 0x101559d2
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
push str._ws_system32_ws
lea eax, [ebp - 0x61c]
push 0x104
push eax
call fcn.1000aa70
lea ecx, [ebp - 0x20c]
add esp, 0x14
lea esi, [ebp - 0x61c]
mov eax, ecx
mov edx, 0x104
sub esi, eax
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x101559c6
movzx eax, word [esi + ecx]
test ax, ax
je 0x101559c6
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x101559a6
jmp 0x101559ca
test edx, edx
jne 0x101559cd
sub ecx, 2
xor eax, eax
mov word [ecx], ax
call fcn.10003180
mov esi, dword [eax + 0x154]
test esi, esi
je 0x101559e8
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xe
call fcn.10003680
add esp, 4
test eax, eax
je 0x10155a01
lea ecx, [ebp - 0x20c]
push ecx
call eax
jmp 0x10155a0e
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
test esi, esi
je 0x10155a1b
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp ebx, 0xffffffff
je 0x10155b61
test bl, 0x10
jne 0x10155b61
push 0x650
call sub.msvcrt.dll_malloc
mov ebx, eax
add esp, 4
mov dword [ebp - 0x648], ebx
test ebx, ebx
je 0x10155b83
push 0x650
push 0
push ebx
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [ebp - 0x644], 0
je 0x10155a6c
mov word [ebx + 0x64c], 0x101
mov dword [ebx + 4], 4
lea esi, [edi + 8]
mov dword [ebx + 0x624], 0x80000002
lea edi, [ebx + 0x630]
mov dword [ebx + 0x628], 0x102061c0
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x62c]
lea ecx, [ebx + 8]
mov edx, 0x104
mov esi, dword [esi]
jmp 0x10155ab0
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x10155ad2
movzx eax, word [esi]
test ax, ax
je 0x10155ad2
mov word [ecx], ax
add esi, 2
add ecx, 2
sub edx, 1
jne 0x10155ab0
jmp 0x10155ad6
test edx, edx
jne 0x10155ad9
sub ecx, 2
xor eax, eax
lea edi, [ebx + 0x210]
lea esi, [ebp - 0x20c]
mov word [ecx], ax
mov edx, 0x104
mov ecx, edi
sub esi, edi
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x10155b13
movzx eax, word [esi + ecx]
test ax, ax
je 0x10155b13
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x10155af3
jmp 0x10155b17
test edx, edx
jne 0x10155b1a
sub ecx, 2
xor eax, eax
push edi
mov word [ecx], ax
call fcn.10154e30
mov ecx, dword [ebp - 0x650]
add esp, 4
mov dword [ebx + 0x620], eax
lea eax, [ebp - 0x648]
mov dword [ebp - 0x64c], 4
push eax
lea eax, [ebp - 0x64c]
push eax
lea ecx, [ecx + 4]
call fcn.101547d0
mov ecx, eax
call fcn.10156de0
mov edi, dword [ebp - 0x62c]
mov eax, dword [ebp - 0x634]
add edi, 0x24
inc eax
mov dword [ebp - 0x62c], edi
mov dword [ebp - 0x634], eax
cmp eax, dword [ebp - 0x630]
jb 0x10155800
mov esi, dword [ebp - 0x638]
mov ebx, dword [ebp - 0x654]
pop edi
push dword [ebp - 0x658]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call sub.msvcrt.dll_free
add esp, 4
lea edx, [esi - 0x10]
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10155bbf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x65c]
test ebx, ebx
je 0x10155be7
mov eax, esi
lock xadd dword [ebx + 4], eax
jne 0x10155be7
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
lock xadd dword [ebx + 8], esi
dec esi
jne 0x10155be7
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.101f99c6
mov esp, ebp
pop ebp
ret 4