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

Disassembly:
lea r12, [rsp - 0x20]
cmp r12, qword [r14 + 0x10]
jbe 0x504cde
push rbp
mov rbp, rsp
sub rsp, 0x98
nop word [rax + rax]
test ecx, ecx
je 0x504aa1
mov qword [rsp + 0xa8], rax
mov r8, qword [rax + 0x30]
cmp ecx, r8d
jbe 0x50499e
mov r9, qword [rax + 0x88]
mov r10d, ecx
sub ecx, r8d
cmp r9d, ecx
jb 0x5048be
mov qword [rsp + 0x58], r8
mov r11, r9
sub r9d, ecx
lea ecx, [rdi + r9]
mov r12, qword [rax + 0x38]
mov r13, qword [rax + 0x28]
mov rdx, qword [rax + 0x90]
mov r15, qword [rax + 0x80]
nop dword [rax + rax]
cmp r11d, ecx
jae 0x5047dc
cmp r11, r9
jb 0x504cd2
mov qword [rsp + 0xb0], rbx
mov dword [rsp + 0x3c], r10d
mov dword [rsp + 0xbc], edi
mov qword [rsp + 0x50], r11
mov dword [rsp + 0x2c], r9d
mov rcx, r11
sub rcx, r9
lea rsi, [r8 + rcx]
sub r9, rdx
sar r9, 0x3f
mov edx, dword [rsp + 0x2c]
and r9, rdx
add r9, r15
cmp r12, rsi
jae 0x504650
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x90], r9
mov rax, r13
mov rbx, rsi
mov rdi, rcx
lea rsi, [0x005247a0]
mov rcx, r12
call sym.runtime.growslice
mov r8, qword [rsp + 0x58]
mov r9, qword [rsp + 0x90]
mov r13, rax
mov r12, rcx
mov rsi, rbx
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x90], r13
lea rax, [r13 + r8]
mov rbx, r9
call sym.runtime.memmove
mov rdx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0xa8]
mov qword [rsi + 0x30], rdx
mov rdx, qword [rsp + 0x48]
mov qword [rsi + 0x38], rdx
mov rdx, qword [rsp + 0x50]
mov edi, dword [rsp + 0x2c]
sub edx, edi
mov edi, dword [rsp + 0x3c]
sub edi, edx
mov r8d, dword [rsp + 0xbc]
sub r8d, edx
cmp dword [0x006bc2a0], 0
jne 0x5046b8
mov r9, qword [rsp + 0x90]
jmp 0x5046d0
call sym.runtime.gcWriteBarrier2
mov r9, qword [rsp + 0x90]
mov qword [r11], r9
mov r10, qword [rsi + 0x28]
mov qword [r11 + 8], r10
mov qword [rsi + 0x28], r9
test edi, edi
jne 0x5047ca
nop dword [rax]
test r8d, r8d
jbe 0x5047ca
mov rcx, qword [rsp + 0xb0]
mov rdx, qword [rcx]
mov qword [rsp + 0x60], rdx
mov ecx, dword [rcx + 0x20]
mov qword [rsp + 0x58], rcx
lea rax, [0x00531040]
call sym.runtime.newobject
mov qword [rsp + 0x88], rax
mov qword [rax + 8], 0xe
lea rcx, [0x005538dc]
mov qword [rax], rcx
lea rcx, [0x00584058]
cmp qword [0x0065c670], rcx
jne 0x504762
mov rdx, qword [0x0065c678]
mov rbx, rax
mov rax, rcx
mov rcx, rdx
call sym.runtime.ifaceeq
test al, al
je 0x504762
lea rcx, [0x00584058]
mov rax, qword [rsp + 0x88]
nop
jmp 0x5047bb
lea rax, [0x00537800]
call sym.runtime.newobject
mov rcx, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
add rcx, qword [rdx + 0x20]
mov qword [rax], rcx
lea rcx, [0x00584058]
mov qword [rax + 8], rcx
cmp dword [0x006bc2a0], 0
jne 0x5047a0
mov rcx, qword [rsp + 0x88]
jmp 0x5047b0
call sym.runtime.gcWriteBarrier1
mov rcx, qword [rsp + 0x88]
mov qword [r11], rcx
mov qword [rax + 0x10], rcx
lea rcx, [0x00584478]
mov rbx, rax
mov rax, rcx
add rsp, 0x98
pop rbp
ret
mov rax, rsi
mov ecx, edi
mov edi, r8d
mov r8, qword [rsp + 0x58]
jmp 0x50499e
nop dword [rax]
cmp rdx, rcx
jb 0x504ccd
cmp r9, rcx
ja 0x504cc5
sub rcx, r9
lea rbx, [r8 + rcx]
mov r10d, r9d
sub r9, rdx
sar r9, 0x3f
and r10, r9
lea rdx, [r15 + r10]
cmp r12, rbx
jae 0x504849
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x90], rdx
mov rax, r13
mov rdi, rcx
lea rsi, [0x005247a0]
mov rcx, r12
call sym.runtime.growslice
mov rdx, qword [rsp + 0x90]
mov r8, qword [rsp + 0x58]
mov r13, rax
mov r12, rcx
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x90], r13
mov qword [rsp + 0x50], r12
lea rax, [r13 + r8]
mov rbx, rdx
call sym.runtime.memmove
mov rdx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0xa8]
mov qword [rsi + 0x30], rdx
mov rdx, qword [rsp + 0x50]
mov qword [rsi + 0x38], rdx
cmp dword [0x006bc2a0], 0
jne 0x504895
mov rcx, qword [rsp + 0x90]
jmp 0x5048ad
call sym.runtime.gcWriteBarrier2
mov rcx, qword [rsp + 0x90]
mov qword [r11], rcx
mov rdx, qword [rsi + 0x28]
mov qword [r11 + 8], rdx
mov qword [rsi + 0x28], rcx
xor eax, eax
xor ebx, ebx
add rsp, 0x98
pop rbp
ret
mov rcx, qword [rbx]
mov qword [rsp + 0x68], rcx
mov edx, dword [rbx + 0x20]
mov qword [rsp + 0x58], rdx
lea rax, [0x00531040]
call sym.runtime.newobject
mov qword [rsp + 0x80], rax
mov qword [rax + 8], 0x12
lea rcx, [0x00554a58]
mov qword [rax], rcx
lea rcx, [0x00584058]
nop dword [rax + rax]
cmp qword [0x0065c670], rcx
jne 0x504935
mov rdx, qword [0x0065c678]
mov rbx, rax
mov rax, rcx
mov rcx, rdx
call sym.runtime.ifaceeq
nop
test al, al
je 0x504935
lea rcx, [0x00584058]
mov rax, qword [rsp + 0x80]
jmp 0x50498f
lea rax, [0x00537800]
nop dword [rax]
call sym.runtime.newobject
mov rcx, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x68]
add rcx, qword [rdx + 0x20]
mov qword [rax], rcx
lea rcx, [0x00584058]
mov qword [rax + 8], rcx
cmp dword [0x006bc2a0], 0
jne 0x504974
mov rcx, qword [rsp + 0x80]
jmp 0x504984
call sym.runtime.gcWriteBarrier1
mov rcx, qword [rsp + 0x80]
mov qword [r11], rcx
mov qword [rax + 0x10], rcx
lea rcx, [0x00584478]
mov rbx, rax
mov rax, rcx
add rsp, 0x98
pop rbp
ret
sub r8d, ecx
cmp edi, ecx
jbe 0x5049ae
mov dword [rsp + 0x30], ecx
jmp 0x504b90
mov rdx, qword [rax + 0x38]
lea ecx, [r8 + rdi]
cmp rdx, rcx
jb 0x504b79
nop
cmp r8, rcx
ja 0x504b71
mov r9, qword [rax + 0x28]
mov r10, qword [rax + 0x30]
sub rcx, r8
lea rbx, [r10 + rcx]
mov r11d, r8d
sub r8, rdx
sar r8, 0x3f
and r11, r8
lea r8, [r9 + r11]
cmp rdx, rbx
jae 0x504a2d
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x90], r8
mov qword [rsp + 0x50], r10
mov rax, r9
mov rdi, rcx
lea rsi, [0x005247a0]
mov rcx, rdx
call sym.runtime.growslice
mov r8, qword [rsp + 0x90]
mov r10, qword [rsp + 0x50]
mov r9, rax
mov rdx, rcx
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x90], r9
lea rax, [r9 + r10]
mov rbx, r8
call sym.runtime.memmove
mov rdx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0xa8]
mov qword [rsi + 0x30], rdx
mov rdx, qword [rsp + 0x58]
mov qword [rsi + 0x38], rdx
cmp dword [0x006bc2a0], 0
jne 0x504a78
mov rcx, qword [rsp + 0x90]
jmp 0x504a90
call sym.runtime.gcWriteBarrier2
mov rcx, qword [rsp + 0x90]
mov qword [r11], rcx
mov rdx, qword [rsi + 0x28]
mov qword [r11 + 8], rdx
mov qword [rsi + 0x28], rcx
xor eax, eax
xor ebx, ebx
add rsp, 0x98
pop rbp
ret
mov rcx, qword [rbx]
mov qword [rsp + 0x70], rcx
mov edx, dword [rbx + 0x20]
mov qword [rsp + 0x58], rdx
lea rax, [0x00531040]
call sym.runtime.newobject
mov qword [rsp + 0x78], rax
mov qword [rax + 8], 0x13
lea rcx, [0x00555150]
mov qword [rax], rcx
lea rcx, [0x00584058]
nop dword [rax + rax]
cmp qword [0x0065c670], rcx
jne 0x504b12
mov rdx, qword [0x0065c678]
mov rbx, rax
mov rax, rcx
mov rcx, rdx
call sym.runtime.ifaceeq
nop
test al, al
je 0x504b12
lea rcx, [0x00584058]
mov rax, qword [rsp + 0x78]
jmp 0x504b62
lea rax, [0x00537800]
call sym.runtime.newobject
mov rcx, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x70]
add rcx, qword [rdx + 0x20]
mov qword [rax], rcx
lea rcx, [0x00584058]
mov qword [rax + 8], rcx
cmp dword [0x006bc2a0], 0
jne 0x504b4a
mov rcx, qword [rsp + 0x78]
jmp 0x504b57
call sym.runtime.gcWriteBarrier1
mov rcx, qword [rsp + 0x78]
mov qword [r11], rcx
mov qword [rax + 0x10], rcx
lea rcx, [0x00584478]
mov rbx, rax
mov rax, rcx
add rsp, 0x98
pop rbp
ret
mov eax, r8d
call sym.runtime.panicSliceB
call sym.runtime.panicSliceAcap
mov qword [rsi + 0x28], r8
mov ecx, dword [rsp + 0x30]
mov r8d, dword [rsp + 0x34]
mov rax, rsi
mov edi, edx
test edi, edi
jbe 0x504ca5
mov rdx, qword [rax + 0x38]
cmp edi, ecx
cmovbe ecx, edi
lea r10d, [rcx + r8]
cmp rdx, r10
jb 0x504cbd
cmp r8, r10
ja 0x504cb2
mov dword [rsp + 0x3c], edi
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x34], r10d
mov r11, qword [rax + 0x28]
mov r12, qword [rax + 0x30]
sub r10, r8
lea rbx, [r12 + r10]
mov r15d, r8d
sub r8, rdx
sar r8, 0x3f
and r15, r8
lea r8, [r15 + r11]
cmp rdx, rbx
jae 0x504c28
mov qword [rsp + 0x58], r10
mov qword [rsp + 0x90], r8
mov qword [rsp + 0x50], r12
mov rax, r11
mov rcx, rdx
mov rdi, r10
lea rsi, [0x005247a0]
call sym.runtime.growslice
mov r8, qword [rsp + 0x90]
mov r10, qword [rsp + 0x58]
mov r12, qword [rsp + 0x50]
mov r11, rax
mov rdx, rcx
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x90], r11
lea rax, [r11 + r12]
mov rcx, r10
mov rbx, r8
call sym.runtime.memmove
mov rdx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0xa8]
mov qword [rsi + 0x30], rdx
mov rdx, qword [rsp + 0x58]
mov qword [rsi + 0x38], rdx
mov edx, dword [rsp + 0x3c]
mov edi, dword [rsp + 0x38]
sub edx, edi
cmp dword [0x006bc2a0], 0
jne 0x504c85
mov r8, qword [rsp + 0x90]
nop
jmp 0x504b7e
call sym.runtime.gcWriteBarrier2
mov r8, qword [rsp + 0x90]
mov qword [r11], r8
mov r9, qword [rsi + 0x28]
mov qword [r11 + 8], r9
nop dword [rax]
jmp 0x504b7e
xor eax, eax
xor ebx, ebx
add rsp, 0x98
pop rbp
ret
mov eax, r8d
mov ecx, r10d
call sym.runtime.panicSliceB
mov ecx, r10d
call sym.runtime.panicSliceAcap
mov eax, r9d
call sym.runtime.panicSliceB
call sym.runtime.panicSliceAcap
mov eax, r9d
mov rcx, r11
call sym.runtime.panicSliceB
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x18], ecx
mov dword [rsp + 0x1c], edi
call sym.runtime.morestack_noctxt.abi0
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov ecx, dword [rsp + 0x18]
mov edi, dword [rsp + 0x1c]
jmp sym.internal_zstd._Reader_.copyFromWindow