Function at 0x14001faf0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0xb8
mov r14, r8
mov rax, qword [rsp + 0x120]
mov rbp, rcx
mov qword [rsp + 0x40], r9
lea r8, [rsp + 0x39]
movzx ebx, word [rax]
mov ecx, ebx
movzx edi, word [rax + 2]
mov edx, edi
call fcn.1400210d0
mov eax, ebx
mov esi, edi
shr eax, 5
shr esi, 5
and eax, 0x3f
and esi, 0x3f
sub eax, esi
cdq
xor eax, edx
sub eax, edx
jne 0x14001fb48
xor eax, eax
jmp 0x14001fb4d
bsr eax, eax
inc eax
xor r15d, r15d
cmp ebx, edi
mov rbx, qword [rsp + 0x120]
lea r8, [rsp + 0xa8]
seta r15b
movzx ecx, word [rbx + 0xc]
movzx edx, word [rbx + 0xe]
lea eax, [r15 + rax*2]
shl rax, 0xe
lea r15, [rbp + rax + 0xa6800]
call fcn.1400210d0
mov rcx, qword [rsp + 0x120]
mov r8d, dword [rcx + 0x10]
mov eax, r8d
mov ebx, r8d
mov esi, r8d
shr eax, 6
shr ebx, 0xe
and eax, 3
shr esi, 0x16
and ebx, 3
shr r8d, 0x1e
and esi, 3
movzx ebp, byte [rsp + rbx + 0xa8]
movzx eax, byte [rsp + rax + 0xa8]
mov edx, eax
movzx edi, byte [rsp + rsi + 0xa8]
movzx r9d, byte [rsp + r8 + 0xa8]
mov byte [rsp + 0x22], al
mov dword [rsp + 0x88], eax
mov byte [rsp + 0x2e], al
mov byte [rsp + 0x20], al
mov dword [rsp + 0x78], ebp
mov byte [rsp + 0x31], bpl
mov dword [rsp + 0x90], ebp
mov byte [rsp + 0x2c], bpl
mov dword [rsp + 0x60], edi
mov byte [rsp + 0x34], dil
mov dword [rsp + 0x70], edi
mov byte [rsp + 0x2f], dil
mov dword [rsp + 0x58], r9d
mov byte [rsp + 0x32], r9b
cmp qword [rcx + 0x28], 0
jne 0x14001fc4c
xor ebx, ebx
xor ebp, ebp
mov byte [rsp + 0x21], al
mov byte [rsp + 0x25], bl
mov byte [rsp + 0x24], bl
mov byte [rsp + 0x28], bl
mov dword [rsp + 0x98], ebp
mov byte [rsp + 0x27], bl
mov byte [rsp + 0x2b], bl
mov dword [rsp + 0x50], ebp
mov byte [rsp + 0x2a], bl
jmp 0x14001fd2d
mov rax, qword [rsp + 0x120]
lea r8, [rsp + 0x35]
movzx ecx, word [rax + 0x18]
movzx edx, word [rax + 0x1a]
call fcn.1400210d0
mov rax, qword [rsp + 0x120]
movzx r11d, byte [rsp + 0x2e]
movzx r12d, byte [rsp + 0x31]
mov r8b, byte [rax + 0x1f]
mov cl, r8b
shr cl, 4
mov bpl, r8b
shr bpl, 2
movzx ebx, r8b
shr r8b, 6
and rbx, 3
movzx esi, cl
and rsi, 3
movzx edx, bpl
movzx r9d, r8b
and rdx, 3
movzx eax, byte [rsp + rbx + 0x35]
mov ebx, eax
movzx edi, byte [rsp + rsi + 0x35]
mov dword [rsp + 0x98], edi
mov byte [rsp + 0x2b], dil
mov byte [rsp + 0x27], dil
movzx ebp, byte [rsp + rdx + 0x35]
movzx r10d, byte [rsp + r9 + 0x35]
movzx r13d, byte [rsp + 0x2c]
movzx ecx, byte [rsp + 0x34]
movzx esi, byte [rsp + 0x2f]
movzx edi, byte [rsp + 0x32]
movzx edx, byte [rsp + 0x20]
mov byte [rsp + 0x22], al
mov byte [rsp + 0x25], bl
mov byte [rsp + 0x21], al
mov byte [rsp + 0x28], bpl
mov byte [rsp + 0x24], bpl
mov dword [rsp + 0x50], r10d
mov byte [rsp + 0x2a], r10b
mov dword [rsp + 0x88], r11d
mov dword [rsp + 0x78], r12d
mov dword [rsp + 0x90], r13d
mov dword [rsp + 0x60], ecx
mov dword [rsp + 0x70], esi
mov dword [rsp + 0x58], edi
cmp edx, eax
mov ecx, eax
mov r10d, eax
cmova ecx, edx
cmovb r10d, edx
cmp eax, ecx
jae 0x14001fd4d
add edx, eax
sub edx, eax
cmp eax, r10d
mov r10d, ecx
cmova r10d, edx
movzx r9d, byte [rsp + 0x39]
mov r13d, r9d
movzx r10d, r10b
xor ecx, ecx
sub r13d, r10d
mov r8d, 2
mov eax, r13d
mov r12d, 3
cdq
movzx esi, byte [rsp + 0x3a]
mov eax, esi
sub eax, r10d
xor r13d, edx
sub r13d, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, r13d
movzx edi, byte [rsp + 0x3b]
cmovb r13d, eax
mov eax, edi
setb cl
sub eax, r10d
cdq
xor eax, edx
neg r10d
sub eax, edx
cmp eax, r13d
cmovb rcx, r8
cmovb r13d, eax
movzx r8d, byte [rsp + 0x3c]
add r10d, r8d
mov eax, r10d
cdq
xor r10d, edx
sub r10d, edx
cmp r10d, r13d
cmovb rcx, r12
shl rcx, 0xc
mov r12d, dword [r14]
mov r13d, r12d
add rcx, r15
and r13d, 0x7fff
shr r12d, 0xf
movdqu xmm4, xmmword [rcx + 0x240]
movd xmm0, r13d
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r11d, xmm2
add r11d, 0x10
bsf edx, r11d
mov dword [rsp + 0x20], edx
lea r10d, [rdx - 1]
movsxd rax, r10d
movzx r11d, word [rcx + r10*2 + 0x240]
sub r13d, r11d
movzx edx, word [rcx + rdx*2 + 0x240]
shl rax, 4
sub edx, r11d
lea r11, [0x140000000]
imul edx, r12d
movdqu xmm3, xmmword [r11 + rax + 0x10c0]
psubw xmm3, xmm4
add r13d, edx
psraw xmm3, 7
paddw xmm4, xmm3
movdqu xmmword [rcx + 0x240], xmm4
cmp r13d, 0x800000
jb 0x140020fe7
movzx edx, byte [rsp + r10 + 0x39]
cmp edx, ebp
mov ecx, ebp
mov r10d, ebp
cmova ecx, edx
cmovb r10d, edx
mov dword [r14], r13d
mov dword [rsp + 0x80], edx
cmp ebx, ecx
jae 0x14001fe9f
lea r11d, [rdx + rbp]
sub r11d, ebx
cmp ebx, r10d
mov r10d, ecx
cmova r10d, r11d
movzx r10d, r10b
mov ebx, r9d
sub ebx, r10d
mov r12d, edi
mov eax, ebx
sub r12d, r10d
cdq
mov eax, esi
xor ebx, edx
sub eax, r10d
sub ebx, edx
cdq
xor eax, edx
neg r10d
sub eax, edx
xor r11d, r11d
cmp eax, ebx
mov ecx, dword [rsp + 0x20]
cmovb ebx, eax
mov eax, r12d
cdq
setb r11b
xor r12d, edx
sub r12d, edx
add r10d, r8d
mov edx, 2
cmp r12d, ebx
mov eax, r10d
lea ecx, [rcx + 0x1f]
cmovb r11, rdx
cdq
cmovb ebx, r12d
xor r10d, edx
sub r10d, edx
mov r12d, 3
cmp r10d, ebx
mov r10d, r13d
cmovb r11, r12
and r10d, 0x7fff
shl rcx, 4
shl r11, 0xc
add rcx, r15
add rcx, r11
movd xmm0, r10d
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movdqu xmm4, xmmword [rcx]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r11d, xmm2
add r11d, 0x10
bsf r11d, r11d
mov dword [rsp + 0x28], r11d
lea edx, [r11 - 1]
movzx ebx, word [rcx + rdx*2]
movzx r12d, word [rcx + r11*2]
shr r13d, 0xf
sub r12d, ebx
imul r13d, r12d
movsxd rax, edx
sub r13d, ebx
shl rax, 4
lea rbx, [0x140000000]
add r13d, r10d
movdqu xmm3, xmmword [rbx + rax + 0x10c0]
psubw xmm3, xmm4
psraw xmm3, 7
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp r13d, 0x800000
jb 0x140020fa4
movzx edx, byte [rsp + rdx + 0x39]
mov ebx, dword [rsp + 0x98]
cmp edx, ebx
mov r10d, ebx
cmova r10d, edx
cmovb ebx, edx
mov dword [r14], r13d
mov dword [rsp + 0x68], edx
cmp ebp, r10d
jae 0x14001ffe0
mov ecx, dword [rsp + 0x98]
lea r11d, [rdx + rcx]
sub r11d, ebp
cmp ebp, ebx
mov ebx, r10d
cmova ebx, r11d
movzx ebx, bl
xor ecx, ecx
sub r9d, ebx
sub esi, ebx
mov eax, r9d
sub edi, ebx
cdq
xor r9d, edx
mov eax, esi
sub r9d, edx
sub r8d, ebx
cdq
xor esi, edx
mov eax, edi
sub esi, edx
mov r10d, 2
cdq
cmp esi, r9d
mov eax, r8d
mov ebp, dword [rsp + 0x28]
cmovb r9d, esi
setb cl
xor edi, edx
sub edi, edx
lea esi, [rbp + 0x1f]
cmp edi, r9d
cdq
cmovb rcx, r10
cmovb r9d, edi
xor r8d, edx
sub r8d, edx
mov edi, 3
cmp r8d, r9d
mov edx, r13d
cmovb rcx, rdi
and edx, 0x7fff
shl rsi, 4
shl rcx, 0xc
add rsi, r15
add rsi, rcx
lea rcx, [0x140000000]
movd xmm0, edx
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movdqu xmm4, xmmword [rsi]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r8d, xmm2
add r8d, 0x10
bsf r9d, r8d
mov dword [rsp + 0x48], r9d
lea eax, [r9 - 1]
movsxd rbx, eax
shl rbx, 4
movzx r12d, word [rsi + rax*2]
movzx r11d, word [rsi + r9*2]
shr r13d, 0xf
sub r11d, r12d
imul r13d, r11d
movdqu xmm3, xmmword [rcx + rbx + 0x10c0]
psubw xmm3, xmm4
sub r13d, r12d
psraw xmm3, 7
add r13d, edx
paddw xmm4, xmm3
movdqu xmmword [rsi], xmm4
cmp r13d, 0x800000
jb 0x140020f61
movzx ebp, byte [rsp + rax + 0x39]
mov ecx, ebp
mov edx, dword [rsp + 0x50]
lea r9, [rsp + 0x39]
mov r8d, dword [r9 + 0x5f]
mov dword [r14], r13d
call fcn.140021030
mov rsi, rax
mov r12d, r13d
mov eax, dword [rsp + 0x48]
and r12d, 0x7fff
shl rsi, 0xc
shr r13d, 0xf
lea ebx, [rax + 0x1f]
movd xmm0, r12d
shl rbx, 4
add rbx, r15
add rbx, rsi
lea rsi, [0x140000000]
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movdqu xmm4, xmmword [rbx]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb edi, xmm2
add edi, 0x10
bsf r9d, edi
mov dword [rsp + 0x50], r9d
lea eax, [r9 - 1]
movsxd rdi, eax
shl rdi, 4
movzx r11d, word [rbx + rax*2]
movzx r10d, word [rbx + r9*2]
sub r10d, r11d
imul r13d, r10d
movdqu xmm3, xmmword [rsi + rdi + 0x10c0]
psubw xmm3, xmm4
sub r13d, r11d
psraw xmm3, 7
add r13d, r12d
paddw xmm4, xmm3
movdqu xmmword [rbx], xmm4
cmp r13d, 0x800000
jb 0x140020f1e
mov ecx, dword [rsp + 0x90]
lea r9, [rsp + 0x39]
mov edx, dword [r9 + 0x47]
mov r8d, dword [r9 + 0x4f]
mov dword [r14], r13d
movzx ebx, byte [rsp + rax + 0x39]
call fcn.140021030
mov rsi, rax
mov r12d, r13d
mov eax, dword [rsp + 0x20]
and r12d, 0x7fff
shl rsi, 0xc
shr r13d, 0xf
lea edi, [rax*8 - 4]
movd xmm0, r12d
shl rdi, 4
add rdi, r15
add rdi, rsi
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movdqu xmm4, xmmword [rdi]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r9d, xmm2
add r9d, 0x10
bsf esi, r9d
lea r9, [0x140000000]
lea eax, [rsi - 1]
movsxd rdx, eax
shl rdx, 4
movzx r11d, word [rdi + rax*2]
movzx r10d, word [rdi + rsi*2]
sub r10d, r11d
imul r13d, r10d
movdqu xmm3, xmmword [r9 + rdx + 0x10c0]
psubw xmm3, xmm4
sub r13d, r11d
psraw xmm3, 7
add r13d, r12d
paddw xmm4, xmm3
movdqu xmmword [rdi], xmm4
cmp r13d, 0x800000
jb 0x140020ed9
movzx ecx, byte [rsp + rax + 0x39]
lea r9, [rsp + 0x39]
mov dword [r9 + 0x67], ecx
mov edx, dword [r9 + 0x2f]
mov r8d, dword [r9 + 0x47]
mov dword [r14], r13d
call fcn.140021030
mov r10, rax
mov eax, dword [rsp + 0x20]
shl eax, 6
mov r12d, dword [rsp + 0x28]
shl r10, 0xc
lea r9d, [rax + r12*8]
lea edi, [r9 + rsi - 0x49]
shl rdi, 4
add rdi, r15
add rdi, r10
mov r10d, r13d
and r10d, 0x7fff
shr r13d, 0xf
movdqu xmm4, xmmword [rdi]
movd xmm0, r10d
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r11d, xmm2
add r11d, 0x10
bsf r12d, r11d
lea eax, [r12 - 1]
movzx r11d, word [rdi + r12*2]
movzx r9d, word [rdi + rax*2]
sub r11d, r9d
imul r13d, r11d
movsxd rdx, eax
sub r13d, r9d
shl rdx, 4
lea r9, [0x140000000]
add r13d, r10d
movdqu xmm3, xmmword [r9 + rdx + 0x10c0]
psubw xmm3, xmm4
psraw xmm3, 7
paddw xmm4, xmm3
movdqu xmmword [rdi], xmm4
cmp r13d, 0x800000
jb 0x140020e94
movzx ecx, byte [rsp + rax + 0x39]
mov edx, ebp
mov dword [rsp + 0x88], ecx
lea r9, [rsp + 0x39]
mov r8d, dword [r9 + 0x2f]
mov dword [r14], r13d
call fcn.140021030
mov r10d, dword [rsp + 0x28]
shl r10d, 6
mov edi, dword [rsp + 0x48]
shl rax, 0xc
lea r11d, [r10 + rdi*8]
lea r9d, [r11 + r12 - 0x49]
shl r9, 4
add r9, r15
add r9, rax
mov eax, r13d
and eax, 0x7fff
shr r13d, 0xf
movdqu xmm4, xmmword [r9]
movd xmm0, eax
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r10d, xmm2
add r10d, 0x10
bsf edi, r10d
lea r10d, [rdi - 1]
movzx r11d, word [r9 + rdi*2]
movzx edx, word [r9 + r10*2]
sub r11d, edx
imul r13d, r11d
movsxd rcx, r10d
sub r13d, edx
shl rcx, 4
add r13d, eax
lea rax, [0x140000000]
movdqu xmm3, xmmword [rax + rcx + 0x10c0]
psubw xmm3, xmm4
psraw xmm3, 7
paddw xmm4, xmm3
movdqu xmmword [r9], xmm4
cmp r13d, 0x800000
jb 0x140020e4f
movzx ecx, byte [rsp + r10 + 0x39]
mov edx, ebx
mov r8d, ebp
lea r9, [rsp + 0x39]
mov dword [r9 + 0x5f], ecx
mov dword [r14], r13d
call fcn.140021030
mov rbp, rax
mov eax, dword [rsp + 0x48]
shl eax, 6
mov ecx, dword [rsp + 0x50]
shl rbp, 0xc
lea ebx, [rax + rcx*8]
mov ecx, r13d
and ecx, 0x7fff
lea edx, [rbx + rdi - 0x49]
lea rbx, [0x140000000]
shl rdx, 4
add rdx, r15
add rdx, rbp
movd xmm0, ecx
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
shr r13d, 0xf
movdqu xmm4, xmmword [rdx]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r8d, xmm2
add r8d, 0x10
bsf r9d, r8d
mov dword [rsp + 0x68], r9d
lea eax, [r9 - 1]
movsxd rbp, eax
shl rbp, 4
movzx r11d, word [rdx + rax*2]
movzx r10d, word [rdx + r9*2]
sub r10d, r11d
imul r13d, r10d
movdqu xmm3, xmmword [rbx + rbp + 0x10c0]
psubw xmm3, xmm4
sub r13d, r11d
psraw xmm3, 7
add r13d, ecx
paddw xmm4, xmm3
movdqu xmmword [rdx], xmm4
cmp r13d, 0x800000
jb 0x140020e0c
movzx eax, byte [rsp + rax + 0x39]
lea r9, [rsp + 0x39]
mov ecx, dword [r9 + 0x37]
mov edx, dword [r9 + 0x67]
mov r8d, dword [r9 + 0x3f]
mov dword [r14], r13d
mov dword [r9 + 0x57], eax
call fcn.140021030
shl rax, 0xc
lea edx, [rsi*8 - 4]
mov r8d, r13d
lea r9, [0x140000000]
shl rdx, 4
and r8d, 0x7fff
add rdx, r15
add rdx, rax
shr r13d, 0xf
movd xmm0, r8d
punpcklwd xmm0, xmm0
movdqu xmm4, xmmword [rdx]
pshufd xmm1, xmm0, 0
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb ebx, xmm2
add ebx, 0x10
bsf ebx, ebx
lea eax, [rbx - 1]
movzx ecx, word [rdx + rbx*2]
movsxd r10, eax
shl r10, 4
movzx ebp, word [rdx + rax*2]
sub ecx, ebp
imul r13d, ecx
movdqu xmm3, xmmword [r9 + r10 + 0x10c0]
psubw xmm3, xmm4
sub r13d, ebp
psraw xmm3, 7
add r13d, r8d
paddw xmm4, xmm3
movdqu xmmword [rdx], xmm4
cmp r13d, 0x800000
jb 0x140020dc9
movzx ecx, byte [rsp + rax + 0x39]
lea r9, [rsp + 0x39]
mov dword [r9 + 0x47], ecx
mov edx, dword [r9 + 0x4f]
mov r8d, dword [r9 + 0x67]
mov dword [r14], r13d
call fcn.140021030
mov ecx, esi
lea r11, [0x140000000]
shl ecx, 6
shl rax, 0xc
lea ebp, [rcx + r12*8]
lea edx, [rbp + rbx - 0x49]
shl rdx, 4
add rdx, r15
add rdx, rax
mov eax, r13d
and eax, 0x7fff
shr r13d, 0xf
movdqu xmm4, xmmword [rdx]
movd xmm0, eax
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r8d, xmm2
add r8d, 0x10
bsf ebp, r8d
lea ecx, [rbp - 1]
movzx r9d, word [rdx + rbp*2]
movsxd r8, ecx
shl r8, 4
movzx r10d, word [rdx + rcx*2]
sub r9d, r10d
imul r13d, r9d
movdqu xmm3, xmmword [r11 + r8 + 0x10c0]
psubw xmm3, xmm4
sub r13d, r10d
psraw xmm3, 7
add r13d, eax
paddw xmm4, xmm3
movdqu xmmword [rdx], xmm4
cmp r13d, 0x800000
jb 0x140020d86
movzx ecx, byte [rsp + rcx + 0x39]
lea r9, [rsp + 0x39]
mov dword [r9 + 0x3f], ecx
mov edx, dword [r9 + 0x5f]
mov r8d, dword [r9 + 0x4f]
mov dword [r14], r13d
call fcn.140021030
mov r8d, r12d
mov edx, r13d
shl r8d, 6
and edx, 0x7fff
shl rax, 0xc
shr r13d, 0xf
movd xmm0, edx
lea r9d, [r8 + rdi*8]
punpcklwd xmm0, xmm0
lea ecx, [r9 + rbp - 0x49]
pshufd xmm1, xmm0, 0
shl rcx, 4
add rcx, r15
add rcx, rax
movdqu xmm4, xmmword [rcx]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r10d, xmm2
add r10d, 0x10
bsf r11d, r10d
mov dword [rsp + 0x88], r11d
lea r8d, [r11 - 1]
movzx eax, word [rcx + r8*2]
movzx r9d, word [rcx + r11*2]
sub r9d, eax
imul r13d, r9d
movsxd r10, r8d
sub r13d, eax
shl r10, 4
lea rax, [0x140000000]
add r13d, edx
movdqu xmm3, xmmword [rax + r10 + 0x10c0]
psubw xmm3, xmm4
psraw xmm3, 7
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp r13d, 0x800000
jb 0x140020d43
movzx ecx, byte [rsp + r8 + 0x39]
lea r9, [rsp + 0x39]
mov dword [r9 + 0x37], ecx
mov edx, dword [r9 + 0x57]
mov r8d, dword [r9 + 0x5f]
mov dword [r14], r13d
call fcn.140021030
mov r8d, edi
mov edx, r13d
shl r8d, 6
and edx, 0x7fff
mov r9d, dword [rsp + 0x68]
mov r11d, dword [rsp + 0x88]
shl rax, 0xc
movd xmm0, edx
lea r10d, [r8 + r9*8]
punpcklwd xmm0, xmm0
lea ecx, [r10 + r11 - 0x49]
pshufd xmm1, xmm0, 0
shl rcx, 4
add rcx, r15
add rcx, rax
shr r13d, 0xf
movdqu xmm4, xmmword [rcx]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r8d, xmm2
add r8d, 0x10
bsf r9d, r8d
mov dword [rsp + 0x98], r9d
lea r8d, [r9 - 1]
movzx eax, word [rcx + r8*2]
movzx r10d, word [rcx + r9*2]
sub r10d, eax
imul r13d, r10d
movsxd r11, r8d
sub r13d, eax
shl r11, 4
add r13d, edx
lea rdx, [0x140000000]
movdqu xmm3, xmmword [rdx + r11 + 0x10c0]
psubw xmm3, xmm4
psraw xmm3, 7
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp r13d, 0x800000
jb 0x140020d00
movzx eax, byte [rsp + r8 + 0x39]
lea r9, [rsp + 0x39]
mov ecx, dword [r9 + 0x1f]
mov edx, dword [r9 + 0x47]
mov r8d, dword [r9 + 0x27]
mov dword [r14], r13d
mov dword [r9 + 0x57], eax
call fcn.140021030
shl rax, 0xc
lea ecx, [rbx*8 - 4]
mov edx, r13d
lea r11, [0x140000000]
shl rcx, 4
and edx, 0x7fff
add rcx, r15
add rcx, rax
shr r13d, 0xf
movd xmm0, edx
punpcklwd xmm0, xmm0
movdqu xmm4, xmmword [rcx]
pshufd xmm1, xmm0, 0
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r8d, xmm2
add r8d, 0x10
bsf r9d, r8d
mov dword [rsp + 0x58], r9d
lea r8d, [r9 - 1]
movzx eax, word [rcx + r8*2]
movzx r10d, word [rcx + r9*2]
sub r10d, eax
imul r13d, r10d
sub r13d, eax
movsxd rax, r8d
add r13d, edx
shl rax, 4
movdqu xmm3, xmmword [r11 + rax + 0x10c0]
psubw xmm3, xmm4
psraw xmm3, 7
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp r13d, 0x800000
jb 0x140020cbd
movzx ecx, byte [rsp + r8 + 0x39]
lea r9, [rsp + 0x39]
mov edx, dword [r9 + 0x3f]
mov r8d, dword [r9 + 0x47]
mov dword [r14], r13d
call fcn.140021030
mov r8d, ebx
mov edx, r13d
shl r8d, 6
and edx, 0x7fff
mov r10d, dword [rsp + 0x58]
shl rax, 0xc
shr r13d, 0xf
movd xmm0, edx
lea r9d, [r8 + rbp*8]
punpcklwd xmm0, xmm0
lea ecx, [r9 + r10 - 0x49]
pshufd xmm1, xmm0, 0
shl rcx, 4
add rcx, r15
add rcx, rax
movdqu xmm4, xmmword [rcx]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r11d, xmm2
add r11d, 0x10
bsf r9d, r11d
mov dword [rsp + 0x60], r9d
lea r8d, [r9 - 1]
movzx eax, word [rcx + r8*2]
movzx r10d, word [rcx + r9*2]
sub r10d, eax
imul r13d, r10d
movsxd r11, r8d
sub r13d, eax
shl r11, 4
lea rax, [0x140000000]
add r13d, edx
movdqu xmm3, xmmword [rax + r11 + 0x10c0]
psubw xmm3, xmm4
psraw xmm3, 7
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp r13d, 0x800000
jb 0x140020c7a
movzx ecx, byte [rsp + r8 + 0x39]
lea r9, [rsp + 0x39]
mov edx, dword [r9 + 0x37]
mov r8d, dword [r9 + 0x3f]
mov dword [r14], r13d
call fcn.140021030
mov r8d, ebp
mov edx, r13d
shl r8d, 6
and edx, 0x7fff
mov r10d, dword [rsp + 0x88]
mov r11d, dword [rsp + 0x60]
shl rax, 0xc
movd xmm0, edx
lea r9d, [r8 + r10*8]
punpcklwd xmm0, xmm0
lea ecx, [r9 + r11 - 0x49]
pshufd xmm1, xmm0, 0
shl rcx, 4
add rcx, r15
add rcx, rax
shr r13d, 0xf
movdqu xmm4, xmmword [rcx]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r8d, xmm2
add r8d, 0x10
bsf r10d, r8d
lea r8d, [r10 - 1]
movzx r9d, word [rcx + r10*2]
movzx eax, word [rcx + r8*2]
sub r9d, eax
imul r13d, r9d
movsxd r11, r8d
sub r13d, eax
shl r11, 4
add r13d, edx
lea rdx, [0x140000000]
movdqu xmm3, xmmword [rdx + r11 + 0x10c0]
psubw xmm3, xmm4
psraw xmm3, 7
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp r13d, 0x800000
jb 0x140020c37
movzx ecx, byte [rsp + r8 + 0x39]
lea r9, [rsp + 0x39]
mov edx, dword [r9 + 0x57]
mov r8d, dword [r9 + 0x37]
mov dword [r14], r13d
mov dword [r9 + 0x3f], r10d
call fcn.140021030
mov edx, dword [rsp + 0x88]
shl edx, 6
mov ecx, dword [rsp + 0x98]
mov r10d, dword [rsp + 0x78]
shl rax, 0xc
lea r8d, [rdx + rcx*8]
lea r9d, [r8 + r10 - 0x49]
shl r9, 4
add r15, r9
add r15, rax
mov eax, r13d
and eax, 0x7fff
shr r13d, 0xf
movdqu xmm4, xmmword [r15]
movd xmm0, eax
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r11d, xmm2
add r11d, 0x10
bsf edx, r11d
lea ecx, [rdx - 1]
movzx r8d, word [r15 + rdx*2]
movzx r9d, word [r15 + rcx*2]
sub r8d, r9d
imul r13d, r8d
movsxd rcx, ecx
sub r13d, r9d
shl rcx, 4
add r13d, eax
lea rax, [0x140000000]
movdqu xmm3, xmmword [rax + rcx + 0x10c0]
psubw xmm3, xmm4
psraw xmm3, 7
paddw xmm4, xmm3
movdqu xmmword [r15], xmm4
cmp r13d, 0x800000
jb 0x140020bf4
mov eax, dword [rsp + 0x20]
dec eax
shrd eax, eax, 2
mov ecx, dword [rsp + 0x28]
mov r9d, dword [rsp + 0x48]
mov dword [r14], r13d
mov r13d, dword [rsp + 0x50]
lea r8d, [rax + rcx - 1]
shrd r8d, r8d, 2
mov r15d, dword [rsp + 0x68]
lea r11d, [r8 + r9 - 1]
mov r8d, dword [rsp + 0x60]
shrd r11d, r11d, 2
lea r14d, [r11 + r13 - 1]
shrd r14d, r14d, 2
lea esi, [r14 + rsi - 1]
shrd esi, esi, 2
lea r12d, [rsi + r12 - 1]
shrd r12d, r12d, 2
lea edi, [r12 + rdi - 1]
shrd edi, edi, 2
lea eax, [rdi + r15 - 1]
shrd eax, eax, 2
lea ebx, [rax + rbx - 1]
mov eax, dword [rsp + 0x88]
shrd ebx, ebx, 2
lea ebp, [rbx + rbp - 1]
mov ebx, dword [rsp + 0x98]
shrd ebp, ebp, 2
lea ecx, [rbp + rax - 1]
mov ebp, dword [rsp + 0x58]
shrd ecx, ecx, 2
mov rax, qword [rsp + 0x120]
lea esi, [rcx + rbx - 1]
shrd esi, esi, 2
lea edi, [rsi + rbp - 1]
shrd edi, edi, 2
lea r9d, [rdi + r8 - 1]
shrd r9d, r9d, 2
lea r10d, [r9 + r10 - 1]
shrd r10d, r10d, 2
lea edx, [r10 + rdx - 1]
shrd edx, edx, 2
mov dword [rax + 4], edx
xor eax, eax
add rsp, 0xb8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rax, qword [rsp + 0x40]
shl r13d, 8
mov rax, qword [rax]
movzx ecx, byte [rax]
or r13d, ecx
inc rax
cmp r13d, 0x800000
jb 0x140020c1f
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rax
jmp 0x140020b14
shl r13d, 8
movzx ecx, byte [rax]
or r13d, ecx
inc rax
cmp r13d, 0x800000
jb 0x140020c1f
jmp 0x140020c12
mov rax, qword [rsp + 0x40]
shl r13d, 8
mov rax, qword [rax]
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020c62
mov rdx, qword [rsp + 0x40]
mov qword [rdx], rax
jmp 0x140020a41
shl r13d, 8
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020c62
jmp 0x140020c55
mov rax, qword [rsp + 0x40]
shl r13d, 8
mov rax, qword [rax]
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020ca5
mov rdx, qword [rsp + 0x40]
mov qword [rdx], rax
jmp 0x140020973
shl r13d, 8
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020ca5
jmp 0x140020c98
mov rdx, qword [rsp + 0x40]
shl r13d, 8
mov rax, qword [rdx]
movzx ecx, byte [rax]
or r13d, ecx
inc rax
cmp r13d, 0x800000
jb 0x140020ce8
mov rdx, qword [rsp + 0x40]
mov qword [rdx], rax
jmp 0x1400208a8
shl r13d, 8
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020ce8
jmp 0x140020cdb
mov rax, qword [rsp + 0x40]
shl r13d, 8
mov rax, qword [rax]
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020d2b
mov rdx, qword [rsp + 0x40]
mov qword [rdx], rax
jmp 0x1400207e3
shl r13d, 8
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020d2b
jmp 0x140020d1e
mov rax, qword [rsp + 0x40]
shl r13d, 8
mov rax, qword [rax]
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020d6e
mov rdx, qword [rsp + 0x40]
mov qword [rdx], rax
jmp 0x140020709
shl r13d, 8
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020d6e
jmp 0x140020d61
mov rax, qword [rsp + 0x40]
shl r13d, 8
mov rax, qword [rax]
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020db1
mov rdx, qword [rsp + 0x40]
mov qword [rdx], rax
jmp 0x14002063d
shl r13d, 8
movzx edx, byte [rax]
or r13d, edx
inc rax
cmp r13d, 0x800000
jb 0x140020db1
jmp 0x140020da4
mov rdx, qword [rsp + 0x40]
shl r13d, 8
mov rdx, qword [rdx]
movzx ecx, byte [rdx]
or r13d, ecx
inc rdx
cmp r13d, 0x800000
jb 0x140020df4
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rdx
jmp 0x14002057e
shl r13d, 8
movzx ecx, byte [rdx]
or r13d, ecx
inc rdx
cmp r13d, 0x800000
jb 0x140020df4
jmp 0x140020de7
mov rdx, qword [rsp + 0x40]
shl r13d, 8
mov rdx, qword [rdx]
movzx ecx, byte [rdx]
or r13d, ecx
inc rdx
cmp r13d, 0x800000
jb 0x140020e37
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rdx
jmp 0x1400204c4
shl r13d, 8
movzx ecx, byte [rdx]
or r13d, ecx
inc rdx
cmp r13d, 0x800000
jb 0x140020e37
jmp 0x140020e2a
mov rax, qword [rsp + 0x40]
shl r13d, 8
mov rax, qword [rax]
movzx r9d, byte [rax]
or r13d, r9d
inc rax
cmp r13d, 0x800000
jb 0x140020e7b
mov r9, qword [rsp + 0x40]
mov qword [r9], rax
jmp 0x1400203f9
shl r13d, 8
movzx r9d, byte [rax]
or r13d, r9d
inc rax
cmp r13d, 0x800000
jb 0x140020e7b
jmp 0x140020e6e
mov rdi, qword [rsp + 0x40]
shl r13d, 8
mov rdi, qword [rdi]
movzx r9d, byte [rdi]
or r13d, r9d
inc rdi
cmp r13d, 0x800000
jb 0x140020ec0
mov r9, qword [rsp + 0x40]
mov qword [r9], rdi
jmp 0x14002032e
shl r13d, 8
movzx r9d, byte [rdi]
or r13d, r9d
inc rdi
cmp r13d, 0x800000
jb 0x140020ec0
jmp 0x140020eb3
mov rdi, qword [rsp + 0x40]
shl r13d, 8
mov rdi, qword [rdi]
movzx r9d, byte [rdi]
or r13d, r9d
inc rdi
cmp r13d, 0x800000
jb 0x140020f05
mov r9, qword [rsp + 0x40]
mov qword [r9], rdi
jmp 0x14002025f
shl r13d, 8
movzx r9d, byte [rdi]
or r13d, r9d
inc rdi
cmp r13d, 0x800000
jb 0x140020f05
jmp 0x140020ef8
mov rbx, qword [rsp + 0x40]
shl r13d, 8
mov rbx, qword [rbx]
movzx esi, byte [rbx]
or r13d, esi
inc rbx
cmp r13d, 0x800000
jb 0x140020f49
mov rsi, qword [rsp + 0x40]
mov qword [rsi], rbx
jmp 0x140020199
shl r13d, 8
movzx esi, byte [rbx]
or r13d, esi
inc rbx
cmp r13d, 0x800000
jb 0x140020f49
jmp 0x140020f3c
mov rdx, qword [rsp + 0x40]
shl r13d, 8
mov rdx, qword [rdx]
movzx ecx, byte [rdx]
or r13d, ecx
inc rdx
cmp r13d, 0x800000
jb 0x140020f8c
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rdx
jmp 0x1400200d9
shl r13d, 8
movzx ecx, byte [rdx]
or r13d, ecx
inc rdx
cmp r13d, 0x800000
jb 0x140020f8c
jmp 0x140020f7f
mov rcx, qword [rsp + 0x40]
shl r13d, 8
mov rcx, qword [rcx]
movzx ebx, byte [rcx]
or r13d, ebx
inc rcx
cmp r13d, 0x800000
jb 0x140020fcf
mov rbx, qword [rsp + 0x40]
mov qword [rbx], rcx
jmp 0x14001ffa5
shl r13d, 8
movzx ebx, byte [rcx]
or r13d, ebx
inc rcx
cmp r13d, 0x800000
jb 0x140020fcf
jmp 0x140020fc2
mov rdx, qword [rsp + 0x40]
shl r13d, 8
mov rdx, qword [rdx]
movzx ecx, byte [rdx]
or r13d, ecx
inc rdx
cmp r13d, 0x800000
jb 0x140021012
mov rcx, qword [rsp + 0x40]
mov qword [rcx], rdx
jmp 0x14001fe6c
shl r13d, 8
movzx ecx, byte [rdx]
or r13d, ecx
inc rdx
cmp r13d, 0x800000
jb 0x140021012
jmp 0x140021005