Function at 0x14009f024
Capabilities:
Link many functions at runtime

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x350
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x14028b7c8]
xor rax, rsp
mov qword [rsp + 0x340], rax
mov r14, rcx
call fcn.140045fd8
lea rcx, str.setupapi.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbp, rax
mov qword [rsp + 0xb0], rax
test rax, rax
je 0x14009f8c8
lea rcx, str.HID.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
mov qword [rsp + 0xb8], rax
test rax, rax
je 0x14009f8b1
lea rdx, str.SetupDiEnumDeviceInterfaces
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x90], rax
test rax, rax
je 0x14009f8b1
lea rdx, str.SetupDiDestroyDeviceInfoList
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0xa8], rax
test rax, rax
je 0x14009f8b1
lea rdx, str.SetupDiGetDeviceInterfaceDetailA
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r12, rax
mov qword [rsp + 0x88], rax
test rax, rax
je 0x14009f8b1
lea rdx, str.SetupDiGetClassDevsA
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, rax
test rax, rax
je 0x14009f8b1
lea rdx, str.HidD_GetHidGuid
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
test rax, rax
je 0x14009f8b1
lea rdx, str.HidD_GetAttributes
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x14009f8b1
lea rdx, str.HidD_GetProductString
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x60], rax
test rax, rax
je 0x14009f8b1
lea rdx, str.HidD_GetPreparsedData
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x68], rax
test rax, rax
je 0x14009f8b1
lea rdx, str.HidP_GetCaps
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x50], rax
test rax, rax
je 0x14009f8b1
lea rdx, str.HidD_FreePreparsedData
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x58], rax
test rax, rax
je 0x14009f8b1
lea rdx, str.HidD_GetSerialNumberString
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.HidP_GetValueCaps
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [rsp + 0xc8]
call rdi
mov r9d, 0x12
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xc8]
call rbx
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x14009f8b1
mov dword [rsp + 0xd8], 0x20
xor edi, edi
mov dword [rsp + 0x4c], edi
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rsp + 0xc8]
xor edx, edx
mov rcx, r15
call qword [rsp + DllRegisterServer]
test eax, eax
je 0x14009f8a7
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x50]
and qword [rsp + 0x28], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0xd8]
mov rcx, r15
call r12
mov ebx, dword [rsp + 0x48]
mov rcx, rbx
call fcn.140158508
mov qword [rsp + 0x58], rax
mov dword [rax], 8
and qword [rsp + 0x28], 0
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x20], rcx
mov r9d, ebx
mov r8, rax
lea rdx, [rsp + 0xd8]
mov rcx, r15
call r12
test eax, eax
je 0x14009f85b
mov r13, qword [rsp + 0x58]
add r13, 4
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x40000000
mov eax, 3
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, eax
mov edx, 0xc0000000
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x14009f853
mov dword [rsp + 0x70], reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea rdx, [rsp + 0x70]
mov rcx, rax
call qword [rsp + 0xa0]
test al, al
je 0x14009f83c
movzx ecx, word [rsp + 0x74]
cmp ecx, 0x51d
je 0x14009f708
cmp ecx, 0x955
je 0x14009f63a
cmp ecx, 0x1044
jne 0x14009f83c
movzx eax, word [rsp + 0x76]
cmp eax, 0x4001
je 0x14009f4dd
cmp eax, 0x7a50
jne 0x14009f83c
bt dword [r14 + 0x20], 0x1e
jae 0x14009f83c
mov ebx, 0x100
mov r8d, ebx
lea rdx, [rsp + 0x140]
mov rcx, r12
call qword [rsp + 0x60]
and qword [rsp + 0x38], 0
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], ebx
lea rax, [rsp + 0x240]
mov qword [rsp + 0x20], rax
or r9d, 0xffffffff
lea r8, [rsp + 0x140]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, 0x248
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f3f7
mov rcx, rax
call fcn.1400d4648
mov rdi, rax
jmp 0x14009f3f9
xor edi, edi
mov rdx, rdi
mov rcx, qword [r14 + 0x18]
call fcn.1400588ac
mov ecx, 0x120
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f42d
lea rdx, str.Gigabyte_AORUS
mov rcx, rax
call fcn.140047b40
mov rbx, rax
jmp 0x14009f42f
xor ebx, ebx
call fcn.140045fd8
mov rdx, rbx
mov rcx, qword [rax + 0x60]
call fcn.140002970
bt dword [rbx + 8], 0x1f
jae 0x14009f44e
mov qword [rdi + 0x1c0], rbx
lea rdx, [rsp + 0x98]
mov rcx, r12
call qword [rsp + 0x68]
test al, al
je 0x14009f83c
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x98]
call rsi
cmp eax, 0x110000
jne 0x14009f4ce
mov ecx, 0x268
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f4b4
movzx r9d, word [rsp + 0x104]
movzx r8d, word [rsp + 0x106]
mov rdx, r13
mov rcx, rax
call fcn.14007b56c
mov rbx, rax
jmp 0x14009f4b6
xor ebx, ebx
call fcn.140045fd8
mov rdx, rbx
mov rcx, qword [rax + 0x50]
call fcn.140022258
mov qword [rdi + 0x1b0], rbx
mov rcx, qword [rsp + 0x98]
call rbp
jmp 0x14009f83c
bt dword [r14 + 0x20], 0x1e
jae 0x14009f83c
mov ebx, 0x100
mov r8d, ebx
lea rdx, [rsp + 0x140]
mov rcx, r12
call qword [rsp + 0x60]
and qword [rsp + 0x38], 0
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], ebx
lea rax, [rsp + 0x240]
mov qword [rsp + 0x20], rax
or r9d, 0xffffffff
lea r8, [rsp + 0x140]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, 0x308
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f554
mov rcx, rax
call fcn.1400d4538
mov rdi, rax
jmp 0x14009f556
xor edi, edi
mov rdx, rdi
mov rcx, qword [r14 + 0x18]
call fcn.1400588ac
mov ecx, 0x120
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f58a
lea rdx, str.Gigabyte_ODIN
mov rcx, rax
call fcn.140047b40
mov rbx, rax
jmp 0x14009f58c
xor ebx, ebx
call fcn.140045fd8
mov rdx, rbx
mov rcx, qword [rax + 0x60]
call fcn.140002970
bt dword [rbx + 8], 0x1f
jae 0x14009f5ab
mov qword [rdi + 0x1c0], rbx
lea rdx, [rsp + 0x80]
mov rcx, r12
call qword [rsp + 0x68]
test al, al
je 0x14009f83c
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x80]
call rsi
cmp eax, 0x110000
jne 0x14009f62b
mov ecx, 0x268
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f611
movzx r9d, word [rsp + 0x104]
movzx r8d, word [rsp + 0x106]
mov rdx, r13
mov rcx, rax
call fcn.14007b56c
mov rbx, rax
jmp 0x14009f613
xor ebx, ebx
call fcn.140045fd8
mov rdx, rbx
mov rcx, qword [rax + 0x50]
call fcn.140022258
mov qword [rdi + 0x1b0], rbx
mov rcx, qword [rsp + 0x80]
call rbp
jmp 0x14009f83c
movzx ecx, word [rsp + 0x76]
sub ecx, 9
je 0x14009f6a6
sub ecx, 1
je 0x14009f67c
cmp ecx, 1
jne 0x14009f83c
mov ecx, 0x4e0
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f678
mov edx, 0x100
mov rcx, rax
call fcn.1400d25ac
mov rbx, rax
jmp 0x14009f67a
xor ebx, ebx
jmp 0x14009f6da
mov ecx, 0x4e0
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f6a2
mov edx, 0x80
mov rcx, rax
call fcn.1400d25ac
mov rbx, rax
jmp 0x14009f6a4
xor ebx, ebx
jmp 0x14009f6da
bt dword [r14 + 0x20], 0x1e
jae 0x14009f83c
mov ecx, 0x4e0
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f6d8
mov edx, 0x10
mov rcx, rax
call fcn.1400d25ac
mov rbx, rax
jmp 0x14009f6da
xor ebx, ebx
test rbx, rbx
je 0x14009f83c
lea rcx, [rbx + 0x1f0]
mov r8, r13
mov edx, 0x200
call fcn.140158644
mov rdx, rbx
mov rcx, qword [r14 + 0x18]
call fcn.1400588ac
jmp 0x14009f83c
lea rdx, [rsp + 0x50]
mov rcx, r12
call qword [rsp + 0x68]
test al, al
je 0x14009f83c
lea rdx, [rsp + 0x100]
mov rcx, qword [rsp + 0x50]
call rsi
cmp eax, 0x110000
jne 0x14009f835
mov eax, 0x84
cmp word [rsp + 0x102], ax
jne 0x14009f835
cmp word [rsp + 0x100], 4
jne 0x14009f835
lea ebx, [rax + 0x7c]
mov r8d, ebx
lea rdx, [rsp + 0x140]
mov rcx, r12
call qword [rsp + 0x60]
and qword [rsp + 0x38], 0
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], ebx
lea rax, [rsp + 0x240]
mov qword [rsp + 0x20], rax
or r9d, 0xffffffff
lea r8, [rsp + 0x140]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, 0x4e8
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f7c9
lea rdx, [rsp + 0x240]
mov rcx, rax
call fcn.1400c9bc0
mov rdi, rax
jmp 0x14009f7cb
xor edi, edi
lea rcx, [rdi + 0x268]
mov r8, r13
mov edx, 0x200
call fcn.140158644
mov rdx, rdi
mov rcx, qword [r14 + 0x18]
call fcn.1400588ac
mov ecx, 0x4e0
call fcn.14013f12c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x14009f814
lea rdx, [rsp + 0x240]
mov rcx, rax
call fcn.1400c9954
mov rbx, rax
jmp 0x14009f816
xor ebx, ebx
bt dword [rbx + 8], 0x1f
jae 0x14009f824
mov qword [rdi + 0x1c0], rbx
call fcn.140045fd8
mov rdx, rbx
mov rcx, qword [rax + 0x60]
call fcn.140002970
mov rcx, qword [rsp + 0x50]
call rbp
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [rsp + 0x4c]
mov r12, qword [rsp + 0x88]
jmp 0x14009f85b
mov r12, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x58]
call fcn.140158604
inc edi
mov dword [rsp + 0x4c], edi
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x20], rax
mov r9d, edi
lea r8, [rsp + 0xc8]
xor edx, edx
mov rcx, r15
call qword [rsp + DllRegisterServer]
test eax, eax
jne 0x14009f275
mov rsi, qword [rsp + 0xb8]
mov rbp, qword [rsp + 0xb0]
mov rcx, r15
call qword [rsp + 0xa8]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
test rsi, rsi
je 0x14009f8c8
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 1
mov rcx, qword [rsp + 0x340]
xor rcx, rsp
call fcn.140156fd0
lea r11, [rsp + 0x350]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret