Function at 0x140069860
Capabilities:
Read file on windows

Disassembly:
push rbp
sub rsp, 0x420
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x3b0], rcx
mov dword [rbp + 0x39c], 0
mov rax, qword [0x14011bb30]
mov eax, dword [rax]
cmp eax, 0x14
jne 0x140069da7
mov rax, qword [rbp + 0x3b0]
mov r9d, 0
mov r8d, 1
mov edx, 0x1e8480
mov rcx, rax
call dbg.serial_open
mov dword [rbp + 0x39c], eax
cmp dword [rbp + 0x39c], 0xffffffff
jne 0x140069931
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400698ef
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400698ef
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x140069daa
mov rax, qword [rbp + 0x3b0]
lea rdx, [rax + 4]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_open_serial_port_
mov edx, 0x200
mov rcx, rax
call sym.snprintf_14
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x140069daa
mov eax, dword [rbp + 0x39c]
mov ecx, eax
call dbg.serial_flush
lea rdx, [rbp + 0x200]
mov eax, dword [rbp + 0x39c]
mov dword [rsp + 0x20], 0
mov r9, rdx
mov r8d, 0xff
mov edx, 0xa2
mov ecx, eax
call dbg.send_command
test eax, eax
jns 0x1400699db
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x140069999
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x140069999
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x140069dad
mov rax, qword [rbp + 0x3b0]
lea rdx, [rax + 4]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_send_command:_DETECT_
mov edx, 0x200
mov rcx, rax
call sym.snprintf_14
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x140069dad
lea rdx, [rbp + 0x300]
mov eax, dword [rbp + 0x39c]
mov r8d, 1
mov ecx, eax
call sym.read
mov dword [rbp + 0x38c], eax
cmp dword [rbp + 0x38c], 0
jle 0x140069a0f
movzx eax, byte [rbp + 0x300]
cmp al, 0xa0
je 0x140069a7e
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x140069a3c
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x140069a3c
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x140069db0
mov rax, qword [rbp + 0x3b0]
lea rdx, [rax + 4]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_detect_controller_
mov edx, 0x200
mov rcx, rax
call sym.snprintf_14
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x140069db0
movabs rax, 0x74736d61482f2e2e
movabs rdx, 0x72636f644f2d7265
mov qword [rbp + 0x1b0], rax
mov qword [rbp + 0x1b8], rdx
movabs rax, 0x726f43315f747079
movabs rdx, 0x3231303036315f65
mov qword [rbp + 0x1c0], rax
mov qword [rbp + 0x1c8], rdx
movabs rax, 0x7268745f30303038
movabs rdx, 0x327475706867756f
mov qword [rbp + 0x1d0], rax
mov qword [rbp + 0x1d8], rdx
movabs rax, 0x38325f4d3030325f
movabs rdx, 0x647561424d325f77
mov qword [rbp + 0x1e0], rax
mov qword [rbp + 0x1e8], rdx
movabs rax, 0x31585f647561424d
movabs rdx, 0x7469622e36585f
mov qword [rbp + 0x1eb], rax
mov qword [rbp + 0x1f3], rdx
mov rax, qword [rbp + 0x3b0]
lea rcx, [rax + 4]
lea rdx, [rbp + 0x1b0]
mov eax, dword [rbp + 0x39c]
mov r8, rdx
mov edx, eax
call dbg.program_firmware
test eax, eax
jns 0x140069bbd
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x140069b7b
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x140069b7b
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x140069db3
mov rax, qword [rbp + 0x3b0]
lea rdx, [rax + 4]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_program_firmware.
mov edx, 0x200
mov rcx, rax
call sym.snprintf_14
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x140069db3
mov edx, 0x2c0
mov ecx, 1
call sym.calloc
mov qword [rbp + 0x390], rax
mov rax, qword [rbp + 0x390]
lea rdx, [0x1400f7c40]
mov qword [rax + 8], rdx
mov rax, qword [rbp + 0x3b0]
mov rcx, rax
call sym.strdup
mov rdx, rax
mov rax, qword [rbp + 0x390]
mov qword [rax + 0x20], rdx
mov rax, qword [rbp + 0x390]
mov dword [rax + 0x10], 0xffffffff
mov rax, qword [rbp + 0x390]
mov dword [rax + 0x1bc], 1
mov ecx, 0x2028
call sym.malloc
mov qword [rbp + 0x380], rax
mov rax, qword [rbp + 0x390]
mov rdx, qword [rbp + 0x380]
mov qword [rax + 0x28], rdx
mov rax, qword [rbp + 0x380]
mov edx, 1
mov rcx, rax
call dbg.init_fpga_info
mov rax, qword [rbp + 0x380]
mov eax, dword [rax + 8]
mov byte [rbp + 0x200], al
mov rax, qword [rbp + 0x380]
mov eax, dword [rax + 0xc]
mov byte [rbp + 0x201], al
lea rdx, [rbp + 0x200]
mov eax, dword [rbp + 0x39c]
mov dword [rsp + 0x20], 2
mov r9, rdx
mov r8d, 0xff
mov edx, 0x10
mov ecx, eax
call dbg.send_command
test eax, eax
jns 0x140069d15
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x140069cd3
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x140069cd3
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x140069db6
mov rax, qword [rbp + 0x3b0]
lea rdx, [rax + 4]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_send_command:_INIT.
mov edx, 0x200
mov rcx, rax
call sym.snprintf_14
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x140069db6
mov rax, qword [rbp + 0x390]
mov rcx, rax
call dbg.add_cgpu
xor eax, 1
test al, al
je 0x140069d93
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x140069d54
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x140069d54
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x140069db9
mov rax, qword [rbp + 0x3b0]
lea rdx, [rax + 4]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_add_cgpu_
mov edx, 0x200
mov rcx, rax
call sym.snprintf_14
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x140069db9
mov eax, dword [rbp + 0x39c]
mov ecx, eax
call sym.close
mov eax, 1
jmp 0x140069e01
nop
jmp 0x140069dba
nop
jmp 0x140069dba
nop
jmp 0x140069dba
nop
jmp 0x140069dba
nop
jmp 0x140069dba
nop
jmp 0x140069dba
nop
cmp dword [rbp + 0x39c], 0
jle 0x140069dd0
mov eax, dword [rbp + 0x39c]
mov ecx, eax
call sym.close
cmp qword [rbp + 0x390], 0
je 0x140069dfc
mov rax, qword [rbp + 0x390]
mov rax, qword [rax + 0x28]
mov rcx, rax
call sym.free
mov rax, qword [rbp + 0x390]
mov qword [rax + 0x28], 0
mov eax, 0
add rsp, 0x420
pop rbp
ret