Function at 0x10003d90
Capabilities:
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x85c
mov dword [ebp - 0x1c], 0x7ff
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.10005ed0
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x10003dc0
xor eax, eax
jmp 0x100042c1
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x25c]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x10003df5
mov ecx, dword [ebp + 8]
push ecx
push str.No_driver_selected_for_device__p._n
call 0x10000000
add esp, 8
push 0xe0000203
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x100042c1
push 0
push 2
push 0
mov edx, dword [ebp - 0xc]
push edx
call dword [0x10000000]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x10003e15
xor eax, eax
jmp 0x100042c1
mov eax, dword [ebp - 0xc]
add eax, 0x608
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
add ecx, 2
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x14]
mov ax, word [edx]
mov word [ebp - 0x1e], ax
add dword [ebp - 0x14], 2
cmp word [ebp - 0x1e], 0
jne 0x10003e29
mov ecx, dword [ebp - 0x14]
sub ecx, dword [ebp - 0x3c]
sar ecx, 1
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x40]
shl edx, 1
push edx
mov eax, dword [ebp - 0xc]
add eax, 0x608
push eax
push 1
push 0
push str.DeviceDesc
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 0x28]
push eax
push 0
lea ecx, [ebp - 0x654]
push ecx
call 0x10000000
add esp, 4
push eax
lea edx, [ebp - 0x654]
push edx
mov eax, dword [ebp - 0xc]
add eax, 0x808
push eax
mov ecx, dword [ebp - 8]
push ecx
call sym.vtvbtoyx.dll__SetupDiGetActualSectionToInstallW_24
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.10006a80
add esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x10003ed1
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 8]
push edx
call dword [0x10000000]
xor eax, eax
jmp 0x100042c1
push 0
lea eax, [ebp - 0x38]
push eax
push 0
push 0x2001f
push 0
push 0
push 0
push str.Device_Parameters
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x10003f24
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 8]
push edx
call dword [0x10000000]
xor eax, eax
jmp 0x100042c1
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2c]
and ecx, 0x1000000
je 0x10003f3b
mov edx, dword [ebp - 0x1c]
and edx, 0xffffffef
mov dword [ebp - 0x1c], edx
push 0
call dword [0x10000000]
mov dword [ebp - 0x24], eax
push 0
push 0
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [0x10000000]
push ecx
push 0x10000
push 0
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x654]
push ecx
mov edx, dword [ebp - 8]
push edx
push 0
call dword [0x10000000]
lea eax, [ebp - 0x654]
push eax
lea ecx, [ebp - 0x454]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x100092c0
lea edx, [ebp - 0x454]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0
push 0
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [0x10000000]
push ecx
push 0x10000
push 0
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x454]
push ecx
mov edx, dword [ebp - 8]
push edx
push 0
call dword [0x10000000]
lea eax, [ebp - 0x654]
push eax
lea ecx, [ebp - 0x454]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push str..Services
lea edx, [ebp - 0x454]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0
lea eax, [ebp - 0x454]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [0x10000000]
mov edx, 2
imul eax, edx, 0
xor ecx, ecx
mov word [ebp + eax - 0x254], cx
lea edx, [ebp - 0x54]
push edx
push str.AddService
lea eax, [ebp - 0x454]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [0x10000000]
test eax, eax
je 0x100040de
lea edx, [ebp - 0x44]
push edx
push 2
lea eax, [ebp - 0x54]
push eax
call dword [0x10000000]
test eax, eax
je 0x100040c3
mov ecx, dword [ebp - 0x44]
and ecx, 2
je 0x100040c3
push 0
lea edx, [ebp - 0x254]
push edx
call 0x10000000
add esp, 4
push eax
lea eax, [ebp - 0x254]
push eax
push 1
lea ecx, [ebp - 0x54]
push ecx
call dword [0x10000000]
test eax, eax
je 0x100040c1
mov edx, 2
imul eax, edx, 0
movzx ecx, word [ebp + eax - 0x254]
test ecx, ecx
je 0x100040c1
lea edx, [ebp - 0x254]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
shl eax, 1
push eax
lea eax, [ebp - 0x254]
push eax
push 1
push 0
push 0x1000957c
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x100040de
lea eax, [ebp - 0x54]
push eax
push str.AddService
lea ecx, [ebp - 0x54]
push ecx
call dword [0x10000000]
test eax, eax
jne 0x1000403b
mov edx, dword [ebp - 0x24]
push edx
call dword [0x10000000]
mov eax, dword [ebp - 8]
push eax
call dword [0x10000000]
lea ecx, [ebp - 0x34]
push ecx
push 0
lea edx, [ebp - 0x85c]
push edx
call 0x10000000
add esp, 4
push eax
lea eax, [ebp - 0x85c]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [0x10000000]
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
shl eax, 1
push eax
mov eax, dword [ebp - 0x34]
push eax
push 1
push 0
push 0x1000927c
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebp - 0xc]
add edx, 0x808
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
shl eax, 1
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x808
push eax
push 1
push 0
push str.InfSection
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp dword [ebp - 0x28], 0
je 0x1000419c
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
shl eax, 1
push eax
mov eax, dword [ebp - 0x28]
push eax
push 1
push 0
push str.InfSectionExt
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.root_
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push str.root_
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x100042bc
mov eax, 2
imul ecx, eax, 0
movzx edx, word [ebp + ecx - 0x254]
test edx, edx
je 0x100042bc
push 1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x100042bc
push 0x10
lea eax, [ebp - 0x254]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x10004285
push 0
push 0
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x10004279
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x10004279
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xc]
push ecx
call 0x10000000
add esp, 4
push eax
lea edx, [ebp - 0x254]
push edx
call 0x10000000
add esp, 4
push eax
push str.Failed_to_start_service__s_for_device__s__error__u._n
call 0x10000000
add esp, 0x10
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x100042b2
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
push edx
call 0x10000000
add esp, 4
push eax
lea eax, [ebp - 0x254]
push eax
call 0x10000000
add esp, 4
push eax
push str.Failed_to_open_service__s_for_device__s._n
call 0x10000000
add esp, 0xc
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov esp, ebp
pop ebp
ret 8