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

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
cmp byte [rcx + 0x38], 0
mov r13, rdx
mov r14, rcx
jne 0x180249569
cmp dword [rcx + 0x30], 0
jbe 0x18024955c
cmp byte [rcx + 0x4d], 0
jne 0x180249569
xor r15d, r15d
cmp byte [rcx + 0x4c], r15b
jne 0x18024954c
mov ebx, r15d
lea eax, [r15 + 1]
nop
mov r8d, recv
lea rdx, [rbp - 0x60]
sub r8, rbx
add rdx, rbx
mov r9d, eax
mov rcx, r14
call fcn.1801c3470
test rax, rax
js 0x1802491f9
je 0x1802491f2
add rbx, rax
mov eax, 1
cmp rbx, 0xc
jb 0x1802491c0
jmp 0x180249207
mov byte [r14 + 0x4c], 1
jmp 0x180249207
mov byte [r14 + 0x4d], 1
test rbx, rbx
je 0x180249569
test rbx, rbx
js 0x180249569
cmp rbx, 0xc
jne 0x18024954c
movzx eax, word [r13 + 0x10]
mov r14d, 1
mov ebx, dword [r13 + 8]
mov qword [rsp + 0xb8], rsi
mov esi, dword [r13 + 0xc]
mov qword [rsp + 0x78], rdi
mov edi, dword [r13 + 0x10]
mov qword [rsp + 0x70], r12
mov r12, r15
nop word [rax + rax]
movzx r8d, byte [rbp + r12 - 0x60]
not ebx
movzx eax, ax
mov ecx, ebx
or eax, 2
mov edx, eax
xor edx, r14d
imul edx, eax
shr edx, 8
xor r8b, dl
lea rdx, [rbp + 0x40]
mov byte [rbp + r12 - 0x60], r8b
mov byte [rbp + 0x40], r8b
mov r8, r14
call fcn.1801f9fa0
mov ebx, eax
lea rdx, [rbp + 0x40]
not ebx
not edi
movzx eax, bl
mov r8, r14
add eax, esi
mov dword [r13 + 8], ebx
imul esi, eax, 0x8088405
mov ecx, edi
inc esi
mov eax, esi
mov dword [r13 + 0xc], esi
shr eax, 0x18
mov byte [rbp + 0x40], al
call fcn.1801f9fa0
movzx r8d, byte [rbp + r12 - 0x5f]
mov edi, eax
not edi
not ebx
movzx eax, di
mov ecx, ebx
or eax, 2
mov dword [r13 + 0x10], edi
mov edx, eax
xor edx, r14d
imul edx, eax
shr edx, 8
xor r8b, dl
lea rdx, [rbp + 0x40]
mov byte [rbp + r12 - 0x5f], r8b
mov byte [rbp + 0x40], r8b
mov r8, r14
call fcn.1801f9fa0
mov ebx, eax
lea rdx, [rbp + 0x40]
not ebx
not edi
movzx eax, bl
mov r8, r14
add eax, esi
mov dword [r13 + 8], ebx
imul esi, eax, 0x8088405
mov ecx, edi
inc esi
mov eax, esi
mov dword [r13 + 0xc], esi
shr eax, 0x18
mov byte [rbp + 0x40], al
call fcn.1801f9fa0
movzx r8d, byte [rbp + r12 - 0x5e]
mov edi, eax
not edi
not ebx
movzx eax, di
or eax, 2
mov dword [r13 + 0x10], edi
mov edx, eax
xor edx, r14d
imul edx, eax
shr edx, 8
xor r8b, dl
lea rdx, [rbp + 0x40]
mov byte [rbp + r12 - 0x5e], r8b
mov byte [rbp + 0x40], r8b
mov r8, r14
mov ecx, ebx
call fcn.1801f9fa0
mov ebx, eax
lea rdx, [rbp + 0x40]
not ebx
not edi
movzx eax, bl
mov r8, r14
add eax, esi
mov dword [r13 + 8], ebx
imul esi, eax, 0x8088405
mov ecx, edi
inc esi
mov eax, esi
mov dword [r13 + 0xc], esi
shr eax, 0x18
mov byte [rbp + 0x40], al
call fcn.1801f9fa0
movzx r8d, byte [rbp + r12 - 0x5d]
mov edi, eax
not edi
not ebx
movzx eax, di
mov ecx, ebx
or eax, 2
mov dword [r13 + 0x10], edi
mov edx, eax
xor edx, r14d
imul edx, eax
shr edx, 8
xor r8b, dl
lea rdx, [rbp + 0x40]
mov byte [rbp + r12 - 0x5d], r8b
mov byte [rbp + 0x40], r8b
mov r8, r14
call fcn.1801f9fa0
mov ebx, eax
lea rdx, [rbp + 0x40]
not ebx
not edi
movzx eax, bl
mov r8, r14
add eax, esi
mov dword [r13 + 8], ebx
imul esi, eax, 0x8088405
mov ecx, edi
inc esi
mov eax, esi
mov dword [r13 + 0xc], esi
shr eax, 0x18
mov byte [rbp + 0x40], al
call fcn.1801f9fa0
not eax
add r12, 4
mov dword [r13 + 0x10], eax
mov edi, eax
cmp r12, 0xc
jb 0x180249250
mov r14, qword [rbp + 0x30]
mov r12, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
mov rsi, qword [rsp + 0xb8]
cmp byte [r14 + 0x38], r15b
jne 0x180249480
mov rcx, qword [r14]
mov qword [rbp - 0x50], r15
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x40], 0xffffffffffffffff
mov qword [rbp - 0x20], r15
mov qword [rbp - 0x28], 0xffffffffffffffff
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x30], r15
test rcx, rcx
je 0x180249492
cmp byte [rcx + 0x38], r15b
jne 0x180249469
lea rdx, [rbp - 0x50]
call fcn.1801c8a40
test eax, eax
jns 0x180249492
mov rcx, qword [r14]
lea rdx, [r14 + 0x18]
test rdx, rdx
je 0x180249480
mov eax, dword [rcx + 0x18]
mov dword [rdx], eax
mov eax, dword [rcx + 0x1c]
mov dword [rdx + 4], eax
xor eax, eax
add rsp, 0x80
pop r15
pop r14
pop r13
pop rbx
pop rbp
ret
mov r9d, 3
lea rdx, [rbp - 0x50]
mov rcx, r14
lea r8d, [r9 + 0x3d]
call fcn.1801c3470
test rax, rax
js 0x180249480
movzx edx, byte [rbp - 0x50]
xor bl, bl
test dl, 0x10
je 0x180249514
mov rax, qword [rbp - 0x28]
lea rcx, [rbp + 0x30]
mov qword [rbp + 0x30], rax
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__localtime64]
test rax, rax
jne 0x1802494d5
movzx ecx, r15w
jmp 0x1802494f9
cmp dword [rax + 0x14], 0x50
jge 0x1802494e2
mov dword [rax + 0x14], 0x50
movzx ecx, word [rax + 8]
shl cx, 6
add cx, word [rax + 4]
mov eax, dword [rax]
sar eax, 1
shl cx, 5
add cx, ax
movzx eax, byte [rbp - 0x55]
movzx edx, byte [rbp - 0x50]
shr cx, 8
cmp al, cl
movzx ebx, bl
mov ecx, 1
cmove ebx, ecx
jmp 0x180249518
movzx eax, byte [rbp - 0x55]
test dl, 0x20
je 0x18024952b
mov ecx, dword [rbp - 0x20]
shr ecx, 0x18
cmp al, cl
je 0x180249480
test bl, bl
jne 0x180249480
test dl, 0x30
je 0x180249480
add r13, 0x18
je 0x18024957f
mov qword [r13], 0x1b
jmp 0x18024957f
add r13, 0x18
je 0x18024957f
mov qword [r13], send
jmp 0x18024957f
add rcx, 0x18
je 0x180249569
mov qword [rcx], send
add r13, 0x18
je 0x18024957f
mov ecx, dword [r14 + 0x18]
mov dword [r13], ecx
mov ecx, dword [r14 + 0x1c]
mov dword [r13 + 4], ecx
mov eax, 0xffffffff
add rsp, 0x80
pop r15
pop r14
pop r13
pop rbx
pop rbp
ret