Function at 0x684df690
Capabilities:
Query or enumerate registry value
Start service

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xbc
mov eax, dword [ebp + 8]
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x84], 0
shr eax, 0x10
mov dword [ebp - 0x90], eax
test byte [0x684eb2d0], 8
jne 0x684df890
mov dword [ebp - 0x8c], 1
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x84]
mov dword [ebp - 0x7c], 0
call fcn.684dc550
test eax, eax
jns 0x684dfc13
cmp dword [ebp - 0x8c], 1
je 0x684df7c0
lea edi, [ebp - 0x68]
mov esi, dword [sym.imp.kernel32.dll_GetTickCount]
call esi
mov ebx, eax
lea esi, [esi]
nop
mov ecx, dword [ebp - 0x7c]
lea eax, [ebp - 0x7c]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], eax
xor eax, eax
test ecx, ecx
mov dword [esp + 4], 0x3e8
setne al
mov dword [esp], 0
mov dword [esp + 8], eax
call sym.combase.dll_CoWaitForMultipleHandles
sub esp, 0x14
test eax, eax
js 0x684df752
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x684df752
mov edx, dword [ebp - 0x68]
test edx, edx
je 0x684df790
call esi
sub eax, ebx
cmp eax, 0x3e7
jbe 0x684df710
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x684df770
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
add dword [ebp - 0x8c], 1
mov eax, dword [ebp - 0x8c]
cmp eax, 0x1f
jne 0x684df6d0
mov esi, 0x80004002
jmp 0x684df7ae
test byte [0x684eb2d0], 4
jne 0x684df9f9
mov dword [esp], eax
mov esi, 0x80004002
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x684eb2d0], 8
jne 0x684dfac5
lea eax, [ebp - 0x78]
mov dword [esp + 4], 0x20019
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.684ca820
mov ebx, eax
test eax, eax
js 0x684df859
lea eax, [ebp - 0x70]
lea edi, [ebp - 0x68]
mov dword [ebp - 0x70], 0x4e
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x78]
lea esi, [ebp - 0x74]
mov dword [esp + 0x10], edi
mov dword [esp], eax
mov eax, dword [sym.imp.advapi32.dll_RegQueryValueExW]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], str.LocalService
mov dword [ebp - 0x94], eax
call eax
sub esp, 0x18
test eax, eax
jne 0x684df83d
cmp dword [ebp - 0x74], 1
je 0x684dfd8a
test byte [0x684eb2d0], 4
jne 0x684dfb8e
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x7c]
lea edi, [ebp - 0x68]
call fcn.684de970
test eax, eax
je 0x684df6fd
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x7c]
call fcn.684dd960
mov esi, eax
test eax, eax
je 0x684df6fd
jmp 0x684df7ae
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x684dfd5d
mov eax, dword [ebp + 0xc]
shr eax, 0x10
je 0x684dfbc6
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 0xf]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 0xe]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 0xd]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 0xb]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 0xa]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 9]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 6]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 4]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], 0x684f2320
call fcn.684db860
mov ebx, eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x684dfd53
mov edi, dword [ebp - 0x90]
test edi, edi
je 0x684dfbfa
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xf]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xe]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xd]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xb]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xa]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 9]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 6]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 4]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], 0x684f2320
call fcn.684db860
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.clsid__s__riid__s_n
mov dword [esp + 8], str.rpc_get_local_class_object
mov dword [esp + 4], 0x684eb2d0
mov dword [esp], 3
call fcn.684dbd80
jmp 0x684df6c6
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x684dfd67
mov edx, dword [ebp - 0x90]
test edx, edx
je 0x684dfbe1
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xf]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xe]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xd]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xb]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xa]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 9]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 6]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 4]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], 0x684f2320
call fcn.684db860
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Server_for__s_failed_to_start._n
mov dword [esp + 8], str.rpc_get_local_class_object
mov dword [esp + 4], 0x684eb2d0
mov dword [esp], 2
call fcn.684dbd80
mov eax, dword [ebp - 0x7c]
jmp 0x684df79d
mov esi, dword [ebp + 8]
test esi, esi
je 0x684dff20
mov ebx, dword [ebp - 0x90]
test ebx, ebx
je 0x684dfd71
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xf]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xe]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xd]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xb]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0xa]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 9]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 6]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 4]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], 0x684f2320
call fcn.684db860
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Attempting_to_start_Local_service_for__s_n
mov dword [esp + 8], str.create_local_service
mov dword [esp + 4], 0x684eb2d0
mov dword [esp], 3
call fcn.684dbd80
jmp 0x684df7cd
mov dword [esp + 0xc], str.No_LocalService_value_n
mov dword [esp + 8], str.create_local_service
mov dword [esp + 4], 0x684eb2d0
mov dword [esp], 2
call fcn.684dbd80
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x684df859
movzx eax, word [ebp + 0xc]
mov dword [esp], 0x684f2311
mov dword [esp + 4], eax
call fcn.684db860
mov ebx, eax
jmp 0x684df92c
movzx eax, word [ebp + 8]
mov dword [esp], 0x684f2311
mov dword [esp + 4], eax
call fcn.684db860
jmp 0x684dfa95
movzx eax, word [ebp + 8]
mov dword [esp], 0x684f2311
mov dword [esp + 4], eax
call fcn.684db860
jmp 0x684df9c8
mov eax, dword [ebp - 0x84]
test eax, eax
je 0x684df786
cmp dword [ebp - 0x8c], 0x1d
jg 0x684df786
lea eax, [ebp - 0x80]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0
call sym.combase.dll_CreateStreamOnHGlobal
mov esi, eax
sub esp, 0xc
mov eax, dword [ebp - 0x84]
test esi, esi
js 0x684dfd48
mov edx, dword [ebp - 0x80]
lea ebx, [ebp - 0x6c]
add eax, 4
mov ecx, dword [edx]
mov dword [esp + 0xc], ebx
mov ebx, dword [eax - 4]
mov dword [esp + 4], eax
mov dword [esp], edx
mov dword [esp + 8], ebx
call dword [ecx + 0x10]
mov esi, eax
mov eax, dword [ebp - 0x84]
sub esp, 0x10
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
test esi, esi
js 0x684dfd28
mov eax, dword [ebp - 0x80]
lea ecx, [ebp - 0x68]
mov edx, dword [eax]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0x14
test byte [0x684eb2d0], 8
jne 0x684dff2a
lea eax, [ebp - 0x70]
mov dword [esp + 4], 0x684fa098
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x80]
mov dword [esp], eax
call sym.combase.dll_CoUnmarshalInterface
sub esp, 0xc
mov esi, eax
test eax, eax
js 0x684dfd28
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax]
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 4], ecx
call dword [edx + 0xc]
mov esi, eax
mov eax, dword [ebp - 0x70]
sub esp, 0x10
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x80]
test eax, eax
je 0x684df7ae
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, esi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x684dfd28
mov eax, 0x684f24c4
jmp 0x684df9c8
mov ebx, 0x684f24c4
jmp 0x684df92c
mov eax, 0x684f24c4
jmp 0x684dfa95
movzx eax, word [ebp + 8]
mov dword [esp], 0x684f2311
mov dword [esp + 4], eax
call fcn.684db860
jmp 0x684dfb61
lea eax, [ebp - 0x70]
mov dword [ebp - 0x6c], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x78]
mov dword [esp + 0x10], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x94]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], str.ServiceParams
call eax
mov dword [ebp - 0x98], 0
sub esp, 0x18
test eax, eax
jne 0x684dfddd
cmp dword [ebp - 0x74], 1
je 0x684dffc5
test byte [0x684eb2d0], 8
jne 0x684dff87
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.advapi32.dll_OpenSCManagerW]
mov dword [ebp - 0x94], eax
sub esp, 0xc
test eax, eax
je 0x684dff53
mov eax, dword [ebp - 0x94]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov edx, eax
test eax, eax
je 0x684dff73
lea eax, [ebp - 0x6c]
mov dword [esp], edx
xor esi, esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x98], edx
mov dword [esp + 4], eax
call dword [sym.imp.advapi32.dll_StartServiceW]
mov edx, dword [ebp - 0x98]
sub esp, 0xc
test eax, eax
jne 0x684dfe82
mov ecx, dword fs:[0x18]
mov esi, dword [ecx + 0x34]
cmp esi, 0x420
cmove esi, eax
mov dword [esp], edx
mov edx, dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov dword [ebp - 0x98], edx
call edx
mov edx, dword [ebp - 0x98]
sub esp, 4
mov eax, dword [ebp - 0x94]
mov dword [esp], eax
call edx
sub esp, 4
test byte [0x684eb2d0], 8
je 0x684dfeee
test esi, esi
mov eax, 0x684f26b7
mov edx, str.failed
mov dword [esp + 0x10], esi
cmovne eax, edx
mov dword [esp + 0xc], str.StartService_returned_error__lu___s__n
mov dword [esp + 8], 0x684f2d88
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0x684eb2d0
mov dword [esp], 3
call fcn.684dbd80
mov eax, dword [ebp - 0x6c]
test esi, esi
jne 0x684dff56
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
test ebx, ebx
je 0x684df6fd
jmp 0x684df859
mov eax, 0x684f24c4
jmp 0x684dfb61
mov dword [esp + 0xc], str.Unmarshalling_local_server._n
mov dword [esp + 8], str.rpc_get_local_class_object
mov dword [esp + 4], 0x684eb2d0
mov dword [esp], 3
call fcn.684dbd80
jmp 0x684dfcd2
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x684df859
mov eax, dword fs:[0x18]
mov edx, dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov esi, dword [eax + 0x34]
jmp 0x684dfe9c
mov eax, edi
call fcn.684dbb10
mov ecx, dword [ebp - 0x98]
mov dword [esp + 0xc], str.Starting_service__s__ld_params_n
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 8], 0x684f2d88
mov dword [esp + 4], 0x684eb2d0
mov dword [esp], 3
call fcn.684dbd80
jmp 0x684dfdea
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x98], eax
test eax, eax
je 0x684dfddd
mov dword [esp + 4], eax
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_calloc]
lea ecx, [ebp - 0x70]
mov dword [esp + 0xc], esi
mov dword [ebp - 0x6c], eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x78]
mov dword [esp + 0x14], ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x94]
mov dword [esp + 8], 0
mov dword [esp + 4], str.ServiceParams
call eax
mov dword [ebp - 0x98], 1
sub esp, 0x18
jmp 0x684dfddd