Function at 0x140004388
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov dword [rax + 0x20], r9d
mov qword [rax + 0x18], r8
mov dword [rax + 0x10], edx
mov qword [rax + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
movsxd r12, dword [rsp + 0xc8]
mov ecx, r12d
call fcn.140003ff4
test eax, eax
jne 0x140004636
mov ecx, dword [rsp + 0xc0]
call fcn.14000435c
test eax, eax
jne 0x140004636
lea rcx, [0x140000000]
mov edi, 0
mov rax, r12
shl rax, 7
mov r15d, dword [rax + rcx + 0xba8dc]
mov eax, dword [rsp + 0xb0]
test al, 7
setne dil
shr eax, 3
add edi, eax
lea ecx, [r15 + r15]
lea eax, [rdi - 2]
cmp ecx, eax
jae 0x140004631
mov r13d, edi
sub r13d, ecx
lea eax, [r13 - 2]
cmp edx, eax
ja 0x140004631
mov ecx, edi
call fcn.14006dc2c
mov ecx, edi
mov rsi, rax
call fcn.14006dc2c
mov ecx, r15d
mov r14, rax
call fcn.14006dc2c
mov rbp, rax
test rsi, rsi
je 0x140004610
test r14, r14
je 0x140004608
test rax, rax
je 0x140004608
mov rax, qword [rsp + 0xa0]
mov r9, rsi
mov dword [rsp + 0x30], edi
test rax, rax
je 0x140004489
mov r8d, dword [rsp + 0xa8]
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x20], rcx
mov rdx, rax
jmp 0x140004499
lea rax, [rsp + 0x30]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov ecx, r12d
call fcn.14000173c
mov ebx, eax
test eax, eax
jne 0x1400045ec
mov ebx, dword [rsp + 0x98]
lea rcx, [rsi + r15]
sub r13d, ebx
xor edx, edx
sub r13d, 2
mov r8d, r13d
call fcn.14006c5b0
mov rdx, qword [rsp + 0x90]
lea ecx, [r15 + r13]
mov r8d, ebx
mov byte [rcx + rsi], 1
inc ecx
add rcx, rsi
call fcn.14006bf10
movsxd rax, dword [rsp + 0xc0]
mov edx, r15d
mov r8, qword [rsp + 0xb8]
mov rcx, rbp
lea r9, [rax + rax*4]
add r9, r9
lea rax, [0x140000000]
call qword [rax + r9*8 + 0xbb8f8]
cmp eax, r15d
je 0x14000451f
mov ebx, 9
jmp 0x1400045ec
mov r13d, edi
mov r9, r14
sub r13d, r15d
mov r8d, r15d
dec r13d
mov rdx, rbp
mov ecx, r12d
mov dword [rsp + 0x20], r13d
call fcn.14000555c
mov ebx, eax
test eax, eax
jne 0x1400045ec
test r13d, r13d
je 0x140004567
mov rcx, r14
mov r8d, r13d
sub rcx, rsi
mov rdx, rsi
mov al, byte [rcx + rdx]
xor byte [rdx], al
inc rdx
sub r8, 1
jne 0x140004559
mov r9, r14
mov dword [rsp + 0x20], r15d
mov r8d, r13d
mov rdx, rsi
mov ecx, r12d
call fcn.14000555c
mov ebx, eax
test eax, eax
jne 0x1400045ec
mov r9, r15
test r15d, r15d
je 0x1400045a5
mov rdx, r14
mov rcx, rbp
sub rdx, rbp
mov r8, r15
mov al, byte [rdx + rcx]
xor byte [rcx], al
inc rcx
sub r8, 1
jne 0x140004597
mov r12, qword [rsp + 0xd8]
cmp dword [r12], edi
jae 0x1400045ba
mov ebx, 6
jmp 0x1400045e8
mov rbx, qword [rsp + 0xd0]
mov r8, r9
mov rdx, rbp
lea rcx, [rbx + 1]
mov byte [rbx], 0
call fcn.14006bf10
lea ecx, [r15 + 1]
mov r8d, r13d
add rcx, rbx
mov rdx, rsi
call fcn.14006bf10
xor ebx, ebx
mov dword [r12], edi
mov rcx, rbp
call fcn.14006dc24
mov rcx, r14
call fcn.14006dc24
mov rcx, rsi
call fcn.14006dc24
mov eax, ebx
jmp 0x140004636
mov rcx, rsi
call fcn.14006dc24
test r14, r14
je 0x14000461d
mov rcx, r14
call fcn.14006dc24
test rbp, rbp
je 0x14000462a
mov rcx, rbp
call fcn.14006dc24
mov eax, reloc.WS2_32.dll_listen
jmp 0x140004636
mov eax, reloc.WS2_32.dll_shutdown
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret