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

Disassembly:
push rbx
push rbp
push rsi
push r12
push r15
sub rsp, 0x50
mov r11, qword [0x1800eb370]
mov rbx, rcx
mov r15d, dword [rcx + 0x14]
mov rbp, r11
mov dword [rcx + 0x4c], 0xffffffff
test dword [r11 + 0x3d5c], 0x400
mov rax, qword [r11 + 0x4a38]
mov r12, qword [rax]
jne 0x1800215a0
cmp byte [rcx + 0xea], 0
je 0x18002157b
mov rax, qword [rcx + 0x38]
cmp qword [rax + 0x60], rcx
jne 0x18002157b
xor esi, esi
xorps xmm0, xmm0
mov dword [rax + 0x10], esi
movss dword [rax + 0x14], xmm0
mov qword [rcx + 0x38], r12
mov eax, dword [r12]
mov dword [rcx + 0x40], eax
cmp qword [r12 + 0x60], rbx
sete al
mov byte [rcx + 0xea], al
add rsp, 0x50
pop r15
pop r12
pop rsi
pop rbp
pop rbx
ret
mov qword [rsp + 0x88], rdi
xor esi, esi
mov qword [rsp + 0x90], r13
mov r13d, r15d
mov qword [rsp + 0x98], r14
movaps xmmword [rsp + 0x40], xmm6
mov byte [rcx + 0xea], 0
and r13d, 0x6000000
je 0x1800215e2
cmp byte [rcx + 0xf1], sil
je 0x1800215e2
mov qword [rcx + 0x38], rsi
mov dword [rcx + 0x40], esi
test dword [r11 + 0x4918], 0x100
jne 0x1800216c1
mov rax, qword [rcx + 0x38]
test rax, rax
jne 0x1800216c1
mov rax, qword [rcx + 0x3a8]
test rax, rax
je 0x18002162f
cmp byte [rax + 0xf3], sil
je 0x18002161e
cmp byte [rax + 0xec], sil
je 0x18002162f
mov rax, qword [rax + 0x38]
mov qword [rcx + 0x38], rax
test rax, rax
jne 0x1800216c1
mov r9d, dword [rcx + 0x40]
test r9d, r9d
je 0x1800216c1
movsxd rax, dword [r11 + 0x4a30]
mov r8d, esi
test eax, eax
jle 0x18002167b
mov rdi, qword [r11 + 0x4a38]
mov r10, rax
mov rcx, rdi
mov rdx, rsi
nop word [rax + rax]
mov rax, qword [rcx]
cmp dword [rax], r9d
je 0x180021730
inc r8d
inc rdx
add rcx, 8
cmp rdx, r10
jl 0x180021660
mov qword [rbx + 0x38], rsi
movss xmm0, dword [rbx + 0x44]
lea r8, [rbx + 0x44]
movss xmm1, dword [0x1800db0d4]
ucomiss xmm0, xmm1
jp 0x180021697
je 0x1800216c1
movss xmm0, dword [rbx + 0x48]
ucomiss xmm0, xmm1
jp 0x1800216a3
je 0x1800216c1
mov edx, dword [rbx + 0x10]
lea r9, [rbx + 0x58]
mov rcx, rbx
mov dword [rsp + 0x20], esi
call fcn.1800211e0
mov r11, qword [0x1800eb370]
mov qword [rbx + 0x38], rax
movss xmm6, dword [0x1800db138]
xor r14b, r14b
test dword [rbp + 0x4918], 0x100
je 0x180021787
movsxd rax, dword [r11 + 0x4a30]
mov r8d, esi
test eax, eax
jle 0x180021718
mov rdi, qword [r11 + 0x4a38]
mov r9, rax
mov r10d, dword [rbp + 0x497c]
mov rcx, rdi
mov rdx, rsi
mov rax, qword [rcx]
cmp dword [rax], r10d
je 0x180021745
inc r8d
inc rdx
add rcx, 8
cmp rdx, r9
jl 0x180021701
lea rdi, [rbx + 0x38]
mov qword [rdi], rsi
mov eax, dword [rbp + 0x497c]
mov dword [rbx + 0x40], eax
mov r14b, 1
jmp 0x1800218d3
movsxd rax, r8d
mov rcx, qword [rdi + rax*8]
mov qword [rbx + 0x38], rcx
test rcx, rcx
jne 0x1800216c1
jmp 0x18002167f
movsxd rax, r8d
mov rcx, qword [rdi + rax*8]
lea rdi, [rbx + 0x38]
mov qword [rdi], rcx
mov eax, dword [rbp + 0x497c]
mov dword [rbx + 0x40], eax
test rcx, rcx
je 0x180021728
test dword [rbx + 0x14], 0x20000000
je 0x180021728
cmp qword [rcx + 0x60], rsi
je 0x180021728
mov qword [rcx + 0x60], rbx
mov r14b, 1
mov ecx, dword [rbx + 0x10]
mov rax, qword [rdi]
mov dword [rbx + 0x40], ecx
mov dword [rax], ecx
jmp 0x1800218d3
test r15d, 0x11000000
jne 0x1800218c1
mov rax, qword [rbx + 0x448]
test rax, rax
je 0x1800217bc
mov rax, qword [rax + 0x88]
test rax, rax
je 0x1800217bc
mov rax, qword [rax + 0x38]
lea rdi, [rbx + 0x38]
mov qword [rdi], rax
jmp 0x1800218d3
bt r15d, 0x19
jae 0x1800217d6
mov rax, qword [rbp + 0x4a50]
lea rdi, [rbx + 0x38]
mov qword [rdi], rax
jmp 0x1800218d3
cmp byte [r11 + 0x5c], sil
jne 0x1800217e5
test dword [rbx + 0x24], 0x200
je 0x180021817
test dword [r11 + 0x3d5c], 0x400
je 0x180021817
test byte [rbx + 0x42d], 1
jne 0x180021817
mov eax, dword [rbx + 0x14]
test eax, 0x13000000
jne 0x180021817
and eax, 0xc000000
cmp eax, 0x4000000
je 0x180021817
lea rdi, [rbx + 0x38]
jmp 0x18002185f
mov rax, qword [rbp + 0x4050]
test rax, rax
je 0x180021882
cmp qword [rax + 0x3c8], rbx
jne 0x180021882
movss xmm0, dword [r11 + 0xe08]
comiss xmm0, xmm6
movss xmm1, dword [r11 + 0xe0c]
jb 0x180021882
comiss xmm1, xmm6
jb 0x180021882
mov rax, qword [rbx + 0x38]
lea rdi, [rbx + 0x38]
test rax, rax
je 0x1800218d3
cmp qword [rax + 0x60], rbx
jne 0x1800218d3
mov edx, dword [rbx + 0x10]
lea r9, [rbx + 0x58]
lea r8, [rbx + 0x50]
mov dword [rsp + 0x20], esi
mov rcx, rbx
call fcn.1800211e0
mov r11, qword [0x1800eb370]
mov qword [rdi], rax
jmp 0x1800218d3
mov rax, qword [rbx + 0x38]
lea rdi, [rbx + 0x38]
test rax, rax
je 0x1800218d3
cmp rbx, qword [rax + 0x60]
jne 0x1800218d3
cmp dword [rbp + 0x4098], esi
je 0x1800218a6
cmp byte [rbp + 0x40a5], sil
je 0x1800218d3
mov rdx, qword [r11 + 0x4a38]
mov rcx, rbx
mov rdx, qword [rdx]
call fcn.180020050
mov r11, qword [0x1800eb370]
jmp 0x1800218d3
mov rax, qword [rbx + 0x3a8]
lea rdi, [rbx + 0x38]
mov rcx, qword [rax + 0x38]
mov qword [rdi], rcx
cmp qword [rdi], rsi
jne 0x180021908
mov rdx, r12
mov rcx, rbx
call fcn.180020050
test al, al
jne 0x180021901
mov edx, dword [rbx + 0x10]
lea r9, [rbx + 0x58]
lea r8, [rbx + 0x50]
mov dword [rsp + 0x20], esi
mov rcx, rbx
call fcn.1800211e0
mov qword [rdi], rax
mov r11, qword [0x1800eb370]
test r14b, r14b
mov r14, qword [rsp + 0x98]
jne 0x180021b30
test r13d, r13d
je 0x180021a4d
bt r15d, 0x19
jae 0x180021932
lea rax, [rbp + 0xe08]
jmp 0x18002194b
movsxd rax, dword [rbp + 0x4a18]
imul rcx, rax, 0x38
mov rax, qword [rbp + 0x4a20]
add rax, 0xfffffffffffffff4
add rax, rcx
movsd xmm0, qword [rax]
movsd qword [rsp + 0x38], xmm0
cmp byte [rbp + 0x4ae6], sil
jne 0x180021974
cmp byte [rbp + 0x4ae7], sil
je 0x180021974
cmp qword [rbp + 0x4aa8], rsi
je 0x180021974
xor dl, dl
jmp 0x180021976
mov dl, 1
movss xmm0, dword [rsp + 0x38]
comiss xmm0, xmm6
jb 0x180021990
movss xmm0, dword [rsp + 0x3c]
comiss xmm0, xmm6
jb 0x180021990
mov cl, 1
jmp 0x180021992
xor cl, cl
cmp byte [rbx + 0xf1], sil
jne 0x1800219a4
test r15d, 0x12000000
je 0x1800219ac
test dl, dl
je 0x1800219cf
test cl, cl
jne 0x1800219be
mov rax, qword [rdi]
movsx esi, word [rax + 0x8a]
mov dword [rbx + 0x4c], esi
jmp 0x180021b30
movsd xmm0, qword [rax]
lea rax, [rsp + 0x30]
movsd qword [rsp + 0x30], xmm0
jmp 0x1800219d9
lea rcx, [rsp + 0x38]
call fcn.18001b2f0
movsxd rcx, dword [r11 + 0x38b8]
test ecx, ecx
jle 0x180021a40
movss xmm4, dword [rax]
mov r8, rcx
mov rcx, qword [r11 + 0x38c0]
mov rdx, rsi
nop word [rax + rax]
movss xmm0, dword [rcx]
comiss xmm4, xmm0
movss xmm3, dword [rcx + 4]
movaps xmm1, xmm0
addss xmm1, dword [rcx + 8]
movaps xmm2, xmm3
addss xmm2, dword [rcx + 0xc]
jb 0x180021a32
movss xmm0, dword [rax + 4]
comiss xmm0, xmm3
jb 0x180021a32
comiss xmm1, xmm4
jbe 0x180021a32
comiss xmm2, xmm0
ja 0x180021a45
inc esi
inc rdx
add rcx, 0x30
cmp rdx, r8
jl 0x180021a00
mov esi, 0xffffffff
mov dword [rbx + 0x4c], esi
jmp 0x180021b30
mov rcx, qword [rdi]
test rcx, rcx
je 0x180021b1a
mov r9, qword [rcx + 0x60]
cmp rbx, r9
je 0x180021b1a
test r9, r9
je 0x180021b1a
bt r15d, 0x18
jb 0x180021b1a
cmp qword [rbx + 0x448], rsi
jne 0x180021b1a
movzx edx, byte [rbx + 0x42d]
and dl, 5
test dword [rbx + 0x14], 0x20000000
je 0x180021ae4
mov eax, dword [rbp + 0x3f90]
cmp dword [rcx + 0x6c], eax
jge 0x180021ae4
cmp dl, 1
je 0x180021ae4
test dword [rbp + 0x5f14], 0x100
je 0x180021acd
mov r8d, dword [rcx]
lea rcx, str._viewport__Window__s_steal_Viewport__08X_from_Window__s_n
mov r9, qword [r9 + 8]
mov rdx, qword [rbx + 8]
call fcn.18002b640
mov rax, qword [rdi]
mov qword [rax + 0x60], rbx
mov eax, dword [rbx + 0x10]
mov rcx, qword [rdi]
mov dword [rcx], eax
mov rax, qword [rdi]
mov dword [rax + 0x74], esi
jmp 0x180021b30
mov rdx, qword [r11 + 0x4a38]
mov rcx, rbx
mov rdx, qword [rdx]
call fcn.180020050
test al, al
jne 0x180021b30
mov edx, dword [rbx + 0x10]
lea r9, [rbx + 0x58]
lea r8, [rbx + 0x50]
mov dword [rsp + 0x20], 0x20
mov rcx, rbx
call fcn.1800211e0
mov qword [rdi], rax
jmp 0x180021b30
cmp dword [rbx + 0x4c], esi
jge 0x180021b30
bt r15d, 0x18
jb 0x180021b30
movsx eax, word [rcx + 0x8a]
mov dword [rbx + 0x4c], eax
mov rcx, qword [rdi]
movaps xmm6, xmmword [rsp + 0x40]
mov r13, qword [rsp + 0x90]
mov rdi, qword [rsp + 0x88]
cmp rbx, qword [rcx + 0x60]
sete al
mov byte [rbx + 0xea], al
mov eax, dword [rcx]
mov dword [rbx + 0x40], eax
add rsp, 0x50
pop r15
pop r12
pop rsi
pop rbp
pop rbx
ret