Function at 0x140001e40
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov edi, 1
cmp di, word [0x140010048]
jb 0x140001e73
lea rcx, str.LOG:_Initializing_ADL_interface..._n
call fcn.1400038e0
movzx eax, word [0x14009a5ac]
test ax, ax
je 0x140001ed4
lea rdx, str...USBCPDFW.LOG
lea rcx, [rsp + 0x30]
cmp di, ax
jne 0x140001ea6
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x140001eb3
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140001ed4
lea rdx, str.LOG:_Initializing_ADL_interface..._n
call fcn.140009b30
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea rcx, str.atiadlxx.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
test rax, rax
jne 0x140001f7a
lea rcx, str.atiadlxy.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
test rax, rax
jne 0x140001f7a
mov eax, 2
cmp ax, word [0x140010048]
jb 0x140001f1c
lea rcx, str.ERROR:_ADL_library_not_found____n
call fcn.1400038e0
movzx eax, word [0x14009a5ac]
test ax, ax
je 0x140002230
lea rdx, str...USBCPDFW.LOG
lea rcx, [rsp + 0x30]
cmp di, ax
jne 0x140001f53
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x140001f60
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140002230
lea rdx, str.ERROR:_ADL_library_not_found____n
jmp 0x140002220
lea rdx, str.ADL2_Main_Control_Create
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_Main_Control_Destroy
mov rcx, rbx
mov qword [0x14009a5f8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_Adapter_AdapterInfoX3_Get
mov rcx, rbx
mov qword [0x14009a5f0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_Device_PMLog_Device_Create
mov rcx, rbx
mov qword [0x14009a5b8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_Device_PMLog_Device_Destroy
mov rcx, rbx
mov qword [0x14009a5e8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_Adapter_KeepAwake_Start
mov rcx, rbx
mov qword [0x14009a5d8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_Adapter_KeepAwake_Stop
mov rcx, rbx
mov qword [0x14009a5c8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r9, qword [0x14009a5f8]
mov qword [0x14009a600], rax
test r9, r9
je 0x1400021b5
cmp qword [0x14009a5f0], 0
je 0x1400021b5
cmp qword [0x14009a5b8], 0
je 0x1400021b5
cmp qword [0x14009a5e8], 0
je 0x1400021b5
cmp qword [0x14009a5d8], 0
je 0x1400021b5
cmp qword [0x14009a5c8], 0
je 0x1400021b5
test rax, rax
je 0x1400021b5
lea r8, [0x14009a5d0]
mov edx, edi
lea rcx, [0x1400019c0]
mov rax, r9
call qword [0x14000b3a0]
test eax, eax
je 0x14000210f
mov eax, 2
cmp ax, word [0x140010048]
jb 0x1400020b1
lea rcx, str.ERROR:_Failed_to_create_clients_context_handle____n
call fcn.1400038e0
movzx eax, word [0x14009a5ac]
test ax, ax
je 0x140002230
lea rdx, str...USBCPDFW.LOG
lea rcx, [rsp + 0x30]
cmp di, ax
jne 0x1400020e8
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x1400020f5
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140002230
lea rdx, str.ERROR:_Failed_to_create_clients_context_handle____n
jmp 0x140002220
mov rcx, qword [0x14009a5d0]
lea r9, [0x14009a5c0]
mov rax, qword [0x14009a5b8]
lea r8, [0x14009a5e0]
mov edx, 0xffffffff
call qword [0x14000b3a0]
test eax, eax
je 0x1400021af
mov eax, 2
cmp ax, word [0x140010048]
jb 0x140002154
lea rcx, str.ERROR:_Failed_to_get_adapter_info____n
call fcn.1400038e0
movzx eax, word [0x14009a5ac]
test ax, ax
je 0x140002230
lea rdx, str...USBCPDFW.LOG
lea rcx, [rsp + 0x30]
cmp di, ax
jne 0x14000218b
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x140002198
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140002230
lea rdx, str.ERROR:_Failed_to_get_adapter_info____n
jmp 0x140002220
movzx eax, dil
jmp 0x140002232
mov eax, 2
cmp ax, word [0x140010048]
jb 0x1400021cf
lea rcx, str.ERROR:_ADLs_API_is_missing____n
call fcn.1400038e0
movzx eax, word [0x14009a5ac]
test ax, ax
je 0x140002230
lea rdx, str...USBCPDFW.LOG
lea rcx, [rsp + 0x30]
cmp di, ax
jne 0x140002202
lea r8, [0x14000daf8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
inc word [0x14009a5ac]
jmp 0x14000220f
lea r8, [0x14000db10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140002230
lea rdx, str.ERROR:_ADLs_API_is_missing____n
call fcn.140009b30
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor al, al
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140009c20
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret