Function at 0x140020aa0
Capabilities:
Encode data using xor

Disassembly:
mov r11, rsp
push rbp
push rdi
sub rsp, 0x78
mov rax, qword [0x140194020]
xor rax, rsp
mov qword [rsp + 0x38], rax
movzx eax, byte [rdx]
mov rbp, rdx
mov rdi, rcx
cmp eax, 8
ja case.default.0x140020af3
mov qword [r11 + 0x18], rbx
lea rcx, [0x140000000]
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 + 0x212e4]
add rdx, rcx
jmp rdx
mov rax, qword [rbp + 8]
mov rcx, qword [rdi]
cmp qword [rax + 8], 0
mov r9, qword [rcx]
jne 0x140020b1c
mov r8d, 2
lea rdx, [0x140140b74]
call qword [r9 + reloc.WS2_32.dll_htonl]
jmp 0x140021256
test r8b, r8b
je 0x140020d4d
mov r8d, 2
lea rdx, [0x140140b78]
call qword [r9 + reloc.WS2_32.dll_htonl]
mov r15d, dword [rsp + 0xb0]
mov r14d, dword [rsp + 0xb8]
mov rcx, qword [rdi + 0x270]
lea r12d, [r15 + r14]
mov r13d, r12d
cmp rcx, r13
jae 0x140020b9e
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
lea rcx, [rdi + 0x260]
mov rdx, qword [rcx + 0x10]
cmp rax, rdx
ja 0x140020b90
mov qword [rcx + 0x10], rax
cmp qword [rcx + 0x18], 0x10
jb 0x140020b8a
mov rcx, qword [rcx]
mov byte [rcx + rax], 0
jmp 0x140020b9e
sub rax, rdx
mov r8b, reloc.WLDAP32.dll_Ordinal_32
mov rdx, rax
call fcn.140012ce0
mov rax, qword [rbp + 8]
xor esi, esi
mov rbx, qword [rax]
mov rax, qword [rax + 8]
mov rbx, qword [rbx]
cmp rax, 1
je 0x140020cb3
nop dword [rax + rax]
cmp qword [rdi + 0x278], 0x10
lea rdx, [rdi + 0x260]
mov rcx, qword [rdi]
jb 0x140020bdb
mov rdx, qword [rdi + 0x260]
mov rax, qword [rcx]
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]
mov rcx, rdi
call fcn.140021a60
mov rcx, qword [rdi]
lea rdx, [0x140140b7c]
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.140020aa0
mov rcx, qword [rdi]
lea rdx, [0x140140b80]
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 0x140020c78
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x140020c73
nop dword [rax]
cmp rbx, qword [rax + 0x10]
jne 0x140020c73
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140020c60
mov rbx, rax
jmp 0x140020c9f
mov rcx, qword [rax]
mov rbx, rax
cmp byte [rcx + 0x19], 0
jne 0x140020c9f
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rcx]
mov rbx, rcx
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x140020c90
mov rax, qword [rbp + 8]
mov rcx, qword [rax + 8]
dec rcx
cmp rsi, rcx
jb 0x140020bc0
mov rcx, qword [rdi]
lea rsi, [rdi + 0x260]
cmp qword [rsi + 0x18], 0x10
mov rdx, rsi
jb 0x140020cca
mov rdx, qword [rsi]
mov rax, qword [rcx]
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]
mov rcx, rdi
call fcn.140021a60
mov rcx, qword [rdi]
lea rdx, [0x140140b7c]
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.140020aa0
mov rcx, qword [rdi]
mov dl, 0xa
mov rax, qword [rcx]
call qword [rax]
cmp qword [rsi + 0x18], 0x10
mov rcx, qword [rdi]
jb 0x140020d32
mov rsi, qword [rsi]
mov rax, qword [rcx]
mov rdx, rsi
mov r8d, r14d
call qword [rax + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi]
mov dl, 0x7d
mov rax, qword [rcx]
call qword [rax]
jmp 0x140021256
mov dl, 0x7b
call qword [r9]
mov rax, qword [rbp + 8]
xor esi, esi
mov r14d, dword [rsp + 0xb8]
mov r15d, dword [rsp + 0xb0]
cmp qword [rax + 8], 1
mov rbx, qword [rax]
mov rbx, qword [rbx]
je 0x140020e43
nop dword [rax]
mov rcx, qword [rdi]
mov dl, Ordinal_35
mov rax, qword [rcx]
call qword [rax]
lea rdx, [rbx + 0x20]
mov rcx, rdi
call fcn.140021a60
mov rcx, qword [rdi]
lea rdx, [0x140140b84]
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.140020aa0
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 0x140020e08
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x140020e03
nop dword [rax]
cmp rbx, qword [rax + 0x10]
jne 0x140020e03
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140020df0
mov rbx, rax
jmp 0x140020e2f
mov rcx, qword [rax]
mov rbx, rax
cmp byte [rcx + 0x19], 0
jne 0x140020e2f
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rcx]
mov rbx, rcx
mov rcx, rax
cmp byte [rax + 0x19], 0
je 0x140020e20
mov rax, qword [rbp + 8]
mov rcx, qword [rax + 8]
dec rcx
cmp rsi, rcx
jb 0x140020d80
mov rcx, qword [rdi]
mov dl, Ordinal_35
mov rax, qword [rcx]
call qword [rax]
lea rdx, [rbx + 0x20]
mov rcx, rdi
call fcn.140021a60
mov rcx, qword [rdi]
lea rdx, [0x140140b84]
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.140020aa0
mov rcx, qword [rdi]
mov dl, 0x7d
mov rax, qword [rcx]
call qword [rax]
jmp 0x140021256
mov rdx, qword [rbp + 8]
mov rcx, qword [rdi]
mov rax, qword [rdx + 8]
mov r9, qword [rcx]
cmp qword [rdx], rax
jne 0x140020ec3
mov r8d, 2
lea rdx, [0x140140b88]
call qword [r9 + reloc.WS2_32.dll_htonl]
jmp 0x140021256
test r8b, r8b
je 0x140021040
mov r8d, 2
lea rdx, [0x140140b8c]
call qword [r9 + reloc.WS2_32.dll_htonl]
mov r14d, dword [rsp + 0xb0]
mov r13d, dword [rsp + 0xb8]
mov rcx, qword [rdi + 0x270]
lea r15d, [r14 + r13]
mov r12d, r15d
cmp rcx, r12
jae 0x140020f45
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
lea rcx, [rdi + 0x260]
mov rdx, qword [rcx + 0x10]
cmp rax, rdx
ja 0x140020f37
mov qword [rcx + 0x10], rax
cmp qword [rcx + 0x18], 0x10
jb 0x140020f31
mov rcx, qword [rcx]
mov byte [rcx + rax], 0
jmp 0x140020f45
sub rax, rdx
mov r8b, reloc.WLDAP32.dll_Ordinal_32
mov rdx, rax
call fcn.140012ce0
mov rax, qword [rbp + 8]
mov rcx, qword [rax + 8]
mov rbx, qword [rax]
sub rcx, 0x10
cmp rbx, rcx
je 0x140020fca
nop dword [rax]
cmp qword [rdi + 0x278], 0x10
lea rdx, [rdi + 0x260]
mov rcx, qword [rdi]
jb 0x140020f7b
mov rdx, qword [rdi + 0x260]
mov rax, qword [rcx]
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.140020aa0
mov rcx, qword [rdi]
lea rdx, [0x140140b80]
mov r8d, 2
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rax, qword [rbp + 8]
add rbx, 0x10
mov rcx, qword [rax + 8]
sub rcx, 0x10
cmp rbx, rcx
jne 0x140020f60
mov rcx, qword [rdi]
lea rbx, [rdi + 0x260]
cmp qword [rbx + 0x18], 0x10
mov rdx, rbx
jb 0x140020fe1
mov rdx, qword [rbx]
mov rax, qword [rcx]
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.140020aa0
mov rcx, qword [rdi]
mov dl, 0xa
mov rax, qword [rcx]
call qword [rax]
cmp qword [rbx + 0x18], 0x10
mov rcx, qword [rdi]
jb 0x140021025
mov rbx, qword [rbx]
mov rax, qword [rcx]
mov r8, r13
mov rdx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi]
mov dl, 0x5d
mov rax, qword [rcx]
call qword [rax]
jmp 0x140021256
mov dl, 0x5b
call qword [r9]
mov rdx, qword [rbp + 8]
mov esi, dword [rsp + 0xb8]
mov r14d, dword [rsp + 0xb0]
mov rax, qword [rdx + 8]
mov rbx, qword [rdx]
sub rax, 0x10
cmp rbx, rax
je 0x1400210a9
nop dword [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.140020aa0
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 0x140021070
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.140020aa0
mov rcx, qword [rdi]
mov dl, 0x5d
mov rax, qword [rcx]
call qword [rax]
jmp 0x140021256
mov rcx, qword [rdi]
mov dl, Ordinal_35
mov rax, qword [rcx]
call qword [rax]
mov rdx, qword [rbp + 8]
mov rcx, rdi
call fcn.140021a60
mov rcx, qword [rdi]
mov dl, Ordinal_35
mov rax, qword [rcx]
call qword [rax]
jmp 0x140021256
cmp byte [rbp + 8], 0
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov r9, qword [rax + 8]
je 0x140021121
mov r8d, 4
lea rdx, [0x14013dd5c]
call r9
jmp 0x140021256
mov r8d, 5
lea rdx, [0x14013dd68]
call r9
jmp 0x140021256
mov r9, qword [rbp + 8]
test r9, r9
je 0x1400211b0
mov r10, r9
lea rbx, [rdi + 0x10]
shr r10, 0x3f
movabs r11, 0x6666666666666667
xor esi, esi
nop word [rax + rax]
mov rax, r11
imul r9
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 [rsi + rbx], al
inc rsi
test r8, r8
jne 0x140021160
test r10b, r10b
je 0x1400211fe
mov byte [rdi + rsi + 0x10], reloc.WLDAP32.dll_Ordinal_45
inc rsi
jmp 0x1400211fe
mov r8, qword [rbp + 8]
test r8, r8
jne 0x1400211bf
mov rcx, qword [rdi]
mov dl, 0x30
mov rax, qword [rcx]
call qword [rax]
jmp 0x140021256
xor esi, esi
lea rbx, [rdi + 0x10]
movabs r10, 0xcccccccccccccccd
nop
mov rax, r10
mul r8
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 [rsi + rbx], al
inc rsi
test r9, r9
jne 0x1400211d0
lea rdx, [rsi + rbx]
mov rcx, rbx
call fcn.1400acca4
mov rcx, qword [rdi]
mov r8, rsi
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x140021256
movaps xmmword [rsp + 0x40], xmm6
lea rcx, [rsp + 0x30]
movsd xmm6, qword [rbp + 8]
movsd qword [rsp + 0x30], xmm6
call qword [sym.imp.api_ms_win_crt_math_l1_1_0.dll__dtest]
test ax, ax
jle 0x14002128b
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 + 0x40]
mov r14, qword [rsp + 0x58]
mov r13, qword [rsp + 0x60]
mov r12, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rbx, qword [rsp + 0xa0]
mov r15, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400acdf0
add rsp, 0x78
pop rdi
pop rbp
ret
lea rbx, [rdi + 0x10]
movaps xmm2, xmm6
mov rcx, rbx
call fcn.1400229c0
mov rcx, qword [rdi]
sub rax, rbx
mov r8, rax
mov rdx, rbx
mov r9, qword [rcx]
call qword [r9 + reloc.WS2_32.dll_htonl]
jmp 0x140021251
mov rcx, qword [rdi]
lea rdx, str._discarded_
mov r8d, recv
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x140021256
mov rcx, qword [rdi]
lea rdx, str.null
mov r8d, 4
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x140021256