Function at 0x140021970
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rax, qword [rcx + 0x40]
mov rbx, rcx
test rax, rax
je 0x140022150
cmp rax, qword [rcx + 0x50]
jb 0x140021a38
mov dword [rbx + 0x98], 1
xor eax, eax
mov byte [rbx + 0x6e3], al
mov rcx, rbx
call sym.get32
mov rcx, rbx
mov ebp, eax
call sym.get32
mov rcx, rbx
mov r12d, eax
call sym.get32
mov rcx, rbx
call sym.get32
mov rcx, rbx
mov dword [rbx + 0x5dc], eax
call sym.get32
mov rax, qword [rbx + 0x40]
test rax, rax
je 0x140022100
cmp rax, qword [rbx + 0x50]
jb 0x140021a50
mov dword [rbx + 0x98], 1
mov rsi, rax
xor edx, edx
xor eax, eax
mov dword [rbx + 0x5e0], eax
lea r10, [rbx + 0x5e4]
lea rax, [rsi + rdx]
cmp rax, qword [rbx + 0x50]
jbe 0x140021a60
movabs rax, 0xa00000001
mov qword [rbx + 0x98], rax
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rdx, [rax + 1]
mov qword [rcx + 0x40], rdx
movzx eax, byte [rax]
jmp 0x1400219a0
lea rsi, [rax + 1]
mov qword [rbx + 0x40], rsi
movzx eax, byte [rax]
mov rdx, rax
jmp 0x1400219fd
mov ecx, edx
cmp edx, 8
jae 0x1400220d0
and edx, 4
jne 0x14002218b
test ecx, ecx
je 0x140021a87
movzx edx, byte [rsi]
mov byte [r10], dl
test cl, 2
jne 0x14002219e
mov qword [rbx + 0x40], rax
mov dword [rbx + 0x700], 0xfffffffe
and r12d, ebp
cmp r12d, 0xffffffff
je 0x140021ace
mov eax, dword [rbx + 0x5e0]
sub eax, 1
js 0x140021ace
cdqe
jmp 0x140021ab8
sub rax, 1
test eax, eax
js 0x140021ace
cmp byte [rbx + rax + 0x5e4], 0xff
je 0x140021ab0
mov dword [rbx + 0x700], eax
mov dword [rbx + 0x704], ebp
cmp byte [rbx + 0x6e5], 0
je 0x1400220b1
mov r8d, dword [rbx + 0x5e0]
test r8d, r8d
jle 0x14002217b
lea eax, [r8 - 1]
cmp eax, 0xe
jbe 0x140022182
movdqu xmm4, xmmword [rbx + 0x5e4]
pxor xmm3, xmm3
pxor xmm2, xmm2
mov eax, r8d
shr eax, 4
movdqa xmm1, xmm4
punpckhbw xmm4, xmm3
punpcklbw xmm1, xmm3
movdqa xmm5, xmm1
movdqa xmm0, xmm1
movdqa xmm1, xmm4
punpcklwd xmm5, xmm2
punpckhwd xmm0, xmm2
punpcklwd xmm1, xmm2
paddd xmm0, xmm5
punpckhwd xmm4, xmm2
paddd xmm0, xmm1
paddd xmm0, xmm4
cmp eax, 1
je 0x140021f10
movdqu xmm1, xmmword [rbx + 0x5f4]
movdqa xmm5, xmm1
punpckhbw xmm1, xmm3
punpcklbw xmm5, xmm3
movdqa xmm4, xmm5
punpckhwd xmm5, xmm2
punpcklwd xmm4, xmm2
paddd xmm0, xmm4
movdqa xmm4, xmm1
punpckhwd xmm1, xmm2
paddd xmm0, xmm5
punpcklwd xmm4, xmm2
paddd xmm0, xmm4
paddd xmm0, xmm1
cmp eax, 2
je 0x140021f10
movdqu xmm1, xmmword [rbx + 0x604]
movdqa xmm5, xmm1
punpckhbw xmm1, xmm3
punpcklbw xmm5, xmm3
movdqa xmm4, xmm5
punpckhwd xmm5, xmm2
punpcklwd xmm4, xmm2
paddd xmm0, xmm4
movdqa xmm4, xmm1
punpckhwd xmm1, xmm2
paddd xmm0, xmm5
punpcklwd xmm4, xmm2
paddd xmm0, xmm4
paddd xmm0, xmm1
cmp eax, 3
je 0x140021f10
movdqu xmm1, xmmword [rbx + 0x614]
movdqa xmm5, xmm1
punpckhbw xmm1, xmm3
punpcklbw xmm5, xmm3
movdqa xmm4, xmm5
punpckhwd xmm5, xmm2
punpcklwd xmm4, xmm2
paddd xmm0, xmm4
movdqa xmm4, xmm1
punpckhwd xmm1, xmm2
paddd xmm0, xmm5
punpcklwd xmm4, xmm2
paddd xmm0, xmm4
paddd xmm0, xmm1
cmp eax, 4
je 0x140021f10
movdqu xmm1, xmmword [rbx + 0x624]
movdqa xmm5, xmm1
punpckhbw xmm1, xmm3
punpcklbw xmm5, xmm3
movdqa xmm4, xmm5
punpckhwd xmm5, xmm2
punpcklwd xmm4, xmm2
paddd xmm0, xmm4
movdqa xmm4, xmm1
punpckhwd xmm1, xmm2
paddd xmm0, xmm5
punpcklwd xmm4, xmm2
paddd xmm0, xmm4
paddd xmm0, xmm1
cmp eax, 5
je 0x140021f10
movdqu xmm1, xmmword [rbx + 0x634]
movdqa xmm5, xmm1
punpckhbw xmm1, xmm3
punpcklbw xmm5, xmm3
movdqa xmm4, xmm5
punpckhwd xmm5, xmm2
punpcklwd xmm4, xmm2
paddd xmm0, xmm4
movdqa xmm4, xmm1
punpckhwd xmm1, xmm2
paddd xmm0, xmm5
punpcklwd xmm4, xmm2
paddd xmm0, xmm4
paddd xmm0, xmm1
cmp eax, 6
je 0x140021f10
movdqu xmm1, xmmword [rbx + 0x644]
movdqa xmm4, xmm1
punpckhbw xmm1, xmm3
punpcklbw xmm4, xmm3
movdqa xmm3, xmm4
punpckhwd xmm4, xmm2
punpcklwd xmm3, xmm2
paddd xmm0, xmm3
movdqa xmm3, xmm1
punpckhwd xmm1, xmm2
paddd xmm0, xmm4
punpcklwd xmm3, xmm2
paddd xmm0, xmm3
paddd xmm0, xmm1
cmp eax, 7
je 0x140021f10
movdqu xmm3, xmmword [rbx + 0x654]
pxor xmm2, xmm2
pxor xmm1, xmm1
movdqa xmm5, xmm3
punpckhbw xmm3, xmm2
punpcklbw xmm5, xmm2
movdqa xmm4, xmm5
punpckhwd xmm5, xmm1
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
movdqa xmm4, xmm3
punpckhwd xmm3, xmm1
paddd xmm0, xmm5
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
paddd xmm0, xmm3
cmp eax, 8
je 0x140021f10
movdqu xmm3, xmmword [rbx + 0x664]
movdqa xmm5, xmm3
punpckhbw xmm3, xmm2
punpcklbw xmm5, xmm2
movdqa xmm4, xmm5
punpckhwd xmm5, xmm1
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
movdqa xmm4, xmm3
punpckhwd xmm3, xmm1
paddd xmm0, xmm5
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
paddd xmm0, xmm3
cmp eax, 9
je 0x140021f10
movdqu xmm3, xmmword [rbx + 0x674]
movdqa xmm5, xmm3
punpckhbw xmm3, xmm2
punpcklbw xmm5, xmm2
movdqa xmm4, xmm5
punpckhwd xmm5, xmm1
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
movdqa xmm4, xmm3
punpckhwd xmm3, xmm1
paddd xmm0, xmm5
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
paddd xmm0, xmm3
cmp eax, 0xa
je 0x140021f10
movdqu xmm3, xmmword [rbx + 0x684]
movdqa xmm5, xmm3
punpckhbw xmm3, xmm2
punpcklbw xmm5, xmm2
movdqa xmm4, xmm5
punpckhwd xmm5, xmm1
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
movdqa xmm4, xmm3
punpckhwd xmm3, xmm1
paddd xmm0, xmm5
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
paddd xmm0, xmm3
cmp eax, 0xb
je 0x140021f10
movdqu xmm3, xmmword [rbx + 0x694]
movdqa xmm5, xmm3
punpckhbw xmm3, xmm2
punpcklbw xmm5, xmm2
movdqa xmm4, xmm5
punpckhwd xmm5, xmm1
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
movdqa xmm4, xmm3
punpckhwd xmm3, xmm1
paddd xmm0, xmm5
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
paddd xmm0, xmm3
cmp eax, 0xc
je 0x140021f10
movdqu xmm3, xmmword [rbx + 0x6a4]
movdqa xmm5, xmm3
punpckhbw xmm3, xmm2
punpcklbw xmm5, xmm2
movdqa xmm4, xmm5
punpckhwd xmm5, xmm1
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
movdqa xmm4, xmm3
punpckhwd xmm3, xmm1
paddd xmm0, xmm5
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
paddd xmm0, xmm3
cmp eax, 0xd
je 0x140021f10
movdqu xmm3, xmmword [rbx + 0x6b4]
movdqa xmm5, xmm3
punpckhbw xmm3, xmm2
punpcklbw xmm5, xmm2
movdqa xmm4, xmm5
punpckhwd xmm5, xmm1
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
movdqa xmm4, xmm3
punpckhwd xmm3, xmm1
paddd xmm0, xmm5
punpcklwd xmm4, xmm1
paddd xmm0, xmm4
paddd xmm0, xmm3
cmp eax, 0xe
je 0x140021f10
movdqu xmm3, xmmword [rbx + 0x6c4]
movdqa xmm4, xmm3
punpckhbw xmm3, xmm2
punpcklbw xmm4, xmm2
movdqa xmm2, xmm4
punpckhwd xmm4, xmm1
punpcklwd xmm2, xmm1
paddd xmm0, xmm2
movdqa xmm2, xmm3
punpckhwd xmm3, xmm1
paddd xmm0, xmm4
punpcklwd xmm2, xmm1
paddd xmm0, xmm2
paddd xmm0, xmm3
nop dword [rax]
movdqa xmm1, xmm0
mov edx, r8d
psrldq xmm1, 8
and edx, 0xfffffff0
paddd xmm0, xmm1
movdqa xmm1, xmm0
psrldq xmm1, 4
paddd xmm0, xmm1
movd eax, xmm0
test r8b, 0xf
je 0x140022098
movsxd rcx, edx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 1]
cmp ecx, r8d
jge 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 2]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 3]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 4]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 5]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 6]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 7]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 8]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 9]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 0xa]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 0xb]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 0xc]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
lea ecx, [rdx + 0xd]
cmp r8d, ecx
jle 0x140022098
movsxd rcx, ecx
add edx, 0xe
movzx ecx, byte [rbx + rcx + 0x5e4]
add eax, ecx
cmp r8d, edx
jle 0x140022098
movsxd rdx, edx
movzx edx, byte [rbx + rdx + 0x5e4]
add eax, edx
nop dword [rax]
lea eax, [rax + r8 + 0x1b]
add eax, dword [rbx + 0x64]
movd xmm3, ebp
movd xmm0, eax
punpckldq xmm0, xmm3
movq qword [rbx + 0x68], xmm0
mov dword [rbx + 0x6e8], 0
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rsi]
lea rdi, [r10 + 8]
and rdi, 0xfffffffffffffff8
mov qword [r10], rcx
mov rcx, qword [rsi + rdx - 8]
mov qword [r10 + rdx - 8], rcx
mov rcx, r10
sub rcx, rdi
sub rsi, rcx
add ecx, edx
shr ecx, 3
rep movsq qword [rdi], qword [rsi]
jmp 0x140021a87
mov rcx, qword [rbx + 0x30]
call sym.fgetc
cmp eax, 0xffffffff
je 0x140022167
mov rsi, qword [rbx + 0x40]
movzx ecx, al
movzx edx, al
mov dword [rbx + 0x5e0], ecx
lea r10, [rbx + 0x5e4]
test rsi, rsi
jne 0x140021a0a
mov r9, qword [rbx + 0x30]
mov r8d, 1
mov rcx, r10
call sym.fread
cmp rax, 1
jne 0x140021a14
jmp 0x140021a8b
mov rcx, qword [rcx + 0x30]
call sym.fgetc
cmp eax, 0xffffffff
jne 0x1400219a0
jmp 0x140021994
mov dword [rbx + 0x98], 1
mov rsi, qword [rbx + 0x40]
xor edx, edx
xor ecx, ecx
jmp 0x140022118
xor eax, eax
jmp 0x140022098
xor eax, eax
xor edx, edx
jmp 0x140021f3e
mov edx, dword [rsi]
mov dword [r10], edx
mov edx, dword [rsi + rcx - 4]
mov dword [r10 + rcx - 4], edx
jmp 0x140021a87
movzx edx, word [rsi + rcx - 2]
mov word [r10 + rcx - 2], dx
jmp 0x140021a87