Function at 0x140021930
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rdi
push r12
push r14
lea rbp, [rsp - 0x3f]
sub rsp, 0xd8
mov rax, qword [0x140111240]
xor rax, rsp
mov qword [rbp - 1], rax
mov r12, qword [0x140111720]
xor r14d, r14d
mov rdi, rcx
mov eax, dword [r12 + 0x1c90]
and byte [rcx + 0xbd], 0xfd
mov dword [rcx + 0xa0], eax
mov qword [rcx + 0x98], r14
mov qword [rcx + 0x90], r14
cmp qword [rcx + 0x10], r14
jne 0x140021aa7
call fcn.140023630
mov edx, r14d
mov ecx, r14d
mov qword [rbp - 0x11], rdx
mov dword [rbp - 9], ecx
cmp dword [rdi + 0x28], r14d
jle 0x1400219b2
mov rdx, rdi
mov ecx, 1
mov qword [rbp - 0x11], rdx
mov dword [rbp - 9], ecx
mov eax, dword [rdi + 8]
shr eax, 0xb
test al, 1
mov rax, r14
cmovne rax, rdi
mov qword [rbp - 0x19], rax
cmp ecx, 1
jle 0x1400219cf
test rax, rax
jne 0x140021a0f
mov r8, qword [rdi + 0x18]
test r8, r8
je 0x1400219ef
lea rdx, [rbp - 0x19]
mov rcx, r8
call fcn.14001ef20
mov ecx, dword [rbp - 9]
mov rdx, qword [rbp - 0x11]
mov rax, qword [rbp - 0x19]
mov r8, qword [rdi + 0x20]
test r8, r8
je 0x140021a0f
lea rdx, [rbp - 0x19]
mov rcx, r8
call fcn.14001ef20
mov ecx, dword [rbp - 9]
mov rdx, qword [rbp - 0x11]
mov rax, qword [rbp - 0x19]
mov qword [rdi + 0x90], rax
cmp ecx, 1
mov rax, r14
cmove rax, rdx
mov qword [rdi + 0x98], rax
cmp dword [rdi + 0xac], r14d
jne 0x140021a3d
test rdx, rdx
je 0x140021aa7
mov eax, dword [rdx]
mov dword [rdi + 0xac], eax
test rdx, rdx
je 0x140021aa7
mov rax, qword [rdx + 0x30]
mov r8d, 1
mov rcx, qword [rax]
movups xmm0, xmmword [rcx + 0x14]
movups xmmword [rdi + 0x5c], xmm0
movups xmm1, xmmword [rcx + 0x24]
movups xmmword [rdi + 0x6c], xmm1
movsxd rax, dword [rdx + 0x28]
cmp eax, r8d
jle 0x140021aa7
mov r10, qword [rdx + 0x30]
mov r9, rax
mov edx, r8d
lea rcx, [r10 + 8]
mov rax, qword [rcx]
cmp byte [rax + 0x31], r14b
je 0x140021a90
inc r8d
inc rdx
add rcx, 8
cmp rdx, r9
jl 0x140021a76
jmp 0x140021aa7
movsxd rax, r8d
mov rcx, qword [r10 + rax*8]
movups xmm0, xmmword [rcx + 0x14]
movups xmmword [rdi + 0x5c], xmm0
movups xmm1, xmmword [rcx + 0x24]
movups xmmword [rdi + 0x6c], xmm1
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x140021ac3
mov eax, dword [rdi + 8]
shr eax, 0xc
test al, 1
je 0x140021ac3
call fcn.140013910
mov qword [rdi + 0x38], r14
mov edx, dword [rdi + 0x28]
mov qword [rsp + 0x108], rbx
cmp edx, 1
jg 0x140021c1b
cmp qword [rdi + 0x10], r14
jne 0x140021c1b
test dword [rdi + 8], 0x400
jne 0x140021c1b
cmp qword [rdi + 0x18], r14
jne 0x140021c1b
cmp byte [r12 + 0xc9], r14b
jne 0x140021c1b
test edx, edx
je 0x140021bbd
mov rax, qword [rdi + 0x30]
mov rcx, qword [rax]
cmp byte [rcx + 0x30], r14b
jne 0x140021c1b
cmp edx, 1
jne 0x140021bbd
mov rbx, qword [rax]
mov eax, dword [rdi + 0xb8]
and eax, 0xfffffebf
bts eax, 7
movsd xmm0, qword [rbx + 0x50]
and eax, 0xffffffd7
or eax, 0x10
movsd qword [rdi + 0x40], xmm0
movsd xmm1, qword [rbx + 0x60]
and eax, 0xfffffffa
or eax, 2
movsd qword [rdi + 0x48], xmm1
mov dword [rdi + 0xb8], eax
mov rax, qword [rdi + 0x80]
test rax, rax
je 0x140021b7e
cmp qword [r12 + 0x1f50], rax
jne 0x140021b7e
mov rcx, rbx
call fcn.140026930
mov rax, qword [rdi + 0x80]
test rax, rax
je 0x140021bbd
mov rdx, qword [rax + 0x38]
mov qword [rbx + 0x38], rdx
mov rax, qword [rdi + 0x80]
mov ecx, dword [rax + 0x40]
mov dword [rbx + 0x40], ecx
mov rax, qword [rdi + 0x80]
cmp byte [rax + 0xce], r14b
je 0x140021bbd
mov qword [rdx + 0x88], rbx
mov byte [rbx + 0xce], 1
mov rcx, rdi
call fcn.14001efa0
movzx edx, byte [rdi + 0xbc]
and dl, 0xef
mov dword [rdi + 0xc], 1
and dl, 0xf3
mov dword [rdi + 0xb4], r14d
mov byte [rdi + 0xbc], dl
mov eax, dword [r12 + 0x1c90]
mov dword [rdi + 0xa4], eax
test dl, 0x40
je 0x14002256d
cmp dword [rdi + 0x28], 1
jne 0x14002256d
mov rdx, qword [rdi + 0x30]
mov rcx, rdi
mov rdx, qword [rdx]
call fcn.1400205f0
jmp 0x14002256d
test byte [rdi + 0xbc], 1
je 0x140021cad
cmp qword [rdi + 0x80], r14
jne 0x140021cad
cmp qword [rdi + 0x10], r14
jne 0x140021cad
test dword [rdi + 8], 0x400
jne 0x140021cad
cmp qword [rdi + 0x18], r14
jne 0x140021cad
mov r9d, dword [rdi + 0xb0]
test r9d, r9d
je 0x140021c88
mov r8d, dword [rdi + 0x28]
mov ecx, r14d
test r8d, r8d
jle 0x140021c88
mov rdx, qword [rdi + 0x30]
mov rax, qword [rdx]
cmp dword [rax + 8], r9d
je 0x140021c78
inc ecx
add rdx, 8
cmp ecx, r8d
jl 0x140021c62
jmp 0x140021c88
mov rax, qword [rdi + 0x30]
movsxd rcx, ecx
mov rdx, qword [rax + rcx*8]
test rdx, rdx
jne 0x140021c8f
mov rax, qword [rdi + 0x30]
mov rdx, qword [rax]
cmp byte [rdx + 0xe8], r14b
jg 0x140021ca1
cmp byte [rdx + 0xe9], r14b
jle 0x140021cad
mov dword [rdi + 0xc], 2
jmp 0x14002256d
mov ecx, dword [rdi + 8]
mov r8d, dword [rdi + 0x28]
mov qword [rsp + 0x110], rsi
mov qword [rsp + 0x118], r13
mov r13d, ecx
or r13d, dword [rdi + 4]
movaps xmmword [rsp + 0xa0], xmm9
test r8d, r8d
jle 0x140021cf8
bt r13d, 0xe
jb 0x140021cf8
movzx eax, byte [rdi + 0xbc]
mov r9d, r14d
and al, 0xf7
or al, 8
and al, 0xfb
mov byte [rdi + 0xbc], al
jmp 0x140021d11
movzx eax, byte [rdi + 0xbc]
mov r9d, r14d
and al, 0xf7
and al, 0xfb
mov byte [rdi + 0xbc], al
test r8d, r8d
jle 0x140021d74
mov r10, r14
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rdi + 0x30]
lea r10, [r10 + 8]
mov rdx, qword [r10 + rax - 8]
movzx eax, byte [rdi + 0xbc]
movzx ecx, byte [rdx + 0xd8]
shl cl, 2
or cl, al
and al, 0xfb
and cl, 4
xor cl, al
mov byte [rdi + 0xbc], cl
cmp r8d, 1
movzx eax, byte [rdx + 0x429]
setg cl
and al, 0xfe
or cl, al
inc r9d
mov byte [rdx + 0x429], cl
mov r8d, dword [rdi + 0x28]
cmp r9d, r8d
jl 0x140021d20
mov ecx, dword [rdi + 8]
bt r13d, 0xf
jae 0x140021d82
and byte [rdi + 0xbc], 0xfb
shr ecx, 0xa
mov rsi, r14
mov byte [rbp - 0x68], sil
xorps xmm9, xmm9
test cl, 1
je 0x140021da1
mov rsi, qword [rdi + 0x80]
jmp 0x140021feb
mov rax, qword [rdi + 0x10]
test rax, rax
jne 0x140021fb6
test byte [rdi + 0xbc], 1
je 0x140021fce
test r8d, r8d
jle 0x140021dc9
mov rax, qword [rdi + 0x30]
mov rdx, qword [rax]
jmp 0x140021dcc
mov rdx, r14
mov eax, dword [rdi + 0xb8]
shl eax, 0x1d
sar eax, 0x1d
cmp eax, 2
jne 0x140021df7
test rdx, rdx
je 0x140021e2f
mov rax, qword [0x140111720]
or dword [rax + 0x1dc0], 1
movsd xmm0, qword [rdx + 0x50]
jmp 0x140021e0f
cmp eax, 1
jne 0x140021e2f
mov rax, qword [0x140111720]
or dword [rax + 0x1dc0], 1
movsd xmm0, qword [rdi + 0x40]
mov byte [rax + 0x1dfc], 1
mov dword [rax + 0x1dc4], 1
mov qword [rax + 0x1ddc], r14
movsd qword [rax + 0x1dd4], xmm0
mov eax, dword [rdi + 0xb8]
shl eax, 0x1a
sar eax, 0x1d
cmp eax, 2
jne 0x140021e5a
test rdx, rdx
je 0x140021e84
mov rax, qword [0x140111720]
or dword [rax + 0x1dc0], 2
movsd xmm0, qword [rdx + 0x60]
jmp 0x140021e72
cmp eax, 1
jne 0x140021e84
mov rax, qword [0x140111720]
or dword [rax + 0x1dc0], 2
movsd xmm0, qword [rdi + 0x48]
mov dword [rax + 0x1dc8], 1
movsd qword [rax + 0x1de4], xmm0
mov eax, dword [rdi + 0xb8]
and al, 0x38
cmp al, 0x10
jne 0x140021eba
test rdx, rdx
je 0x140021eba
mov rcx, qword [0x140111720]
movzx eax, byte [rdx + 0xd2]
or dword [rcx + 0x1dc0], 8
mov byte [rcx + 0x1dfd], al
mov dword [rcx + 0x1dcc], 1
mov eax, dword [rdi + 0xb8]
and eax, 0x1c0
cmp eax, 0x80
jne 0x140021eeb
test rdx, rdx
je 0x140021eeb
mov rax, qword [0x140111720]
mov ecx, dword [rdx + 0x40]
or dword [rax + 0x1dc0], 0x100
mov dword [rax + 0x1e24], ecx
mov rax, qword [0x140111720]
lea r8, str.DockNode__02X
mov edx, reloc.WS2_32.dll_sendto
lea rcx, [rbp - 0x19]
or dword [rax + 0x1dc0], 0x400
movups xmm0, xmmword [rdi + 0x5c]
movups xmmword [rax + 0x1e2c], xmm0
movups xmm1, xmmword [rdi + 0x6c]
movups xmmword [rax + 0x1e3c], xmm1
mov r9d, dword [rdi]
call fcn.140027cc0
lea rdx, [rbp - 0x59]
mov qword [rbp - 0x59], rsi
mov ecx, 1
call fcn.14002f170
xor edx, edx
lea rcx, [rbp - 0x19]
mov r8d, 0x20081139
call fcn.140016c50
mov ecx, 1
call fcn.14002eac0
mov rsi, qword [r12 + 0x1d18]
mov qword [rdi + 0x80], rsi
mov byte [rbp - 0x68], 1
movss xmm0, dword [rsi + 0x50]
movss xmm1, dword [rsi + 0x54]
movss dword [rsi + 0x118], xmm0
movss dword [rsi + 0x11c], xmm1
mov qword [rsi + 0x450], rdi
mov rcx, qword [rdi + 0x80]
movss dword [rdi + 0x40], xmm0
movss dword [rdi + 0x44], xmm1
movsd xmm0, qword [rsi + 0x58]
movsd qword [rdi + 0x48], xmm0
cmp byte [rcx + 0xd5], r14b
je 0x140021fc4
call fcn.14001abb0
jmp 0x140021fc4
mov rsi, qword [rax + 0x80]
mov qword [rdi + 0x80], rsi
and dword [rdi + 0xb8], 0xfffffe00
test byte [rdi + 0xbc], 0x40
je 0x140021feb
mov rdx, qword [rdi + 0x80]
test rdx, rdx
je 0x140021feb
mov rcx, rdi
call fcn.1400205f0
cmp qword [rdi + 0x10], r14
jne 0x140022065
mov rax, qword [r12 + 0x1f50]
test rax, rax
je 0x140022022
mov rcx, qword [rax + 0x3d0]
mov rax, qword [rcx + 0x448]
test rax, rax
je 0x140022022
cmp qword [rcx + 0x3c8], rsi
jne 0x140022022
mov eax, dword [rax]
mov dword [rdi + 0xac], eax
test rsi, rsi
je 0x140022065
test r13b, 8
je 0x140022065
mov rdx, qword [rsi + 0x2f8]
mov r8d, 2
mov byte [rbp - 0x69], 1
lea rcx, [rdx + 0xa8]
call fcn.140041ae0
mov rdx, qword [rsi + 0x2f8]
mov r8d, 1
lea rcx, [rdx + 0xa8]
call fcn.1400419b0
jmp 0x140022069
mov byte [rbp - 0x69], r14b
cmp qword [rdi + 0x10], 0
mov r14, qword [rdi + 0x90]
mov qword [rsp + 0xd0], r15
jne 0x14002224e
test rsi, rsi
je 0x14002224e
test r13b, 8
je 0x14002224e
test r14, r14
je 0x14002224e
cmp qword [r14 + 0x18], 0
jne 0x14002224e
cmp dword [r14 + 0x28], 0
jne 0x14002224e
mov rax, qword [0x140111720]
mov r15b, 1
cmp byte [rax + 0x20d4], 0
lea rbx, [rax + 0x20e8]
mov eax, 0
cmove rbx, rax
test rbx, rbx
je 0x140022110
cmp dword [rbx + 0x14], 0xffffffff
je 0x140022110
lea rdx, [rbx + 0x18]
lea rcx, str._IMWINDOW
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x140022110
mov rdx, qword [rbx]
mov rcx, rsi
mov rdx, qword [rdx]
call fcn.14001f010
test al, al
je 0x140022110
mov rax, qword [rdi + 0x10]
jmp 0x14002225e
mov rax, qword [r14 + 0x10]
mov rcx, r14
movaps xmmword [rsp + 0xc0], xmm6
movaps xmmword [rsp + 0xb0], xmm7
test rax, rax
je 0x14002213c
nop dword [rax]
mov rcx, rax
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x140022130
movss xmm0, dword [rcx + 0x40]
movss xmm4, dword [r14 + 0x40]
movaps xmm6, xmm0
comiss xmm4, xmm0
movss xmm3, dword [r14 + 0x44]
movaps xmm2, xmm4
movss xmm7, dword [rcx + 0x44]
movaps xmm1, xmm3
addss xmm6, dword [rcx + 0x48]
addss xmm2, dword [r14 + 0x48]
addss xmm1, dword [r14 + 0x4c]
addss xmm7, dword [rcx + 0x4c]
movss xmm5, dword [0x1400ae8cc]
jbe 0x140022182
addss xmm4, xmm5
comiss xmm6, xmm2
movaps xmm6, xmmword [rsp + 0xc0]
jbe 0x140022193
subss xmm2, xmm5
comiss xmm3, dword [rcx + 0x44]
jbe 0x14002219d
addss xmm3, xmm5
comiss xmm7, xmm1
movaps xmm7, xmmword [rsp + 0xb0]
jbe 0x1400221ae
subss xmm1, xmm5
comiss xmm4, xmm2
ja 0x140022107
comiss xmm3, xmm1
ja 0x140022107
mov rcx, qword [rsi + 0x3c8]
subss xmm1, xmm3
subss xmm2, xmm4
movaps xmm0, xmm4
cvttss2si edx, xmm1
cvttss2si r8d, xmm2
mov word [rbp - 0x57], dx
movaps xmm1, xmm3
mov word [rbp - 0x59], r8w
mov eax, dword [rbp - 0x59]
mov dword [rsi + 0x2b0], eax
subss xmm0, dword [rsi + 0x50]
subss xmm1, dword [rsi + 0x54]
cvttss2si eax, xmm0
mov word [rbp - 0x59], ax
cvttss2si eax, xmm1
mov word [rbp - 0x57], ax
mov eax, dword [rbp - 0x59]
mov dword [rsi + 0x2b4], eax
mov word [rbp - 0x59], r8w
mov word [rbp - 0x57], dx
mov eax, dword [rbp - 0x59]
mov dword [rcx + 0x2b0], eax
subss xmm4, dword [rcx + 0x50]
subss xmm3, dword [rcx + 0x54]
cvttss2si eax, xmm4
mov word [rbp - 0x59], ax
cvttss2si eax, xmm3
mov word [rbp - 0x57], ax
mov eax, dword [rbp - 0x59]
mov dword [rcx + 0x2b4], eax
mov rax, qword [rdi + 0x10]
jmp 0x14002225e
mov rax, qword [rdi + 0x10]
xor r15b, r15b
test rsi, rsi
je 0x140022314
test rax, rax
jne 0x14002227e
mov r8, qword [rsi + 0x58]
xor r9d, r9d
mov rdx, qword [rsi + 0x50]
mov rcx, rdi
call fcn.140020e00
mov rcx, rdi
call fcn.140021140
cmp qword [rdi + 0x18], 0
jne 0x140022314
cmp dword [rdi + 0x28], 0
jne 0x140022314
test byte [rdi + 0xbc], 1
je 0x140022314
test r13b, 8
jne 0x140022314
mov rax, qword [0x140111720]
lea rcx, [rbp - 0x29]
movss xmm1, dword [rdi + 0x44]
addss xmm1, dword [rdi + 0x4c]
movups xmm0, xmmword [rax + 0x196c]
movups xmmword [rbp - 0x29], xmm0
shufps xmm0, xmm0, 0xff
mulss xmm0, dword [rax + 0x1638]
movss dword [rbp - 0x55], xmm1
movss dword [rbp - 0x1d], xmm0
movss xmm0, dword [rdi + 0x48]
addss xmm0, dword [rdi + 0x40]
movss dword [rbp - 0x59], xmm0
call fcn.14001c2f0
mov rcx, qword [rsi + 0x2f8]
lea r8, [rbp - 0x59]
xor r13d, r13d
lea rdx, [rdi + 0x40]
mov dword [rsp + 0x28], r13d
mov r9d, eax
movss dword [rsp + 0x20], xmm9
call fcn.14003b520
jmp 0x140022317
xor r13d, r13d
cmp byte [rbp - 0x69], 0
je 0x140022462
test byte [rdi + 0xbc], 1
je 0x140022462
mov rdx, qword [rsi + 0x2f8]
xor r8d, r8d
lea rcx, [rdx + 0xa8]
call fcn.1400419b0
mov rax, qword [0x140111720]
lea rcx, [rbp - 0x29]
test r15b, r15b
je 0x1400223ed
movss xmm0, dword [r14 + 0x40]
movss xmm1, dword [r14 + 0x44]
movss xmm2, dword [rdi + 0x44]
movss dword [rbp - 0x39], xmm0
addss xmm0, dword [r14 + 0x48]
movss dword [rbp - 0x35], xmm1
addss xmm1, dword [r14 + 0x4c]
movss dword [rbp - 0x55], xmm2
addss xmm2, dword [rdi + 0x4c]
movss dword [rbp - 0x31], xmm0
movss xmm0, dword [rdi + 0x40]
movss dword [rbp - 0x59], xmm0
addss xmm0, dword [rdi + 0x48]
movss dword [rbp - 0x2d], xmm1
movss dword [rbp - 0x4d], xmm2
movss dword [rbp - 0x51], xmm0
movups xmm0, xmmword [rax + 0x171c]
movups xmmword [rbp - 0x29], xmm0
shufps xmm0, xmm0, 0xff
mulss xmm0, dword [rax + 0x1638]
movss dword [rbp - 0x1d], xmm0
call fcn.14001c2f0
mov rcx, qword [rsi + 0x2f8]
lea r8, [rbp - 0x39]
mov r9d, eax
movss dword [rsp + 0x20], xmm9
lea rdx, [rbp - 0x59]
call fcn.140040ea0
jmp 0x14002244f
movss xmm0, dword [rdi + 0x48]
addss xmm0, dword [rdi + 0x40]
movss xmm1, dword [rdi + 0x44]
addss xmm1, dword [rdi + 0x4c]
movss dword [rbp - 0x39], xmm0
movss dword [rbp - 0x35], xmm1
movups xmm0, xmmword [rax + 0x171c]
movups xmmword [rbp - 0x29], xmm0
shufps xmm0, xmm0, 0xff
mulss xmm0, dword [rax + 0x1638]
movss dword [rbp - 0x1d], xmm0
call fcn.14001c2f0
mov rcx, qword [rsi + 0x2f8]
lea r8, [rbp - 0x39]
mov r9d, eax
mov dword [rsp + 0x28], r13d
lea rdx, [rdi + 0x40]
movss dword [rsp + 0x20], xmm9
call fcn.14003b520
mov rdx, qword [rsi + 0x2f8]
lea rcx, [rdx + 0xa8]
call fcn.14003eb80
movaps xmm9, xmmword [rsp + 0xa0]
mov r15, qword [rsp + 0xd0]
test rsi, rsi
je 0x14002248b
cmp dword [rdi + 0x28], 0
jle 0x14002248b
mov rdx, rsi
mov rcx, rdi
call fcn.140022590
jmp 0x1400224a3
movzx eax, byte [rdi + 0xbc]
and al, 0xef
mov dword [rdi + 0xb4], r13d
and al, 0xfd
mov byte [rdi + 0xbc], al
mov rax, qword [rdi + 0x38]
mov r13, qword [rsp + 0x118]
test rax, rax
je 0x1400224c3
mov ecx, dword [rax + 0x18]
test ecx, ecx
je 0x1400224c3
mov dword [rdi + 0xb0], ecx
jmp 0x1400224d9
cmp dword [rdi + 0x28], 0
jle 0x1400224d9
mov rax, qword [rdi + 0x30]
mov rcx, qword [rax]
mov eax, dword [rcx + 8]
mov dword [rdi + 0xb0], eax
test rsi, rsi
je 0x14002251c
test byte [rdi + 0xbc], 1
je 0x14002251c
cmp qword [rdi + 0x10], 0
jne 0x14002251c
mov rax, qword [r12 + 0x1d38]
test rax, rax
je 0x140022504
cmp qword [rax + 0x3d8], rsi
je 0x14002251c
mov rcx, rsi
call fcn.140019b00
mov eax, dword [r12 + 0x1c90]
mov dword [rdi + 0xa4], eax
jmp 0x14002252f
mov eax, dword [r12 + 0x1c90]
mov dword [rdi + 0xa4], eax
test rsi, rsi
je 0x14002255a
mov rcx, qword [rdi + 0x18]
test rcx, rcx
je 0x14002253d
call fcn.140021930
mov rcx, qword [rdi + 0x20]
test rcx, rcx
je 0x14002254b
call fcn.140021930
cmp qword [rdi + 0x10], 0
jne 0x14002255a
mov rcx, rsi
call fcn.140031cf0
cmp byte [rbp - 0x68], 0
mov rsi, qword [rsp + 0x110]
je 0x14002256d
call fcn.140024650
mov rbx, qword [rsp + 0x108]
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.1400a9be0
add rsp, 0xd8
pop r14
pop r12
pop rdi
pop rbp
ret