Function at 0x140049220
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov r15d, r8d
mov r14, rdx
mov r8, qword [rcx + 0x50]
mov rsi, rcx
mov rdx, qword [rcx + 0x58]
mov edi, 0x1238
xor r12d, r12d
mov r9d, edi
add rcx, 0x40
mov byte [rax - 0x38], r12b
call fcn.140005804
mov qword [rsi + 0x58], rax
lea rcx, [rsi + 0x20]
mov qword [rsi + 0x50], rdi
mov ebp, r15d
mov qword [rsi + 0x48], r12
shr ebp, 2
mov byte [rsp + 0x20], r12b
lea eax, [rbp + 6]
mov dword [rsi + 0x18], eax
lea eax, [rax*4 + 4]
mov r8, qword [rsi + 0x30]
mov rdx, qword [rsi + 0x38]
mov r9d, eax
mov ebx, eax
call fcn.1400486b4
mov qword [rsi + 0x38], rax
movabs rax, 0x3fffffffffffffff
mov qword [rsi + 0x28], rax
mov qword [rsi + 0x30], rbx
mov al, byte [0x140078ec8]
mov rdi, qword [rsi + 0x38]
test al, al
jne 0x1400492ce
call fcn.140050e80
mov al, byte [0x140078ec8]
cmp byte [0x140078ece], r12b
je 0x14004931a
test al, al
jne 0x1400492e0
call fcn.140050e80
cmp byte [0x140078ecb], r12b
je 0x14004931a
mov rdx, r15
mov r8, rdi
mov rcx, r14
call fcn.140051e14
lea rcx, [rsi + 8]
mov rax, qword [rcx]
call qword [rax + 0x40]
test al, al
jne 0x140049bc0
mov edx, dword [rsi + 0x18]
mov rcx, qword [rsi + 0x38]
call fcn.140051db4
jmp 0x140049bc0
mov rbx, r15
mov qword [rsp + 0x20], r15
shr rbx, 2
mov r9, r14
mov r8, rbx
mov rdx, rdi
mov ecx, 1
call fcn.140048538
lea eax, [rbp - 1]
shl rbx, 2
mov r10d, eax
lea r13, [0x140000000]
lea r9, [0x14005ee44]
mov edx, dword [rdi + rax*4]
mov eax, edx
shr eax, 0x10
movzx ecx, al
mov eax, edx
shr eax, 8
movzx r8d, byte [rcx + r13 + 0x5ec40]
movzx ecx, al
shl r8d, 8
movzx eax, byte [rcx + r13 + 0x5ec40]
xor r8d, eax
movzx eax, dl
shl r8d, 8
movzx eax, byte [rax + r13 + 0x5ec40]
xor r8d, eax
mov eax, edx
shr rax, 0x18
shl r8d, 8
movzx eax, byte [rax + r13 + 0x5ec40]
xor r8d, eax
lea eax, [rbp + 1]
xor r8d, dword [rdi]
xor r8d, dword [0x14005ee40]
mov dword [rbx + rdi], r8d
xor r8d, dword [rdi + 4]
mov dword [rdi + rax*4], r8d
xor r8d, dword [rdi + 8]
mov r11d, eax
lea eax, [rbp + 2]
mov dword [rdi + rax*4], r8d
xor r8d, dword [rdi + 0xc]
mov r12d, eax
lea eax, [rbp + 3]
mov dword [rdi + rax*4], r8d
mov r14, qword [rsi + 0x38]
mov ebp, eax
mov rax, qword [rsi + 0x30]
lea rcx, [r14 + rax*4]
lea rax, [rdi + 0x10]
add rax, rbx
jmp 0x140049519
cmp r15d, 0x18
jne 0x14004940c
mov eax, dword [rdi + 0x24]
xor eax, dword [rdi + 0x10]
mov dword [rdi + 0x28], eax
xor eax, dword [rdi + 0x14]
mov dword [rdi + 0x2c], eax
jmp 0x140049487
cmp r15d, 0x20
jne 0x140049487
mov edx, dword [rdi + 0x2c]
mov eax, edx
shr rax, 0x18
movzx r8d, byte [rax + r13 + 0x5ec40]
mov eax, edx
shl r8d, 8
shr eax, 0x10
movzx ecx, al
movzx eax, byte [rcx + r13 + 0x5ec40]
xor r8d, eax
mov eax, edx
shl r8d, 8
shr eax, 8
movzx ecx, al
movzx eax, byte [rcx + r13 + 0x5ec40]
xor r8d, eax
movzx eax, dl
shl r8d, 8
movzx eax, byte [rax + r13 + 0x5ec40]
xor r8d, eax
xor r8d, dword [rdi + 0x10]
mov dword [rdi + 0x30], r8d
xor r8d, dword [rdi + 0x14]
mov dword [rdi + 0x34], r8d
xor r8d, dword [rdi + 0x18]
mov dword [rdi + 0x38], r8d
xor r8d, dword [rdi + 0x1c]
mov dword [rdi + 0x3c], r8d
add rdi, rbx
mov edx, dword [rdi + r10*4]
mov eax, edx
shr eax, 0x10
movzx ecx, al
mov eax, edx
shr eax, 8
movzx r8d, byte [rcx + r13 + 0x5ec40]
shl r8d, 8
movzx ecx, al
movzx eax, byte [rcx + r13 + 0x5ec40]
xor r8d, eax
movzx eax, dl
shl r8d, 8
movzx eax, byte [rax + r13 + 0x5ec40]
xor r8d, eax
mov eax, edx
shl r8d, 8
shr rax, 0x18
movzx eax, byte [rax + r13 + 0x5ec40]
xor r8d, eax
xor r8d, dword [r9]
add r9, 4
xor r8d, dword [rdi]
mov dword [rbx + rdi], r8d
xor r8d, dword [rdi + 4]
mov dword [rdi + r11*4], r8d
xor r8d, dword [rdi + 8]
mov dword [rdi + r12*4], r8d
xor r8d, dword [rdi + 0xc]
mov dword [rdi + rbp*4], r8d
mov rax, qword [rsi + 0x30]
mov r14, qword [rsi + 0x38]
lea rcx, [r14 + rax*4]
lea rax, [rbx + 0x10]
add rax, rdi
cmp rax, rcx
jne 0x1400493f5
lea rcx, [rsi + 8]
mov rax, qword [rcx]
call qword [rax + 0x40]
test al, al
je 0x14004956d
mov al, byte [0x140078eb0]
test al, al
jne 0x14004953f
call fcn.140048c20
mov r8d, reloc.WS2_32.dll_recv
mov rdx, r14
mov rcx, r14
call fcn.140043904
mov eax, dword [rsi + 0x18]
mov r8d, reloc.WS2_32.dll_recv
shl eax, 2
lea rcx, [r14 + rax*4]
mov rdx, rcx
call fcn.140043904
jmp 0x140049b91
mov al, byte [0x140078eb1]
test al, al
jne 0x14004957c
call fcn.140048a94
mov eax, dword [rsi + 0x18]
lea r12, [0x140000000]
mov ebp, 4
lea edi, [rax*4 - 4]
cmp edi, ebp
jbe 0x140049922
lea r15d, [rdi + 2]
lea r13d, [rbp + 2]
mov r9d, dword [r14 + rdi*4]
mov ebx, ebp
mov r8d, dword [r14 + rbx*4]
mov eax, r8d
shr rax, 0x18
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r8d
shr eax, 0x10
movzx ecx, al
shr r8d, 8
mov r11d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r11d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r8b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + rbx*4]
xor r11d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
mov eax, r9d
shr rax, 0x18
xor r11d, dword [r12 + rcx*8 + 0x786b3]
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r9d
shr eax, 0x10
movzx ecx, al
shr r9d, 8
mov r8d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r8d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + rdi*4]
xor r8d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
lea eax, [r13 - 1]
xor r8d, dword [r12 + rcx*8 + 0x786b3]
mov dword [r14 + rbx*4], r8d
mov dword [r14 + rdi*4], r11d
mov r8d, dword [r14 + rax*4]
mov ebx, eax
mov eax, r8d
shr rax, 0x18
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r8d
shr eax, 0x10
movzx ecx, al
shr r8d, 8
mov r11d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r11d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r8b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + rbx*4]
xor r11d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
lea eax, [r15 - 1]
mov r9d, dword [r14 + rax*4]
mov r10d, eax
mov eax, r9d
shr rax, 0x18
xor r11d, dword [r12 + rcx*8 + 0x786b3]
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r9d
shr eax, 0x10
movzx ecx, al
shr r9d, 8
mov r8d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r8d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + r10*4]
xor r8d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
xor r8d, dword [r12 + rcx*8 + 0x786b3]
mov dword [r14 + rbx*4], r8d
mov ebx, r13d
mov dword [r14 + r10*4], r11d
mov r8d, dword [r14 + rbx*4]
mov eax, r8d
shr rax, 0x18
movzx edx, byte [rax + r12 + 0x5ec40]
add ebp, 4
mov r9d, dword [r14 + r15*4]
mov eax, r8d
shr eax, 0x10
movzx ecx, al
mov r11d, dword [r12 + rdx*8 + 0x786b4]
shr r8d, 8
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r11d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r8b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + rbx*4]
xor r11d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
mov eax, r9d
shr rax, 0x18
xor r11d, dword [r12 + rcx*8 + 0x786b3]
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r9d
shr eax, 0x10
movzx ecx, al
shr r9d, 8
mov r8d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r8d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + r15*4]
xor r8d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
lea eax, [r13 + 1]
add r13d, 4
xor r8d, dword [r12 + rcx*8 + 0x786b3]
mov dword [r14 + rbx*4], r8d
mov dword [r14 + r15*4], r11d
mov r8d, dword [r14 + rax*4]
mov ebx, eax
mov eax, r8d
shr rax, 0x18
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r8d
shr eax, 0x10
movzx ecx, al
shr r8d, 8
mov r11d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r11d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r8b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + rbx*4]
xor r11d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
lea eax, [r15 + 1]
mov r9d, dword [r14 + rax*4]
mov r10d, eax
mov eax, r9d
shr rax, 0x18
xor r11d, dword [r12 + rcx*8 + 0x786b3]
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r9d
shr eax, 0x10
movzx ecx, al
shr r9d, 8
mov r8d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r8d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + r10*4]
xor r8d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
mov eax, 0xfffffffc
add edi, eax
add r15d, eax
xor r8d, dword [r12 + rcx*8 + 0x786b3]
mov dword [r14 + rbx*4], r8d
mov dword [r14 + r10*4], r11d
cmp ebp, edi
jb 0x1400495a2
mov r10d, ebp
mov r9d, dword [r14 + r10*4]
mov eax, r9d
shr rax, 0x18
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r9d
shr eax, 0x10
movzx ecx, al
shr r9d, 8
mov r8d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r8d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + r10*4]
xor r8d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
lea eax, [rbp + 1]
mov r9d, dword [r14 + rax*4]
xor r8d, dword [r12 + rcx*8 + 0x786b3]
mov dword [r14 + r10*4], r8d
mov r10d, eax
mov eax, r9d
shr rax, 0x18
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r9d
shr eax, 0x10
movzx ecx, al
shr r9d, 8
mov r8d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r8d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + r10*4]
xor r8d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
lea eax, [rbp + 2]
mov r9d, dword [r14 + rax*4]
xor r8d, dword [r12 + rcx*8 + 0x786b3]
mov dword [r14 + r10*4], r8d
mov r10d, eax
mov eax, r9d
shr rax, 0x18
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r9d
shr eax, 0x10
movzx ecx, al
shr r9d, 8
mov r8d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r8d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + r10*4]
xor r8d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
lea eax, [rbp + 3]
mov r9d, dword [r14 + rax*4]
xor r8d, dword [r12 + rcx*8 + 0x786b3]
mov dword [r14 + r10*4], r8d
mov r10d, eax
mov eax, r9d
shr rax, 0x18
movzx edx, byte [rax + r12 + 0x5ec40]
mov eax, r9d
shr eax, 0x10
movzx ecx, al
shr r9d, 8
mov r8d, dword [r12 + rdx*8 + 0x786b4]
movzx eax, byte [rcx + r12 + 0x5ec40]
xor r8d, dword [r12 + rax*8 + 0x786b1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x5ec40]
movzx eax, byte [r14 + r10*4]
xor r8d, dword [r12 + rcx*8 + 0x786b2]
movzx ecx, byte [rax + r12 + 0x5ec40]
xor r8d, dword [r12 + rcx*8 + 0x786b3]
mov dword [r14 + r10*4], r8d
mov ecx, dword [r14]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
mov ecx, dword [rsi + 0x18]
mov ebx, eax
shl ecx, 2
mov ecx, dword [r14 + rcx*4]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
mov dword [r14], eax
mov ecx, dword [rsi + 0x18]
shl ecx, 2
mov dword [r14 + rcx*4], ebx
mov ecx, dword [r14 + 4]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
mov ecx, dword [rsi + 0x18]
mov ebx, eax
lea ecx, [rcx*4 + 1]
mov ecx, dword [r14 + rcx*4]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
mov dword [r14 + 4], eax
mov ecx, dword [rsi + 0x18]
lea ecx, [rcx*4 + 1]
mov dword [r14 + rcx*4], ebx
mov ecx, dword [r14 + 8]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
mov ecx, dword [rsi + 0x18]
mov ebx, eax
lea ecx, [rcx*4 + 2]
mov ecx, dword [r14 + rcx*4]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
mov dword [r14 + 8], eax
mov ecx, dword [rsi + 0x18]
lea ecx, [rcx*4 + 2]
mov dword [r14 + rcx*4], ebx
mov ecx, dword [r14 + 0xc]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
mov ecx, dword [rsi + 0x18]
mov ebx, eax
lea ecx, [rcx*4 + 3]
mov ecx, dword [r14 + rcx*4]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
mov dword [r14 + 0xc], eax
mov ecx, dword [rsi + 0x18]
lea ecx, [rcx*4 + 3]
mov dword [r14 + rcx*4], ebx
cmp byte [0x140078ec8], 0
jne 0x140049b9f
call fcn.140050e80
cmp byte [0x140078ece], 0
je 0x140049bc0
mov r8d, dword [rsi + 0x18]
lea rcx, [r14 + 0x10]
shl r8d, 4
mov rdx, rcx
sub r8d, 0x10
call fcn.140043904
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret