Function at 0x14004f610
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
xor ebx, ebx
lea rdi, [rcx + 0x10]
lea r13, [rcx + 8]
mov r12, rdx
mov r15, rcx
mov qword [rbp - 0x39], rdi
cmp dword [rcx + 0x1c], ebx
je 0x14004f9a2
mov rcx, qword [rcx]
mov rax, qword [rdi]
mov r10, qword [r13]
test rcx, rcx
jne 0x14004f684
mov r9d, 1
lea rdx, [rbp - 0x31]
mov r8d, recv
mov rcx, rax
call r10
mov qword [rbp + 0x77], rdi
mov rdx, rax
mov qword [rbp + 0x7f], r13
mov rcx, rdi
mov r10, r13
test rax, rax
jns 0x14004f6c4
jmp 0x14004f9af
mov r9d, recv
mov dword [rsp + 0x20], 1
lea r8, [rbp - 0x31]
mov rdx, rax
call r10
mov rdx, rax
test rax, rax
jns 0x14004f6b8
cmp rdx, 0xfffffffffffffffe
mov eax, ebx
sete al
inc eax
mov dword [r15 + 0x18], eax
jmp 0x14004f9a9
mov qword [rbp + 0x7f], r13
mov qword [rbp + 0x77], rdi
mov qword [rbp - 0x39], rdi
cmp rdx, 0xc
je 0x14004f6d7
mov qword [r12], socket
jmp 0x14004fa55
mov edi, dword [r12 + 0x10]
mov ecx, edi
mov esi, dword [r12 + 8]
mov qword [rsp + 0xd8], r14
mov r14d, dword [r12 + 0xc]
and ecx, 0xfffd
lea rdx, [rbp + 0x67]
or ecx, 2
not esi
mov eax, ecx
mov r8d, 1
xor eax, 1
imul eax, ecx
mov ecx, esi
sar eax, 8
xor al, byte [rbp + rbx - 0x31]
mov byte [rbp + 0x67], al
mov byte [rbp + rbx - 0x31], al
call fcn.14004fc40
mov esi, eax
lea rdx, [rbp + 0x67]
not eax
not edi
mov dword [r12 + 8], eax
mov r8d, 1
movzx eax, al
mov ecx, edi
add eax, r14d
imul r14d, eax, 0x8088405
inc r14d
mov eax, r14d
mov dword [r12 + 0xc], r14d
shr eax, 0x18
mov byte [rbp + 0x67], al
call fcn.14004fc40
mov edi, eax
mov r8d, 1
not eax
mov ecx, esi
movzx edx, ax
mov dword [r12 + 0x10], eax
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
lea rdx, [rbp + 0x67]
sar eax, 8
xor al, byte [rbp + rbx - 0x30]
mov byte [rbp + 0x67], al
mov byte [rbp + rbx - 0x30], al
call fcn.14004fc40
mov esi, eax
lea rdx, [rbp + 0x67]
not eax
mov r8d, 1
mov dword [r12 + 8], eax
mov ecx, edi
movzx eax, al
add eax, r14d
imul r14d, eax, 0x8088405
inc r14d
mov eax, r14d
mov dword [r12 + 0xc], r14d
shr eax, 0x18
mov byte [rbp + 0x67], al
call fcn.14004fc40
mov edi, eax
mov r8d, 1
not eax
mov ecx, esi
movzx edx, ax
mov dword [r12 + 0x10], eax
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
lea rdx, [rbp + 0x67]
sar eax, 8
xor al, byte [rbp + rbx - 0x2f]
mov byte [rbp + 0x67], al
mov byte [rbp + rbx - 0x2f], al
call fcn.14004fc40
mov esi, eax
not eax
mov dword [r12 + 8], eax
movzx eax, al
add eax, r14d
lea rdx, [rbp + 0x67]
imul r14d, eax, 0x8088405
mov r8d, 1
mov ecx, edi
inc r14d
mov eax, r14d
mov dword [r12 + 0xc], r14d
shr eax, 0x18
mov byte [rbp + 0x67], al
call fcn.14004fc40
mov edi, eax
mov r8d, 1
not eax
mov ecx, esi
movzx edx, ax
mov dword [r12 + 0x10], eax
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
lea rdx, [rbp + 0x67]
sar eax, 8
xor al, byte [rbp + rbx - 0x2e]
mov byte [rbp + 0x67], al
mov byte [rbp + rbx - 0x2e], al
call fcn.14004fc40
mov esi, eax
lea rdx, [rbp + 0x67]
not esi
mov r8d, 1
movzx eax, sil
mov ecx, edi
add eax, r14d
mov dword [r12 + 8], esi
imul r14d, eax, 0x8088405
inc r14d
mov eax, r14d
mov dword [r12 + 0xc], r14d
shr eax, 0x18
mov byte [rbp + 0x67], al
call fcn.14004fc40
mov edi, eax
add rbx, 4
not edi
mov dword [r12 + 0x10], edi
mov ecx, edi
cmp rbx, 0xc
jb 0x14004f6f0
mov rcx, qword [r15]
lea rdx, [rbp - 0x19]
mov r14, qword [rsp + 0xd8]
mov ebx, 0
test rcx, rcx
jne 0x14004f8fe
mov rcx, qword [rbp + 0x77]
mov r9d, 3
mov rax, qword [rbp + 0x7f]
mov r8d, 0x40
mov rcx, qword [rcx]
call qword [rax]
test rax, rax
jns 0x14004f94f
xor eax, eax
jmp 0x14004fa5a
call fcn.14004dd00
test eax, eax
jns 0x14004f916
mov dword [r15 + 0x18], 2
xor eax, eax
jmp 0x14004fa5a
mov rdx, qword [rbp - 0x39]
lea r8, [rbp - 0x19]
mov rcx, qword [r15]
mov r9d, 0x40
mov dword [rsp + 0x20], 3
mov rdx, qword [rdx]
call qword [r13]
test rax, rax
jns 0x14004f94f
cmp rax, 0xfffffffffffffffe
sete bl
inc ebx
mov dword [r15 + 0x18], ebx
xor eax, eax
jmp 0x14004fa5a
mov rax, qword [rbp + 0xf]
lea rcx, [rbp + 0x67]
mov qword [rbp + 0x67], rax
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__localtime64]
mov edx, dword [rbp + 0x17]
movzx r8d, byte [rbp - 0x26]
shr edx, 0x18
cmp r8b, dl
je 0x14004f8f7
movzx ecx, word [rax + 8]
shl cx, 6
add cx, word [rax + 4]
mov eax, dword [rax]
shl cx, 5
sar eax, 1
add cx, ax
shr cx, 8
cmp r8b, cl
je 0x14004f8f7
mov qword [r12], 0x1b
jmp 0x14004fa55
mov dword [rcx + 0x18], 3
mov rcx, rdi
mov r10, r13
mov r11, qword [r15]
lea rsi, [r12 + 4]
test r11, r11
jne 0x14004f9de
mov rcx, qword [rcx]
lea rdx, [rbp + 0x67]
mov r9d, 4
mov r8d, 8
call qword [r10]
test rax, rax
jns 0x14004fa3b
mov eax, socket
jmp 0x14004fa45
mov ecx, dword [r15 + 0x18]
test ecx, ecx
je 0x14004fa43
sub ecx, 1
je 0x14004fa13
sub ecx, 1
je 0x14004fa03
cmp ecx, 1
je 0x14004f9fc
mov eax, socket
jmp 0x14004fa45
mov eax, reloc.WS2_32.dll_select
jmp 0x14004fa45
mov r8, rsi
mov rdx, r12
mov rcx, r11
call fcn.14004e090
jmp 0x14004fa55
mov rdx, qword [rdi]
lea r8, [rbp + 0x67]
mov r9d, 8
mov dword [rsp + 0x20], 4
mov rcx, r11
call qword [r13]
test rax, rax
jns 0x14004fa3b
mov eax, socket
jmp 0x14004fa45
mov ebx, dword [rbp + 0x6b]
mov eax, dword [rbp + 0x67]
jmp 0x14004fa45
mov eax, ebx
test r12, r12
je 0x14004fa4e
mov dword [r12], eax
test rsi, rsi
je 0x14004fa55
mov dword [rsi], ebx
mov eax, 0xffffffff
add rsp, 0x90
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret