Function at 0x464150
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 [0x00514780]
mov eax, dword [rax]
cmp eax, 0x14
jne 0x464690
mov r9d, 0
mov r8d, 1
mov edx, 0x1e8480
mov rcx, qword [rbp + 0x3b0]
call dbg.serial_open
mov dword [rbp + 0x39c], eax
cmp dword [rbp + 0x39c], 0xffffffff
jne 0x46421e
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x4641dc
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x4641dc
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
test eax, eax
js 0x464693
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 0x464693
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 0x4642c8
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x464286
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x464286
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
test eax, eax
js 0x464696
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 0x464696
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 0x4642fc
movzx eax, byte [rbp + 0x300]
cmp al, 0xa0
je 0x46436b
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x464329
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x464329
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
test eax, eax
js 0x464699
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 0x464699
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, 0x622e36585f31585f
mov qword [rbp + 0x1f0], rax
mov word [rbp + 0x1f8], 0x7469
mov byte [rbp + 0x1fa], 0
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 0x4644a9
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x464467
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x464467
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
test eax, eax
js 0x46469c
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 0x46469c
mov edx, 0x2c0
mov ecx, 1
call sym.calloc
mov qword [rbp + 0x390], rax
mov rax, qword [rbp + 0x390]
lea rdx, [0x004f0c60]
mov qword [rax + 8], rdx
mov rcx, qword [rbp + 0x3b0]
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 0x4645fe
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x4645bc
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x4645bc
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
test eax, eax
js 0x46469f
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 0x46469f
mov rax, qword [rbp + 0x390]
mov rcx, rax
call dbg.add_cgpu
xor eax, 1
test al, al
je 0x46467c
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x46463d
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x46463d
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
test eax, eax
js 0x4646a2
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 0x4646a2
mov eax, dword [rbp + 0x39c]
mov ecx, eax
call sym.close
mov eax, 1
jmp 0x4646ea
nop
jmp 0x4646a3
nop
jmp 0x4646a3
nop
jmp 0x4646a3
nop
jmp 0x4646a3
nop
jmp 0x4646a3
nop
jmp 0x4646a3
nop
cmp dword [rbp + 0x39c], 0
jle 0x4646b9
mov eax, dword [rbp + 0x39c]
mov ecx, eax
call sym.close
cmp qword [rbp + 0x390], 0
je 0x4646e5
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