Function at 0x1400c4990
Capabilities:
Read file on windows

Disassembly:
push rbp
sub rsp, 0x350
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x2e0], rcx
mov dword [rbp + 0x2e8], edx
mov qword [rbp + 0x2f0], r8
mov rax, qword [rbp + 0x2f0]
lea rdx, [0x14010be1c]
mov rcx, rax
call sym.fopen
mov qword [rbp + 0x2b8], rax
cmp qword [rbp + 0x2b8], 0
jne 0x1400c4a46
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c4a08
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c4a08
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c51df
mov rdx, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_load_firmware_
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x1400c51df
mov rax, qword [rbp + 0x2b8]
mov r8d, 2
mov edx, 0
mov rcx, rax
call sym.fseek
mov rax, qword [rbp + 0x2b8]
mov rcx, rax
call sym.ftell
mov dword [rbp + 0x2b4], eax
mov rax, qword [rbp + 0x2b8]
mov rcx, rax
call sym.rewind
mov eax, dword [rbp + 0x2b4]
movsxd rdx, eax
imul rdx, rdx, 0x214d0215
shr rdx, 0x20
mov ecx, edx
sar ecx, 5
cdq
mov eax, ecx
sub eax, edx
mov dword [rbp + 0x2cc], eax
mov edx, dword [rbp + 0x2b4]
movsxd rax, edx
imul rax, rax, 0x214d0215
shr rax, 0x20
sar eax, 5
mov ecx, edx
sar ecx, 0x1f
sub eax, ecx
imul ecx, eax, 0xf6
mov eax, edx
sub eax, ecx
test eax, eax
jle 0x1400c4adb
add dword [rbp + 0x2cc], 1
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c4b04
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c4b04
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c4b51
mov rcx, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov edx, dword [rbp + 0x2cc]
mov dword [rsp + 0x28], edx
mov edx, dword [rbp + 0x2b4]
mov dword [rsp + 0x20], edx
mov r9, rcx
lea r8, str._FPGA__s__Loaded_firmware:__d_bytes____d_blocks.
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
lea rdx, [rbp + 0x1b0]
mov eax, dword [rbp + 0x2e8]
mov dword [rsp + 0x20], 0
mov r9, rdx
mov r8d, 0xff
mov edx, 0x1c
mov ecx, eax
call dbg.send_command
test eax, eax
jns 0x1400c4bea
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c4bac
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c4bac
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c51e2
mov rdx, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_send_command:_START_CONFIG_
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x1400c51e2
mov ecx, 1
call dbg.sleep
lea rdx, [rbp + 0x2af]
mov eax, dword [rbp + 0x2e8]
mov r8d, 1
mov ecx, eax
call sym.read
mov dword [rbp + 0x2b0], eax
cmp dword [rbp + 0x2b0], 0
jle 0x1400c4c90
movzx eax, byte [rbp + 0x2af]
cmp al, 0x3c
jne 0x1400c4c90
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c4c55
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c4c55
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c4cfb
mov rdx, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Start_config...
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x1400c4cfb
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c4cbd
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c4cbd
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c51e5
mov rdx, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_receive_response:_START_CONFIG.
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x1400c51e5
mov byte [rbp + 0x2cb], 0
mov dword [rbp + 0x2c4], 0
jmp 0x1400c5007
mov eax, dword [rbp + 0x2cc]
sub eax, 1
cmp dword [rbp + 0x2c4], eax
jne 0x1400c4d9f
mov eax, dword [rbp + 0x2b4]
movsxd rdx, eax
imul rdx, rdx, 0x214d0215
shr rdx, 0x20
sar edx, 5
mov ecx, eax
sar ecx, 0x1f
sub edx, ecx
imul ecx, edx, 0xf6
sub eax, ecx
mov edx, eax
movsxd rdx, edx
mov rcx, qword [rbp + 0x2b8]
lea rax, [rbp + 0x1b0]
mov r9, rcx
mov r8, rdx
mov edx, 1
mov rcx, rax
call sym.fread
mov dword [rbp + 0x2c0], eax
mov eax, dword [rbp + 0x2c0]
sub eax, 1
cdqe
movzx eax, byte [rbp + rax + 0x1b0]
mov byte [rbp + 0x2cb], al
cmp dword [rbp + 0x2c0], 0
jle 0x1400c4dc9
sub dword [rbp + 0x2c0], 1
jmp 0x1400c4dc9
mov rdx, qword [rbp + 0x2b8]
lea rax, [rbp + 0x1b0]
mov r9, rdx
mov r8d, 0xf6
mov edx, 1
mov rcx, rax
call sym.fread
mov dword [rbp + 0x2c0], eax
mov eax, dword [rbp + 0x2c0]
movzx edx, al
lea rcx, [rbp + 0x1b0]
mov eax, dword [rbp + 0x2e8]
mov dword [rsp + 0x20], edx
mov r9, rcx
mov r8d, 0xff
mov edx, 0x16
mov ecx, eax
call dbg.send_command
test eax, eax
jns 0x1400c4e74
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c4e29
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c4e29
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c51e8
mov eax, dword [rbp + 0x2c4]
lea edx, [rax + 1]
mov rcx, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov dword [rsp + 0x20], edx
mov r9, rcx
lea r8, str._FPGA__s__Failed_to_send_command:_TRANSMIT_for_block:__d_
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x1400c51e8
lea rdx, [rbp + 0x2af]
mov eax, dword [rbp + 0x2e8]
mov r8d, 1
mov ecx, eax
call sym.read
mov dword [rbp + 0x2b0], eax
cmp dword [rbp + 0x2b0], 0
jle 0x1400c4eac
movzx eax, byte [rbp + 0x2af]
cmp al, 0x1e
je 0x1400c4f4b
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c4ed5
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c4ed5
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c4f1b
mov eax, dword [rbp + 0x2c4]
lea edx, [rax + 1]
mov rcx, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov dword [rsp + 0x20], edx
mov r9, rcx
lea r8, str._FPGA__s__Failed_to_receive_response_for_block:__d_
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
mov ecx, dword [rbp + 0x2c0]
mov edx, dword [rbp + 0x2c0]
lea rax, [rbp + 0x1b0]
mov r9d, ecx
mov r8d, edx
mov rdx, rax
lea rax, str.Block_Content
mov rcx, rax
call sym.logbyte2_23
jmp 0x1400c51ef
cmp dword [rbp + 0x2c4], 0
jle 0x1400c5000
mov eax, dword [rbp + 0x2c4]
lea edx, [rax + 1]
movsxd rax, edx
imul rax, rax, 0x68db8bad
shr rax, 0x20
sar eax, 0xc
mov ecx, edx
sar ecx, 0x1f
sub eax, ecx
imul ecx, eax, 0x2710
mov eax, edx
sub eax, ecx
test eax, eax
jne 0x1400c5000
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c4fb0
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c4fb0
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c5000
mov eax, dword [rbp + 0x2c4]
lea ecx, [rax + 1]
mov r8, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov edx, dword [rbp + 0x2cc]
mov dword [rsp + 0x28], edx
mov dword [rsp + 0x20], ecx
mov r9, r8
lea r8, str._FPGA__s__Successfully_transmitted__d__d...
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
add dword [rbp + 0x2c4], 1
mov eax, dword [rbp + 0x2c4]
cmp eax, dword [rbp + 0x2cc]
jl 0x1400c4d11
movzx eax, byte [rbp + 0x2cb]
mov byte [rbp + 0x1b0], al
lea rdx, [rbp + 0x1b0]
mov eax, dword [rbp + 0x2e8]
mov dword [rsp + 0x20], 1
mov r9, rdx
mov r8d, 0xff
mov edx, 0x19
mov ecx, eax
call dbg.send_command
test eax, eax
jns 0x1400c50bf
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c5081
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c5081
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c51eb
mov rdx, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_send_command:_TRANSMIT_for_last_block_
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x1400c51eb
lea rdx, [rbp + 0x2af]
mov eax, dword [rbp + 0x2e8]
mov r8d, 1
mov ecx, eax
call sym.read
mov dword [rbp + 0x2b0], eax
cmp dword [rbp + 0x2b0], 0
jle 0x1400c5165
movzx eax, byte [rbp + 0x2af]
cmp al, 0x20
jne 0x1400c5165
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c5120
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c5120
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c51c9
mov rcx, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov edx, dword [rbp + 0x2cc]
mov dword [rsp + 0x20], edx
mov r9, rcx
lea r8, str._FPGA__s__Configuration_completed_for__d_blocks.
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x1400c51c9
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400c518e
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400c518e
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
js 0x1400c51ee
mov rdx, qword [rbp + 0x2e0]
lea rax, [rbp - 0x50]
mov r9, rdx
lea r8, str._FPGA__s__Failed_to_receive_response_for_last_block.
mov edx, 0x200
mov rcx, rax
call sym.snprintf_19
lea rax, [rbp - 0x50]
mov r8d, 0
mov rdx, rax
mov ecx, 0
call dbg._applog
jmp 0x1400c51ee
mov rax, qword [rbp + 0x2b8]
mov rcx, rax
call sym.fclose
mov eax, 0
jmp 0x1400c520d
nop
jmp 0x1400c51ef
nop
jmp 0x1400c51ef
nop
jmp 0x1400c51ef
nop
jmp 0x1400c51ef
nop
jmp 0x1400c51ef
nop
cmp qword [rbp + 0x2b8], 0
je 0x1400c5208
mov rax, qword [rbp + 0x2b8]
mov rcx, rax
call sym.fclose
mov eax, 0xffffffff
add rsp, 0x350
pop rbp
ret