Function at 0x10003790
Capabilities:
Create device object

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x264
mov dword [ebp - 0x250], eax
mov edi, dword [edx + 0x28]
xor eax, eax
xor edx, edx
mov dword [ebp + eax - 0x22c], edx
add eax, 4
cmp eax, 0x20
jb 0x100037ab
lea eax, [ebp - 0x240]
mov dword [esp + 0x14], 0x20
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x22c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0xb0027
mov dword [ebp - 0x235], 0
mov dword [ebp - 0x231], 0
mov byte [ebp - 0x22d], 0
call sym._call_minidriver
mov eax, dword [ebp - 0x240]
test eax, eax
je 0x10003830
test byte [0x10006034], 2
jne 0x10003a60
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edi]
lea esi, [ebp - 0x20a]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 8]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.DeviceHID_p_p
mov dword [esp + 4], 0xff
call sym._swprintf
mov dword [esp + 4], esi
lea esi, [ebp - 0x248]
mov dword [esp], esi
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea edx, [ebp - 0x24c]
sub esp, 8
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0x3fc
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sym._IoCreateDevice_28
sub esp, 0x1c
test eax, eax
je 0x100038f8
test byte [0x10006034], 2
je 0x10003828
mov eax, dword [ebp - 0x240]
mov dword [esp + 0xc], str.Failed_to_create_child_PDO__status__lx._n
mov dword [esp + 8], str.create_child
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x10006034
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x10003828
mov eax, dword [ebp - 0x24c]
mov edx, dword [sym.imp.ntoskrnl.exe_wcscpy]
mov dword [edi + 0xc], eax
mov esi, dword [eax + 0x28]
mov dword [ebp - 0x254], edx
lea eax, [esi + 0x54]
mov dword [esi], ebx
mov dword [esi + 0x58], eax
mov dword [esi + 0x54], eax
lea eax, [edi + 0x84]
mov dword [esi + 0x50], 0
mov dword [esp + 4], eax
lea eax, [esi + 0x84]
mov dword [esp], eax
call edx
lea eax, [edi + 0x214]
mov edx, dword [ebp - 0x254]
mov dword [esp + 4], eax
lea eax, [esi + 0x214]
mov dword [esp], eax
call edx
lea eax, [edi + 0x3a4]
mov edx, dword [ebp - 0x254]
mov dword [esp + 4], eax
lea eax, [esi + 0x3a4]
mov dword [esp], eax
call edx
mov eax, dword [edi + 0x3f4]
mov dword [esi + 0x3f4], eax
movzx eax, word [ebp - 0x228]
mov word [esi + 0xa], ax
mov eax, dword [ebp - 0x226]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x250]
movzx eax, byte [eax]
mov byte [esi + 8], al
lea eax, [ebp - 0x240]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x235]
mov dword [esp + 0x14], 9
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0xb0003
call sym._call_minidriver
mov edx, dword [ebp - 0x240]
test edx, edx
jne 0x10003a20
cmp byte [ebp - 0x230], 0
je 0x100039f5
cmp byte [ebp - 0x22f], 0x22
je 0x10003a90
test byte [0x10006034], 2
jne 0x10003bb0
mov eax, dword [ebp - 0x24c]
mov dword [esp], eax
call sym._IoDeleteDevice_4
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x10006034], 2
je 0x10003a02
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], str.Cannot_get_Device_Descriptor__status__lx_n
mov dword [esp + 8], str.create_child
mov dword [esp + 4], 0x10006034
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x10003a02
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Minidriver_failed_to_get_attributes__status__lx._n
mov dword [esp + 8], str.create_child
mov dword [esp + 4], 0x10006034
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edx, word [ebp - 0x22e]
mov dword [esp], edx
mov dword [ebp - 0x250], edx
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x250]
mov dword [esp + 4], ebx
mov ecx, eax
lea eax, [ebp - 0x240]
mov dword [esp + 0xc], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 8], 0
mov dword [esp], 0xb0007
mov dword [ebp - 0x250], ecx
call sym._call_minidriver
mov eax, dword [ebp - 0x240]
mov ecx, dword [ebp - 0x250]
test eax, eax
je 0x10003b28
test byte [0x10006034], 2
jne 0x10003c85
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x24c]
mov dword [esp], eax
call sym._IoDeleteDevice_4
sub esp, 4
jmp 0x10003828
lea eax, [esi + 0x10]
mov dword [esp], ecx
mov dword [esp + 0xc], eax
movzx eax, word [ebp - 0x22e]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [ebp - 0x250], ecx
call sym._HidP_GetCollectionDescription_16
mov ecx, dword [ebp - 0x250]
sub esp, 0x10
mov ebx, eax
mov dword [ebp - 0x240], eax
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_free]
cmp ebx, 0x110000
je 0x10003be0
test byte [0x10006034], 2
je 0x10003a02
mov dword [esp + 0xc], str.Cannot_parse_Report_Descriptor_n
mov dword [esp + 8], str.create_child
mov dword [esp + 4], 0x10006034
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x10003a02
mov dword [esp + 0xc], str.No_Report_Descriptor_found_in_reply_n
mov dword [esp + 8], str.create_child
mov dword [esp + 4], 0x10006034
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x10003a02
mov eax, dword [esi + 0x10]
movzx edx, word [eax + 0x1a]
mov dword [esi + 4], edx
movzx edx, word [eax + 2]
cmp word [eax], 1
sete al
cmp dx, 2
jne 0x10003cbc
test al, al
je 0x10003cbc
mov dword [esi + 0x4c], 1
mov dword [esp + 4], 0
mov eax, dword [edi]
mov dword [esp], eax
call sym._IoInvalidateDeviceRelations_8
mov eax, dword [ebp - 0x24c]
mov dword [esi + 0x40], 0xc8
sub esp, 8
mov dword [esp], eax
call sym._HID_StartDeviceThread
mov edx, 1
mov eax, esi
call sym._send_wm_input_device_change
test byte [0x10006034], 8
je 0x10003828
mov eax, dword [esi + 0x4c]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.created_device__p__rawinput_handle__x_n
mov dword [esp + 0x14], eax
mov dword [esp + 8], str.create_child
mov dword [esp + 4], 0x10006034
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x10003828
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], str.Cannot_get_Report_Descriptor__status__lx_n
mov dword [esp + 8], str.create_child
mov dword [esp + 4], 0x10006034
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
mov ecx, dword [ebp - 0x250]
jmp 0x10003b03
cmp dx, 6
jne 0x10003cd2
test al, al
je 0x10003cd2
mov dword [esi + 0x4c], 2
jmp 0x10003c0e
mov eax, 1
lock xadd dword [0x10006028], eax
add eax, 1
mov dword [esi + 0x4c], eax
jmp 0x10003c0e