Function at 0x140021120
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, 0x98
mov rsi, r8
mov r10, qword [rsp + 0x100]
mov rbx, rcx
mov qword [rsp + 0x58], r9
lea r8, [rsp + 0x88]
movzx edi, word [r10]
mov ecx, edi
movzx ebp, word [r10 + 2]
mov edx, ebp
call fcn.140022730
sub edi, ebp
mov eax, edi
cdq
xor edi, edx
sub edi, edx
jne 0x14002116f
xor eax, eax
jmp 0x140021174
bsr eax, edi
inc eax
cmp eax, 5
lea r14d, [rax - 1]
lea r8, [rsp + 0x4e]
adc r14d, 0
lea rax, [r14 + r14*8]
shl rax, 0xd
lea r14, [rbx + rax + 0x21eb80]
mov rbx, qword [rsp + 0x100]
movzx ecx, word [rbx + 0xc]
movzx edx, word [rbx + 0xe]
call fcn.140022730
mov rax, qword [rsp + 0x100]
mov edx, dword [rax + 0x10]
mov ebx, edx
mov r9d, dword [rax + 0x14]
mov edi, r9d
shr ebx, 9
shr edx, 0x15
shr edi, 9
and rbx, 7
shr r9d, 0x15
and rdx, 7
and rdi, 7
and r9, 7
movzx ebp, byte [rsp + rbx + 0x4e]
mov ebx, ebp
mov cl, byte [rsp + rdx + 0x4e]
mov r8b, byte [rsp + rdi + 0x4e]
mov r10b, byte [rsp + r9 + 0x4e]
mov byte [rsp + 0x2a], bpl
mov byte [rsp + 0x36], bpl
mov byte [rsp + 0x28], bpl
mov byte [rsp + 0x39], cl
mov byte [rsp + 0x34], cl
mov byte [rsp + 0x3c], r8b
mov byte [rsp + 0x37], r8b
mov byte [rsp + 0x3a], r10b
cmp qword [rax + 0x28], 0
jne 0x140021247
xor eax, eax
mov ecx, ebx
xor r8d, r8d
mov byte [rsp + 0x29], bpl
xor edx, edx
mov byte [rsp + 0x2d], al
mov byte [rsp + 0x2c], al
mov byte [rsp + 0x30], al
mov byte [rsp + 0x2f], al
mov byte [rsp + 0x33], al
mov byte [rsp + 0x32], al
jmp 0x1400212d0
mov rax, qword [rsp + 0x100]
lea r8, [rsp + 0x20]
movzx ecx, word [rax + 0x18]
movzx edx, word [rax + 0x1a]
call fcn.140022730
mov rax, qword [rsp + 0x100]
mov ebx, dword [rax + 0x20]
mov ecx, ebx
mov r8d, ebx
mov edx, ebx
shr ebx, 0x15
shr ecx, 0xc
shr r8d, 0xf
and rbx, 7
shr edx, 0x12
and rcx, 7
and r8, 7
and rdx, 7
mov bpl, byte [rsp + rbx + 0x20]
mov byte [rsp + 0x32], bpl
movzx ecx, byte [rsp + rcx + 0x20]
mov eax, ecx
movzx r8d, byte [rsp + r8 + 0x20]
movzx edx, byte [rsp + rdx + 0x20]
mov byte [rsp + 0x2d], al
mov byte [rsp + 0x29], cl
mov byte [rsp + 0x30], r8b
mov byte [rsp + 0x2c], r8b
mov byte [rsp + 0x33], dl
mov byte [rsp + 0x2f], dl
movzx ebp, byte [rsp + 0x2a]
movzx ebx, byte [rsp + 0x28]
cmp ebx, ecx
mov edi, ecx
mov r9d, ecx
cmova edi, ebx
cmovb r9d, ebx
cmp ebp, edi
jae 0x1400212f0
add ebx, ecx
sub ebx, ebp
cmp ebp, r9d
mov r9d, edi
cmova r9d, ebx
movd xmm2, r9d
xor r15d, r15d
movq xmm0, qword [rsp + 0x88]
pxor xmm1, xmm1
punpcklwd xmm2, xmm2
mov r10d, 2
punpcklbw xmm0, xmm1
mov r12d, 3
pshufd xmm3, xmm2, 0
psubw xmm3, xmm0
pmullw xmm3, xmm3
movdqu xmmword [rsp + 0x3e], xmm3
movzx r9d, word [rsp + 0x3e]
movzx ecx, word [rsp + 0x40]
cmp ecx, r9d
movzx ebp, word [rsp + 0x42]
cmovb r9d, ecx
setb r15b
cmp ebp, r9d
movzx r11d, word [rsp + 0x44]
cmovb r9d, ebp
cmovb r15, r10
mov ecx, 4
cmp r11d, r9d
movzx r13d, word [rsp + 0x46]
cmovb r9d, r11d
cmovb r15, r12
mov ebp, 5
cmp r13d, r9d
movzx ebx, word [rsp + 0x48]
cmovb r9d, r13d
cmovb r15, rcx
mov r11d, 7
cmp ebx, r9d
movzx edi, word [rsp + 0x4a]
lea r13, [0x140000000]
cmovb r9d, ebx
cmovb r15, rbp
mov ecx, 6
cmp edi, r9d
movzx r10d, word [rsp + 0x4c]
cmovb r9d, edi
cmovb r15, rcx
cmp r10d, r9d
mov edi, dword [rsi]
cmovb r15, r11
lea rbx, [r15 + r15*8]
mov r15d, edi
shl rbx, 0xa
and r15d, 0x7fff
add rbx, r14
shr edi, 0xf
movd xmm4, r15d
movdqu xmm2, xmmword [rbx + 0x23ee]
punpcklwd xmm4, xmm4
pshufd xmm5, xmm4, 0
movdqa xmm4, xmm2
pcmpgtw xmm4, xmm5
packsswb xmm4, xmm4
pmovmskb r9d, xmm4
add r9d, 0x100
bsf ebp, r9d
lea r9d, [rbp - 1]
movzx r10d, word [rbx + rbp*2 + 0x23ee]
movsxd r11, r9d
shl r11, 4
movzx r12d, word [rbx + r9*2 + 0x23ee]
sub r10d, r12d
imul r10d, edi
sub r15d, r12d
movdqu xmm1, xmmword [r13 + r11 + 0x1200]
psubw xmm1, xmm2
add r15d, r10d
psraw xmm1, 6
paddw xmm2, xmm1
movdqu xmmword [rbx + 0x23ee], xmm2
cmp r15d, 0x800000
jb 0x1400225f7
movzx edi, byte [rsp + r9 + 0x88]
cmp edi, r8d
mov ebx, r8d
mov r10d, r8d
cmova ebx, edi
cmovb r10d, edi
mov dword [rsi], r15d
cmp eax, ebx
jae 0x140021490
lea r9d, [rdi + r8]
sub r9d, eax
cmp eax, r10d
mov r10d, ebx
cmova r10d, r9d
movd xmm1, r10d
xor r9d, r9d
punpcklwd xmm1, xmm1
mov r13d, 2
pshufd xmm2, xmm1, 0
mov eax, 3
psubw xmm2, xmm0
pmullw xmm2, xmm2
movdqu xmmword [rsp + 0x3e], xmm2
movzx r10d, word [rsp + 0x3e]
movzx r11d, word [rsp + 0x40]
cmp r11d, r10d
movzx r12d, word [rsp + 0x42]
cmovb r10d, r11d
setb r9b
cmp r12d, r10d
movzx ebx, word [rsp + 0x44]
cmovb r10d, r12d
cmovb r9, r13
cmp ebx, r10d
movzx r11d, word [rsp + 0x46]
cmovb r10d, ebx
cmovb r9, rax
mov r12d, 4
cmp r11d, r10d
movzx r13d, word [rsp + 0x48]
cmovb r10d, r11d
cmovb r9, r12
mov ebx, 5
cmp r13d, r10d
lea r11d, [rbp + 0x1f7]
movzx eax, word [rsp + 0x4a]
lea r12, [r11 + r11*8]
cmovb r10d, r13d
cmovb r9, rbx
cmp eax, r10d
lea rbx, [r14 + r12*2]
cmovb r10d, eax
cmovb r9, rcx
movzx ecx, word [rsp + 0x4c]
cmp ecx, r10d
mov r10d, 7
mov ecx, r15d
cmovb r9, r10
and ecx, 0x7fff
shr r15d, 0xf
movd xmm0, ecx
lea r9, [r9 + r9*8]
shl r9, 0xa
add rbx, r9
punpcklwd xmm0, xmm0
pshufd xmm3, xmm0, 0
movdqu xmm1, xmmword [rbx]
movdqa xmm4, xmm1
pcmpgtw xmm4, xmm3
packsswb xmm4, xmm4
pmovmskb eax, xmm4
add eax, 0x100
bsf r9d, eax
mov dword [rsp + 0x90], r9d
lea eax, [r9 - 1]
movzx r11d, word [rbx + rax*2]
movzx r10d, word [rbx + r9*2]
sub r10d, r11d
imul r15d, r10d
movsxd r12, eax
sub r15d, r11d
shl r12, 4
add r15d, ecx
lea rcx, [0x140000000]
movdqu xmm5, xmmword [rcx + r12 + 0x1200]
psubw xmm5, xmm1
psraw xmm5, 6
paddw xmm1, xmm5
movdqu xmmword [rbx], xmm1
cmp r15d, 0x800000
jb 0x1400225b4
movzx ecx, byte [rsp + rax + 0x88]
lea r9, [rsp + 0x88]
mov dword [r9 - 0x28], ecx
mov dword [rsi], r15d
call fcn.140022640
mov r10d, eax
mov eax, dword [rsp + 0x90]
lea ebx, [rax + 0x1f7]
lea r9, [rbx + rbx*8]
lea r11, [r10 + r10*8]
shl r11, 0xa
lea rcx, [r14 + r9*2]
mov r9d, r15d
add rcx, r11
and r9d, 0x7fff
shr r15d, 0xf
movdqu xmm4, xmmword [rcx]
movd xmm0, r9d
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r12d, xmm2
add r12d, 0x100
bsf ebx, r12d
lea eax, [rbx - 1]
movzx r13d, word [rcx + rbx*2]
movzx r12d, word [rcx + rax*2]
sub r13d, r12d
imul r15d, r13d
movsxd r10, eax
sub r15d, r12d
shl r10, 4
add r15d, r9d
lea r9, [0x140000000]
movdqu xmm3, xmmword [r9 + r10 + 0x1200]
psubw xmm3, xmm4
psraw xmm3, 6
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp r15d, 0x800000
jb 0x14002256f
movzx ecx, byte [rsp + rax + 0x88]
lea r9, [rsp + 0x88]
movzx edx, byte [r9 - 0x56]
movzx r8d, byte [r9 - 0x55]
mov dword [r9 - 0x10], ecx
mov dword [rsi], r15d
call fcn.140022640
mov r10d, eax
lea eax, [rbx + 0x1f7]
lea r9, [rax + rax*8]
lea rcx, [r14 + r9*2]
mov r9d, r15d
and r9d, 0x7fff
shr r15d, 0xf
lea r11, [r10 + r10*8]
shl r11, 0xa
add rcx, r11
movd xmm0, r9d
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movdqu xmm4, xmmword [rcx]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r12d, xmm2
add r12d, 0x100
bsf r13d, r12d
mov dword [rsp + 0x80], r13d
lea eax, [r13 - 1]
movzx r12d, word [rcx + rax*2]
movzx r13d, word [rcx + r13*2]
sub r13d, r12d
imul r15d, r13d
movsxd r10, eax
sub r15d, r12d
shl r10, 4
add r15d, r9d
lea r9, [0x140000000]
movdqu xmm3, xmmword [r9 + r10 + 0x1200]
psubw xmm3, xmm4
psraw xmm3, 6
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp r15d, 0x800000
jb 0x14002252a
movzx eax, byte [rsp + rax + 0x88]
mov edx, edi
movzx ecx, byte [rsp + 0x34]
lea r9, [rsp + 0x88]
movzx r8d, byte [r9 - 0x52]
mov dword [rsi], r15d
mov dword [r9 - 0x18], eax
call fcn.140022640
mov r9d, eax
lea eax, [rbp*8 + 0x1bf]
lea r13, [rax + rax*8]
lea rcx, [r14 + r13*2]
lea r10, [r9 + r9*8]
mov r9d, r15d
shl r10, 0xa
and r9d, 0x7fff
add rcx, r10
shr r15d, 0xf
movd xmm0, r9d
movdqu xmm4, xmmword [rcx]
punpcklwd xmm0, xmm0
movdqa xmm2, xmm4
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r11d, xmm2
add r11d, 0x100
bsf r13d, r11d
lea eax, [r13 - 1]
movzx r12d, word [rcx + r13*2]
movzx r11d, word [rcx + rax*2]
sub r12d, r11d
imul r15d, r12d
movsxd r10, eax
sub r15d, r11d
shl r10, 4
add r15d, r9d
lea r9, [0x140000000]
movdqu xmm3, xmmword [r9 + r10 + 0x1200]
psubw xmm3, xmm4
psraw xmm3, 6
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp r15d, 0x800000
jb 0x1400224e5
movzx ecx, byte [rsp + rax + 0x88]
mov r8d, edi
mov dword [rsp + 0x68], ecx
lea r9, [rsp + 0x88]
mov edx, dword [r9 - 0x28]
mov dword [rsi], r15d
call fcn.140022640
mov r10d, eax
mov eax, ebp
shl eax, 6
mov edi, dword [rsp + 0x90]
lea ecx, [rax + rdi*8]
lea r8d, [rcx + r13 - 0x49]
lea r9, [r8 + r8*8]
mov r8d, r15d
lea r11, [r10 + r10*8]
shl r11, 0xa
lea rdx, [r14 + r9*2]
add rdx, r11
and r8d, 0x7fff
lea r9, [0x140000000]
shr r15d, 0xf
movdqu xmm4, xmmword [rdx]
movd xmm0, r8d
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r12d, xmm2
add r12d, 0x100
bsf edi, r12d
lea eax, [rdi - 1]
movzx ecx, word [rdx + rdi*2]
movsxd r10, eax
shl r10, 4
movzx r12d, word [rdx + rax*2]
sub ecx, r12d
imul r15d, ecx
movdqu xmm3, xmmword [r9 + r10 + 0x1200]
psubw xmm3, xmm4
sub r15d, r12d
psraw xmm3, 6
add r15d, r8d
paddw xmm4, xmm3
movdqu xmmword [rdx], xmm4
cmp r15d, 0x800000
jb 0x1400224a2
movzx ecx, byte [rsp + rax + 0x88]
lea r9, [rsp + 0x88]
mov dword [r9 - 0x48], ecx
mov edx, dword [r9 - 0x10]
mov r8d, dword [r9 - 0x28]
mov dword [rsi], r15d
call fcn.140022640
mov edx, dword [rsp + 0x90]
shl edx, 6
mov eax, eax
lea r12d, [rdx + rbx*8]
lea r8d, [r12 + rdi - 0x49]
lea r9, [r8 + r8*8]
lea r10, [rax + rax*8]
mov eax, r15d
shl r10, 0xa
lea rcx, [r14 + r9*2]
add rcx, r10
and eax, 0x7fff
shr r15d, 0xf
movdqu xmm4, xmmword [rcx]
movd xmm0, eax
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r11d, xmm2
add r11d, 0x100
bsf r12d, r11d
lea edx, [r12 - 1]
movzx r8d, word [rcx + r12*2]
movzx r9d, word [rcx + rdx*2]
sub r8d, r9d
imul r15d, r8d
movsxd r10, edx
sub r15d, r9d
shl r10, 4
add r15d, eax
lea rax, [0x140000000]
movdqu xmm3, xmmword [rax + r10 + 0x1200]
psubw xmm3, xmm4
psraw xmm3, 6
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp r15d, 0x800000
jb 0x14002245f
movzx ecx, byte [rsp + rdx + 0x88]
lea r9, [rsp + 0x88]
mov dword [r9 - 0x28], ecx
mov edx, dword [r9 - 0x18]
mov r8d, dword [r9 - 0x10]
mov dword [rsi], r15d
call fcn.140022640
mov ecx, ebx
mov edx, r15d
shl ecx, 6
and edx, 0x7fff
mov r9d, dword [rsp + 0x80]
mov eax, eax
shr r15d, 0xf
movd xmm0, edx
lea r10d, [rcx + r9*8]
punpcklwd xmm0, xmm0
lea r11d, [r10 + r12 - 0x49]
pshufd xmm1, xmm0, 0
lea r8, [r11 + r11*8]
lea rcx, [rax + rax*8]
shl rcx, 0xa
lea r8, [r14 + r8*2]
add r8, rcx
movdqu xmm4, xmmword [r8]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r9d, xmm2
add r9d, 0x100
bsf r10d, r9d
mov dword [rsp + 0x78], r10d
lea ecx, [r10 - 1]
movzx eax, word [r8 + rcx*2]
movzx r9d, word [r8 + r10*2]
sub r9d, eax
imul r15d, r9d
movsxd r11, ecx
sub r15d, eax
shl r11, 4
add r15d, edx
lea rdx, [0x140000000]
movdqu xmm3, xmmword [rdx + r11 + 0x1200]
psubw xmm3, xmm4
psraw xmm3, 6
paddw xmm4, xmm3
movdqu xmmword [r8], xmm4
cmp r15d, 0x800000
jb 0x14002241c
dec ebp
lea r9, [rsp + 0x88]
shrd ebp, ebp, 3
mov eax, dword [r9 + 8]
mov r10d, dword [r9 - 8]
mov dword [rsi], r15d
movzx r11d, byte [rsp + rcx + 0x88]
lea ebp, [rbp + rax - 1]
shrd ebp, ebp, 3
mov eax, dword [r9 - 0x10]
mov rcx, qword [rsp + 0x100]
movzx r8d, byte [r9 - 0x4f]
lea ebx, [rbp + rbx - 1]
shrd ebx, ebx, 3
mov dword [r9 - 0x18], r11d
lea r15d, [rbx + r10 - 1]
shrd r15d, r15d, 3
lea edx, [r15 + r13 - 1]
shrd edx, edx, 3
lea edx, [rdx + rdi - 1]
shrd edx, edx, 3
lea edx, [rdx + r12 - 1]
shrd edx, edx, 3
lea edx, [rdx + rax - 1]
shrd edx, edx, 3
shr edx, 8
mov dword [rcx + 4], edx
movzx ecx, byte [r9 - 0x51]
mov edx, dword [r9 - 0x20]
call fcn.140022640
mov ecx, eax
lea ebp, [r13*8 + 0x1bf]
mov r10d, dword [rsi]
lea rax, [rbp + rbp*8]
mov ebp, r10d
lea rdx, [r14 + rax*2]
and ebp, 0x7fff
lea r15, [0x140000000]
shr r10d, 0xf
lea rbx, [rcx + rcx*8]
shl rbx, 0xa
add rdx, rbx
movd xmm0, ebp
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movdqu xmm4, xmmword [rdx]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r8d, xmm2
add r8d, 0x100
bsf ebx, r8d
lea eax, [rbx - 1]
movzx r11d, word [rdx + rbx*2]
movsxd r8, eax
shl r8, 4
movzx r9d, word [rdx + rax*2]
sub r11d, r9d
imul r11d, r10d
sub ebp, r9d
movdqu xmm3, xmmword [r15 + r8 + 0x1200]
psubw xmm3, xmm4
add ebp, r11d
psraw xmm3, 6
paddw xmm4, xmm3
movdqu xmmword [rdx], xmm4
cmp ebp, 0x800000
jb 0x1400223df
movzx ecx, byte [rsp + rax + 0x88]
lea r9, [rsp + 0x88]
mov dword [r9 - 8], ecx
mov edx, dword [r9 - 0x48]
mov r8d, dword [r9 - 0x20]
mov dword [rsi], ebp
call fcn.140022640
mov r8d, eax
shl r13d, 6
lea eax, [r13 + rdi*8]
lea r13d, [rax + rbx - 0x49]
lea rcx, [r13 + r13*8]
lea r9, [r8 + r8*8]
lea r8, [0x140000000]
shl r9, 0xa
lea rdx, [r14 + rcx*2]
mov ecx, ebp
add rdx, r9
and ecx, 0x7fff
shr ebp, 0xf
movdqu xmm4, xmmword [rdx]
movd xmm0, ecx
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r10d, xmm2
add r10d, 0x100
bsf r13d, r10d
lea eax, [r13 - 1]
movzx r11d, word [rdx + r13*2]
movsxd r9, eax
shl r9, 4
movzx r15d, word [rdx + rax*2]
sub r11d, r15d
imul ebp, r11d
movdqu xmm3, xmmword [r8 + r9 + 0x1200]
psubw xmm3, xmm4
sub ebp, r15d
psraw xmm3, 6
add ebp, ecx
paddw xmm4, xmm3
movdqu xmmword [rdx], xmm4
cmp ebp, 0x800000
jb 0x1400223a2
movzx ecx, byte [rsp + rax + 0x88]
lea r9, [rsp + 0x88]
mov dword [r9 - 0x20], ecx
mov edx, dword [r9 - 0x28]
mov r8d, dword [r9 - 0x48]
mov dword [rsi], ebp
call fcn.140022640
mov r8d, eax
shl edi, 6
lea eax, [rdi + r12*8]
lea edi, [rax + r13 - 0x49]
lea rcx, [rdi + rdi*8]
lea r9, [r8 + r8*8]
lea r8, [0x140000000]
shl r9, 0xa
lea rdx, [r14 + rcx*2]
mov ecx, ebp
add rdx, r9
and ecx, 0x7fff
shr ebp, 0xf
movdqu xmm4, xmmword [rdx]
movd xmm0, ecx
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r10d, xmm2
add r10d, 0x100
bsf edi, r10d
lea eax, [rdi - 1]
movzx r11d, word [rdx + rdi*2]
movsxd r9, eax
shl r9, 4
movzx r15d, word [rdx + rax*2]
sub r11d, r15d
imul ebp, r11d
movdqu xmm3, xmmword [r8 + r9 + 0x1200]
psubw xmm3, xmm4
sub ebp, r15d
psraw xmm3, 6
add ebp, ecx
paddw xmm4, xmm3
movdqu xmmword [rdx], xmm4
cmp ebp, 0x800000
jb 0x140022365
movzx ecx, byte [rsp + rax + 0x88]
lea r9, [rsp + 0x88]
mov dword [r9 - 0x48], ecx
mov edx, dword [r9 - 0x18]
mov r8d, dword [r9 - 0x28]
mov dword [rsi], ebp
call fcn.140022640
mov r9d, eax
shl r12d, 6
mov eax, dword [rsp + 0x78]
lea r12d, [r12 + rax*8]
lea ecx, [r12 + rdi - 0x49]
lea r8, [rcx + rcx*8]
mov ecx, ebp
lea r10, [r9 + r9*8]
shl r10, 0xa
lea rdx, [r14 + r8*2]
add rdx, r10
and ecx, 0x7fff
lea r8, [0x140000000]
shr ebp, 0xf
movdqu xmm4, xmmword [rdx]
movd xmm0, ecx
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r11d, xmm2
add r11d, 0x100
bsf r12d, r11d
lea eax, [r12 - 1]
movzx r15d, word [rdx + r12*2]
movsxd r9, eax
shl r9, 4
movzx r11d, word [rdx + rax*2]
sub r15d, r11d
imul ebp, r15d
movdqu xmm3, xmmword [r8 + r9 + 0x1200]
psubw xmm3, xmm4
sub ebp, r11d
psraw xmm3, 6
add ebp, ecx
paddw xmm4, xmm3
movdqu xmmword [rdx], xmm4
cmp ebp, 0x800000
jb 0x140022328
movzx eax, byte [rsp + rax + 0x88]
lea r9, [rsp + 0x88]
movzx ecx, byte [r9 - 0x4e]
movzx r8d, byte [r9 - 0x4c]
mov edx, dword [r9 - 8]
mov dword [rsi], ebp
mov dword [r9 - 0x28], eax
call fcn.140022640
mov eax, eax
lea edx, [rbx*8 + 0x1bf]
lea r15, [rdx + rdx*8]
lea rcx, [r14 + r15*2]
lea r8, [rax + rax*8]
mov eax, ebp
shl r8, 0xa
and eax, 0x7fff
add rcx, r8
shr ebp, 0xf
movd xmm0, eax
movdqu xmm4, xmmword [rcx]
punpcklwd xmm0, xmm0
movdqa xmm2, xmm4
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r9d, xmm2
add r9d, 0x100
bsf r15d, r9d
lea edx, [r15 - 1]
movzx r10d, word [rcx + r15*2]
movzx r11d, word [rcx + rdx*2]
sub r10d, r11d
imul ebp, r10d
movsxd r8, edx
sub ebp, r11d
shl r8, 4
add ebp, eax
lea rax, [0x140000000]
movdqu xmm3, xmmword [rax + r8 + 0x1200]
psubw xmm3, xmm4
psraw xmm3, 6
paddw xmm4, xmm3
movdqu xmmword [rcx], xmm4
cmp ebp, 0x800000
jb 0x1400222eb
movzx ecx, byte [rsp + rdx + 0x88]
lea r9, [rsp + 0x88]
mov edx, dword [r9 - 0x20]
mov r8d, dword [r9 - 8]
mov dword [rsi], ebp
call fcn.140022640
mov ecx, ebx
mov edx, ebp
shl ecx, 6
and edx, 0x7fff
mov eax, eax
shr ebp, 0xf
movd xmm0, edx
lea r9d, [rcx + r13*8]
punpcklwd xmm0, xmm0
lea r10d, [r9 + r15 - 0x49]
pshufd xmm1, xmm0, 0
lea r11, [r10 + r10*8]
lea rcx, [rax + rax*8]
shl rcx, 0xa
lea r8, [r14 + r11*2]
add r8, rcx
movdqu xmm4, xmmword [r8]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r9d, xmm2
add r9d, 0x100
bsf r10d, r9d
mov dword [rsp + 0x28], r10d
lea ecx, [r10 - 1]
movzx eax, word [r8 + rcx*2]
movzx r9d, word [r8 + r10*2]
sub r9d, eax
imul ebp, r9d
movsxd r11, ecx
sub ebp, eax
shl r11, 4
add ebp, edx
lea rdx, [0x140000000]
movdqu xmm3, xmmword [rdx + r11 + 0x1200]
psubw xmm3, xmm4
psraw xmm3, 6
paddw xmm4, xmm3
movdqu xmmword [r8], xmm4
cmp ebp, 0x800000
jb 0x1400222ae
movzx ecx, byte [rsp + rcx + 0x88]
lea r9, [rsp + 0x88]
mov edx, dword [r9 - 0x48]
mov r8d, dword [r9 - 0x20]
mov dword [rsi], ebp
call fcn.140022640
mov ecx, r13d
mov edx, ebp
shl ecx, 6
and edx, 0x7fff
mov r9d, dword [rsp + 0x28]
mov eax, eax
shr ebp, 0xf
movd xmm0, edx
lea r10d, [rcx + rdi*8]
punpcklwd xmm0, xmm0
lea r11d, [r10 + r9 - 0x49]
pshufd xmm1, xmm0, 0
lea r8, [r11 + r11*8]
lea rcx, [rax + rax*8]
shl rcx, 0xa
lea r8, [r14 + r8*2]
add r8, rcx
movdqu xmm4, xmmword [r8]
movdqa xmm2, xmm4
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb r10d, xmm2
add r10d, 0x100
bsf r10d, r10d
lea ecx, [r10 - 1]
movzx r9d, word [r8 + r10*2]
movzx eax, word [r8 + rcx*2]
sub r9d, eax
imul ebp, r9d
movsxd r11, ecx
sub ebp, eax
shl r11, 4
add ebp, edx
lea rdx, [0x140000000]
movdqu xmm3, xmmword [rdx + r11 + 0x1200]
psubw xmm3, xmm4
psraw xmm3, 6
paddw xmm4, xmm3
movdqu xmmword [r8], xmm4
cmp ebp, 0x800000
jb 0x140022271
movzx ecx, byte [rsp + rcx + 0x88]
lea r9, [rsp + 0x88]
mov edx, dword [r9 - 0x28]
mov r8d, dword [r9 - 0x48]
mov dword [rsi], ebp
mov dword [r9 - 0x58], r10d
call fcn.140022640
mov r10d, dword [rsp + 0x30]
mov ecx, edi
shl ecx, 6
mov eax, eax
lea r8d, [rcx + r12*8]
lea r9d, [r8 + r10 - 0x49]
lea r11, [r9 + r9*8]
lea rdx, [r14 + r11*2]
lea r14, [rax + rax*8]
shl r14, 0xa
add rdx, r14
mov r14d, ebp
and r14d, 0x7fff
shr ebp, 0xf
movdqu xmm4, xmmword [rdx]
movd xmm0, r14d
movdqa xmm2, xmm4
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
pcmpgtw xmm2, xmm1
packsswb xmm2, xmm2
pmovmskb ecx, xmm2
add ecx, 0x100
bsf eax, ecx
lea rcx, [0x140000000]
lea r8d, [rax - 1]
movzx r11d, word [rdx + r8*2]
movsxd r8, r8d
shl r8, 4
movzx r9d, word [rdx + rax*2]
sub r9d, r11d
imul ebp, r9d
movdqu xmm3, xmmword [rcx + r8 + 0x1200]
psubw xmm3, xmm4
sub ebp, r11d
psraw xmm3, 6
add ebp, r14d
paddw xmm4, xmm3
movdqu xmmword [rdx], xmm4
cmp ebp, 0x800000
jb 0x140022234
dec ebx
shrd ebx, ebx, 3
mov dword [rsi], ebp
mov esi, dword [rsp + 0x28]
mov r9, qword [rsp + 0x100]
lea edx, [rbx + r13 - 1]
shrd edx, edx, 3
lea ecx, [rdx + rdi - 1]
shrd ecx, ecx, 3
lea ebx, [rcx + r12 - 1]
shrd ebx, ebx, 3
lea ebp, [rbx + r15 - 1]
shrd ebp, ebp, 3
lea edi, [rbp + rsi - 1]
shrd edi, edi, 3
lea r8d, [rdi + r10 - 1]
shrd r8d, r8d, 3
lea eax, [r8 + rax - 1]
shrd eax, eax, 3
shr eax, 8
mov dword [r9 + 8], eax
xor eax, eax
add rsp, 0x98
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rdx, qword [rsp + 0x58]
shl ebp, 8
mov rdx, qword [rdx]
movzx ecx, byte [rdx]
or ebp, ecx
inc rdx
cmp ebp, 0x800000
jb 0x14002225c
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rdx
jmp 0x1400221c5
shl ebp, 8
movzx ecx, byte [rdx]
or ebp, ecx
inc rdx
cmp ebp, 0x800000
jb 0x14002225c
jmp 0x14002224f
mov rax, qword [rsp + 0x58]
shl ebp, 8
mov rax, qword [rax]
movzx edx, byte [rax]
or ebp, edx
inc rax
cmp ebp, 0x800000
jb 0x140022299
mov rdx, qword [rsp + 0x58]
mov qword [rdx], rax
jmp 0x1400220f6
shl ebp, 8
movzx edx, byte [rax]
or ebp, edx
inc rax
cmp ebp, 0x800000
jb 0x140022299
jmp 0x14002228c
mov rax, qword [rsp + 0x58]
shl ebp, 8
mov rax, qword [rax]
movzx edx, byte [rax]
or ebp, edx
inc rax
cmp ebp, 0x800000
jb 0x1400222d6
mov rdx, qword [rsp + 0x58]
mov qword [rdx], rax
jmp 0x140022026
shl ebp, 8
movzx edx, byte [rax]
or ebp, edx
inc rax
cmp ebp, 0x800000
jb 0x1400222d6
jmp 0x1400222c9
mov rax, qword [rsp + 0x58]
shl ebp, 8
mov rax, qword [rax]
movzx ecx, byte [rax]
or ebp, ecx
inc rax
cmp ebp, 0x800000
jb 0x140022313
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rax
jmp 0x140021f57
shl ebp, 8
movzx ecx, byte [rax]
or ebp, ecx
inc rax
cmp ebp, 0x800000
jb 0x140022313
jmp 0x140022306
mov rdx, qword [rsp + 0x58]
shl ebp, 8
mov rdx, qword [rdx]
movzx ecx, byte [rdx]
or ebp, ecx
inc rdx
cmp ebp, 0x800000
jb 0x140022350
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rdx
jmp 0x140021e8c
shl ebp, 8
movzx ecx, byte [rdx]
or ebp, ecx
inc rdx
cmp ebp, 0x800000
jb 0x140022350
jmp 0x140022343
mov rdx, qword [rsp + 0x58]
shl ebp, 8
mov rdx, qword [rdx]
movzx ecx, byte [rdx]
or ebp, ecx
inc rdx
cmp ebp, 0x800000
jb 0x14002238d
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rdx
jmp 0x140021dba
shl ebp, 8
movzx ecx, byte [rdx]
or ebp, ecx
inc rdx
cmp ebp, 0x800000
jb 0x14002238d
jmp 0x140022380
mov rdx, qword [rsp + 0x58]
shl ebp, 8
mov rdx, qword [rdx]
movzx ecx, byte [rdx]
or ebp, ecx
inc rdx
cmp ebp, 0x800000
jb 0x1400223ca
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rdx
jmp 0x140021cef
shl ebp, 8
movzx ecx, byte [rdx]
or ebp, ecx
inc rdx
cmp ebp, 0x800000
jb 0x1400223ca
jmp 0x1400223bd
mov rdx, qword [rsp + 0x58]
shl ebp, 8
mov rdx, qword [rdx]
movzx ecx, byte [rdx]
or ebp, ecx
inc rdx
cmp ebp, 0x800000
jb 0x140022407
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rdx
jmp 0x140021c20
shl ebp, 8
movzx ecx, byte [rdx]
or ebp, ecx
inc rdx
cmp ebp, 0x800000
jb 0x140022407
jmp 0x1400223fa
mov rax, qword [rsp + 0x58]
shl r15d, 8
mov rax, qword [rax]
movzx edx, byte [rax]
or r15d, edx
inc rax
cmp r15d, 0x800000
jb 0x140022447
mov rdx, qword [rsp + 0x58]
mov qword [rdx], rax
jmp 0x140021aef
shl r15d, 8
movzx edx, byte [rax]
or r15d, edx
inc rax
cmp r15d, 0x800000
jb 0x140022447
jmp 0x14002243a
mov rax, qword [rsp + 0x58]
shl r15d, 8
mov rax, qword [rax]
movzx ecx, byte [rax]
or r15d, ecx
inc rax
cmp r15d, 0x800000
jb 0x14002248a
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rax
jmp 0x140021a0e
shl r15d, 8
movzx ecx, byte [rax]
or r15d, ecx
inc rax
cmp r15d, 0x800000
jb 0x14002248a
jmp 0x14002247d
mov rdx, qword [rsp + 0x58]
shl r15d, 8
mov rdx, qword [rdx]
movzx ecx, byte [rdx]
or r15d, ecx
inc rdx
cmp r15d, 0x800000
jb 0x1400224cd
mov rcx, qword [rsp + 0x58]
mov qword [rcx], rdx
jmp 0x140021937
shl r15d, 8
movzx ecx, byte [rdx]
or r15d, ecx
inc rdx
cmp r15d, 0x800000
jb 0x1400224cd
jmp 0x1400224c0
mov rcx, qword [rsp + 0x58]
shl r15d, 8
mov rcx, qword [rcx]
movzx r9d, byte [rcx]
or r15d, r9d
inc rcx
cmp r15d, 0x800000
jb 0x140022511
mov r9, qword [rsp + 0x58]
mov qword [r9], rcx
jmp 0x14002185f
shl r15d, 8
movzx r9d, byte [rcx]
or r15d, r9d
inc rcx
cmp r15d, 0x800000
jb 0x140022511
jmp 0x140022504
mov rcx, qword [rsp + 0x58]
shl r15d, 8
mov rcx, qword [rcx]
movzx r9d, byte [rcx]
or r15d, r9d
inc rcx
cmp r15d, 0x800000
jb 0x140022556
mov r9, qword [rsp + 0x58]
mov qword [r9], rcx
jmp 0x14002178d
shl r15d, 8
movzx r9d, byte [rcx]
or r15d, r9d
inc rcx
cmp r15d, 0x800000
jb 0x140022556
jmp 0x140022549
mov rcx, qword [rsp + 0x58]
shl r15d, 8
mov rcx, qword [rcx]
movzx r9d, byte [rcx]
or r15d, r9d
inc rcx
cmp r15d, 0x800000
jb 0x14002259b
mov r9, qword [rsp + 0x58]
mov qword [r9], rcx
jmp 0x1400216b6
shl r15d, 8
movzx r9d, byte [rcx]
or r15d, r9d
inc rcx
cmp r15d, 0x800000
jb 0x14002259b
jmp 0x14002258e
mov rcx, qword [rsp + 0x58]
shl r15d, 8
mov rcx, qword [rcx]
movzx ebx, byte [rcx]
or r15d, ebx
inc rcx
cmp r15d, 0x800000
jb 0x1400225df
mov rbx, qword [rsp + 0x58]
mov qword [rbx], rcx
jmp 0x1400215eb
shl r15d, 8
movzx ebx, byte [rcx]
or r15d, ebx
inc rcx
cmp r15d, 0x800000
jb 0x1400225df
jmp 0x1400225d2
mov rbx, qword [rsp + 0x58]
shl r15d, 8
mov rbx, qword [rbx]
movzx edi, byte [rbx]
or r15d, edi
inc rbx
cmp r15d, 0x800000
jb 0x140022622
mov rdi, qword [rsp + 0x58]
mov qword [rdi], rbx
jmp 0x14002145f
shl r15d, 8
movzx edi, byte [rbx]
or r15d, edi
inc rbx
cmp r15d, 0x800000
jb 0x140022622
jmp 0x140022615