Function at 0x41ad77
Capabilities:
Create thread

Disassembly:
mov eax, 0x4cadd0
call fcn.004bf1dc
sub esp, 0x91c
push ebx
push esi
lea eax, [ebp - 0x108]
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ecx
push eax
mov dword [0x50402c], ebx
mov dword [ebp - 0x108], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0xf8], 2
jne 0x41ae1f
cmp dword [0x504028], ebx
je 0x41ae1f
push 0x14
call fcn.004bfbe2
mov esi, eax
pop ecx
cmp esi, ebx
je 0x41b157
push 1
pop edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x41adec
push ebx
push ebx
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x41adf8
push esi
call fcn.004c004b
pop ecx
jmp 0x41b157
push str.3583ed93_8b81_44ee_9d25_14fffb277739
push ebx
lea eax, [ebp - 0x54]
mov dword [ebp - 0x50], esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push eax
mov dword [ebp - 0x54], 0xc
mov dword [ebp - 0x4c], edi
call esi
mov dword [0x504038], eax
jmp 0x41ae37
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push str.3583ed93_8b81_44ee_9d25_14fffb277739
push ebx
push ebx
push ebx
call esi
push 1
mov dword [0x504038], eax
pop edi
push ebx
push ebx
push edi
push ebx
call esi
push ebx
push ebx
push edi
push ebx
mov dword [0x504030], eax
call esi
push ebx
push ebx
mov dword [0x504034], eax
call dword [sym.imp.ole32.dll_CoInitializeEx]
cmp eax, ebx
mov edi, str.SUCCEEDED_hr_
mov esi, str.ASSERT__s_
jge 0x41ae90
push edi
lea eax, [ebp - 0x508]
push esi
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x508]
mov ecx, 0x503ff0
push eax
push 0x49c
push str.NMSSvc.cpp
call fcn.00423080
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
push 1
push ebx
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], ebx
call fcn.0041b281
push ebx
push ebx
push ebx
push 3
push 1
push ebx
push ebx
push 0xffffffffffffffff
push ebx
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
test eax, eax
jge 0x41aef0
push edi
lea eax, [ebp - 0x508]
push esi
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x508]
mov ecx, 0x503ff0
push eax
push 0x4a5
push str.NMSSvc.cpp
call fcn.00423080
push 5
push 4
push 0x503c38
call fcn.0041b166
test eax, eax
jge 0x41af2f
push edi
lea eax, [ebp - 0x508]
push esi
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x508]
mov ecx, 0x503ff0
push eax
push 0x4a9
push str.NMSSvc.cpp
call fcn.00423080
call dword [sym.imp.ole32.dll_CoResumeClassObjects]
cmp eax, ebx
jge 0x41af6b
push edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x508]
push esi
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x508]
mov esi, str.NMSSvc.cpp
mov ecx, 0x503ff0
push eax
push 0x4ac
push esi
call fcn.00423080
jmp 0x41af76
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
mov esi, str.NMSSvc.cpp
mov al, byte [ebp - 0x11]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.00406ad6
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
push 0x2161
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.0041a16a
test eax, eax
jne 0x41afbc
push esi
push 0x4af
push str.sEventMessage.LoadString_IDS_SERVICE_STARTED_
lea eax, [ebp - 0x518]
push str.__s____d__in___s_
push eax
call edi
add esp, 0x14
mov eax, dword [ebp - 0x28]
cmp eax, ebx
jne 0x41afc8
mov eax, 0x4d68e8
push eax
push dword [ebp - 0x10]
call fcn.0041aa75
cmp dword [0x504028], ebx
pop ecx
pop ecx
je 0x41afe5
mov ecx, dword [ebp - 0x10]
push 4
call fcn.0041ad3f
lea eax, [ebp - 0x58]
push eax
push ebx
push dword [ebp - 0x10]
push 0x419f87
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x41b053
push 0x2162
lea ecx, [ebp - 0x2c]
call fcn.0041a16a
test eax, eax
jne 0x41b02b
push esi
push 0x4ba
push str.sEventMessage.LoadString_IDS_SERVICE_CREATE_THREAD_FAILED_
lea eax, [ebp - 0x518]
push str.__s____d__in___s_
push eax
call edi
add esp, 0x14
mov eax, dword [ebp - 0x28]
cmp eax, ebx
jne 0x41b037
mov eax, 0x4d68e8
push eax
push dword [ebp - 0x10]
call fcn.0041aa75
pop ecx
pop ecx
push str.CServiceModule::Run___Failed_to_create_startup_thread
push 0x503ff0
call fcn.004230b0
pop ecx
pop ecx
mov eax, dword [0x504038]
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
mov dword [ebp - 0x34], eax
mov eax, dword [0x504034]
mov dword [ebp - 0x30], eax
push 0xbf
push 0xffffffffffffffff
lea eax, [ebp - 0x34]
push ebx
push eax
push 2
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp eax, ebx
je 0x41b0a7
cmp eax, 1
je 0x41b0a7
push 1
push ebx
push ebx
lea eax, [ebp - 0x74]
push ebx
push eax
call esi
test eax, eax
je 0x41b069
cmp dword [ebp - 0x70], 0x12
je 0x41b069
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x41b086
mov ecx, dword [ebp - 0x10]
call fcn.0041a1fa
push 0x2163
lea ecx, [ebp - 0x2c]
call fcn.0041a16a
test eax, eax
jne 0x41b0e0
push str.NMSSvc.cpp
push 0x4d9
push str.sEventMessage.LoadString_IDS_SERVICE_EXITING_
lea eax, [ebp - 0x928]
push str.__s____d__in___s_
push eax
call edi
add esp, 0x14
mov eax, dword [ebp - 0x28]
cmp eax, ebx
jne 0x41b0ec
mov eax, 0x4d68e8
push eax
push dword [ebp - 0x10]
call fcn.0041aa75
pop ecx
pop ecx
call dword [sym.imp.ole32.dll_CoSuspendClassObjects]
push 0x503c38
call fcn.0041b1fb
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.ole32.dll_CoUninitialize]
push dword [0x504030]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [0x504034]
call esi
mov eax, dword [0x504038]
cmp eax, ebx
je 0x41b140
push eax
call esi
mov dword [0x504038], ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.00405d6e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.0041b237
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret