Function at 0x140001960
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x40
mov r8d, dword [rcx + 0x58]
lea rdx, [rcx + 7]
mov rbx, rcx
xor ebp, ebp
mov rcx, qword [rcx + 0x60]
xor r9d, r9d
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx r10d, byte [rbx + 6]
mov r11d, eax
movzx ecx, byte [r10 + rbx + 0x3c]
and cl, 0xf
movzx ecx, cl
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x140079820]
cvttsd2si ecx, xmm0
mov dword [rbx + 0x5c], ecx
movzx eax, byte [r10 + rbx + 0xc]
cmp dword [rbx], ebp
je 0x140001a03
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x1400797e8]
addsd xmm0, qword [0x140079838]
cvttsd2si eax, xmm0
mov byte [rbx + 0x7e], al
movzx eax, byte [r10 + rbx + 0xd]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x1400797e8]
addsd xmm0, qword [0x140079838]
cvttsd2si eax, xmm0
jmp 0x140001a0c
mov byte [rbx + 0x7e], al
movzx eax, byte [r10 + rbx + 0xd]
mov byte [rbx + 0x7f], al
mov edi, 0x101
movzx edx, byte [r10 + rbx + 8]
mov r9d, 0xffff8000
mov r8d, 0x7fff
movsx eax, di
imul edx, eax
mov eax, r8d
movsx ecx, di
add dx, r9w
mov word [rbx + 0x80], dx
movzx edx, byte [r10 + rbx + 9]
imul edx, ecx
movsx ecx, di
sub ax, dx
mov word [rbx + 0x82], ax
movzx edx, byte [r10 + rbx + 0xa]
imul edx, ecx
movsx ecx, di
add dx, r9w
mov word [rbx + 0x84], dx
movzx edx, byte [r10 + rbx + 0xb]
imul edx, ecx
mov ecx, 0x1000
sub r8w, dx
mov word [rbx + 0x86], r8w
movzx eax, byte [r10 + rbx + 0xf]
shr al, 4
and al, 1
movzx edx, al
shl dx, 0xe
mov word [rbx + 0x7c], dx
movzx eax, byte [r10 + rbx + 0xf]
shr al, 5
and al, 1
movzx r8d, al
imul r8d, ecx
mov ecx, 0x2000
add r8w, dx
mov word [rbx + 0x7c], r8w
movzx eax, byte [r10 + rbx + 0xf]
shr al, 6
and al, 1
movzx edx, al
mov eax, 0x8000
imul edx, ecx
mov ecx, 0x200
add dx, r8w
mov word [rbx + 0x7c], dx
movsx r9d, byte [r10 + rbx + 0xf]
sar r9w, 0xf
and r9w, ax
add r9w, dx
mov word [rbx + 0x7c], r9w
movzx eax, byte [r10 + rbx + 0x10]
and al, 1
movzx r8d, al
mov eax, 0x100
imul r8d, eax
add r8w, r9w
mov word [rbx + 0x7c], r8w
movzx eax, byte [r10 + rbx + 0x10]
shr al, 1
and al, 1
movzx edx, al
imul edx, ecx
add dx, r8w
mov word [rbx + 0x7c], dx
movzx eax, byte [r10 + rbx + 0x10]
shr al, 4
and al, 1
movzx ecx, al
shl cx, 5
add cx, dx
mov word [rbx + 0x7c], cx
movzx eax, byte [r10 + rbx + 0x10]
shr al, 5
and al, 1
movzx edx, al
shl dx, 4
add dx, cx
mov word [rbx + 0x7c], dx
movzx eax, byte [r10 + rbx + 0x10]
shr al, 6
and al, 1
movzx ecx, al
mov eax, 0x80
shl cx, 6
add cx, dx
mov word [rbx + 0x7c], cx
movsx edx, byte [r10 + rbx + 0x10]
sar dx, 0xf
and dx, ax
add dx, cx
mov word [rbx + 0x7c], dx
movzx eax, byte [r10 + rbx + 0xf]
and eax, 0xf
cmp eax, 7
ja case.default.0x140001bb2
lea r8, [0x140000000]
cdqe
mov ecx, dword [r8 + rax*4 + 0x1cb8]
add rcx, r8
jmp rcx
inc dx
jmp 0x140001be1
add dx, 9
jmp 0x140001be1
add dx, 8
jmp 0x140001be1
add dx, 0xa
jmp 0x140001be1
add dx, 2
jmp 0x140001be1
add dx, 6
jmp 0x140001be1
add dx, 4
jmp 0x140001be1
add dx, 5
mov word [rbx + 0x7c], dx
test r11d, r11d
jne 0x140001cab
mov rcx, qword [rbx + 0x60]
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14d, 0x40
lea r15d, [r14 - 0x3f]
nop dword [rax]
mov ecx, 0x32
call qword [sym.imp.KERNEL32.dll_Sleep]
mov edx, 0xce6
mov ecx, 0x54c
call qword [sym.imp.hidapi.dll_hid_enumerate]
mov rdi, rax
test rax, rax
jne 0x140001c39
mov byte [rbx + 5], bpl
jmp 0x140001c10
mov rcx, qword [rax]
xor r9d, r9d
mov qword [rsp + 0x30], rbp
mov edx, 0xc0000000
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbx + 0x60], rax
mov rcx, rdi
cmp dword [rdi + 0x34], 0xffffffff
sete al
mov byte [rbx + 6], al
mov eax, 0x4e
cmovne eax, r14d
mov dword [rbx + 0x58], eax
mov eax, 0x31
cmovne eax, r15d
mov byte [rbx + 7], al
call qword [sym.imp.hidapi.dll_hid_free_enumeration]
cmp qword [rbx + 0x60], rbp
jne 0x140001c9d
mov byte [rbx + 5], bpl
jmp 0x140001c10
mov r14, qword [rsp + 0x60]
mov byte [rbx + 5], r15b
mov r15, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x70]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret