Function at 0x1000403b
Capabilities:
Create service
Modify service
Query or enumerate registry value
Query service status
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x248
xor esi, esi
mov eax, dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
push eax
sub esp, 0x614
mov dword [ebp - 0x1c], esp
sub esp, 0x18
mov dword [ebp - 0x18], esp
sub esp, 0x14
mov ebx, esp
push eax
mov dword [ebp - 0x30], esp
push eax
mov dword [ebp - 0x24], esp
push eax
mov dword [ebp - 0x48], esp
push eax
mov dword [ebp - 0x38], esp
push eax
mov dword [ebp - 0x34], esp
sub esp, 0x24
mov dword [ebp - 0x40], esp
push eax
mov dword [ebp - 0x3c], esp
push eax
mov dword [ebp - 0x44], esp
push 0xf003f
push esi
push esi
mov edi, eax
call eax
cmp dword [0x1002d1f8], 0xa
jl 0x100040b7
mov edx, dword [0x1002d1fc]
lea ecx, [edx + 1]
imul ecx, edx
and ecx, 1
je 0x100040b7
push 0xf003f
push esi
push esi
call edi
mov eax, edi
jmp 0x1000404e
test eax, eax
je 0x10004150
test eax, eax
je 0x100041b9
mov dword [ebp - 0x10], 0
push 0xf01ff
push str.USBSafeManager
mov dword [ebp - 0x20], eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x14], eax
cmp dword [0x1002d1f8], 0xa
mov dword [ebp - 0x28], ebx
jl 0x100041c0
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
mov esi, dword [ebp - 0x20]
je 0x100041c3
mov ebx, str.USBSafeManager
mov edi, dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ecx, 0xf01ff
push ecx
push ebx
push esi
call edi
mov eax, 0xf01ff
push eax
push ebx
push esi
call edi
mov dword [ebp - 0x14], eax
cmp dword [0x1002d1f8], 0xa
jl 0x100041c0
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
mov esi, dword [ebp - 0x20]
jne 0x10004117
jmp 0x100041c3
xor eax, eax
push 1
push eax
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp dword [0x1002d1f8], 0xa
jl 0x100040bf
mov edx, dword [0x1002d1fc]
lea ecx, [edx + 1]
imul ecx, edx
and ecx, 1
je 0x100040bf
xor eax, eax
inc eax
push eax
xor eax, eax
push eax
push eax
mov esi, edi
call edi
xor eax, eax
inc eax
push eax
xor eax, eax
push eax
push eax
call edi
cmp dword [0x1002d1f8], 0xa
jl 0x100040bf
mov edx, dword [0x1002d1fc]
lea ecx, [edx + 1]
imul ecx, edx
xor edx, edx
inc edx
and ecx, edx
jne 0x1000417e
jmp 0x100040bf
xor edi, edi
jmp 0x100050e6
mov esi, dword [ebp - 0x20]
cmp dword [ebp - 0x14], 0
jne 0x10004b08
cmp dword [0x1002cd84], 0
je 0x10004b08
push dword [0x1002cd7c]
push str.USBSafeManagerGrp
push str.svchost
push str.__SYSTEMROOT___system32_s.exe__k___s___svcr___s_
push 0x30b
push dword [ebp - 0x1c]
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x18
mov esi, eax
cmp dword [0x1002d1f8], 0xa
jl 0x10004282
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004282
mov ebx, str.svchost
mov edi, dword [sym.imp.SHLWAPI.dll_wnsprintfW]
push dword [0x1002cd7c]
mov eax, str.USBSafeManagerGrp
push eax
push ebx
mov eax, str.__SYSTEMROOT___system32_s.exe__k___s___svcr___s_
push eax
mov eax, 0x30b
push eax
mov esi, dword [ebp - 0x1c]
push esi
call edi
add esp, 0x18
push dword [0x1002cd7c]
mov eax, str.USBSafeManagerGrp
push eax
push ebx
mov eax, str.__SYSTEMROOT___system32_s.exe__k___s___svcr___s_
push eax
mov eax, 0x30b
push eax
push esi
call edi
add esp, 0x18
mov esi, eax
cmp dword [0x1002d1f8], 0xa
jl 0x10004282
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004226
sub esp, 0x34
xorps xmm0, xmm0
movups xmmword [esp + 0x20], xmm0
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x1c], eax
movaps xmm0, xmmword [0x10024330]
movups xmmword [esp + 0xc], xmm0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov dword [esp + 0x30], 0
mov dword [esp + 8], str.USB_Safe_Manager
mov dword [esp + 4], str.USBSafeManager
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x10004b05
mov dword [ebp - 0x2c], esi
xor eax, eax
movsd xmm0, qword [0x10024340]
mov ecx, dword [ebp - 0x18]
movsd qword [ecx + eax*8], xmm0
inc eax
cmp eax, 3
jne 0x100042df
movaps xmm0, xmmword [0x10024350]
mov eax, dword [ebp - 0x28]
movups xmmword [eax], xmm0
mov dword [eax + 0x10], ecx
push eax
push 2
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
cmp dword [0x1002d1f8], 0xa
jl 0x10004363
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004363
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x14]
mov dword [esi + 0x10], ebx
push esi
mov eax, 2
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov dword [esi + 0x10], ebx
push esi
mov eax, 2
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
cmp dword [0x1002d1f8], 0xa
jl 0x10004363
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004328
lea edi, [ebp - 0x252]
mov eax, dword [sym.imp.SHLWAPI.dll_wnsprintfW]
lea esi, [ebp - 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push 0x10027898
xor ecx, ecx
push ecx
push str.svchost
push str.SoftwareMicrosoftWindows_NTCurrentVersion
push str._s_s_c_s
push 0x104
push edi
call eax
sub esp, 8
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], eax
movaps xmm0, xmmword [0x10024360]
movups xmmword [esp + 8], xmm0
mov dword [esp + 4], edi
mov dword [esp], VariantClear
call ebx
cmp dword [0x1002d1f8], 0xa
mov esi, 0
jl 0x10004448
mov ecx, dword [0x1002d1fc]
lea edx, [ecx + 1]
imul edx, ecx
and edx, 1
je 0x10004448
push 0x10027898
push esi
push str.svchost
push str.SoftwareMicrosoftWindows_NTCurrentVersion
push str._s_s_c_s
push 0x104
push edi
mov edi, dword [sym.imp.SHLWAPI.dll_wnsprintfW]
call edi
sub esp, 8
mov dword [esp + 0x20], esi
xor eax, eax
lea esi, [ebp - 0x10]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], eax
movaps xmm0, xmmword [0x10024360]
movups xmmword [esp + 8], xmm0
lea eax, [ebp - 0x252]
mov dword [esp + 4], eax
mov dword [esp], VariantClear
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
call ebx
mov eax, edi
lea edi, [ebp - 0x252]
jmp 0x10004377
test eax, eax
je 0x100047ab
push str.USBSafeManagerGrp
push 0x5c
push str.svchost
push str.SoftwareMicrosoftWindows_NTCurrentVersion
push str._s_s_c_s
push 0x104
lea eax, [ebp - 0x252]
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x1c
cmp dword [0x1002d1f8], 0xa
jl 0x1000450c
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x1000450c
mov ebx, str.USBSafeManagerGrp
mov edi, dword [sym.imp.SHLWAPI.dll_wnsprintfW]
push ebx
mov eax, 0x5c
push eax
mov eax, str.svchost
push eax
mov eax, str.SoftwareMicrosoftWindows_NTCurrentVersion
push eax
mov eax, str._s_s_c_s
push eax
mov eax, 0x104
push eax
lea esi, [ebp - 0x252]
push esi
call edi
add esp, 0x1c
push ebx
mov eax, 0x5c
push eax
mov eax, str.svchost
push eax
mov eax, str.SoftwareMicrosoftWindows_NTCurrentVersion
push eax
mov eax, str._s_s_c_s
push eax
mov eax, 0x104
push eax
push esi
call edi
add esp, 0x1c
cmp dword [0x1002d1f8], 0xa
jl 0x1000450c
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x100044a3
xor edx, edx
lea ecx, [ebp - 0x252]
lea eax, [ebp - 0x10]
movaps xmm0, xmmword [0x10024360]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
sub esp, 0x24
mov dword [esp + 0x20], edx
mov ebx, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
movups xmmword [esp + 8], xmm0
mov esi, ecx
mov dword [esp + 4], ecx
mov dword [esp], VariantClear
call edi
cmp dword [0x1002d1f8], 0xa
jl 0x100045a2
mov ecx, dword [0x1002d1fc]
lea edx, [ecx + 1]
imul edx, ecx
and edx, 1
je 0x100045a2
sub esp, 0x24
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
movaps xmm0, xmmword [0x10024360]
movups xmmword [esp + 8], xmm0
mov dword [esp + 4], esi
mov dword [esp], VariantClear
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
call edi
movaps xmm0, xmmword [0x10024360]
xor edx, edx
mov ecx, esi
mov eax, ebx
jmp 0x10004524
test eax, eax
jne 0x100045fc
mov esi, 4
push esi
push dword [ebp - 0x10]
call fcn.1000510f
add esp, 8
mov eax, dword [ebp - 0x30]
mov dword [eax], 0x2000
xor ebx, ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
push eax
push esi
push ebx
push str.AuthenticationCapabilities
push dword [ebp - 0x10]
call edi
mov eax, dword [ebp - 0x24]
mov dword [eax], 1
push esi
push eax
push esi
push ebx
lea esi, [ebp - 0x252]
push str.CoInitializeSecurityParam
push dword [ebp - 0x10]
call edi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.Parameters
push str.USBSafeManager
push str.Services_
push str.SYSTEMCurrentControlSet_s_s_s
push 0x104
push esi
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x18
cmp dword [0x1002d1f8], 0xa
jl 0x100046a0
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x100046a0
mov edi, str.Parameters
mov esi, dword [sym.imp.SHLWAPI.dll_wnsprintfW]
push edi
mov eax, str.USBSafeManager
push eax
mov eax, str.Services_
push eax
mov eax, str.SYSTEMCurrentControlSet_s_s_s
push eax
mov eax, 0x104
push eax
lea ebx, [ebp - 0x252]
push ebx
call esi
add esp, 0x18
push edi
mov eax, str.USBSafeManager
push eax
mov eax, str.Services_
push eax
mov eax, str.SYSTEMCurrentControlSet_s_s_s
push eax
mov eax, 0x104
push eax
push ebx
call esi
add esp, 0x18
cmp dword [0x1002d1f8], 0xa
jl 0x100046a0
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004643
xor eax, eax
lea ebx, [ebp - 0x252]
lea edi, [ebp - 0x10]
movaps xmm0, xmmword [0x10024360]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
sub esp, 0x24
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], eax
movups xmmword [esp + 8], xmm0
mov dword [esp + 4], ebx
mov dword [esp], VariantClear
call esi
cmp dword [0x1002d1f8], 0xa
jl 0x1000472b
mov ecx, dword [0x1002d1fc]
lea edx, [ecx + 1]
imul edx, ecx
and edx, 1
je 0x1000472b
sub esp, 0x24
xor eax, eax
mov dword [esp + 0x20], eax
lea edi, [ebp - 0x10]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], eax
movaps xmm0, xmmword [0x10024360]
movups xmmword [esp + 8], xmm0
mov dword [esp + 4], ebx
mov dword [esp], VariantClear
call esi
movaps xmm0, xmmword [0x10024360]
xor eax, eax
jmp 0x100046b8
test eax, eax
mov edi, dword [ebp - 0x14]
jne 0x100049c9
push 4
push dword [ebp - 0x10]
call fcn.1000510f
add esp, 8
mov eax, dword [0x1002cd6c]
lea ebx, [eax + eax]
add ebx, 2
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, dword [ebp - 0x2c]
push ebx
push dword [0x1002cd64]
push 2
push 0
push str.ServiceDLL
push dword [ebp - 0x10]
call edi
mov edx, dword [ebp - 0x10]
cmp dword [0x1002d1f8], 0xa
jl 0x10004871
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004871
push ebx
push dword [0x1002cd64]
push 2
push 0
push str.ServiceDLL
push edx
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
call edi
jmp 0x10004757
push str.USBSafeManager
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
cmp dword [0x1002d1f8], 0xa
jl 0x1000481d
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x1000481d
mov esi, str.USBSafeManager
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
call edi
push esi
call edi
cmp dword [0x1002d1f8], 0xa
jl 0x100047fb
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x100047dc
push str.USBSafeManager
call edi
mov ebx, eax
cmp dword [0x1002d1f8], 0xa
jl 0x1000481d
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x100047dc
add ebx, ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push ebx
push str.USBSafeManager
push 7
push 0
push str.USBSafeManagerGrp
push dword [ebp - 0x10]
call edi
cmp dword [0x1002d1f8], 0xa
mov esi, dword [ebp - 0x10]
jl 0x10004961
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004961
push ebx
push str.USBSafeManager
push 7
push 0
push str.USBSafeManagerGrp
push esi
call edi
jmp 0x10004825
lea eax, [esi + esi]
add eax, 2
xor ecx, ecx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, 4
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x24], edx
push eax
push dword [ebp - 0x1c]
push 2
push ecx
push str.ImagePath
push edx
call edi
mov eax, 0x100273e2
push eax
call ebx
add eax, eax
push eax
mov eax, 0x100273e2
push eax
push 1
xor eax, eax
push eax
push str.ServiceMain
push dword [ebp - 0x10]
call edi
mov ebx, dword [ebp - 0x48]
xor eax, eax
mov dword [ebx], eax
push esi
push ebx
push esi
push eax
push str.ServiceDllUnloadOnStop
push dword [ebp - 0x10]
call edi
cmp dword [0x1002d1f8], 0xa
jl 0x100049b7
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x100049b7
push dword [ebp - 0x18]
mov esi, ebx
push dword [ebp - 0x1c]
push 2
xor eax, eax
push eax
push str.ImagePath
push dword [ebp - 0x24]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
call edi
mov eax, 0x100273e2
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
call ebx
add eax, eax
push eax
mov eax, 0x100273e2
push eax
push 1
xor eax, eax
push eax
push str.ServiceMain
push dword [ebp - 0x10]
call edi
xor eax, eax
mov dword [esi], eax
mov ecx, 4
push ecx
push esi
mov esi, 4
push esi
push eax
push str.ServiceDllUnloadOnStop
push dword [ebp - 0x10]
call edi
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
xor ecx, ecx
jmp 0x10004890
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x1002d1f8], 0xa
jl 0x10004450
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004450
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call edi
push esi
call edi
cmp dword [0x1002d1f8], 0xa
jl 0x10004450
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x1000498f
jmp 0x10004450
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x14]
lea ebx, [ebp - 0x252]
push 0x10027898
push str.USBSafeManager
push str.Services_
push str.SYSTEMCurrentControlSet_s_s_s
push 0x104
push ebx
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x18
cmp dword [0x1002d1f8], 0xa
jl 0x10004a05
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004a50
sub esp, 0x24
xor eax, eax
mov dword [esp + 0x20], eax
lea ecx, [ebp - 0x10]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
movaps xmm0, xmmword [0x10024360]
movups xmmword [esp + 8], xmm0
mov dword [esp + 4], ebx
mov dword [esp], VariantClear
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp dword [0x1002d1f8], 0xa
jl 0x10004a83
mov ecx, dword [0x1002d1fc]
lea edx, [ecx + 1]
imul edx, ecx
and edx, 1
je 0x10004a83
sub esp, 0x24
xor eax, eax
mov dword [esp + 0x20], eax
lea ecx, [ebp - 0x10]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
movaps xmm0, xmmword [0x10024360]
movups xmmword [esp + 8], xmm0
mov dword [esp + 4], ebx
mov dword [esp], VariantClear
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
jmp 0x10004a05
test eax, eax
je 0x10004d61
push 2
push edi
call fcn.1000510f
add esp, 8
cmp dword [0x1002d1f8], 0xa
jl 0x10004b05
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004b05
mov esi, 2
push esi
push edi
call fcn.1000510f
add esp, 8
push esi
push edi
call fcn.1000510f
add esp, 8
cmp dword [0x1002d1f8], 0xa
jl 0x10004ae1
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004ab4
push 2
push edi
call fcn.1000510f
add esp, 8
cmp dword [0x1002d1f8], 0xa
jl 0x10004b05
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004ab4
mov esi, dword [ebp - 0x20]
cmp dword [ebp - 0x14], 0
je 0x10004c71
lea eax, [ebp - 0x252]
push str.Parameters
push str.USBSafeManager
push str.Services_
push str.SYSTEMCurrentControlSet_s_s_s
push 0x104
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x18
cmp dword [0x1002d1f8], 0xa
jl 0x10004bbc
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004bbc
mov ebx, str.USBSafeManager
mov edi, dword [sym.imp.SHLWAPI.dll_wnsprintfW]
mov eax, str.Parameters
push eax
push ebx
mov eax, str.Services_
push eax
mov eax, str.SYSTEMCurrentControlSet_s_s_s
push eax
mov eax, 0x104
push eax
lea esi, [ebp - 0x252]
push esi
call edi
add esp, 0x18
mov eax, str.Parameters
push eax
push ebx
mov eax, str.Services_
push eax
mov eax, str.SYSTEMCurrentControlSet_s_s_s
push eax
mov eax, 0x104
push eax
push esi
call edi
add esp, 0x18
cmp dword [0x1002d1f8], 0xa
jl 0x10004bbc
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004b5f
xor edx, edx
lea eax, [ebp - 0x10]
movaps xmm0, xmmword [0x10024360]
mov ecx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea ebx, [ebp - 0x252]
sub esp, 0x24
mov dword [esp + 0x20], edx
mov esi, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
movups xmmword [esp + 8], xmm0
mov dword [esp + 4], ebx
mov dword [esp], VariantClear
mov edi, ecx
call ecx
mov ebx, dword [0x1002d1fc]
mov edx, dword [0x1002d1f8]
lea ecx, [ebx + 1]
imul ecx, ebx
and ecx, 1
cmp edx, 0xa
jl 0x10004c59
test ecx, ecx
je 0x10004c59
sub esp, 0x24
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], eax
movaps xmm0, xmmword [0x10024360]
movups xmmword [esp + 8], xmm0
lea ebx, [ebp - 0x252]
mov dword [esp + 4], ebx
mov dword [esp], VariantClear
call edi
xor edx, edx
mov ecx, edi
movaps xmm0, xmmword [0x10024360]
mov eax, esi
jmp 0x10004bd4
test eax, eax
mov ebx, dword [ebp - 0x3c]
je 0x10004ca6
cmp edx, 0xa
mov edi, dword [ebp - 0x44]
mov esi, dword [ebp - 0x40]
jl 0x10004c78
test ecx, ecx
je 0x10004c78
jmp 0x10004c6f
xor edi, edi
jmp 0x100050df
push 0x24
push esi
call sub.NTDLL.dll_RtlZeroMemory
cmp dword [0x1002d1f8], 0xa
jl 0x10004fb7
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004fe3
jmp 0x10004fb7
push 0x20a
lea eax, [ebp - 0x252]
push eax
call sub.NTDLL.dll_RtlZeroMemory
cmp dword [0x1002d1f8], 0xa
jl 0x10004d02
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004d02
mov esi, 0x20a
push esi
lea edi, [ebp - 0x252]
push edi
call sub.NTDLL.dll_RtlZeroMemory
push esi
push edi
call sub.NTDLL.dll_RtlZeroMemory
cmp dword [0x1002d1f8], 0xa
jl 0x10004d02
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004cd5
mov eax, dword [ebp - 0x38]
mov dword [eax], 0x20a
mov ecx, dword [ebp - 0x34]
mov dword [ecx], 2
push eax
lea eax, [ebp - 0x252]
push eax
push ecx
push 0
push str.ServiceDLL
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10004f00
mov edi, dword [0x1002cd64]
cmp dword [0x1002d1f8], 0xa
jl 0x10004ec4
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004eec
jmp 0x10004ec4
push 4
push dword [ebp - 0x10]
call fcn.1000510f
add esp, 8
push 0x100273e2
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [0x1002d1fc]
lea ecx, [edx + 1]
imul ecx, edx
test cl, 1
sete cl
cmp dword [0x1002d1f8], 0xa
setl dl
or dl, cl
test dl, dl
je 0x10004d97
add eax, eax
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
push eax
push 0x100273e2
push 1
push 0
push str.ServiceMain
mov dword [ebp - 0x18], ecx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp dword [0x1002d1f8], 0xa
jl 0x10004e65
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004e65
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
mov eax, 0x100273e2
push eax
xor eax, eax
inc eax
push eax
xor eax, eax
push eax
mov eax, str.ServiceMain
push eax
push edi
call ebx
push esi
mov eax, 0x100273e2
push eax
xor eax, eax
inc eax
push eax
xor eax, eax
push eax
mov eax, str.ServiceMain
push eax
push edi
call ebx
cmp dword [0x1002d1f8], 0xa
jl 0x10004e32
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
xor eax, eax
inc eax
and ecx, eax
jne 0x10004de9
push dword [ebp - 0x1c]
push 0x100273e2
push 1
push 0
push str.ServiceMain
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp dword [0x1002d1f8], 0xa
jl 0x10004e65
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004de9
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x1002d1f8], 0xa
mov edi, dword [ebp - 0x14]
jl 0x10004a8b
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004a8b
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x10]
call esi
cmp dword [0x1002d1f8], 0xa
jl 0x10004a8b
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10004e98
jmp 0x10004a8b
push edi
lea eax, [ebp - 0x252]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
cmp dword [0x1002d1f8], 0xa
jl 0x10004efc
mov ecx, dword [0x1002d1fc]
lea edx, [ecx + 1]
imul edx, ecx
and edx, 1
je 0x10004efc
push edi
lea eax, [ebp - 0x252]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
jmp 0x10004ec4
test eax, eax
je 0x10004f56
mov eax, dword [0x1002cd6c]
lea esi, [eax + eax]
add esi, 2
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
push dword [0x1002cd64]
push 2
push 0
push str.ServiceDLL
push dword [ebp - 0x10]
call edi
cmp dword [0x1002d1f8], 0xa
jl 0x10004f56
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10004f56
push esi
push dword [0x1002cd64]
push 2
push 0
push str.ServiceDLL
push dword [ebp - 0x10]
call edi
jmp 0x10004f11
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x1002d1fc]
mov edx, dword [0x1002d1f8]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
cmp edx, 0xa
jl 0x10004c60
test ecx, ecx
je 0x10004c60
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call edi
push esi
call edi
mov eax, dword [0x1002d1fc]
mov edx, dword [0x1002d1f8]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
cmp edx, 0xa
jl 0x10004c60
test ecx, ecx
jne 0x10004f8b
jmp 0x10004c60
xor eax, eax
mov dword [ebx], eax
push ebx
push 0x24
push esi
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
cmp dword [0x1002d1f8], 0xa
jl 0x10004ff7
mov ecx, dword [0x1002d1fc]
lea edx, [ecx + 1]
imul edx, ecx
and edx, 1
je 0x10004ff7
xor eax, eax
mov dword [ebx], eax
push ebx
push 0x24
push esi
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
jmp 0x10004fb7
test eax, eax
mov ebx, dword [ebp - 0x14]
je 0x10005004
cmp dword [esi + 4], 4
je 0x10005078
cmp dword [0x1002cd84], 0
je 0x1000506b
mov dword [edi], 0x1002723c
push 1
push edi
push ebx
call fcn.10012602
add esp, 0xc
cmp dword [0x1002d1f8], 0xa
jl 0x10005078
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10005078
xor esi, esi
inc esi
push esi
push edi
push ebx
call fcn.10012602
add esp, 0xc
push esi
push edi
push ebx
call fcn.10012602
add esp, 0xc
cmp dword [0x1002d1f8], 0xa
jl 0x10005078
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, esi
jne 0x1000503b
jmp 0x10005078
xor eax, eax
push eax
push eax
push ebx
call fcn.10012602
add esp, 0xc
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [0x1002d1f8], 0xa
jl 0x100050d9
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x100050d9
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push ebx
call esi
cmp dword [0x1002d1f8], 0xa
jl 0x100050bd
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x1000509e
push ebx
call esi
cmp dword [0x1002d1f8], 0xa
jl 0x100050d9
mov eax, dword [0x1002d1fc]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x1000509e
xor edi, edi
inc edi
mov esi, dword [ebp - 0x20]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret