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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x178
mov eax, 1
mov rbx, rcx
mov ecx, dword [r8 + 0x14]
mov r14, rdx
xor edx, edx
mov rbp, r8
mov r15, r9
shl eax, cl
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x1e0]
add rax, r9
test qword [rsp + 0x1e0], 0xfffff
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0x1e0]
setne dl
shr rax, 0x14
add rax, rdx
mov qword [rsp + 0x118], rax
mov rax, qword [rsp + 0xa0]
cmp qword [rbx], rax
jae 0x60149f
lea rdx, str.zstd_lib_compress_zstd_ldm.c
lea rcx, str.ldmState__window.nextSrc____BYTE_const_src__srcSize
mov r8d, 0x209
call fcn.0059d7c0
mov rax, qword [r14 + 0x18]
cmp qword [r14 + 8], rax
jbe 0x6014c2
lea rdx, str.zstd_lib_compress_zstd_ldm.c
lea rcx, str.sequences__pos___sequences__size
mov r8d, 0x20d
call fcn.0059d7c0
mov rax, qword [r14 + 0x20]
cmp qword [r14 + 0x18], rax
jbe 0x6014e5
lea rdx, str.zstd_lib_compress_zstd_ldm.c
lea rcx, str.sequences__size___sequences__capacity
mov r8d, 0x20e
call fcn.0059d7c0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0x90], 0
mov rdi, qword [rsp + 0x118]
cmp qword [rsp + 0x90], rdi
je 0x601d10
mov rax, qword [r14 + 0x18]
cmp rax, qword [r14 + 0x20]
mov qword [rsp + 0x88], rax
jae 0x601d10
mov rax, qword [rsp + 0x90]
mov rdi, qword [rsp + 0x1e0]
mov qword [rsp + 0x30], r15
shl rax, 0x14
sub rdi, rax
mov rax, rdi
mov rdi, qword [rsp + 0xa0]
cmp rax, 0xfffff
jbe 0x60155f
lea rdi, [r15 + 0x100000]
mov rax, rdi
sub rax, r15
cmp qword [rsp + 0xa0], r15
mov qword [rsp + 0x50], rax
ja 0x60158d
lea rdx, str.zstd_lib_compress_zstd_ldm.c
lea rcx, str.chunkStart___iend
mov r8d, 0x218
call fcn.0059d7c0
mov rax, qword [rbx + 8]
mov rdx, rdi
sub rdx, rax
cmp edx, 0xe0000000
jbe 0x60171c
mov ecx, dword [rbp + 4]
mov esi, 1
mov r13, r15
mov edx, esi
sub r13, rax
mov eax, dword [rsp + 0x3c]
mov r12d, r13d
shl edx, cl
cmp dword [rsp + 0x3c], 0
cmovne esi, dword [rsp + 0x3c]
dec eax
mov dword [rsp + 0x40], edx
add esi, 2
sub r12d, esi
test dword [rsp + 0x3c], eax
je 0x6015f1
lea rdx, [0x0079dbc5]
lea rcx, str._maxDist___maxDist___1____0
mov r8d, 0x446
call fcn.0059d7c0
cmp r13d, esi
ja 0x60160f
lea rdx, [0x0079dbc5]
lea rcx, str.curr___newCurrent
mov r8d, 0x448
call fcn.0059d7c0
cmp r12d, 0x10000000
ja 0x601631
lea rdx, [0x0079dbc5]
lea rcx, str.correction___1__28
mov r8d, 0x44b
call fcn.0059d7c0
mov r8d, dword [rbx + 0x1c]
lea ecx, [r12 + 2]
mov eax, r12d
add qword [rbx + 8], rax
add qword [rbx + 0x10], rax
mov eax, 2
mov edx, r8d
sub edx, r12d
cmp r8d, ecx
cmovb edx, eax
mov dword [rbx + 0x1c], edx
mov edx, dword [rbx + 0x18]
mov r8d, edx
sub r8d, r12d
cmp ecx, edx
cmovbe eax, r8d
cmp dword [rsp + 0x3c], esi
mov dword [rbx + 0x18], eax
jbe 0x60168a
lea rdx, [0x0079dbc5]
lea rcx, str.newCurrent___maxDist
mov r8d, 0x45c
call fcn.0059d7c0
mov eax, esi
sub eax, dword [rsp + 0x3c]
cmp eax, 1
ja 0x6016ae
lea rdx, [0x0079dbc5]
lea rcx, str.newCurrent___maxDist___ZSTD_WINDOW_START_INDEX
mov r8d, 0x45d
call fcn.0059d7c0
cmp esi, dword [rbx + 0x1c]
jae 0x6016cc
lea rdx, [0x0079dbc5]
lea rcx, str.window__lowLimit___newCurrent
mov r8d, 0x45f
call fcn.0059d7c0
cmp esi, dword [rbx + 0x18]
jae 0x6016ea
lea rdx, [0x0079dbc5]
lea rcx, str.window__dictLimit___newCurrent
mov r8d, 0x460
call fcn.0059d7c0
inc dword [rbx + 0x20]
mov rcx, qword [rbx + 0x28]
xor eax, eax
xor r9d, r9d
cmp dword [rsp + 0x40], eax
jbe 0x601715
mov r8d, dword [rcx + rax*8]
mov edx, r8d
sub edx, r12d
cmp r8d, r12d
cmovb edx, r9d
mov dword [rcx + rax*8], edx
inc rax
jmp 0x6016f6
mov dword [rbx + 0x30], 0
mov rax, qword [rbx + 8]
sub rdi, rax
mov qword [rsp + 0x60], rax
mov eax, dword [rsp + 0x3c]
add eax, dword [rbx + 0x30]
cmp edi, eax
jbe 0x601751
sub edi, dword [rsp + 0x3c]
cmp edi, dword [rbx + 0x1c]
jbe 0x60173f
mov dword [rbx + 0x1c], edi
mov eax, dword [rbx + 0x1c]
cmp dword [rbx + 0x18], eax
jae 0x60174a
mov dword [rbx + 0x18], eax
mov dword [rbx + 0x30], 0
mov eax, dword [rbx + 0x18]
mov edx, dword [rbp + 0xc]
mov dword [rsp + 0x68], eax
mov eax, dword [rbx + 0x1c]
mov ecx, dword [rsp + 0x68]
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x68]
cmp eax, dword [rsp + 0x6c]
ja 0x601d14
mov dword [rsp + 0x120], eax
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0xc8], 0
mov eax, edx
mov edi, edx
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x50]
cmp rax, rdi
jb 0x601ca6
add rax, r15
add rcx, qword [rsp + 0x60]
lea rsi, [rsp + 0x160]
mov qword [rsp + 0x40], rax
sub rax, 8
mov r8d, dword [rbp + 0x10]
mov qword [rsp + 0xf0], rax
lea rax, [rbx + 0x40]
mov r11d, dword [rbp + 8]
mov r10d, dword [rbp + 4]
mov qword [rsp + 0xb0], rax
lea rax, [rbx + 0x240]
mov qword [rsp + 0xa8], rcx
mov rcx, rsi
mov qword [rsp + 0xf8], rax
call fcn.006013d0
mov rax, qword [rsp + 0x58]
mov cl, r11b
mov qword [rsp + 0x140], rsi
add rax, r15
mov qword [rsp + 0x48], rax
mov eax, 1
shl eax, cl
mov ecx, r10d
shl rax, 3
sub ecx, r11d
mov qword [rsp + 0x128], rax
or eax, 0xffffffff
shl eax, cl
not eax
mov dword [rsp + 0x124], eax
mov rdi, qword [rsp + 0x48]
cmp qword [rsp + 0xf0], rdi
jbe 0x601c92
mov r8, qword [rsp + 0xf0]
sub r8, qword [rsp + 0x48]
lea rax, [rsp + 0x15c]
mov r9, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x140]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x15c], 0
call fcn.006012a0
mov qword [rsp + 0xb8], rax
mov eax, dword [rsp + 0x15c]
mov r12, qword [rsp + 0xb0]
mov rdi, qword [rsp + 0xf8]
lea rsi, [r12 + rax*8]
cmp rsi, r12
je 0x601916
mov r13, qword [rsp + 0x48]
sub r13, qword [rsp + 0x58]
add r12, 8
add r13, qword [r12 - 8]
mov rdx, qword [rsp + 0x58]
add rdi, 0x18
mov rcx, r13
call fcn.005aad30
mov edx, dword [rsp + 0x124]
mov qword [rdi - 0x18], r13
and edx, eax
shr rax, 0x20
mov dword [rdi - 0x10], edx
mov dword [rdi - 0xc], eax
mov ecx, dword [rbp + 8]
mov rax, qword [rbx + 0x28]
shl rdx, cl
lea rax, [rax + rdx*8]
mov qword [rdi - 8], rax
prefetcht0 byte [rax]
jmp 0x6018bf
mov rax, qword [rsp + 0x48]
add rax, qword [rsp + 0xb8]
mov dword [rsp + 0xc0], 0
mov qword [rsp + 0x138], rax
mov eax, dword [rsp + 0xc0]
cmp eax, dword [rsp + 0x15c]
jae 0x601c80
mov eax, dword [rsp + 0xc0]
imul rax, rax, 0x18
add rax, qword [rsp + 0xf8]
mov esi, dword [rax + 0xc]
mov rdi, qword [rax]
mov r13, qword [rax + 0x10]
mov dword [rsp + 0x100], esi
mov esi, dword [rax + 8]
mov rax, rdi
sub rax, qword [rsp + 0x60]
mov dword [rsp + 0xc4], esi
mov qword [rsp + 0x110], rax
mov rax, qword [rsp + 0x100]
mov edx, dword [rsp + 0x110]
shl rax, 0x20
or rdx, rax
cmp rdi, qword [rsp + 0x30]
mov qword [rsp + 0xe8], rdx
mov r8, rdx
jb 0x6019f5
mov rax, qword [rsp + 0x128]
mov qword [rsp + 0xe0], 0
mov qword [rsp + 0x108], 0
mov qword [rsp + 0xd8], 0
mov qword [rsp + 0xd0], 0
add rax, r13
mov qword [rsp + 0x130], rax
jmp 0x601a16
mov edx, dword [rsp + 0xc4]
mov r9d, dword [rbp + 8]
jmp 0x601bc4
mov eax, dword [rsp + 0x100]
cmp eax, dword [r13 + 4]
je 0x601a25
add r13, 8
cmp r13, qword [rsp + 0x130]
jb 0x601a05
jmp 0x601ba6
mov eax, dword [r13]
cmp eax, dword [rsp + 0x120]
jbe 0x601a12
mov edx, dword [rsp + 0x6c]
cmp dword [rsp + 0x68], edx
mov esi, eax
jbe 0x601b31
cmp dword [rsp + 0x68], eax
mov rdx, qword [rsp + 0x70]
cmovbe rdx, qword [rsp + 0x60]
add rsi, rdx
cmp dword [rsp + 0x68], eax
ja 0x601a69
mov r9, qword [rsp + 0x40]
mov rax, qword [rsp + 0xa8]
jmp 0x601a79
mov r9, qword [rsp + 0xc8]
mov rax, qword [rsp + 0x80]
mov r8, r9
mov rdx, rsi
mov rcx, rdi
sub r8, rsi
mov qword [rsp + 0x148], r9
mov qword [rsp + 0x78], rax
add r8, rdi
cmp qword [rsp + 0x40], r8
cmovb r8, qword [rsp + 0x40]
call fcn.005fb720
mov r9, qword [rsp + 0x148]
mov r12, rax
lea rax, [rsi + rax]
cmp r9, rax
jne 0x601ad2
mov r8, qword [rsp + 0x40]
mov rdx, qword [rsp + 0xa8]
lea rcx, [rdi + r12]
call fcn.005fb720
add r12, rax
cmp qword [rsp + 0x58], r12
ja 0x601a12
mov r9, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x30]
mov r8, rsi
mov rcx, rdi
call fcn.006010d0
mov rcx, rax
mov r11, rax
neg rcx
add rsi, rcx
cmp qword [rsp + 0x78], rsi
jne 0x601b6f
mov rsi, qword [rsp + 0x80]
cmp qword [rsp + 0x78], rsi
je 0x601b6f
mov r8, qword [rsp + 0xc8]
mov rdx, qword [rsp + 0x30]
add rcx, rdi
mov r9, rsi
call fcn.006010d0
add r11, rax
jmp 0x601b6f
add rsi, qword [rsp + 0x60]
mov r8, qword [rsp + 0x40]
mov rcx, rdi
mov rdx, rsi
call fcn.005fb720
cmp qword [rsp + 0x58], rax
mov r12, rax
ja 0x601a12
mov r9, qword [rsp + 0xa8]
mov rdx, qword [rsp + 0x30]
mov r8, rsi
mov rcx, rdi
call fcn.006010d0
mov r11, rax
lea rax, [r12 + r11]
cmp rax, qword [rsp + 0x108]
jbe 0x601a12
mov qword [rsp + 0xe0], r13
mov qword [rsp + 0x108], rax
mov qword [rsp + 0xd8], r11
mov qword [rsp + 0xd0], r12
jmp 0x601a12
cmp qword [rsp + 0xe0], 0
jne 0x601bd1
mov edx, dword [rsp + 0xc4]
mov r9d, dword [rbp + 8]
mov r8, qword [rsp + 0xe8]
mov rcx, rbx
call fcn.00601dd0
jmp 0x601c74
mov rax, qword [rsp + 0xe0]
mov ecx, dword [rsp + 0x110]
mov r9, qword [rsp + 0xd0]
add r9, qword [rsp + 0xd8]
sub ecx, dword [rax]
mov rax, qword [r14 + 0x18]
imul rdx, rax, 0xc
add rdx, qword [r14]
cmp rax, qword [r14 + 0x20]
jne 0x601c0f
mov rax, 0xffffffffffffffba
jmp 0x601d4e
mov r8, rdi
sub r8, qword [rsp + 0xd8]
mov dword [rdx + 8], r9d
sub r8, qword [rsp + 0x30]
mov dword [rdx], ecx
inc rax
mov r9d, dword [rbp + 8]
mov rcx, rbx
mov dword [rdx + 4], r8d
mov edx, dword [rsp + 0xc4]
mov r8, qword [rsp + 0xe8]
mov qword [r14 + 0x18], rax
call fcn.00601dd0
add rdi, qword [rsp + 0xd0]
cmp rdi, qword [rsp + 0x138]
mov qword [rsp + 0x30], rdi
mov rax, rdi
jbe 0x601c74
sub rax, qword [rsp + 0xb8]
mov qword [rsp + 0x48], rax
jmp 0x601c80
inc dword [rsp + 0xc0]
jmp 0x601936
mov rdi, qword [rsp + 0xb8]
add qword [rsp + 0x48], rdi
jmp 0x60184a
mov rax, qword [rsp + 0x40]
sub rax, qword [rsp + 0x30]
cmp rax, 0xffffffffffffff88
ja 0x601d4e
mov rdi, qword [rsp + 0x88]
cmp qword [r14 + 0x18], rdi
jbe 0x601cc7
imul rdx, rdi, 0xc
mov edi, dword [rsp + 0x98]
add rdx, qword [r14]
add dword [rdx + 4], edi
jmp 0x601cf4
cmp qword [rsp + 0x50], rax
je 0x601ce7
lea rdx, str.zstd_lib_compress_zstd_ldm.c
lea rcx, str.newLeftoverSize__chunkSize
mov r8d, 0x23f
call fcn.0059d7c0
mov rax, qword [rsp + 0x98]
add rax, qword [rsp + 0x50]
inc qword [rsp + 0x90]
add r15, 0x100000
mov qword [rsp + 0x98], rax
jmp 0x6014fd
xor eax, eax
jmp 0x601d4e
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x70], rax
mov eax, dword [rsp + 0x6c]
add rax, qword [rsp + 0x70]
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x70]
add rax, rcx
mov qword [rsp + 0xc8], rax
mov eax, dword [rsp + 0x6c]
mov dword [rsp + 0x120], eax
jmp 0x60179c
add rsp, 0x178
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret