Function at 0x4113c9
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
push edi
xor edi, edi
push 4
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, edi
mov dword [ebp - 0xc], eax
jne 0x411400
mov ecx, dword [ebp + 8]
lea eax, [ebp - 1]
push eax
push 0x415800
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_unsigned_short_int_const___class_std::allocator_unsigned_short_int__const__]
mov eax, dword [ebp + 8]
jmp 0x4116fd
lea eax, [ebp - 1]
push esi
push eax
lea ecx, [ebp - 0x3c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_class_std::allocator_unsigned_short_int__const__]
lea eax, [ebp - 0x24]
mov esi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x144]
push edi
push eax
push 3
push 0x3b
push dword [ebp - 0xc]
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x24], edi
call esi
test eax, eax
jne 0x4116da
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4116da
push ebx
mov ebx, dword [ebp - 0x10]
push ebx
call dword [sym.imp.MSVCRT.dll_malloc]
pop ecx
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push ebx
push eax
push 3
push 0x3b
push dword [ebp - 0xc]
call esi
cmp dword [ebp - 8], edi
mov dword [ebp - 0x14], edi
jbe 0x4116cf
mov ebx, dword [ebp - 0x28]
mov edi, dword [ebp + 8]
mov esi, 0x416afc
lea eax, [ebp - 1]
lea ecx, [ebp - 0x100]
push eax
push esi
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_unsigned_short_int_const___class_std::allocator_unsigned_short_int__const__]
push eax
lea eax, [ebp - 0x50]
push dword [ebx + 4]
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_unsigned_short_int_const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__
add esp, 0xc
lea ecx, [ebp - 0x3c]
push eax
call dword [0x4151fc]
lea ecx, [ebp - 0x50]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea ecx, [ebp - 0x100]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea eax, [ebp - 0x1e]
lea ecx, [ebp - 0xe0]
push eax
push esi
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_unsigned_short_int_const___class_std::allocator_unsigned_short_int__const__]
push eax
lea eax, [ebp - 0x80]
push dword [ebx]
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_unsigned_short_int_const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__
add esp, 0xc
lea ecx, [ebp - 0x3c]
push eax
call dword [0x4151fc]
lea ecx, [ebp - 0x80]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea ecx, [ebp - 0xe0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea eax, [ebp - 0x1d]
lea ecx, [ebp - 0xc0]
push eax
push esi
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_unsigned_short_int_const___class_std::allocator_unsigned_short_int__const__]
push eax
lea eax, [ebp - 0x120]
push dword [ebx + 0xc]
push eax
call fcn.00412756
pop ecx
pop ecx
push eax
lea eax, [ebp - 0xa0]
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__
add esp, 0xc
lea ecx, [ebp - 0x3c]
push eax
call dword [0x4151fc]
lea ecx, [ebp - 0xa0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea ecx, [ebp - 0x120]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea ecx, [ebp - 0xc0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
and dword [ebp - 0x1c], 0
push 1
push dword [ebx]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
push ecx
push 0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x4116b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4116b4
mov eax, dword [ebp - 0x1c]
push eax
mov dword [ebp - 0x40], eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
pop ecx
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x40]
push edi
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
push esi
lea eax, [ebp - 0x70]
push dword [edi]
push eax
call fcn.00412756
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x60]
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
add esp, 0xc
lea ecx, [ebp - 0x3c]
push eax
call dword [0x4151fc]
lea ecx, [ebp - 0x60]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea ecx, [ebp - 0x70]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
push esi
lea eax, [ebp - 0xb0]
push dword [edi + 4]
push eax
call fcn.00412756
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x90]
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
add esp, 0xc
lea ecx, [ebp - 0x3c]
push eax
call dword [0x4151fc]
lea ecx, [ebp - 0x90]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea ecx, [ebp - 0xb0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea eax, [ebp - 0x15]
push 0x41623c
push eax
push esi
lea ecx, [ebp - 0x110]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_unsigned_short_int_const___class_std::allocator_unsigned_short_int__const__]
push eax
lea eax, [ebp - 0xf0]
push dword [edi + 0xc]
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_unsigned_short_int_const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__
add esp, 0xc
push eax
lea eax, [ebp - 0xd0]
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
add esp, 0xc
lea ecx, [ebp - 0x3c]
push eax
call dword [0x4151fc]
lea ecx, [ebp - 0xd0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea ecx, [ebp - 0xf0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
lea ecx, [ebp - 0x110]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
push edi
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
inc dword [ebp - 0x14]
add ebx, 0x24
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 8]
jb 0x411490
push dword [ebp - 0x28]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
pop ebx
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__]
lea ecx, [ebp - 0x3c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
mov eax, dword [ebp + 8]
pop esi
pop edi
leave
ret