Function at 0x1400128c0
Capabilities:
Link many functions at runtime

Disassembly:
mov r11, rsp
push rbp
push rbx
push rsi
push rdi
push r12
lea rbp, [r11 - 0x5f]
sub rsp, 0xf0
mov rax, qword [0x1402878c8]
xor rax, rsp
mov qword [rbp + 0x17], rax
xor r12d, r12d
mov qword [rbp - 0x41], rcx
mov qword [rbp - 0x61], r12
mov rbx, rdx
mov rsi, rcx
mov edi, r12d
test rdx, rdx
je 0x140012e9c
mov qword [r11 - 0x38], r15
mov r15d, 0xb672
mov qword [r11 + 0x18], r13
mov qword [r11 - 0x30], r14
cmp byte [rbx + 0x410], 0
jne 0x140012e69
cmp byte [rbx + 0x413], 0
jne 0x140012e69
cmp byte [rbx + 0x414], 0
jne 0x140012e69
cmp byte [rbx + 0x415], 0
jne 0x140012e69
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x40000080
mov edx, 0xc0000000
mov rcx, rbx
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp - 0x69], rax
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140012e69
lea rdx, [rbp + 7]
mov rcx, rax
call sub.HID.DLL_HidD_GetAttributes
lea rdx, [rbp - 0x49]
mov rcx, r14
call sub.HID.DLL_HidD_GetPreparsedData
mov rcx, qword [rbp - 0x49]
lea rdx, [rbp - 0x39]
call sub.HID.DLL_HidP_GetCaps
cmp byte [rbx + 0x416], 0
je 0x140012bac
lea rcx, str.TmRimUpdate.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x140012b6d
lea rdx, str.TMRDL_InitializeRimUpdateLib
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_DeInitializeRimUpdateLib
mov rcx, rsi
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_InitializeRimUpdateInstanceBasedOnHandle
mov rcx, rsi
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_DeInitializeRimUpdateInstance
mov rcx, rsi
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.TMRDL_GetFirmwareVersion
mov rcx, rsi
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r15, rax
test r12, r12
je 0x140012b53
test r13, r13
je 0x140012b53
test rdi, rdi
je 0x140012b53
test r14, r14
je 0x140012b53
test rax, rax
je 0x140012b53
xor eax, eax
lea r9, [rbp - 0x59]
mov edx, 1
mov qword [rsp + 0x28], rax
mov ecx, edx
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x55]
call r12
xor r12d, r12d
cmp eax, 0x1001
jne 0x140012b56
mov rcx, qword [rbp - 0x69]
lea rax, [rbp - 0x79]
mov qword [rsp + 0x38], r12
lea r9, [rbp - 0x71]
mov qword [rsp + 0x30], r12
lea r8, [rbp - 0x6d]
mov qword [rsp + 0x28], rax
xor edx, edx
lea rax, [rbp - 0x51]
mov qword [rsp + 0x20], rax
call rdi
cmp dword [rbp - 0x79], 0x1001
mov rdi, rax
jne 0x140012b3a
test rax, rax
je 0x140012b4a
mov qword [rsp + 0x38], r12
lea rax, [rbp - 0x79]
mov qword [rsp + 0x30], r12
lea r9, [rbp - 0x6d]
mov qword [rsp + 0x28], rax
lea r8, [rbp - 0x75]
lea rax, [rbp - 0x71]
mov dword [rbp - 0x75], r12d
lea rdx, [rbp - 0x4d]
mov qword [rsp + 0x20], rax
mov rcx, rdi
call r15
cmp dword [rbp - 0x79], 0x1001
jne 0x140012b3a
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call r14
xor edx, edx
xor ecx, ecx
call r13
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [rbp - 0x75]
mov ecx, 0xfffffffe
mov rdi, qword [rbp - 0x61]
cmp eax, 0x80000000
mov r14, qword [rbp - 0x69]
mov r15d, 0xb672
cmovae eax, ecx
jmp 0x140012b72
test rdi, rdi
je 0x140012b4a
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call r14
xor edx, edx
xor ecx, ecx
call r13
jmp 0x140012b56
xor r12d, r12d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rdi, qword [rbp - 0x61]
mov r15d, 0xb672
mov r14, qword [rbp - 0x69]
mov eax, 0xffffffff
mov dword [rbx + 0x420], eax
test eax, eax
jns 0x140012e60
test rdi, rdi
je 0x140012b93
mov rax, qword [rbx + 0x658]
mov qword [rdi + 0x658], rax
mov rcx, rbx
mov edx, 0x660
mov rbx, qword [rbx + 0x658]
call fcn.140006de0
jmp 0x140012e77
lea r9, [rbp - 0x39]
mov r8, rbx
mov rdx, r14
mov rcx, rsi
call fcn.140013900
lea r9, [rbp - 0x39]
mov qword [rbx + 0x420], 0
mov r8, rbx
mov rdx, r14
mov rcx, rsi
movzx edi, ax
call fcn.140013bb0
cmp dword [rbx + 0x420], 0
jne 0x140012c04
mov ecx, 0x32
call qword [sym.imp.KERNEL32.dll_Sleep]
lea r9, [rbp - 0x39]
mov r8, rbx
mov rdx, r14
mov rcx, rsi
call fcn.140013bb0
test di, di
je 0x140012df7
cmp dword [rbx + 0x434], 0xb695044f
jne 0x140012c26
cmp di, r15w
jne 0x140012c26
mov ecx, 0xb695044f
jmp 0x140012c40
mov word [rbx + 0x436], r12w
movzx eax, di
shl eax, 0x10
or dword [rbx + 0x434], eax
mov ecx, dword [rbx + 0x434]
mov rax, qword [rsi + 0x290]
test rax, rax
je 0x140012df0
cmp dword [rax + 0x210], ecx
je 0x140012c6c
cmp dword [rax + 0x214], ecx
je 0x140012c6c
mov rax, qword [rax + 0x2d8]
test rax, rax
jne 0x140012c50
test rax, rax
je 0x140012df0
mov qword [rbx + 0x650], rax
mov eax, dword [rbx + 0x434]
cmp eax, 0xb692044f
ja 0x140012d6c
je 0x140012d4f
cmp eax, 0xb672044f
je 0x140012d32
cmp eax, 0xb677044f
je 0x140012d15
cmp eax, 0xb67f044f
je 0x140012cf8
cmp eax, 0xb684044f
je 0x140012cdb
cmp eax, 0xb689044f
jne 0x140012df7
lea rcx, [rbx + 0x208]
mov edx, 0x104
lea r8, str.TS_PC_Racer
call fcn.1401b25d8
jmp 0x140012df7
lea rcx, [rbx + 0x208]
mov edx, 0x104
lea r8, str.T_GT_Racing_Wheel
call fcn.1401b25d8
jmp 0x140012df7
lea rcx, [rbx + 0x208]
mov edx, 0x104
lea r8, str.TMX_Force_Feedback
call fcn.1401b25d8
jmp 0x140012df7
lea rcx, [rbx + 0x208]
mov edx, 0x104
lea r8, str.T150_Racing_Wheel
call fcn.1401b25d8
jmp 0x140012df7
lea rcx, [rbx + 0x208]
mov edx, 0x104
lea r8, str.TH8A_Shifter
call fcn.1401b25d8
jmp 0x140012df7
lea rcx, [rbx + 0x208]
mov edx, 0x104
lea r8, str.TS_XW_Racer
call fcn.1401b25d8
jmp 0x140012df7
cmp eax, 0xb698044f
je 0x140012dd6
cmp eax, 0xb699044f
je 0x140012dbc
cmp eax, 0xb69a044f
je 0x140012da2
cmp eax, 0xb69b044f
jne 0x140012df7
lea rcx, [rbx + 0x208]
mov edx, 0x104
lea r8, str.T248PS
call fcn.1401b25d8
jmp 0x140012df7
lea rcx, [rbx + 0x208]
mov edx, 0x104
lea r8, str.T248X
call fcn.1401b25d8
jmp 0x140012df7
lea rcx, [rbx + 0x208]
mov edx, 0x104
lea r8, str.TSS_Handbrake_Sparco_Mod__V2_SENSOR_
call fcn.1401b25d8
jmp 0x140012df7
lea rcx, [rbx + 0x208]
mov edx, 0x104
lea r8, str.TH8A_Shifter__V2_SENSOR_
call fcn.1401b25d8
jmp 0x140012df7
mov qword [rbx + 0x650], r12
mov rcx, qword [rbx + 0x650]
test rcx, rcx
je 0x140012e43
mov eax, dword [rbx + 0x420]
sub eax, 0x2c
cmp eax, 0xc0
ja 0x140012e43
cmp dword [rcx + 0x208], 4
jne 0x140012e43
mov edx, dword [rcx + 0x20c]
lea eax, [rdx - 2]
test eax, 0xfffffffa
jne 0x140012e43
cmp edx, 7
je 0x140012e43
lea r9, [rbp - 0x39]
mov r8, rbx
mov rdx, r14
mov rcx, rsi
call fcn.140013730
lea r9, [rbp - 0x39]
mov r8, rbx
mov rdx, r14
mov rcx, rsi
call fcn.140014070
test eax, eax
jne 0x140012e60
mov dword [rbx + 0x43c], r12d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdi, rbx
mov qword [rbp - 0x61], rbx
mov rbx, qword [rbx + 0x658]
mov rsi, qword [rbp - 0x41]
test rbx, rbx
jne 0x140012911
mov r15, qword [rsp + 0xe0]
mov r14, qword [rsp + 0xe8]
mov r13, qword [rsp + 0x130]
mov eax, 1
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1401adf80
add rsp, 0xf0
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret