Function at 0x140002240
Capabilities:
Link many functions at runtime

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x438
lea rbp, [rsp + 0x30]
mov rax, qword [0x14005b740]
xor rax, rbp
mov qword [rbp + 0x3f0], rax
mov rbx, qword [rcx + 8]
mov qword [rbp + 0x20], rcx
mov rcx, qword [rbp + 0x470]
mov esi, edx
mov dword [rbp], edx
mov qword [rbp + 0x28], rcx
movsxd r14, r8d
lea rdx, str.ADL2_OverdriveN_Capabilities_Get
mov rcx, rbx
mov qword [rbp + 0x10], r9
mov dword [rbp + 4], r14d
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_FanControl_Get
mov rcx, rbx
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_FanControl_Set
mov rcx, rbx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_PowerLimit_Get
mov rcx, rbx
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_PowerLimit_Set
mov rcx, rbx
mov qword [rbp + 0x40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_Temperature_Get
mov rcx, rbx
mov qword [rbp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_SystemClocks_Get
mov rcx, rbx
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_SystemClocks_Set
mov rcx, rbx
mov qword [rbp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_MemoryClocks_Get
mov rcx, rbx
mov qword [rbp + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_MemoryClocks_Set
mov rcx, rbx
mov qword [rbp + 0x30], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp + 0x78], rax
test r12, r12
je 0x140002cb5
test rdi, rdi
je 0x140002cb5
test r13, r13
je 0x140002cb5
cmp qword [rbp + 0x40], 0
je 0x140002cb5
cmp qword [rbp + 0x50], 0
je 0x140002cb5
test r15, r15
je 0x140002cb5
cmp qword [rbp + 0x48], 0
je 0x140002cb5
cmp qword [rbp + 0x38], 0
je 0x140002cb5
cmp qword [rbp + 0x30], 0
je 0x140002cb5
test rax, rax
je 0x140002cb5
lea rdx, str.ADL2_OverdriveN_SystemClocksX2_Get
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_SystemClocksX2_Set
mov rcx, rbx
mov qword [rbp + 0x68], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_MemoryClocksX2_Get
mov rcx, rbx
mov qword [rbp + 0x58], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.ADL2_OverdriveN_MemoryClocksX2_Set
mov rcx, rbx
mov qword [rbp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [rbp + 0xb0]
xor edx, edx
mov r8d, 0xa4
mov qword [rbp + 0x70], rax
call fcn.140032380
lea r8, [rbp + 0xb0]
mov edx, esi
xor ecx, ecx
call r12
test eax, eax
je 0x14000249d
cmp eax, 0xfffffff8
jne 0x1400024d8
mov rbx, qword [0x14005eb50]
test rbx, rbx
je 0x1400024d8
lea rcx, [rbp + 0x160]
xor edx, edx
mov r8d, 0x290
call fcn.140032380
lea r8, [rbp + 0x160]
mov edx, esi
xor ecx, ecx
call rbx
test eax, eax
je 0x140002485
lea rdx, str.Cannot_get_17.7.2_Overdrive_capabilities_for_adapter__d__error__d__n
mov r9d, eax
mov r8d, esi
mov ecx, 2
call fcn.1400054d0
jmp 0x140002cc6
mov eax, dword [rbp + 0x1e8]
mov dword [rbp + 0x134], eax
mov eax, dword [rbp + 0x160]
mov dword [rbp + 0xb0], eax
xor eax, eax
lea r8, [rbp + 0x88]
mov edx, esi
xor ecx, ecx
mov qword [rbp + 0x88], rax
mov qword [rbp + 0x90], rax
mov qword [rbp + 0x98], rax
mov qword [rbp + 0xa0], rax
call rdi
test eax, eax
je 0x1400024f1
lea rdx, str.Failed_to_get_fan_info__n
jmp 0x140002cbc
lea rdx, str.Failed_to_get_OverdriveN_capabilities__error__d___n
mov r8d, eax
mov ecx, 2
call fcn.1400054d0
jmp 0x140002cc6
movzx ebx, byte [rbp + 0x478]
lea r8, sym.ZecMiner64.exe__Co9eEk_rc_U8Qzt_M_rBCXNPgLr_62n_K__
test bl, bl
jne 0x140002565
mov rax, qword [rbp + 0x20]
mov ecx, dword [rax + 0x78]
cmp ecx, 2
jge 0x140002521
mov eax, dword [r8 + r14*4 + 0x61950]
cdq
xor eax, edx
sub eax, edx
cmp eax, 5
jg 0x140002525
test ecx, ecx
jns 0x140002565
lea rdx, str.OC_v7__Reset_control_for_GPU__d__close_miner_right_now_if_you_want_to_use_default_control_from_Catalyst__n
mov r8d, r14d
mov ecx, 2
call fcn.1400054d0
lea r8, [rbp + 0x88]
mov edx, esi
xor ecx, ecx
mov dword [rbp + 0x88], 2
call r13
test eax, eax
je 0x140002c95
lea rdx, str.Failed_to_set_fan_info__n
jmp 0x140002cbc
lea r9, [rbp + 8]
mov r8d, 1
mov edx, esi
xor ecx, ecx
mov dword [rbp + 8], 0xfffe7578
call r15
mov eax, 0x10624dd3
imul dword [rbp + 8]
mov r11d, edx
sar r11d, 6
mov eax, r11d
shr eax, 0x1f
add r11d, eax
mov dword [rbp + 8], r11d
lea eax, [r11 + 0x64]
cmp eax, 0x15e
ja 0x140002c9c
lea r10, sym.ZecMiner64.exe__Co9eEk_rc_U8Qzt_M_rBCXNPgLr_62n_K__
test bl, bl
jne 0x140002615
mov eax, dword [r10 + r14*4 + 0x617b0]
test eax, eax
je 0x140002615
jle 0x140002653
cmp r11d, eax
jl 0x140002615
cmp byte [r14 + r10 + 0x61930], bl
jne 0x14000262d
mov dword [rsp + 0x28], eax
lea r8, str.GPU__d_reached_STOP_temperature___d____d___stop_mining_on_this_GPU._n
mov r9d, r14d
mov edx, 3
xor ecx, ecx
mov dword [rsp + 0x20], r11d
call fcn.1400056c0
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
lea r10, sym.ZecMiner64.exe__Co9eEk_rc_U8Qzt_M_rBCXNPgLr_62n_K__
mov qword [r10 + r14*8 + 0x61c50], rax
mov byte [r14 + r10 + 0x61930], 1
mov r11d, dword [rbp + 8]
mov r8d, dword [rbp + 0x134]
test r8d, r8d
jg 0x14000265f
lea rdx, str.Failed_to_get_fan_config_info__n
jmp 0x140002cbc
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
lea r10, sym.ZecMiner64.exe__Co9eEk_rc_U8Qzt_M_rBCXNPgLr_62n_K__
mov rcx, qword [r10 + r14*8 + 0x61c50]
add rcx, 0x7530
cmp rax, rcx
jbe 0x140002611
jmp 0x140002ceb
neg eax
cmp r11d, eax
jl 0x140002615
jmp 0x140002d25
mov eax, dword [rbp + 0x94]
mov r9d, 0x64
lea rdi, [r14*4]
mov ecx, dword [rdi + r10 + 0x616b0]
mov dword [rdi + r10 + 0x61bd0], r11d
imul eax, eax, 0x64
cdq
idiv r8d
cmp eax, r9d
mov r12d, eax
mov eax, dword [rbp + 0x98]
cmovg r12d, r9d
cmp ecx, 0xffffffff
cmovne eax, ecx
mov rcx, qword [rbp + 0x10]
imul eax, eax, 0x64
cdq
idiv r8d
cmp eax, r9d
cmovg eax, r9d
test rcx, rcx
je 0x1400026c9
mov dword [rcx], r11d
mov rcx, qword [rbp + 0x28]
mov dword [rcx], r12d
test bl, bl
je 0x140002c95
mov ecx, dword [r10 + rdi + 0x61950]
lea r15, [r10 + 0x61950]
cmp ecx, 5
jg 0x140002747
test bl, bl
jne 0x140002747
test ecx, ecx
jns 0x1400027fd
imul ecx, r8d
mov eax, 0xae147ae1
lea r8, [rbp + 0x88]
imul ecx
xor ecx, ecx
mov dword [rbp + 0x88], 3
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rbp + 0xa4], edx
mov dword [rbp + 0x98], edx
mov edx, esi
call r13
test eax, eax
je 0x1400027f6
mov r8d, dword [r15 + rdi]
lea rdx, str.Failed_to_set_new_fan_speed__d__n
mov ecx, 2
neg r8d
call fcn.1400054d0
jmp 0x140002cc6
cmp r12d, 0xffffffff
jne 0x140002769
test bl, bl
jne 0x140002769
lea r8, str.Cannot_get_current_fan_speed_n
lea edx, [r12 + 4]
xor ecx, ecx
call fcn.1400056c0
jmp 0x1400027f6
mov r9d, eax
mov r8d, r11d
mov edx, r14d
mov byte [rsp + 0x20], bl
call fcn.1400012a0
lea rdx, str.GPU__d_temp___d__old_fan_speed___d__new_fan_speed___d__r_n
mov dword [rsp + 0x28], eax
mov r9d, r11d
mov r8d, r14d
mov ecx, 2
mov ebx, eax
mov dword [rsp + 0x20], r12d
call fcn.1400054d0
mov eax, 0x51eb851f
lea r8, sym.ZecMiner64.exe__Co9eEk_rc_U8Qzt_M_rBCXNPgLr_62n_K__
imul ebx, dword [rbp + 0x134]
xor ecx, ecx
mov dword [rbp + 0x88], 3
imul ebx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rdi + r8 + 0x616b0], edx
mov dword [rbp + 0xa4], edx
mov dword [rbp + 0x98], edx
mov dword [rbp + 0x94], edx
lea r8, [rbp + 0x88]
mov edx, esi
call r13
test eax, eax
jne 0x140002559
lea r10, sym.ZecMiner64.exe__Co9eEk_rc_U8Qzt_M_rBCXNPgLr_62n_K__
mov r14d, dword [rdi + r10 + 0x61730]
mov eax, dword [rdi + r10 + 0x61830]
mov r15d, dword [rdi + r10 + 0x619d0]
mov r12d, dword [rdi + r10 + 0x61b50]
mov r13d, dword [rdi + r10 + 0x61ad0]
mov dword [rbp + 0x28], eax
test r14d, r14d
jne 0x140002845
test r15d, r15d
jne 0x140002845
cmp eax, 0xffffff9c
jne 0x140002845
test r12d, r12d
jne 0x140002845
test r13d, r13d
je 0x140002c95
mov ecx, dword [rbp + 0xb0]
movabs r8, 0xffffffffffffff0
lea eax, [rcx + 1]
shl ecx, 4
lea eax, [rax + rax*2]
add ecx, 0xc
shl eax, 2
mov dword [rbp + 0x1c], ecx
movsxd rdx, eax
mov dword [rbp + 0x18], eax
lea rax, [rdx + 0xf]
mov qword [rbp + 0x10], rdx
cmp rax, rdx
ja 0x14000287d
mov rax, r8
and rax, 0xfffffffffffffff0
call fcn.140037250
movsxd rcx, ecx
sub rsp, rax
lea rax, [rcx + 0xf]
lea rdi, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
cmp rax, rcx
ja 0x1400028a1
mov rax, r8
and rax, 0xfffffffffffffff0
call fcn.140037250
sub rsp, rax
xor esi, esi
lea rbx, [rsp + 0x30]
test r14d, r14d
jg 0x1400028c2
test r12d, r12d
jle 0x140002b0f
mov r8, rdx
mov rcx, rdi
xor edx, edx
call fcn.140032380
mov eax, dword [rbp + 0x18]
mov r8, qword [rbp + 0x20]
mov dword [rdi], eax
mov eax, dword [rbp + 0xb0]
xor edx, edx
mov rcx, rbx
mov dword [rdi + 8], eax
call fcn.140032380
mov eax, dword [rbp + 0x1c]
mov edx, dword [rbp]
mov dword [rbx], eax
mov eax, dword [rbp + 0xb0]
mov r8, rdi
xor ecx, ecx
mov dword [rbx + 8], eax
call qword [rbp + 0x48]
test eax, eax
je 0x140002a9a
cmp eax, 0xfffffff8
jne 0x140002a81
mov r9, qword [rbp + 0x68]
test r9, r9
je 0x140002a81
mov edx, dword [rbp]
mov r8, rbx
xor ecx, ecx
call r9
test eax, eax
je 0x14000294a
lea rdx, str.Failed_to_get_17.7.2_sysclocks__error__d__n
mov r8d, eax
mov ecx, 2
call fcn.1400054d0
jmp 0x140002cc6
test r14d, r14d
jle 0x140002983
mov edx, 1
cmp dword [rbx + 8], edx
jle 0x140002983
lea rcx, [rbx + 0x24]
nop dword [rax]
cmp dword [rcx - 8], esi
je 0x140002978
mov eax, r14d
imul eax, eax, 0x64
mov dword [rcx - 8], eax
cmp dword [rcx], esi
jne 0x140002978
mov dword [rcx], 1
inc edx
add rcx, 0x10
cmp edx, dword [rbx + 8]
jl 0x140002960
test r12d, r12d
jle 0x1400029b4
mov ecx, 1
cmp dword [rbx + 8], ecx
jle 0x1400029b4
lea rax, [rbx + 0x24]
cmp dword [rax - 4], esi
je 0x1400029a9
mov dword [rax - 4], r12d
cmp dword [rax], esi
jne 0x1400029a9
mov dword [rax], 1
inc ecx
add rax, 0x10
cmp ecx, dword [rbx + 8]
jl 0x140002996
mov r14d, dword [rbp]
mov r8, rbx
xor ecx, ecx
mov edx, r14d
mov dword [rbx + 4], 3
call qword [rbp + 0x58]
mov r12d, dword [rbp + 4]
test eax, eax
je 0x1400029e3
mov r8d, r12d
lea rdx, str.Failed_to_set_new_effective_core_clock_for_GPU__d__17.7.2__r_n
xor ecx, ecx
call fcn.1400054d0
mov rdx, qword [rbp + 0x10]
test r15d, r15d
jg 0x1400029f5
test r13d, r13d
jle 0x140002c35
mov r8, rdx
mov rcx, rdi
xor edx, edx
call fcn.140032380
mov eax, dword [rbp + 0x18]
mov r8, qword [rbp + 0x20]
mov dword [rdi], eax
mov eax, dword [rbp + 0xb0]
xor edx, edx
mov rcx, rbx
mov dword [rdi + 8], eax
call fcn.140032380
mov eax, dword [rbp + 0x1c]
mov r8, rdi
mov dword [rbx], eax
mov eax, dword [rbp + 0xb0]
mov edx, r14d
xor ecx, ecx
mov dword [rbx + 8], eax
call qword [rbp + 0x30]
test eax, eax
je 0x140002bc3
cmp eax, 0xfffffff8
jne 0x140002baa
mov r9, qword [rbp + 0x60]
test r9, r9
je 0x140002baa
mov r8, rbx
mov edx, r14d
xor ecx, ecx
call r9
test eax, eax
je 0x140002b1c
lea rdx, str.Failed_to_get_17.7.2_memclocks__error__d__n
mov r8d, eax
mov ecx, 2
call fcn.1400054d0
jmp 0x140002cc6
lea rdx, str.Failed_to_get_sysclocks__error__d__n
mov r8d, eax
mov ecx, 2
call fcn.1400054d0
jmp 0x140002cc6
test r14d, r14d
jle 0x140002abe
mov ecx, esi
cmp dword [rdi + 8], ecx
jle 0x140002abe
imul r14d, r14d, 0x64
lea rax, [rdi + 0xc]
nop
mov dword [rax], r14d
inc ecx
lea rax, [rax + 0xc]
cmp ecx, dword [rdi + 8]
jl 0x140002ab0
test r12d, r12d
jle 0x140002ade
mov ecx, esi
cmp dword [rdi + 8], ecx
jle 0x140002ade
lea rax, [rdi + 0x10]
nop
mov dword [rax], r12d
inc ecx
lea rax, [rax + 0xc]
cmp ecx, dword [rdi + 8]
jl 0x140002ad0
mov r14d, dword [rbp]
mov r8, rdi
xor ecx, ecx
mov edx, r14d
mov dword [rdi + 4], 3
call qword [rbp + 0x38]
mov r12d, dword [rbp + 4]
test eax, eax
je 0x1400029e3
mov r8d, r12d
lea rdx, str.Failed_to_set_new_effective_core_clock_for_GPU__d_r_n
jmp 0x1400029dc
mov r14d, dword [rbp]
mov r12d, dword [rbp + 4]
jmp 0x1400029e7
test r15d, r15d
jle 0x140002b53
mov edx, 1
cmp dword [rbx + 8], edx
jle 0x140002b53
lea rcx, [rbx + 0x24]
nop
cmp dword [rcx - 8], esi
je 0x140002b48
mov eax, r15d
imul eax, eax, 0x64
mov dword [rcx - 8], eax
cmp dword [rcx], esi
jne 0x140002b48
mov dword [rcx], 1
inc edx
add rcx, 0x10
cmp edx, dword [rbx + 8]
jl 0x140002b30
test r13d, r13d
jle 0x140002b84
mov ecx, 1
cmp dword [rbx + 8], ecx
jle 0x140002b84
lea rax, [rbx + 0x24]
cmp dword [rax - 4], esi
je 0x140002b79
mov dword [rax - 4], r13d
cmp dword [rax], esi
jne 0x140002b79
mov dword [rax], 1
inc ecx
add rax, 0x10
cmp ecx, dword [rbx + 8]
jl 0x140002b66
mov r8, rbx
mov edx, r14d
xor ecx, ecx
mov dword [rbx + 4], 3
call qword [rbp + 0x70]
test eax, eax
je 0x140002c35
lea rdx, str.Failed_to_set_new_effective_memory_clock_for_GPU__d__17.7.2__r_n
jmp 0x140002c2b
lea rdx, str.Failed_to_get_memclocks__error__d__n
mov r8d, eax
mov ecx, 2
call fcn.1400054d0
jmp 0x140002cc6
test r15d, r15d
jle 0x140002bee
mov eax, esi
cmp dword [rdi + 8], eax
jle 0x140002bee
imul r15d, r15d, 0x64
lea rcx, [rdi + 0xc]
nop word [rax + rax]
mov dword [rcx], r15d
inc eax
lea rcx, [rcx + 0xc]
cmp eax, dword [rdi + 8]
jl 0x140002be0
test r13d, r13d
jle 0x140002c0e
cmp dword [rdi + 8], esi
jle 0x140002c0e
lea rax, [rdi + 0x10]
nop dword [rax]
mov dword [rax], r13d
inc esi
lea rax, [rax + 0xc]
cmp esi, dword [rdi + 8]
jl 0x140002c00
mov r8, rdi
mov edx, r14d
xor ecx, ecx
mov dword [rdi + 4], 3
call qword [rbp + 0x78]
test eax, eax
je 0x140002c35
lea rdx, str.Failed_to_set_new_effective_memory_clock_for_GPU__d_r_n
mov r8d, r12d
xor ecx, ecx
call fcn.1400054d0
mov ebx, dword [rbp + 0x28]
cmp ebx, 0xffffff9c
je 0x140002c95
xor eax, eax
lea r8, [rbp + 0x78]
mov edx, r14d
xor ecx, ecx
mov qword [rbp + 0x78], rax
mov dword [rbp + 0x80], eax
call qword [rbp + 0x40]
xor ecx, ecx
test eax, eax
je 0x140002c6c
lea rdx, str.Power_control_failed_for_GPU__d_n
mov r8d, r12d
call fcn.1400054d0
jmp 0x140002cc6
lea r8, [rbp + 0x78]
mov edx, r14d
mov dword [rbp + 0x78], 3
mov dword [rbp + 0x7c], ebx
call qword [rbp + 0x50]
test eax, eax
je 0x140002c95
lea rdx, str.Failed_to_set_new_Power_Control_treshold_for_GPU__d_n
mov r8d, r12d
xor ecx, ecx
call fcn.1400054d0
mov eax, 1
jmp 0x140002cc8
lea rdx, str.GPU__d:_got_incorrect_temperature__d__ignore_n
mov r9d, r11d
mov r8d, r14d
mov ecx, 2
call fcn.1400054d0
jmp 0x140002cc6
lea rdx, str.ADL2s_API_is_missing__n
mov ecx, 2
call fcn.1400054d0
xor eax, eax
mov rcx, qword [rbp + 0x3f0]
xor rcx, rbp
call fcn.14002aed0
lea rsp, [rbp + 0x408]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea r8, str.GPU__d_reached_STOP_temperature_and_was_stopped__but_it_is_still_overheated._Probably_wrong_card_was_turned_off__check__KNOWN_ISSUES__section_of_readme_file_for_details._n
mov r9d, r14d
mov edx, 3
xor ecx, ecx
call fcn.1400056c0
lea r8, str.Miner_will_be_closed_n
mov edx, 3
xor ecx, ecx
call fcn.1400056c0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.1400153f0
int3
mov dword [rsp + 0x28], eax
lea r8, str.GPU__d_reached_CLOSE_temperature___d____d_._n
mov r9d, r14d
mov edx, 3
xor ecx, ecx
mov dword [rsp + 0x20], r11d
call fcn.1400056c0
lea r8, str.Miner_will_be_closed_n
mov edx, 3
xor ecx, ecx
call fcn.1400056c0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.1400153f0
int3