Function at 0x101d3780
Capabilities:
Enumerate services
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xa0
mov ecx, dword [ebp + 8]
cmp dword [ecx + 8], 0
je 0x101d3c65
mov eax, dword [ecx + 0xc]
xor esi, esi
test eax, eax
je 0x101d37ec
mov ecx, dword [ecx + 0x14]
test ecx, ecx
je 0x101d37ec
add ecx, eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
mov word [esp + 0x30], 0
lea ecx, [esp + 0xc]
lea edx, [esp + 0x24]
call fcn.101aeea0
mov esi, dword [esp + 0xc]
cmp dword [esp + 0x10], 0
je 0x101d37ec
mov eax, dword [0x1044eff8]
push esi
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
push 0xf003f
push 0
push esi
call sub.advapi32.dll_OpenSCManagerW
mov ebx, eax
call sub.KERNEL32.dll_GetLastError
test eax, eax
mov dword [esp + 0x98], eax
je 0x101d38e8
lea eax, [esp + 0x98]
mov dword [esp + 0x24], 0x10443454
mov dword [esp + 0x28], 1
mov dword [esp + 0x34], 0
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
mov dword [esp + 0x10], 0x1002df20
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], 1
lea eax, [esp + 0x24]
push eax
call fcn.100748a0
add esp, 4
mov dword [esp + 0x44], 4
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
xor edi, edi
mov dword [esp + 0x24], 4
mov dword [esp + 0x28], 0
movsd xmm0, qword [esp + 0x24]
mov dword [esp + 0x14], edi
movsd qword [esp + 0xc], xmm0
mov edx, dword [ebp + 8]
lea eax, [esp + 0xc]
lea ecx, [esp + 0x68]
push 2
push eax
call fcn.101d2ac0
add esp, 8
mov eax, dword [esp + 0x68]
mov dword [esp + 0x58], 4
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
test eax, eax
mov dword [esp + 0x50], eax
je 0x101d39b2
mov eax, dword [esp + 0x70]
movsd xmm0, qword [esp + 0x68]
mov dword [esp + 0x60], eax
movsd qword [esp + 0x58], xmm0
jmp 0x101d3a4a
mov dword [esp + 0x44], 1
mov dword [esp + 0x48], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x4c], 0
lea eax, [esp + 0x78]
lea edx, [esp + 0x74]
lea ecx, [esp + 0x20]
push eax
push ecx
push edx
push 0
push 1
push 1
push 0x30
push ebx
call sub.advapi32.dll_EnumServicesStatusW
xor edi, edi
test eax, eax
mov esi, 1
mov eax, 0
jne 0x101d3cf6
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xea
mov dword [esp + 0x58], eax
jne 0x101d3c6d
mov esi, dword [esp + 0x74]
mov dword [esp], ebx
test esi, esi
je 0x101d3cc3
xor edx, edx
lea ecx, [esp + 0x44]
push esi
call fcn.101ab1a0
add esp, 4
mov edi, dword [esp + 0x44]
mov ebx, dword [esp + 0x4c]
cmp esi, 2
lea eax, [edi + ebx]
jb 0x101d39a1
lea ecx, [esi - 1]
push ecx
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea ebx, [ebx + esi - 1]
lea eax, [edi + ebx]
mov byte [eax], 0
mov esi, edi
inc ebx
xor edi, edi
mov eax, dword [esp + 0x74]
jmp 0x101d3ccc
mov ebx, dword [esp + 0x6c]
mov edi, dword [esp + 0x70]
mov eax, dword [esp + 0x4c]
movsd xmm0, qword [esp + 0x44]
mov dword [esp + 0x7c], edi
mov dword [esp + 0x78], ebx
mov dword [esp + 0x2c], eax
movsd qword [esp + 0x24], xmm0
mov edx, dword [ebp + 8]
lea esi, [esp + 0x24]
lea ecx, [esp + 0xc]
push 0
push esi
call fcn.101d2ac0
add esp, 8
cmp dword [esp + 0xc], 0
je 0x101d4235
mov eax, dword [esp + 0x14]
movsd xmm0, qword [esp + 0xc]
cmp bl, 3
mov dword [esp + 0x60], eax
movsd qword [esp + 0x58], xmm0
jne 0x101d3a4a
mov ebx, dword [edi + 4]
mov esi, dword [edi]
mov eax, dword [ebx]
push esi
call eax
add esp, 4
cmp dword [ebx + 4], 0
je 0x101d3a3b
cmp dword [ebx + 8], 9
jb 0x101d3a2c
mov esi, dword [esi - 4]
mov eax, dword [0x1044eff8]
push esi
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [0x1044eff8]
push edi
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
mov ecx, dword [esp + 0x60]
mov ebx, dword [esp + 0x58]
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], 4
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov edx, ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x54], ebx
shl edx, 4
add edx, ebx
test ecx, ecx
mov dword [esp + 0x30], edx
je 0x101d3b48
mov dword [esp + 4], edx
mov eax, dword [esp + 0x54]
xor edi, edi
mov ecx, 4
mov edx, dword [esp + 4]
lea ebx, [eax + 0x10]
jmp 0x101d3aff
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x14]
mov edx, dword [esp]
mov eax, edi
movaps xmm0, xmmword [esp + 0x80]
add esi, 0x10
inc edi
add ebx, 0x10
shl eax, 4
mov dword [ecx + eax], edx
movzx edx, byte [esp + 8]
movlps qword [ecx + eax + 4], xmm0
mov byte [ecx + eax + 0xc], dl
movzx edx, word [esp + 0x20]
mov word [ecx + eax + 0xd], dx
movzx edx, byte [esp + 0x22]
mov byte [ecx + eax + 0xf], dl
mov edx, dword [esp + 4]
mov dword [esp + 0x14], edi
cmp esi, edx
je 0x101d3b7d
movzx eax, byte [ebx - 4]
cmp al, 2
je 0x101d3b48
mov byte [esp + 8], al
mov eax, dword [ebx - 0x10]
lea esi, [ebx - 0x10]
movsd xmm0, qword [ebx - 0xc]
cmp edi, dword [esp + 0x10]
mov dword [esp], eax
movzx eax, byte [esi + 0xf]
movaps xmmword [esp + 0x80], xmm0
mov byte [esp + 0x22], al
movzx eax, word [esi + 0xd]
mov word [esp + 0x20], ax
jne 0x101d3ab8
lea ecx, [esp + 0xc]
mov edx, edi
call fcn.101aac80
jmp 0x101d3ab0
sub edx, ebx
mov dword [esp + 0x2c], ebx
je 0x101d3b7d
mov esi, dword [0x1044eff8]
shr edx, 4
add ebx, 4
jmp 0x101d3b66
add ebx, 0x10
dec edx
je 0x101d3b7d
cmp dword [ebx], 0
je 0x101d3b60
push dword [ebx - 4]
push 0
push dword [esi]
mov edi, edx
call sub.KERNEL32.dll_HeapFree
mov edx, edi
jmp 0x101d3b60
cmp dword [esp + 0x28], 0
je 0x101d3b96
mov eax, dword [0x1044eff8]
push dword [esp + 0x54]
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
lea eax, [esp + 0xc]
lea ecx, [esp + 0x78]
mov dword [esp + 0x24], 0x104434b4
mov dword [esp + 0x28], 1
mov dword [esp + 0x34], 0
mov dword [esp + 0x78], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x7c], 0x101ab620
mov dword [esp + 0x30], 1
lea esi, [esp + 0x24]
push esi
call fcn.100748a0
add esp, 4
mov eax, dword [esp + 0x14]
movsd xmm0, qword [esp + 0xc]
cmp dword [esp + 0x50], 0
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 8]
movsd qword [esp + 0x24], xmm0
je 0x101d3c5b
mov ebx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x44]
test ebx, ebx
mov dword [esp], ecx
je 0x101d3c3c
mov ecx, dword [esp]
mov edi, dword [0x1044eff8]
lea esi, [ecx + 4]
jmp 0x101d3c26
add esi, 0x10
dec ebx
je 0x101d3c3c
cmp dword [esi], 0
je 0x101d3c20
push dword [esi - 4]
push 0
push dword [edi]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [ebp + 8]
jmp 0x101d3c20
cmp dword [esp + 0x48], 0
lea esi, [esp + 0x24]
je 0x101d3c5b
mov eax, dword [0x1044eff8]
push dword [esp]
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [ebp + 8]
push esi
push eax
call fcn.101d43d0
add esp, 8
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [esp + 0x58]
mov dword [esp + 0x24], 0x1044319c
mov dword [esp + 0x28], 1
mov dword [esp + 0x34], 0
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
mov dword [esp + 0x10], 0x101a2bc0
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], 1
lea eax, [esp + 0x24]
push eax
call fcn.100748a0
add esp, 4
xor edi, edi
xor esi, esi
mov dword [esp + 0x1c], 4
jmp 0x101d3ed9
mov esi, 1
xor eax, eax
xor ebx, ebx
mov dword [esp + 8], ebx
mov dword [esp + 0x4c], ebx
lea ecx, [esp + 0x78]
push ecx
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x7c]
push ecx
push eax
push esi
push 1
push 0x30
push dword [esp + 0x1c]
call sub.advapi32.dll_EnumServicesStatusW
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x68], 4
mov dword [esp + 0x6c], 0
mov dword [esp], esi
mov dword [esp + 0x70], 0
test ecx, ecx
mov dword [esp + 4], ecx
je 0x101d41ca
xor edi, edi
mov esi, 4
xor ebx, ebx
mov dword [esp + 8], eax
jmp 0x101d3d7c
mov esi, dword [esp + 0x68]
mov edi, dword [esp + 0x70]
movsd xmm0, qword [esp + 0x3c]
mov eax, edi
inc ebx
inc edi
shl eax, 5
cmp ebx, dword [esp + 4]
movsd qword [esi + eax + 0x18], xmm0
movsd xmm0, qword [esp + 0x34]
movsd qword [esi + eax + 0x10], xmm0
movsd xmm0, qword [esp + 0x24]
movsd xmm1, qword [esp + 0x2c]
movsd qword [esi + eax + 8], xmm1
movsd qword [esi + eax], xmm0
mov dword [esp + 0x70], edi
je 0x101d3eb9
cmp ebx, 0x71c71c7
mov dword [esp + 0x80], edi
je 0x101d41fa
lea eax, [ebx*4]
mov edi, esi
lea esi, [eax + eax*8]
lea eax, [esi + 0x24]
cmp eax, dword [esp + 8]
ja 0x101d420d
mov eax, dword [esp]
mov eax, dword [eax + esi]
test eax, eax
je 0x101d3e20
mov ecx, 0xffffffff
nop word [eax + eax]
cmp word [eax + ecx*2 + 2], 0
lea ecx, [ecx + 1]
jne 0x101d3dc0
push ecx
push eax
lea eax, [esp + 0x60]
push eax
call fcn.10169f90
add esp, 0xc
mov eax, dword [esp]
mov eax, dword [eax + esi + 4]
test eax, eax
je 0x101d3e48
mov ecx, 0xffffffff
mov esi, edi
nop dword [eax]
cmp word [eax + ecx*2 + 2], 0
lea ecx, [ecx + 1]
jne 0x101d3df0
push ecx
push eax
lea eax, [esp + 0x14]
push eax
call fcn.10169f90
add esp, 0xc
mov edi, dword [esp + 0x80]
jmp 0x101d3e6e
mov dword [esp + 0x58], 1
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
mov byte [esp + 0x64], 1
mov eax, dword [esp]
mov eax, dword [eax + esi + 4]
test eax, eax
jne 0x101d3de5
mov esi, edi
mov edi, dword [esp + 0x80]
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov byte [esp + 0x18], 1
movsd xmm0, qword [esp + 0x58]
movsd xmm1, qword [esp + 0x60]
cmp edi, dword [esp + 0x6c]
movsd xmm2, qword [esp + 0x14]
lea eax, [esp + 0x34]
movsd qword [esp + 0x24], xmm0
movsd xmm0, qword [esp + 0xc]
movsd qword [esp + 0x2c], xmm1
movsd qword [eax + 8], xmm2
movsd qword [eax], xmm0
jne 0x101d3d38
lea ecx, [esp + 0x68]
mov edx, edi
call fcn.101aad20
jmp 0x101d3d30
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x6c]
cmp dword [esp + 0x48], 0
je 0x101d3ed9
mov eax, dword [0x1044eff8]
push dword [esp]
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [esp + 0x1c]
mov ebx, edi
mov dword [esp + 0xc], 4
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
shl ebx, 5
add ebx, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], esi
test edi, edi
mov esi, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebx
je 0x101d3fe5
mov eax, dword [esp + 0x1c]
xor edi, edi
mov ecx, 4
mov dword [esp + 0x50], ebx
lea esi, [eax + 0x20]
jmp 0x101d3f44
mov eax, dword [esp + 0x50]
add ebx, 0x20
add esi, 0x20
cmp ebx, eax
mov ebx, eax
je 0x101d402b
cmp byte [esi - 4], 2
je 0x101d3fe5
mov ebx, dword [esi - 0x1c]
mov edx, dword [esi - 0x14]
mov eax, dword [esi - 0x20]
cmp edi, dword [esp + 0x10]
mov dword [esp + 0x80], ebx
mov ebx, dword [esi - 0x18]
mov dword [esp + 0x54], edx
mov edx, dword [esi - 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov ebx, dword [esi - 0x10]
mov dword [esp], edx
jne 0x101d3f8f
lea ecx, [esp + 0xc]
mov edx, edi
call fcn.101aac80
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x14]
mov edx, ebx
mov ebx, dword [esp + 8]
mov eax, edi
inc edi
shl eax, 4
cmp dword [esp], 0
mov dword [ecx + eax], ebx
mov ebx, dword [esp + 0x80]
mov dword [ecx + eax + 4], ebx
mov ebx, dword [esp + 0x54]
mov dword [ecx + eax + 0xc], ebx
mov ebx, dword [esp + 4]
mov dword [ecx + eax + 8], ebx
lea ebx, [esi - 0x20]
mov dword [esp + 0x14], edi
je 0x101d3f30
push edx
push 0
mov eax, dword [0x1044eff8]
push dword [eax]
mov dword [esp + 0xc], ecx
call sub.KERNEL32.dll_HeapFree
mov ecx, dword [esp]
jmp 0x101d3f30
sub ebx, esi
mov dword [esp + 0x2c], esi
je 0x101d402b
mov edi, dword [0x1044eff8]
shr ebx, 5
add esi, 0x14
jmp 0x101d4006
add esi, 0x20
dec ebx
je 0x101d402b
cmp dword [esi - 0x10], 0
je 0x101d4018
push dword [esi - 0x14]
push 0
push dword [edi]
call sub.KERNEL32.dll_HeapFree
cmp dword [esi], 0
je 0x101d4000
push dword [esi - 4]
push 0
push dword [edi]
call sub.KERNEL32.dll_HeapFree
jmp 0x101d4000
cmp dword [esp + 0x28], 0
je 0x101d4044
mov eax, dword [0x1044eff8]
push dword [esp + 0x1c]
push 0
push dword [eax]
call sub.KERNEL32.dll_HeapFree
mov edi, dword [esp + 0x14]
movsd xmm0, qword [esp + 0xc]
test edi, edi
movsd qword [esp + 0x44], xmm0
mov dword [esp + 0x4c], edi
je 0x101d386f
xor ebx, ebx
cmp edi, 0x8000000
setb al
jae 0x101d425d
mov ecx, edi
mov bl, al
shl ecx, 4
shl ebx, 2
test ecx, ecx
js 0x101d425d
mov eax, dword [esp + 0x44]
mov dword [esp], eax
je 0x101d41e4
mov eax, dword [0x1044f00c]
mov esi, dword [0x1044eff8]
movzx eax, byte [eax]
mov eax, dword [esi]
test eax, eax
jne 0x101d40bb
mov dword [esp + 8], ecx
call sub.KERNEL32.dll_GetProcessHeap
mov ecx, dword [esp + 8]
test eax, eax
je 0x101d41ee
mov dword [esi], eax
push ecx
push 0
push eax
mov esi, ecx
call sub.KERNEL32.dll_HeapAlloc
mov ecx, esi
test eax, eax
je 0x101d41ee
mov edx, dword [esp]
mov dword [esp + 0x24], eax
add eax, 0xc
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x1c], edi
jmp 0x101d4174
mov ecx, dword [0x1044eff8]
mov dword [ecx], eax
push esi
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
mov ebx, eax
test eax, eax
je 0x101d4221
mov eax, dword [esp]
mov edi, esi
mov esi, dword [esp + 0x80]
add eax, 0x10
inc esi
mov dword [esp + 0x50], eax
push edi
push dword [esp + 0x58]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [esp]
mov edx, dword [esp + 0x50]
mov dword [esp + 0x80], esi
movzx ecx, byte [eax + 0xc]
mov eax, dword [esp + 4]
mov dword [eax - 0xc], ebx
mov dword [eax - 8], edi
mov dword [eax - 4], edi
mov byte [eax], cl
mov ecx, dword [esp + 8]
mov edi, dword [esp + 0x1c]
add eax, 0x10
add ecx, 0xfffffff0
cmp edi, esi
je 0x101d3881
test ecx, ecx
je 0x101d3881
mov esi, dword [edx + 8]
mov edi, dword [edx]
mov dword [esp + 8], ecx
mov dword [esp], edx
mov dword [esp + 4], eax
test esi, esi
mov dword [esp + 0x54], edi
je 0x101d41c0
js 0x101d422e
mov eax, dword [0x1044f00c]
movzx eax, byte [eax]
mov eax, dword [0x1044eff8]
mov eax, dword [eax]
test eax, eax
jne 0x101d4108
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
jne 0x101d4100
jmp 0x101d4221
mov ebx, 1
jmp 0x101d411b
mov dword [esp + 0x1c], 4
xor esi, esi
cmp dword [esp + 0x48], 0
jne 0x101d3ec8
jmp 0x101d3ed9
mov eax, ebx
test eax, eax
jne 0x101d40d0
push ecx
push ebx
call fcn.1001ac80
add esp, 8
jmp 0x101d4262
push 0x104431d0
push 0x20
push 0xfffffffffffffffc
call fcn.1002ac90
add esp, 0xc
jmp 0x101d4262
push 0x104431d0
push dword [esp + 0xc]
push eax
call fcn.1002ac30
add esp, 0xc
jmp 0x101d4262
push esi
push 1
call fcn.1001ac80
add esp, 8
jmp 0x101d4262
call fcn.1001ac40
jmp 0x101d4262
movsd xmm0, qword [esp + 0x10]
movsd qword [esp + 0x24], xmm0
push 0x10443480
push 0x1043ec64
push esi
push 0x2b
push str.called__Result::unwrap____on_an__Err__value
call fcn.10027650
add esp, 0x14
jmp 0x101d4262
call fcn.1001ac40
ud2