Function at 0x180018440
Capabilities:
Encode data using xor

Disassembly:
mov r11, rsp
push rbp
push rdi
sub rsp, 0xd8
movzx eax, byte [rdx]
mov rbp, rdx
mov rdi, rcx
cmp eax, 8
ja case.default.0x180018487
mov qword [r11 + 0x18], rbx
lea rcx, [0x180000000]
mov qword [r11 - 0x18], rsi
mov qword [r11 - 0x20], r12
mov qword [r11 - 0x28], r13
mov qword [r11 - 0x30], r14
mov qword [r11 - 0x38], r15
mov edx, dword [rcx + rax*4 + 0x18d4c]
add rdx, rcx
jmp rdx
mov rax, qword [rbp + 8]
mov rcx, qword [rdi]
cmp qword [rax + 8], 0
mov rax, qword [rcx]
jne 0x1800184af
mov r8d, 2
lea rdx, [0x18015bb74]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x180018c18
test r8b, r8b
je 0x18001870e
mov r8d, 2
lea rdx, [0x18015bb78]
call qword [rax + reloc.WS2_32.dll_htonl]
mov r12d, dword [rsp + 0x118]
mov r15d, dword [rsp + 0x110]
add r12d, r15d
mov rcx, qword [rdi + 0x270]
mov r13d, r12d
cmp rcx, r13
jae 0x180018571
mov eax, 2
lea rbx, [rdi + 0x260]
mul rcx
mov rcx, 0xffffffffffffffff
lea r8, [rbx + 0x10]
mov rsi, rax
cmovo rsi, rcx
mov rcx, qword [r8]
cmp rsi, rcx
ja 0x18001852a
cmp qword [rbx + 0x18], 0x10
jb 0x180018521
mov rbx, qword [rbx]
mov qword [r8], rsi
mov byte [rsi + rbx], 0
jmp 0x180018571
mov r9, qword [rbx + 0x18]
mov rdx, rsi
mov rax, r9
sub rdx, rcx
sub rax, rcx
cmp rdx, rax
ja 0x180018561
mov qword [r8], rsi
cmp r9, 0x10
jb 0x18001854b
mov rbx, qword [rbx]
mov r8, rdx
add rcx, rbx
mov edx, reloc.WLDAP32.dll_Ordinal_32
call sub.VCRUNTIME140.dll_memset
mov byte [rsi + rbx], 0
jmp 0x180018571
mov r9, rdx
mov byte [rsp + reloc.WLDAP32.dll_Ordinal_32], 0x20
mov rcx, rbx
call fcn.180019a60
mov rax, qword [rbp + 8]
lea r14, [rdi + 0x260]
xor esi, esi
cmp qword [rax + 8], 1
mov rbx, qword [rax]
mov rbx, qword [rbx]
je 0x180018673
nop
cmp qword [r14 + 0x18], 0x10
mov rdx, r14
mov rcx, qword [rdi]
mov rax, qword [rcx]
jb 0x1800185a3
mov rdx, qword [r14]
mov r8, r13
call qword [rax + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi]
mov dl, Ordinal_35
mov rax, qword [rcx]
call qword [rax]
lea rdx, [rbx + 0x20]
xor r8d, r8d
mov rcx, rdi
call fcn.1800191f0
mov rcx, qword [rdi]
lea rdx, [0x18015bb7c]
mov r8d, 3
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
lea rdx, [rbx + 0x40]
mov dword [rsp + 0x28], r12d
xor r9d, r9d
mov dword [rsp + 0x20], r15d
mov r8b, 1
mov rcx, rdi
call fcn.180018440
mov rcx, qword [rdi]
lea rdx, [0x18015bb80]
mov r8d, 2
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rax, qword [rbx + 0x10]
inc rsi
cmp byte [rax + 0x19], 0
je 0x180018639
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x180018634
cmp rbx, qword [rax + 0x10]
jne 0x180018634
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x180018621
mov rbx, rax
jmp 0x18001865f
mov rcx, qword [rax]
mov rbx, rax
cmp byte [rcx + 0x19], 0
jne 0x18001865f
nop word [rax + rax]
mov rax, qword [rcx]
mov rbx, rcx
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x180018650
mov rax, qword [rbp + 8]
mov rcx, qword [rax + 8]
dec rcx
cmp rsi, rcx
jb 0x180018590
cmp qword [r14 + 0x18], 0x10
mov rdx, r14
mov rcx, qword [rdi]
mov rax, qword [rcx]
jb 0x180018686
mov rdx, qword [r14]
mov r8, r13
call qword [rax + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi]
mov dl, Ordinal_35
mov rax, qword [rcx]
call qword [rax]
lea rdx, [rbx + 0x20]
xor r8d, r8d
mov rcx, rdi
call fcn.1800191f0
mov rcx, qword [rdi]
lea rdx, [0x18015bb7c]
mov r8d, 3
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
lea rdx, [rbx + 0x40]
mov dword [rsp + 0x28], r12d
xor r9d, r9d
mov dword [rsp + 0x20], r15d
mov r8b, 1
mov rcx, rdi
call fcn.180018440
mov rcx, qword [rdi]
mov dl, 0xa
mov rax, qword [rcx]
call qword [rax]
cmp qword [r14 + 0x18], 0x10
mov rcx, qword [rdi]
mov rax, qword [rcx]
jb 0x1800186f1
mov r14, qword [r14]
mov r8d, dword [rsp + 0x118]
mov rdx, r14
call qword [rax + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi]
mov dl, 0x7d
mov rax, qword [rcx]
call qword [rax]
jmp 0x180018c18
mov dl, 0x7b
call qword [rax]
mov rax, qword [rbp + 8]
xor esi, esi
mov r14d, dword [rsp + 0x118]
mov r15d, dword [rsp + 0x110]
cmp qword [rax + 8], 1
mov rbx, qword [rax]
mov rbx, qword [rbx]
je 0x180018803
nop dword [rax]
mov rcx, qword [rdi]
mov dl, Ordinal_35
mov rax, qword [rcx]
call qword [rax]
lea rdx, [rbx + 0x20]
xor r8d, r8d
mov rcx, rdi
call fcn.1800191f0
mov rcx, qword [rdi]
lea rdx, [0x18015bb84]
mov r8d, 2
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
lea rdx, [rbx + 0x40]
mov dword [rsp + 0x28], r14d
xor r9d, r9d
mov dword [rsp + 0x20], r15d
xor r8d, r8d
mov rcx, rdi
call fcn.180018440
mov rcx, qword [rdi]
mov dl, Ordinal_45
mov rax, qword [rcx]
call qword [rax]
mov rax, qword [rbx + 0x10]
inc rsi
cmp byte [rax + 0x19], 0
je 0x1800187c8
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x1800187c3
nop dword [rax]
cmp rbx, qword [rax + 0x10]
jne 0x1800187c3
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x1800187b0
mov rbx, rax
jmp 0x1800187ef
mov rcx, qword [rax]
mov rbx, rax
cmp byte [rcx + 0x19], 0
jne 0x1800187ef
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rcx]
mov rbx, rcx
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x1800187e0
mov rax, qword [rbp + 8]
mov rcx, qword [rax + 8]
dec rcx
cmp rsi, rcx
jb 0x180018740
mov rcx, qword [rdi]
mov dl, Ordinal_35
mov rax, qword [rcx]
call qword [rax]
lea rdx, [rbx + 0x20]
xor r8d, r8d
mov rcx, rdi
call fcn.1800191f0
mov rcx, qword [rdi]
lea rdx, [0x18015bb84]
mov r8d, 2
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
lea rdx, [rbx + 0x40]
mov dword [rsp + 0x28], r14d
xor r9d, r9d
mov dword [rsp + 0x20], r15d
xor r8d, r8d
mov rcx, rdi
call fcn.180018440
mov rcx, qword [rdi]
mov dl, 0x7d
mov rax, qword [rcx]
call qword [rax]
jmp 0x180018c18
mov rdx, qword [rbp + 8]
mov rcx, qword [rdi]
mov rax, qword [rdx + 8]
cmp qword [rdx], rax
mov rax, qword [rcx]
jne 0x180018885
mov r8d, 2
lea rdx, [0x18015bb88]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x180018c18
test r8b, r8b
je 0x1800189ce
mov r8d, 2
lea rdx, [0x18015bb8c]
call qword [rax + reloc.WS2_32.dll_htonl]
mov r14d, dword [rsp + 0x110]
lea rsi, [rdi + 0x260]
mov r13d, dword [rsp + 0x118]
mov rcx, qword [rdi + 0x270]
lea r15d, [r14 + r13]
mov r12d, r15d
cmp rcx, r12
jae 0x1800188e9
mov eax, 2
mov r8b, reloc.WLDAP32.dll_Ordinal_32
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rsi
mov rdx, rax
call fcn.1800181d0
mov rax, qword [rbp + 8]
mov rcx, qword [rax + 8]
mov rbx, qword [rax]
sub rcx, 0x10
cmp rbx, rcx
je 0x18001895f
nop dword [rax]
cmp qword [rsi + 0x18], 0x10
mov rdx, rsi
mov rcx, qword [rdi]
mov rax, qword [rcx]
jb 0x180018913
mov rdx, qword [rsi]
mov r8, r12
call qword [rax + reloc.WS2_32.dll_htonl]
xor r9d, r9d
mov dword [rsp + 0x28], r15d
mov r8b, 1
mov dword [rsp + 0x20], r14d
mov rdx, rbx
mov rcx, rdi
call fcn.180018440
mov rcx, qword [rdi]
lea rdx, [0x18015bb80]
mov r8d, 2
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rax, qword [rbp + 8]
add rbx, 0x10
mov rax, qword [rax + 8]
sub rax, 0x10
cmp rbx, rax
jne 0x180018900
cmp qword [rsi + 0x18], 0x10
mov rdx, rsi
mov rcx, qword [rdi]
mov rax, qword [rcx]
jb 0x180018972
mov rdx, qword [rsi]
mov r8, r12
call qword [rax + reloc.WS2_32.dll_htonl]
mov rax, qword [rbp + 8]
xor r9d, r9d
mov dword [rsp + 0x28], r15d
mov r8b, 1
mov rcx, rdi
mov dword [rsp + 0x20], r14d
mov rdx, qword [rax + 8]
sub rdx, 0x10
call fcn.180018440
mov rcx, qword [rdi]
mov dl, 0xa
mov rax, qword [rcx]
call qword [rax]
cmp qword [rsi + 0x18], 0x10
mov rcx, qword [rdi]
mov rax, qword [rcx]
jb 0x1800189b6
mov rsi, qword [rsi]
mov r8, r13
mov rdx, rsi
call qword [rax + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi]
mov dl, 0x5d
mov rax, qword [rcx]
call qword [rax]
jmp 0x180018c18
mov dl, 0x5b
call qword [rax]
mov rdx, qword [rbp + 8]
mov esi, dword [rsp + 0x118]
mov r14d, dword [rsp + 0x110]
mov rax, qword [rdx + 8]
mov rbx, qword [rdx]
sub rax, 0x10
cmp rbx, rax
je 0x180018a39
nop word [rax + rax]
mov dword [rsp + 0x28], esi
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], r14d
mov rdx, rbx
mov rcx, rdi
call fcn.180018440
mov rcx, qword [rdi]
mov dl, Ordinal_45
mov rax, qword [rcx]
call qword [rax]
mov rdx, qword [rbp + 8]
add rbx, 0x10
mov rax, qword [rdx + 8]
sub rax, 0x10
cmp rbx, rax
jne 0x180018a00
mov rdx, qword [rdx + 8]
xor r9d, r9d
sub rdx, 0x10
mov dword [rsp + 0x28], esi
xor r8d, r8d
mov dword [rsp + 0x20], r14d
mov rcx, rdi
call fcn.180018440
mov rcx, qword [rdi]
mov dl, 0x5d
mov rax, qword [rcx]
call qword [rax]
jmp 0x180018c18
mov rcx, qword [rdi]
mov dl, Ordinal_35
mov rax, qword [rcx]
call qword [rax]
mov rdx, qword [rbp + 8]
xor r8d, r8d
mov rcx, rdi
call fcn.1800191f0
mov rcx, qword [rdi]
mov dl, Ordinal_35
mov rax, qword [rcx]
call qword [rax]
jmp 0x180018c18
cmp byte [rbp + 8], 0
mov rcx, qword [rdi]
mov rax, qword [rcx]
je 0x180018ab0
mov r8d, 4
lea rdx, str.true
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x180018c18
mov r8d, 5
lea rdx, str.false
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x180018c18
mov r9, qword [rbp + 8]
test r9, r9
je 0x180018b63
mov r11, r9
lea rbx, [rdi + 0x10]
shr r11, 0x3f
mov r10, rbx
xor esi, esi
movabs rbp, 0x6666666666666667
nop dword [rax]
mov rax, rbp
lea r10, [r10 + 1]
imul r9
inc rsi
mov r8, rdx
sar r8, 2
mov rcx, r8
shr rcx, 0x3f
add r8, rcx
lea ecx, [r8 + r8*4]
add ecx, ecx
sub r9d, ecx
mov eax, r9d
mov r9, r8
cdq
xor eax, edx
sub eax, edx
add al, 0x30
mov byte [r10 - 1], al
test r8, r8
jne 0x180018af0
test r11b, r11b
je 0x180018b3a
mov byte [rdi + rsi + 0x10], reloc.WLDAP32.dll_Ordinal_45
inc rsi
lea rdx, [rbx + rsi]
mov rcx, rbx
call fcn.1800f17e0
mov rcx, qword [rdi]
mov r8, rsi
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x180018c18
mov r8, qword [rbp + 8]
test r8, r8
jne 0x180018b72
mov rcx, qword [rdi]
mov dl, 0x30
mov rax, qword [rcx]
call qword [rax]
jmp 0x180018c18
lea rbx, [rdi + 0x10]
xor esi, esi
mov r10, rbx
movabs r11, 0xcccccccccccccccd
nop word [rax + rax]
mov rax, r11
lea r10, [r10 + 1]
mul r8
inc rsi
mov r9, rdx
shr r9, 3
lea ecx, [r9 + r9*4]
add ecx, ecx
sub r8d, ecx
mov eax, r8d
mov r8, r9
cdq
xor eax, edx
sub eax, edx
add al, 0x30
mov byte [r10 - 1], al
test r9, r9
jne 0x180018b90
lea rdx, [rsi + rbx]
mov rcx, rbx
call fcn.1800f17e0
mov rcx, qword [rdi]
mov r8, rsi
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x180018c18
movaps xmmword [rsp + 0xa0], xmm6
movsd xmm6, qword [rbp + 8]
movaps xmm0, xmm6
call sub.api_ms_win_crt_math_l1_1_0.dll__dclass
test ax, ax
jle 0x180018c52
mov rcx, qword [rdi]
lea rdx, str.null
mov r8d, 4
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
movaps xmm6, xmmword [rsp + 0xa0]
mov r14, qword [rsp + 0xb8]
mov r13, qword [rsp + 0xc0]
mov r12, qword [rsp + 0xc8]
mov rsi, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0x100]
mov r15, qword [rsp + 0xb0]
add rsp, 0xd8
pop rdi
pop rbp
ret
lea r14, [rdi + 0x10]
movaps xmm0, xmm6
mov rbx, r14
call qword [sym.imp.api_ms_win_crt_math_l1_1_0.dll__dsign]
test eax, eax
je 0x180018c75
xorps xmm6, xmmword [0x1801852a0]
lea rbx, [r14 + 1]
mov byte [r14], reloc.WLDAP32.dll_Ordinal_45
xorps xmm0, xmm0
ucomisd xmm6, xmm0
jp 0x180018c8f
jne 0x180018c8f
mov word [rbx], 0x2e30
lea rax, [rbx + 3]
mov byte [rbx + 2], Ordinal_50
jmp 0x180018cfc
xor esi, esi
lea rcx, [rsp + 0x70]
movaps xmm1, xmm6
mov dword [rsp + 0x34], esi
mov dword [rsp + 0x30], esi
call fcn.18001a020
lea r9, [rsp + 0x60]
mov rcx, rbx
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x34]
movups xmm2, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movups xmm0, xmmword [rax + 0x20]
lea rax, [rsp + 0x40]
movaps xmmword [rsp + 0x50], xmm2
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
movaps xmmword [rsp + 0x40], xmm0
movaps xmmword [rsp + 0x60], xmm1
call fcn.180010070
mov r8d, dword [rsp + 0x30]
mov rcx, rbx
mov edx, dword [rsp + 0x34]
call fcn.1800102c0
mov rcx, qword [rdi]
sub rax, r14
mov r8, rax
mov rdx, r14
mov r9, qword [rcx]
call qword [r9 + reloc.WS2_32.dll_htonl]
jmp 0x180018c10
mov rcx, qword [rdi]
lea rdx, str._discarded_
mov r8d, ntohl
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x180018c18
mov rcx, qword [rdi]
lea rdx, str.null
mov r8d, 4
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x180018c18