Function at 0x14002c1e0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x10], rdx
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2f]
sub rsp, 0xa0
mov rdi, rdx
mov r14d, 1
mov r12d, r9d
mov edx, r14d
mov rbx, r8
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x14002c58f
mov ecx, dword [rsi]
test cl, 8
je 0x14002c23c
lea eax, [r14 + 0xc]
jmp 0x14002c5a8
mov r15d, dword [rbp + 0x7f]
xor r13d, r13d
and ecx, 0xffffff0f
mov eax, r15d
mov qword [rsi + 0x90], r13
mov qword [rsi + 0x70], r13
and eax, 0xffffffcf
mov qword [rsi + 0x20], r13
mov dword [rsi + 0x78], r13d
dec eax
mov dword [rsi], ecx
je 0x14002c469
dec eax
je 0x14002c2cc
cmp eax, 6
je 0x14002c2b1
test rbx, rbx
je 0x14002c58f
test r12d, r12d
je 0x14002c58f
mov r14d, dword [rbp - 0x19]
or ecx, 0xa0
mov qword [rsi + 0x80], rbx
mov dword [rsi], ecx
mov dword [rsi + 0x88], r12d
mov qword [rsi + 0x68], r12
mov dword [rsi + 0x8c], r13d
jmp 0x14002c38d
mov r14d, dword [rbp - 0x19]
mov qword [rsi + 0x80], r13
mov qword [rsi + 0x68], r13
mov dword [rbp - 9], 0x41c00010
jmp 0x14002c3aa
test rbx, rbx
je 0x14002c58f
xor r9d, r9d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
lea r8d, [r9 + 3]
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x20], r8d
test r15b, 0x10
je 0x14002c301
call qword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x14002c307
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsi + 0x80], rax
mov rcx, rax
cmp rax, 0xffffffffffffffff
je 0x14002c49d
lea r8, [rbp - 0x11]
mov r9d, r14d
mov rdx, r13
mov qword [rbp - 0x11], r13
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14002c366
mov rax, qword [rbp - 0x11]
or dword [rsi], 0x20
lea rdx, [rbp + 7]
mov rcx, rsi
mov qword [rsi + 0x20], rax
call fcn.140028c00
test eax, eax
je 0x14002c372
mov rcx, qword [rsi + 0x80]
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r14d
jmp 0x14002c5a8
mov qword [rsi + 0x20], r13
mov qword [rsi + 0x68], 0xffffffffffffffff
or dword [rsi], 0x40
mov r14d, r13d
test rdi, rdi
jne 0x14002c384
mov rdi, rbx
mov qword [rbp + 0x67], rbx
test byte [rsi], 0x20
jne 0x14002c4a5
mov edx, r15d
mov rcx, rdi
mov ebx, 0x81800000
call fcn.14002c150
mov ecx, 0x81c00000
test eax, eax
cmove ebx, ecx
mov dword [rbp - 9], ebx
test r15b, 0x20
jne 0x14002c4ab
lea rcx, [rbp + 0x1f]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
lea rdx, [rbp - 0x11]
lea rcx, [rbp + 0x1f]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov r11, qword [rbp - 0x11]
lea rdx, [rbp - 0x31]
lea rcx, [rbp - 1]
mov qword [rbp - 1], r11
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov rcx, qword [rbp - 0x11]
movabs r11, 0xfe624e212ac18000
add rcx, r11
movabs rax, 0xd6bf94d5e57a42bd
imul rcx
lea rbx, [rcx + rdx]
movzx ecx, word [rbp - 0x31]
sub cx, 0x3c
sar rbx, 0x17
shl cx, 4
mov rax, rbx
shr rax, 0x3f
add rbx, rax
movzx eax, word [rbp - 0x2f]
and ax, 0xf
mov dword [rbp + 0xb], ebx
or cx, ax
movzx eax, word [rbp - 0x2b]
and eax, 0x1f
shl cx, 5
movzx edi, cx
movzx ecx, word [rbp - 0x27]
or edi, eax
movzx eax, word [rbp - 0x29]
and cx, 0x3f
shl ax, 6
shl edi, 0x10
or cx, ax
shl cx, 5
movzx eax, cx
or edi, eax
movzx eax, word [rbp - 0x25]
add ax, ax
and eax, 0x1f
or edi, eax
jmp 0x14002c4b1
mov qword [rsi + 0x80], rbx
test rbx, rbx
je 0x14002c58f
cmp rbx, 0xffffffffffffffff
je 0x14002c58f
lea r8, [rbp + 7]
mov rdx, r12
mov rcx, rsi
call fcn.14002bcd0
mov r14d, eax
test eax, eax
je 0x14002c384
mov eax, r14d
jmp 0x14002c5a8
mov eax, dword [rbp + 0x17]
mov dword [rbp - 9], eax
mov ebx, dword [rbp + 0xb]
mov edi, dword [rbp + 0x13]
mov edx, 0x169
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov r12, rax
mov qword [rbp + 0x1f], rax
test rax, rax
jne 0x14002c4d2
lea ebx, [rax + 2]
jmp 0x14002c594
xor edx, edx
mov r8d, 0x160
mov rcx, rax
call sub.MSVCR100.dll_memset
mov eax, r15d
and eax, 0x20
mov dword [rbp - 0x11], eax
je 0x14002c51d
mov eax, 8
mov r15b, 8
mov word [r12 + 2], ax
mov rax, qword [rsi + 0x68]
mov qword [r12 + 0x10], rax
mov qword [r12 + 0x18], rax
mov rax, qword [rsi + 0x18]
mov qword [r12 + 0x38], rax
or dword [rsi], 0x80000000
jmp 0x14002ca18
test r15b, 0x10
lea r15, [r12 + 0x50]
je 0x14002c561
mov r8, qword [rbp + 0x67]
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r13
or r9d, 0xffffffff
xor edx, edx
mov ecx, 0xfde9
mov dword [rsp + 0x28], 0x104
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [r12 + 0x20], eax
test eax, eax
je 0x14002c57f
dec eax
jmp 0x14002c57a
mov r14, qword [rbp + 0x67]
mov rcx, r15
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [r12 + 0x20], eax
cmp dword [r12 + 0x20], r13d
jne 0x14002c5c9
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov ebx, 9
test byte [rsi], 0x40
je 0x14002c5a6
mov rcx, qword [rsi + 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov rcx, r15
cmp byte [r15], r13b
je 0x14002c5f4
mov edx, gethostbyaddr
nop word [rax + rax]
cmp byte [rcx], 0x5c
movzx eax, byte [rcx]
cmove eax, edx
inc rcx
mov byte [rcx - 1], al
cmp byte [rcx], r13b
jne 0x14002c5e0
mov dword [rbp - 0x31], 0xd5455
mov byte [rbp - 0x2d], 7
mov dword [r12 + 4], edi
mov dword [r12 + 0x24], reloc.OLEAUT32.dll_SafeArrayGetElemsize
mov eax, 8
lea rcx, [r12 + 0x160]
mov word [r12], ax
mov eax, dword [rbp - 9]
mov qword [r12 + 0x48], rcx
mov dword [r12 + 0x34], eax
lea rax, [rbp - 0x31]
xor r15b, r15b
mov qword [r12 + 0x40], rax
movzx eax, byte [rbp + 0xb]
mov edx, 9
mov byte [rbp - 0x2c], al
mov dword [r12 + 0x28], edx
mov eax, ebx
shr eax, 8
mov r14d, r13d
mov dword [rbp - 0x19], r15d
mov byte [rbp - 0x2b], al
mov eax, ebx
shr ebx, 0x18
shr eax, 0x10
mov byte [rbp - 0x29], bl
mov qword [rbp - 1], r14
mov byte [rbp - 0x2a], al
mov rax, qword [rbp - 0x31]
mov qword [rcx], rax
movzx eax, byte [rbp - 0x29]
mov byte [rcx + 8], al
mov rax, qword [r12 + 0x48]
mov byte [rax + 2], 5
mov rax, qword [r12 + 0x48]
mov byte [rax + 4], 1
test dword [rsi], 0x80000000
je 0x14002c69c
mov r15b, 8
mov dword [r12 + 0x24], r13d
jmp 0x14002c6ed
test byte [rbp + 0x7f], 8
je 0x14002c6bf
mov edx, dword [r12 + 0x20]
lea eax, [rdx - 1]
cmp byte [rax + r12 + 0x50], 0x2f
je 0x14002c6f1
mov byte [rdx + r12 + 0x50], gethostbyaddr
inc dword [r12 + 0x20]
jmp 0x14002c6f1
cmp qword [rsi + 0x10], r13
je 0x14002c6d4
mov r14d, reloc.WSOCK32.dll_ioctlsocket
mov word [r12], dx
mov qword [rbp - 1], r14
lea rcx, [r12 + 0x50]
call fcn.14002c0c0
movzx r15d, r15b
test eax, eax
mov eax, 8
cmove r15d, eax
mov dword [rbp - 0x19], r15d
movzx eax, word [r12]
mov word [r12 + 0x30], ax
movzx eax, r15b
mov word [r12 + 2], ax
test r15b, r15b
jne 0x14002c720
mov rcx, qword [rsi + 0x68]
cmp rcx, 0xffffffffffffffff
je 0x14002c720
mov eax, r14d
add rax, rcx
mov qword [r12 + 0x10], rax
mov rax, qword [rsi + 0x68]
mov rdx, rsi
mov rcx, r12
mov qword [r12 + 0x18], rax
mov rax, qword [rsi + 0x18]
add rax, qword [rsi + 0x20]
mov qword [r12 + 0x38], rax
mov dword [rsi + 0x28], r13d
call fcn.14002af30
mov r11d, dword [rsi + 0x28]
test r11d, r11d
jne 0x14002cac2
test dword [rsi], 0x80000000
mov eax, dword [r12 + 0x20]
je 0x14002c76b
add eax, 0xb
mov qword [rsi + 0x18], rax
jmp 0x14002ca18
mov ecx, dword [r12 + 0x24]
lea eax, [rcx + rax + 0x32]
add qword [rsi + 0x18], rax
test r14d, r14d
je 0x14002ca18
mov r8, qword [rsi + 0x10]
mov dword [rsi + 0x44], 0x12345678
mov dword [rsi + 0x48], 0x23456789
mov dword [rsi + 0x4c], 0x34567890
lea r9, [0x140118b60]
test r8, r8
je 0x14002c7f4
movzx eax, byte [r8]
test al, al
je 0x14002c7f4
mov edx, dword [rsi + 0x44]
mov ecx, edx
shr edx, 8
xor rcx, rax
movzx eax, cl
mov ecx, dword [r9 + rax*4]
xor ecx, edx
mov edx, dword [rsi + 0x4c]
movzx eax, cl
mov dword [rsi + 0x44], ecx
movzx ecx, dl
add eax, dword [rsi + 0x48]
shr edx, 8
imul eax, eax, 0x8088405
inc eax
mov dword [rsi + 0x48], eax
movzx eax, byte [rsi + 0x4b]
xor rcx, rax
mov eax, dword [r9 + rcx*4]
xor eax, edx
inc r8
mov dword [rsi + 0x4c], eax
jne 0x14002c7a6
mov rbx, r13
call qword [sym.imp.MSVCR100.dll_rand]
inc rbx
sar eax, 7
mov byte [rbp + rbx - 0x32], al
cmp rbx, 0xc
jl 0x14002c7f7
movzx eax, byte [r12 + 5]
mov r15d, dword [rsi + 0x44]
mov edi, dword [rsi + 0x48]
mov r12d, dword [rsi + 0x4c]
mov byte [rbp - 0x26], al
lea r14, [0x140118b60]
nop dword [rax + rax]
movsx r9, byte [rbp + r13 - 0x31]
mov eax, r15d
mov r8d, r12d
shr eax, 8
and r8d, 0xfffd
mov rcx, r15
xor rcx, r9
or r8d, 2
movzx edx, cl
mov ecx, dword [r14 + rdx*4]
movzx edx, r12b
xor ecx, eax
mov dword [rsi + 0x44], ecx
movzx ebx, cl
mov r10d, ecx
add ebx, edi
mov ecx, r12d
shr ecx, 8
imul ebx, ebx, 0x8088405
inc ebx
mov dword [rsi + 0x48], ebx
movzx eax, byte [rsi + 0x4b]
xor rdx, rax
mov eax, r8d
mov r11d, dword [r14 + rdx*4]
xor eax, 1
xor r11d, ecx
mov ecx, r10d
shr r10d, 8
imul eax, r8d
movsx r8, byte [rbp + r13 - 0x30]
shr eax, 8
mov dword [rsi + 0x4c], r11d
xor al, r9b
xor rcx, r8
mov edx, r11d
mov byte [rbp + r13 - 0x31], al
movzx eax, cl
and edx, 0xfffd
mov ecx, dword [r14 + rax*4]
or edx, 2
xor ecx, r10d
mov dword [rsi + 0x44], ecx
movzx edi, cl
mov r9d, ecx
add edi, ebx
movzx ecx, r11b
shr r11d, 8
imul edi, edi, 0x8088405
inc edi
mov dword [rsi + 0x48], edi
movzx eax, byte [rsi + 0x4b]
xor rcx, rax
mov eax, edx
xor r11d, dword [r14 + rcx*4]
xor eax, 1
mov ecx, r9d
shr r9d, 8
mov dword [rsi + 0x4c], r11d
imul eax, edx
shr eax, 8
mov edx, r11d
xor al, r8b
movsx r8, byte [rbp + r13 - 0x2f]
and edx, 0xfffd
xor rcx, r8
mov byte [rbp + r13 - 0x30], al
or edx, 2
movzx eax, cl
mov ecx, dword [r14 + rax*4]
xor ecx, r9d
movzx ebx, cl
mov r10d, ecx
mov dword [rsi + 0x44], ecx
add ebx, edi
movzx ecx, r11b
imul ebx, ebx, 0x8088405
inc ebx
mov dword [rsi + 0x48], ebx
movzx eax, byte [rsi + 0x4b]
xor rcx, rax
movsx r9, byte [rbp + r13 - 0x2e]
mov eax, edx
shr r11d, 8
xor r11d, dword [r14 + rcx*4]
xor eax, 1
mov ecx, r10d
xor rcx, r9
mov dword [rsi + 0x4c], r11d
shr r10d, 8
imul eax, edx
shr eax, 8
mov edx, r11d
add r13, 4
xor al, r8b
and edx, 0xfffd
mov byte [rbp + r13 - 0x33], al
movzx eax, cl
or edx, 2
mov ecx, dword [r14 + rax*4]
xor ecx, r10d
movzx edi, cl
mov dword [rsi + 0x44], ecx
mov r15d, ecx
add edi, ebx
movzx ecx, r11b
shr r11d, 8
imul edi, edi, 0x8088405
inc edi
mov dword [rsi + 0x48], edi
movzx eax, byte [rsi + 0x4b]
xor rcx, rax
mov eax, dword [r14 + rcx*4]
xor eax, r11d
mov r12d, eax
mov dword [rsi + 0x4c], eax
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, r9b
mov byte [rbp + r13 - 0x32], al
cmp r13, 0xc
jl 0x14002c830
lea rdx, [rbp - 0x31]
mov r8d, reloc.WSOCK32.dll_ioctlsocket
mov rcx, rsi
call fcn.14002ba80
mov r11d, dword [rsi + 0x28]
mov r12, qword [rbp + 0x1f]
mov r14, qword [rbp - 1]
mov r15d, dword [rbp - 0x19]
test r11d, r11d
jne 0x14002cac2
add qword [rsi + 0x18], 0xc
or dword [rsi], 0x10
cmp qword [rsi + 0x80], 0
je 0x14002ca6e
mov rcx, rsi
cmp r15b, 8
jne 0x14002ca35
mov rdx, r12
call fcn.14002be50
jmp 0x14002ca3a
call fcn.14002c000
mov r11d, dword [rsi + 0x28]
test r11d, r11d
jne 0x14002cac2
and dword [rsi], 0xffffffef
test byte [rsi], 0x40
je 0x14002ca58
mov rcx, qword [rsi + 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsi + 0x70]
and dword [rsi], 0xffffffbf
mov qword [rsi + 0x68], rax
mov rax, qword [rsi + 0x90]
add qword [rsi + 0x18], rax
mov eax, dword [rsi]
test eax, eax
jns 0x14002cad3
or eax, 8
cmp dword [rbp - 0x11], 0
mov dword [rsi], eax
jne 0x14002cc17
mov edx, dword [rsi + 0x78]
mov rcx, rsi
call fcn.14002b8e0
movzx edx, word [rsi + 0x7a]
mov rcx, rsi
call fcn.14002b8e0
mov edx, dword [rsi + 0x70]
mov rcx, rsi
call fcn.14002b8e0
mov rdx, qword [rsi + 0x70]
mov rcx, rsi
shr rdx, 0x10
call fcn.14002b8e0
mov r11d, dword [rsi + 0x28]
test r11d, r11d
je 0x14002cc17
mov rcx, r12
mov ebx, r11d
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x14002c594
mov rax, qword [rsi + 0x90]
mov edx, r14d
lea rcx, [rdx + rax]
mov eax, dword [rsi + 0x78]
cmp qword [r12 + 0x10], rcx
mov dword [r12 + 8], eax
mov rax, qword [rsi + 0x90]
lea rcx, [rdx + rax]
sete r8b
mov qword [r12 + 0x10], rcx
mov rax, qword [rsi + 0x68]
mov qword [r12 + 0x18], rax
test byte [rsi], 4
je 0x14002cb94
test r14d, r14d
jne 0x14002cb94
movzx eax, r15b
mov word [r12 + 2], ax
movzx eax, word [r12]
test al, 1
jne 0x14002cb39
mov ecx, 0xfff7
and ax, cx
mov word [r12], ax
movzx eax, word [r12]
mov rdx, qword [r12 + 0x38]
mov rcx, rsi
mov word [r12 + 0x30], ax
sub rdx, qword [rsi + 0x20]
call fcn.14002bc40
test eax, eax
je 0x14002cb81
mov rdx, rsi
mov rcx, r12
call fcn.14002af30
mov r11d, dword [rsi + 0x28]
test r11d, r11d
jne 0x14002cac2
mov rdx, qword [rsi + 0x18]
mov rcx, rsi
call fcn.14002bc40
test eax, eax
jne 0x14002cbd2
mov rcx, r12
mov ebx, reloc.WSOCK32.dll_recv
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x14002c594
movzx eax, r15b
cmp word [r12 + 2], ax
jne 0x14002cc1e
test r15b, r15b
jne 0x14002cbaa
test r8b, r8b
je 0x14002cc1e
mov rdx, rsi
mov rcx, r12
call fcn.14002adb0
mov r11d, dword [rsi + 0x28]
test r11d, r11d
jne 0x14002cac2
add qword [rsi + 0x18], 0x10
movzx eax, word [r12 + 0x30]
mov word [r12], ax
mov rcx, qword [rsi + 0x60]
test rcx, rcx
jne 0x14002cbe6
mov qword [rsi + 0x60], r12
xor eax, eax
jmp 0x14002c5a8
lea rax, [rcx + 0x158]
cmp qword [rax], 0
je 0x14002cc10
nop word [rax + rax]
mov rcx, qword [rax]
lea rax, [rcx + 0x158]
cmp qword [rax], 0
jne 0x14002cc00
mov qword [rcx + 0x158], r12
xor eax, eax
jmp 0x14002c5a8
mov rcx, r12
mov ebx, reloc.OLEAUT32.dll_SafeArrayGetElemsize
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x14002c594