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

Disassembly:
mov rax, rsp
push rbx
push rdi
push r15
sub rsp, 0xb0
mov rbx, qword [0x1401010d0]
mov qword [rax - 0x20], rbp
mov qword [rax - 0x30], r12
movaps xmmword [rax - 0x78], xmm8
mov ecx, dword [rbx + 0x1ef0]
cmp dword [rbx + 0x1628], ecx
jle 0x1400221d0
mov r8d, 0x2d04
lea rdx, [0x140053e60]
lea rcx, str.g.PlatformIO.Viewports.Size___g.Viewports.Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov ecx, dword [rbx + 0x1ef0]
mov ebp, dword [rbx + 0x1a6c]
xor r15d, r15d
shr ebp, 0xa
mov eax, ecx
and bpl, 1
mov qword [rsp + 0xa0], rsi
mov dword [rsp + 0xd0], ebp
je 0x140022275
mov ebp, r15d
test ecx, ecx
jle 0x14002226e
mov esi, r15d
test rsi, rsi
js 0x14002220a
cmp ebp, ecx
jl 0x140022224
mov r8d, 0x6c7
lea rdx, [0x140053c00]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x1ef8]
mov rdi, qword [rax + rsi*8]
mov rax, qword [rbx + 0x15a0]
test rax, rax
je 0x14002225d
cmp byte [rdi + 0x82], r15b
je 0x14002225d
mov rcx, rdi
call rax
mov ecx, dword [rdi + 4]
test al, al
je 0x140022256
bts ecx, 0xa
jmp 0x14002225a
btr ecx, 0xa
mov dword [rdi + 4], ecx
mov eax, dword [rbx + 0x1ef0]
inc ebp
inc rsi
mov ecx, eax
cmp ebp, eax
jl 0x140022201
mov ebp, dword [rsp + 0xd0]
test eax, eax
jg 0x140022293
mov r8d, 0x6c7
lea rdx, [0x140053c00]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x1ef8]
mov rdi, qword [rax]
mov qword [rsp + 0xe8], rdi
cmp dword [rdi], 0x11111111
je 0x1400222c7
mov r8d, 0x2d1c
lea rdx, [0x140053e60]
lea rcx, str.main_viewport__ID__IMGUI_VIEWPORT_DEFAULT_ID
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
cmp qword [rdi + 0x88], r15
je 0x1400222ea
mov r8d, 0x2d1d
lea rdx, [0x140053e60]
lea rcx, str.main_viewport__Window__0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
xorps xmm8, xmm8
test bpl, bpl
je 0x140022337
mov rax, qword [rbx + 0x1578]
lea rcx, [rsp + 0xd8]
mov rdx, rdi
call rax
test dword [rdi + 4], 0x400
movsd xmm1, qword [rbx + 0x10]
movsd xmm0, qword [rax]
movsd qword [rsp + 0xe0], xmm0
movsd qword [rsp + 0xd8], xmm1
je 0x140022362
movsd xmm0, qword [rdi + 8]
movsd xmm1, qword [rdi + 0x10]
jmp 0x140022350
movsd xmm1, qword [rbx + 0x10]
lea rax, [rsp + 0xd8]
mov qword [rsp + 0xd8], r15
movsd xmm0, qword [rax]
movsd qword [rsp + 0xd8], xmm1
movsd qword [rsp + 0xe0], xmm0
lea r9, [rsp + 0xd8]
mov dword [rsp + 0x20], 0x1004
lea r8, [rsp + 0xe0]
mov edx, 0x11111111
xor ecx, ecx
call fcn.140022cb0
mov eax, dword [rbx + 0x1ef0]
mov r12d, r15d
mov dword [rbx + 0x1f00], r15d
mov qword [rbx + 0x1f08], r15
mov qword [rbx + 0x1f10], r15
test eax, eax
jle 0x140022931
mov qword [rsp + 0x90], r13
mov r13, r15
mov qword [rsp + 0x88], r14
movaps xmmword [rsp + 0x70], xmm6
movaps xmmword [rsp + 0x40], xmm9
movss xmm9, dword [0x140060be8]
movaps xmmword [rsp + 0x60], xmm7
test r12d, r12d
js 0x1400223e2
cmp r12d, eax
jl 0x1400223fc
mov r8d, 0x6c7
lea rdx, [0x140053c00]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x1ef8]
mov rdi, qword [rax + r13]
mov dword [rdi + 0x60], r12d
test r12d, r12d
jle 0x1400225f3
mov eax, dword [rbx + 0x1c90]
sub eax, 2
cmp dword [rdi + 0x64], eax
jge 0x1400225f3
mov eax, dword [rbx + 0x1cb8]
mov ebp, r15d
mov rsi, r15
test eax, eax
jle 0x1400224f6
nop word [rax + rax]
test rsi, rsi
js 0x140022449
cmp ebp, eax
jl 0x140022463
mov r8d, 0x6c7
lea rdx, [0x140053c00]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x1cc0]
mov rcx, qword [rax + rsi*8]
cmp qword [rcx + 0x38], rdi
jne 0x1400224e3
test rsi, rsi
js 0x140022481
cmp ebp, dword [rbx + 0x1cb8]
jl 0x14002249b
mov r8d, 0x6c7
lea rdx, [0x140053c00]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x1cc0]
mov rcx, qword [rax + rsi*8]
mov qword [rcx + 0x38], r15
test rsi, rsi
js 0x1400224b7
cmp ebp, dword [rbx + 0x1cb8]
jl 0x1400224d1
mov r8d, 0x6c7
lea rdx, [0x140053c00]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x1cc0]
mov rcx, qword [rax + rsi*8]
mov byte [rcx + 0xce], r15b
mov eax, dword [rbx + 0x1cb8]
inc ebp
inc rsi
cmp ebp, eax
jl 0x140022440
cmp rdi, qword [rbx + 0x1f18]
jne 0x140022506
mov qword [rbx + 0x1f18], r15
mov rax, qword [rbx + 0x1ef8]
movsxd rcx, r12d
lea rsi, [rax + rcx*8]
mov rcx, rax
cmp rsi, rax
jb 0x14002252c
movsxd rax, dword [rbx + 0x1ef0]
lea rcx, [rcx + rax*8]
cmp rsi, rcx
jb 0x140022546
mov r8d, 0x6df
lea rdx, [0x140053c00]
lea rcx, [0x14005a038]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x1ef8]
movsxd r8, dword [rbx + 0x1ef0]
sub rsi, rax
sar rsi, 3
sub r8, rsi
lea rcx, [rax + rsi*8]
lea r8, [r8*8 - 8]
lea rdx, [rcx + 8]
call sub.VCRUNTIME140.dll_memmove
dec dword [rbx + 0x1ef0]
mov rcx, rdi
call fcn.140023db0
mov rcx, qword [rbx + 0x1630]
movsxd rax, dword [rbx + 0x1628]
lea rdx, [rcx + rax*8]
cmp rcx, rdx
jae 0x1400225df
nop dword [rax + rax]
mov rax, qword [rcx]
add rcx, 8
cmp rax, rdi
je 0x1400225c5
cmp rcx, rdx
jb 0x1400225a0
mov rcx, rdi
call fcn.140030310
dec r12d
sub r13, 8
jmp 0x1400228ec
mov r8d, 0x2d40
lea rdx, [0x140053e60]
lea rcx, str.g.PlatformIO.Viewports.contains_viewport___false
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rcx, rdi
call fcn.140030310
dec r12d
sub r13, 8
jmp 0x1400228ec
movzx esi, byte [rdi + 0x82]
test bpl, bpl
je 0x140022685
test dword [rdi + 4], 0x400
jne 0x140022685
test sil, sil
je 0x140022685
cmp byte [rdi + 0x58], r15b
je 0x14002264b
mov rdx, rdi
lea rcx, [rsp + 0xd8]
call qword [rbx + 0x1578]
movss xmm0, dword [rax]
movss xmm1, dword [rax + 4]
movss dword [rdi + 0x100], xmm0
movss dword [rdi + 0x104], xmm1
movss dword [rdi + 8], xmm0
movss dword [rdi + 0xc], xmm1
cmp byte [rdi + 0x59], r15b
je 0x140022685
mov rdx, rdi
lea rcx, [rsp + 0xe0]
call qword [rbx + 0x1588]
movss xmm0, dword [rax]
movss xmm1, dword [rax + 4]
movss dword [rdi + 0x108], xmm0
movss dword [rdi + 0x10c], xmm1
movss dword [rdi + 0x10], xmm0
movss dword [rdi + 0x14], xmm1
movss xmm0, dword [rdi + 8]
lea rcx, [rsp + 0x30]
movss xmm1, dword [rdi + 0xc]
movss dword [rsp + 0x30], xmm0
addss xmm0, dword [rdi + 0x10]
movss dword [rsp + 0x34], xmm1
addss xmm1, dword [rdi + 0x14]
movss dword [rsp + 0x38], xmm0
movss dword [rsp + 0x3c], xmm1
call fcn.140023bb0
test dword [rdi + 4], 0x1000
lea rdx, [rdi + 0x70]
movsd xmm4, qword [rdi + 0x128]
movsd xmm3, qword [rdi + 0x130]
movaps xmm0, xmm4
movss xmm6, dword [rdi + 0xc]
movaps xmm2, xmm4
movss xmm5, dword [rdi + 8]
movaps xmm1, xmm6
shufps xmm0, xmm0, 0x55
addss xmm2, xmm5
addss xmm1, xmm0
mov word [rdi + 0x80], ax
movss xmm0, dword [rdi + 0x10]
subss xmm0, xmm4
mov qword [rdi + 0x130], r15
mov qword [rdi + 0x128], r15
movss dword [rdi + 0x18], xmm2
movaps xmm2, xmm8
movss dword [rdi + 0x1c], xmm1
movss xmm1, dword [rdi + 0x14]
addss xmm0, xmm3
movsd qword [rdi + 0x120], xmm3
movsd qword [rdi + 0x118], xmm4
maxss xmm2, xmm0
movaps xmm0, xmm4
shufps xmm0, xmm0, 0x55
subss xmm1, xmm0
movaps xmm0, xmm8
addss xmm1, dword [rdi + 0x124]
movss dword [rdi + 0x20], xmm2
mov dword [rdi + 0x78], 0x3f800000
maxss xmm0, xmm1
movss dword [rdi + 0x24], xmm0
subss xmm5, dword [rdx]
subss xmm6, dword [rdx + 4]
je 0x140022791
ucomiss xmm5, xmm8
jp 0x140022785
jne 0x140022785
ucomiss xmm6, xmm8
jp 0x140022785
je 0x140022791
lea r8, [rdi + 8]
mov rcx, rdi
call fcn.140021c40
mov rax, qword [rbx + 0x15d0]
test rax, rax
je 0x1400227ac
test sil, sil
je 0x1400227ac
mov rcx, rdi
call rax
movaps xmm7, xmm0
jmp 0x140022807
movsx rax, word [rdi + 0x80]
cmp ax, 0xffff
je 0x1400227f6
mov rsi, rax
test eax, eax
js 0x1400227c9
cmp esi, dword [rbx + 0x1618]
jl 0x1400227e3
mov r8d, 0x6c7
lea rdx, [0x140053c00]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x1620]
lea rcx, [rsi + rsi*8]
movss xmm7, dword [rax + rcx*4 + 0x20]
jmp 0x140022807
movss xmm7, dword [rdi + 0x28]
ucomiss xmm7, xmm8
jp 0x140022807
jne 0x140022807
movaps xmm7, xmm9
movss xmm0, dword [rdi + 0x28]
ucomiss xmm0, xmm8
jp 0x140022818
je 0x1400228e7
ucomiss xmm7, xmm0
jp 0x140022823
je 0x1400228e7
test dword [rbx + 8], 0x4000
movaps xmm6, xmm7
divss xmm6, xmm0
je 0x1400228e7
mov rcx, qword [rdi + 0x88]
mov r14, qword [0x1401010d0]
test rcx, rcx
je 0x140022857
movaps xmm1, xmm6
call fcn.14000d1e0
jmp 0x1400228e7
mov eax, dword [r14 + 0x1cb8]
mov ebp, r15d
mov rsi, r15
test eax, eax
je 0x1400228e7
test rsi, rsi
js 0x140022871
cmp ebp, eax
jl 0x14002288b
mov r8d, 0x6c7
lea rdx, [0x140053c00]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [r14 + 0x1cc0]
mov rcx, qword [rax + rsi*8]
cmp qword [rcx + 0x38], rdi
jne 0x1400228d7
test rsi, rsi
js 0x1400228aa
cmp ebp, dword [r14 + 0x1cb8]
jl 0x1400228c4
mov r8d, 0x6c7
lea rdx, [0x140053c00]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rcx, qword [r14 + 0x1cc0]
movaps xmm1, xmm6
mov rcx, qword [rcx + rsi*8]
call fcn.14000d1e0
mov eax, dword [r14 + 0x1cb8]
inc ebp
inc rsi
cmp ebp, eax
jne 0x140022868
movss dword [rdi + 0x28], xmm7
mov eax, dword [rbx + 0x1ef0]
inc r12d
mov ebp, dword [rsp + 0xd0]
add r13, 8
cmp r12d, eax
jl 0x1400223d8
movaps xmm9, xmmword [rsp + 0x40]
movaps xmm7, xmmword [rsp + 0x60]
movaps xmm6, xmmword [rsp + 0x70]
mov r14, qword [rsp + 0x88]
mov r13, qword [rsp + 0x90]
mov rdi, qword [rsp + 0xe8]
movaps xmm8, xmmword [rsp + 0x50]
mov r12, qword [rsp + 0x98]
cmp dword [rbx + 0x1618], r15d
jne 0x140022985
movsd xmm0, qword [rdi + 8]
movsd qword [rbx + 0x1f24], xmm0
movsd xmm1, qword [rdi + 0x10]
movsd qword [rbx + 0x1f2c], xmm1
movsd xmm0, qword [rdi + 0x18]
movsd qword [rbx + 0x1f34], xmm0
movsd xmm1, qword [rdi + 0x20]
movsd qword [rbx + 0x1f3c], xmm1
mov eax, dword [rdi + 0x28]
mov dword [rbx + 0x1f44], eax
test bpl, bpl
mov rbp, qword [rsp + 0xa8]
jne 0x14002299e
mov qword [rbx + 0x1f10], rdi
jmp 0x140022ae3
test dword [rbx + 0xc], 0x800
je 0x1400229de
mov ecx, dword [rbx + 0x138]
test ecx, ecx
je 0x140022a07
call fcn.1400217f0
mov rdi, rax
test rax, rax
je 0x1400229ed
test byte [rax + 4], 0x80
je 0x1400229ed
mov r8d, 0x2d9a
lea rdx, [0x140053e60]
lea rcx, [0x140053e28]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rcx, qword [rbx + 0x120]
call fcn.140022080
mov rdi, rax
lea rax, [rbx + 0x1f18]
mov rsi, rax
test rdi, rdi
je 0x140022a14
mov qword [rax], rdi
mov rcx, rdi
mov rax, rdi
jmp 0x140022a52
lea rax, [rbx + 0x1f18]
mov rdi, r15
mov rsi, rax
mov rax, qword [rax]
mov rcx, rax
test rax, rax
jne 0x140022a52
cmp dword [rbx + 0x1ef0], r15d
jg 0x140022a42
mov r8d, 0x6c7
lea rdx, [0x140053c00]
lea rcx, str.i___0__i___Size
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rax, qword [rbx + 0x1ef8]
mov rax, qword [rax]
mov qword [rsi], rax
mov rcx, rax
mov rdx, qword [rbx + 0x1d38]
test rdx, rdx
je 0x140022a62
mov rax, qword [rdx + 0x38]
mov qword [rbx + 0x1f10], rax
cmp byte [rbx + 0x20d4], r15b
je 0x140022a7c
test rdi, rdi
jne 0x140022aa9
mov rdi, rcx
jmp 0x140022aa4
cmp dword [rbx + 0x1d6c], r15d
je 0x140022aa4
mov rax, qword [0x1401010d0]
nop dword [rax]
cmp byte [rax + r15 + 0x128], 0
jne 0x140022abf
inc r15
cmp r15, 5
jl 0x140022a90
test rdi, rdi
je 0x140022abf
cmp rdi, qword [rbx + 0x1f10]
je 0x140022abf
test byte [rdi + 4], 0x80
jne 0x140022abf
mov qword [rbx + 0x1f10], rdi
cmp qword [rbx + 0x1f10], 0
jne 0x140022ae3
mov r8d, 0x2dbd
lea rdx, [0x140053e60]
lea rcx, str.g.MouseViewport___0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rsi, qword [rsp + 0xa0]
add rsp, 0xb0
pop r15
pop rdi
pop rbx
ret