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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0xd8]
sub rsp, 0x1b0
mov rsi, rdx
mov r14, r9
mov edx, 1
mov rdi, r8
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
xor r12d, r12d
test eax, eax
jne 0x180006d1c
mov ecx, dword [rbx]
lea eax, [r12 + 8]
test al, cl
je 0x180006971
lea eax, [r12 + 0xd]
jmp 0x180006d35
mov r13d, dword [rbp + 0x100]
and ecx, 0xffffff0f
mov eax, r13d
mov qword [rbx + 0xa0], r12
and eax, 0xffffffcf
mov qword [rbx + 0x78], r12
mov qword [rbx + 0x20], r12
mov edx, 0x80000000
mov dword [rbx + 0x80], r12d
mov r15d, select
mov dword [rbx], ecx
mov dword [rsp + 0x78], r13d
sub eax, 1
je 0x180006ac1
sub eax, 1
je 0x180006a19
cmp eax, 6
je 0x1800069fc
test rdi, rdi
je 0x180006d1c
test r14, r14
je 0x180006d1c
or ecx, 0xa0
mov qword [rbx + 0x90], r14
mov qword [rbx + 0x70], r14
mov r14d, dword [rsp + 0x44]
mov dword [rbx], ecx
mov qword [rbx + 0x88], rdi
mov qword [rbx + 0x98], r12
jmp 0x180006a92
mov r14d, dword [rsp + 0x44]
mov qword [rbx + 0x88], r12
mov qword [rbx + 0x70], r12
mov dword [rsp + 0x48], 0x41c00010
jmp 0x180006b45
test rdi, rdi
je 0x180006d1c
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], r12d
mov r8d, 3
mov dword [rsp + 0x20], r8d
mov rcx, rdi
test r15b, r13b
je 0x180006a4a
call qword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x180006a50
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbx + 0x88], rax
cmp rax, 0xffffffffffffffff
jne 0x180006a66
lea r14d, [rax + 2]
jmp 0x180006aed
lea r8, [rsp + 0x58]
xor edx, edx
mov rcx, rbx
call fcn.18000d330
mov r14d, eax
test eax, eax
jne 0x180006ab2
or dword [rbx], 0x40
test rsi, rsi
cmovne rdi, rsi
mov rsi, rdi
test byte [rbx], 0x20
jne 0x180006bf4
mov dword [rsp + 0x48], 0x81800000
mov rcx, rsi
test r15b, r13b
je 0x180006b15
call qword [sym.imp.KERNEL32.dll_lstrlenW]
dec eax
cdqe
lea rcx, [rsi + rax*2]
jmp 0x180006b0a
mov rcx, qword [rbx + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180006aed
lea rax, [rdi - 1]
mov qword [rbx + 0x88], rdi
cmp rax, 0xfffffffffffffffd
ja 0x180006d1c
lea r8, [rsp + 0x58]
mov rdx, r14
mov rcx, rbx
call fcn.18000d330
mov r14d, eax
test eax, eax
je 0x180006a89
mov eax, r14d
jmp 0x180006d35
cmp rcx, rsi
jbe 0x180006b3d
cmp ax, 0x2f
je 0x180006b3d
cmp ax, 0x5c
je 0x180006b3d
sub rcx, 2
movzx eax, word [rcx]
cmp ax, 0x2e
jne 0x180006af5
jmp 0x180006b45
call qword [sym.imp.KERNEL32.dll_lstrlenA]
dec eax
movsxd rcx, eax
add rcx, rsi
jmp 0x180006b35
cmp rcx, rsi
jbe 0x180006b3d
cmp al, 0x2f
je 0x180006b3d
cmp al, 0x5c
je 0x180006b3d
dec rcx
mov al, byte [rcx]
cmp al, 0x2e
jne 0x180006b25
jmp 0x180006b45
mov dword [rsp + 0x48], 0x81c00000
test r13b, 0x20
jne 0x180006be2
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x4c]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx r15d, word [rsp + 0x4c]
movabs rcx, 0xfe624e212ac18000
add rcx, qword [rsp + 0x70]
movabs rax, 0xd6bf94d5e57a42bd
imul rcx
shl r15d, 0x10
lea r12, [rcx + rdx]
sar r12, 0x17
mov rax, r12
shr rax, 0x3f
add r12, rax
mov eax, r12d
mov dword [rsp + 0x58], r12d
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x5c], eax
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x60], eax
movzx eax, word [rsp + 0x40]
or r15d, eax
mov dword [rsp + 0x40], r15d
mov r15d, select
jmp 0x180006c19
mov r15d, dword [rsp + 0x64]
mov dword [rsp + 0x40], r15d
mov r15d, select
jmp 0x180006c04
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x60]
mov r12d, dword [rsp + 0x58]
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x50], eax
xor eax, eax
or r9d, 0xffffffff
mov qword [rsp + 0x38], rax
mov r8, rsi
mov qword [rsp + 0x30], rax
xor edx, edx
mov dword [rsp + 0x28], eax
mov ecx, 0xfde9
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
xor ecx, ecx
mov r8d, 0x1000
add eax, 8
movsxd rdx, eax
add rdx, 0x169
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
xor edx, edx
mov r8d, 0x160
mov rcx, rax
mov rdi, rax
call fcn.180056d30
mov eax, r13d
and eax, 0x20
mov dword [rsp + 0x70], eax
je 0x180006cac
mov esi, 8
mov word [rdi + 2], si
mov r13b, sil
mov rax, qword [rbx + 0x70]
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], rax
mov rax, qword [rbx + 0x18]
mov qword [rdi + 0x38], rax
bts dword [rbx], 0x1f
xor r12d, r12d
jmp 0x1800070c9
mov eax, r13d
and eax, r15d
lea r15, [rdi + 0x50]
mov dword [rsp + 0x4c], eax
je 0x180006cf7
and qword [rsp + 0x38], 0
or r9d, 0xffffffff
and qword [rsp + 0x30], 0
mov r8, rsi
mov dword [rsp + 0x28], 0x104
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [rdi + 0x20], eax
test eax, eax
je 0x180006d13
dec eax
mov dword [rdi + 0x20], eax
jmp 0x180006d0f
mov rdx, rsi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [rdi + 0x20], eax
test eax, eax
jne 0x180006d56
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov esi, 9
test byte [rbx], 0x40
je 0x180006d33
mov rcx, qword [rbx + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
lea r11, [rsp + 0x1b0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov cl, byte [r15]
mov rax, r15
jmp 0x180006d6b
cmp cl, 0x5c
jne 0x180006d66
mov byte [rax], 0x2f
inc rax
mov cl, byte [rax]
test cl, cl
jne 0x180006d5e
mov eax, dword [rsp + 0x40]
lea rcx, [rdi + 0x160]
mov edx, dword [rsp + 0x50]
xor r14d, r14d
mov dword [rdi + 4], eax
xor r13b, r13b
mov eax, dword [rsp + 0x48]
mov dword [rdi + 0x34], eax
lea rax, [rbp - 0x70]
mov qword [rdi + 0x40], rax
lea r8d, [r14 + 8]
mov al, byte [rsp + 0x5c]
lea esi, [r14 + 9]
mov byte [rbp - 0x6b], al
mov eax, edx
shr eax, 8
mov byte [rbp - 0x6a], al
mov eax, edx
shr eax, 0x10
mov byte [rbp - 0x69], al
mov al, byte [rsp + 0x58]
mov byte [rbp - 0x67], al
mov eax, r12d
shr eax, 8
mov byte [rbp - 0x66], al
mov eax, r12d
shr eax, 0x10
mov byte [rbp - 0x65], al
mov al, byte [rsp + 0x60]
mov byte [rbp - 0x63], al
mov dword [rbp - 0x70], 0xd5455
mov byte [rbp - 0x6c], 7
movsd xmm0, qword [rbp - 0x70]
mov qword [rdi + 0x48], rcx
shr edx, 0x18
mov byte [rbp - 0x68], dl
mov edx, dword [rsp + 0x44]
mov eax, edx
shr eax, 8
mov byte [rbp - 0x62], al
mov eax, edx
shr eax, 0x10
mov byte [rbp - 0x61], al
mov word [rdi], r8w
mov dword [rdi + 0x24], shutdown
mov dword [rdi + 0x28], esi
shr r12d, 0x18
mov byte [rbp - 0x64], r12b
xor r12d, r12d
shr edx, 0x18
mov byte [rbp - 0x60], dl
movsd qword [rcx], xmm0
mov al, byte [rbp - 0x68]
mov byte [rcx + 8], al
mov byte [rcx + 2], 5
mov rax, qword [rdi + 0x48]
mov byte [rax + 4], 1
cmp dword [rsp + 0x4c], r12d
je 0x180006ec7
mov r8d, dword [rdi + 0x20]
mov rdx, r15
xor ecx, ecx
mov word [rbp - 0x5f], 0x7075
mov byte [rbp - 0x5b], 1
lea eax, [r8 + 0x1b]
mov dword [rdi + 0x24], eax
lea eax, [r8 + 0x13]
mov dword [rdi + 0x28], eax
mov al, r8b
add al, 0xa
mov byte [rbp - 0x5d], al
lea eax, [r8 + 0xa]
shr eax, 8
mov byte [rbp - 0x5c], al
call fcn.180007a0c
mov byte [rbp - 0x5a], al
mov ecx, eax
shr ecx, 8
mov rdx, r15
mov byte [rbp - 0x59], cl
mov ecx, eax
shr ecx, 0x10
mov byte [rbp - 0x58], cl
mov rcx, qword [rdi + 0x48]
shr eax, 0x18
mov byte [rbp - 0x57], al
mov rax, qword [rdi + 0x40]
movsd xmm0, qword [rax + 0x11]
movsd qword [rcx + 9], xmm0
mov al, byte [rax + 0x19]
mov byte [rcx + 0x11], al
mov r8d, dword [rdi + 0x20]
mov rcx, qword [rdi + 0x48]
inc r8d
add rcx, 0x12
call fcn.180056680
lea r8d, [r14 + 8]
cmp dword [rbx], r12d
jge 0x180006edd
mov esi, 8
mov dword [rdi + 0x24], r12d
mov r13b, sil
jmp 0x180006f6f
test byte [rsp + 0x78], r8b
je 0x180006f00
mov edx, dword [rdi + 0x20]
mov esi, 8
lea eax, [rdx - 1]
cmp byte [rax + rdi + 0x50], 0x2f
je 0x180006f6f
mov byte [rdx + rdi + 0x50], 0x2f
inc dword [rdi + 0x20]
jmp 0x180006f6f
cmp qword [rbx + 0x10], r12
je 0x180006f0f
mov r14d, ntohl
mov word [rdi], si
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrlenA]
movsxd rsi, eax
add rsi, r15
jmp 0x180006f28
cmp byte [rsi], 0x2e
je 0x180006f34
dec rsi
cmp rsi, r15
ja 0x180006f20
jne 0x180006f34
cmp byte [rsi], 0x2e
jne 0x180006f60
lea r15, [0x1800a19f0]
mov rdx, rsi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x180006f6a
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
cdqe
add r15, rax
cmp byte [r15], r12b
jne 0x180006f3b
mov esi, 8
mov r13b, sil
jmp 0x180006f6f
mov esi, 8
movzx eax, word [rdi]
mov word [rdi + 0x30], ax
movzx eax, r13b
mov word [rdi + 2], ax
test r13b, r13b
jne 0x180006f95
cmp qword [rbx + 0x70], 0xffffffffffffffff
je 0x180006f95
mov eax, r14d
add rax, qword [rbx + 0x70]
mov qword [rdi + 0x10], rax
mov rax, qword [rbx + 0x70]
mov rdx, rbx
mov qword [rdi + 0x18], rax
mov rcx, rdi
mov rax, qword [rbx + 0x20]
add rax, qword [rbx + 0x18]
mov qword [rdi + 0x38], rax
mov dword [rbx + 0x28], r12d
call fcn.18000c114
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x18000717d
mov edx, dword [rbx]
mov ecx, dword [rdi + 0x20]
test edx, edx
jns 0x180006fd8
add ecx, 0xb
mov qword [rbx + 0x18], rcx
jmp 0x1800070cb
mov eax, dword [rdi + 0x24]
add eax, 0x32
add eax, ecx
add qword [rbx + 0x18], rax
test r14d, r14d
je 0x1800070cb
mov r8, qword [rbx + 0x10]
lea r15, [rbx + 0x48]
mov dword [r15], 0x12345678
mov dword [rbx + 0x4c], 0x23456789
mov dword [rbx + 0x50], 0x34567890
test r8, r8
je 0x180007067
lea r9, [0x1800a1b70]
cmp byte [r8], r12b
je 0x180007067
movsx rax, byte [r8]
mov edx, dword [r15]
mov ecx, edx
xor rcx, rax
shr edx, 8
movzx eax, cl
xor edx, dword [r9 + rax*4]
movzx eax, dl
add eax, dword [r15 + 4]
imul ecx, eax, 0x8088405
mov dword [r15], edx
mov edx, dword [r15 + 8]
inc ecx
mov dword [r15 + 4], ecx
movzx eax, byte [r15 + 7]
movzx ecx, dl
xor rcx, rax
shr edx, 8
xor edx, dword [r9 + rcx*4]
mov dword [r15 + 8], edx
add r8, 1
jne 0x180007016
mov rsi, r12
call fcn.18005b470
sar eax, 7
mov byte [rbp + rsi - 0x80], al
inc rsi
cmp rsi, 0xc
jl 0x18000706a
mov al, byte [rdi + 5]
mov rsi, r12
mov byte [rbp - 0x75], al
mov dl, byte [rbp + rsi - 0x80]
mov rcx, r15
call fcn.18000d85c
mov byte [rbp + rsi - 0x80], al
inc rsi
cmp rsi, 0xc
jl 0x180007088
mov r8d, ntohl
lea rdx, [rbp - 0x80]
mov rcx, rbx
call fcn.18000d720
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x18000717d
add qword [rbx + 0x18], 0xc
lea esi, [rax + 8]
or dword [rbx], 0x10
mov edx, dword [rbx]
cmp qword [rbx + 0x88], r12
je 0x180007127
mov rcx, rbx
cmp r13b, sil
jne 0x1800070e6
mov rdx, rdi
call fcn.180009a3c
jmp 0x1800070eb
call fcn.18000b884
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x18000717d
and dword [rbx], 0xffffffef
mov edx, dword [rbx]
test dl, 0x40
je 0x18000710f
mov rcx, qword [rbx + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rbx]
mov rax, qword [rbx + 0x78]
and edx, 0xffffffbf
mov qword [rbx + 0x70], rax
mov rax, qword [rbx + 0xa0]
add qword [rbx + 0x18], rax
mov dword [rbx], edx
test edx, edx
jns 0x18000718d
or edx, esi
mov dword [rbx], edx
cmp dword [rsp + 0x70], r12d
jne 0x18000731b
mov edx, dword [rbx + 0x80]
mov rcx, rbx
call fcn.18000d650
movzx edx, word [rbx + 0x82]
mov rcx, rbx
call fcn.18000d650
mov edx, dword [rbx + 0x78]
mov rcx, rbx
call fcn.18000d650
mov rdx, qword [rbx + 0x78]
mov rcx, rbx
shr rdx, 0x10
call fcn.18000d650
mov eax, dword [rbx + 0x28]
test eax, eax
je 0x18000731b
mov esi, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x180006d21
mov rdx, qword [rbx + 0xa0]
mov eax, dword [rbx + 0x80]
mov r8, qword [rdi + 0x10]
mov dword [rdi + 8], eax
mov ecx, r14d
add rdx, rcx
add rcx, qword [rbx + 0xa0]
mov qword [rdi + 0x10], rcx
mov rax, qword [rbx + 0x70]
mov qword [rdi + 0x18], rax
test byte [rbx], 4
je 0x18000722a
test r14d, r14d
jne 0x18000722a
movzx eax, r13b
mov word [rdi + 2], ax
movzx eax, word [rdi]
test al, 1
jne 0x1800071de
mov ecx, 0xfff7
and ax, cx
mov word [rdi], ax
mov rdx, qword [rdi + 0x38]
mov rcx, rbx
mov word [rdi + 0x30], ax
sub rdx, qword [rbx + 0x20]
call fcn.18000c948
test eax, eax
je 0x180007220
mov rdx, rbx
mov rcx, rdi
call fcn.18000c114
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x18000717d
mov rdx, qword [rbx + 0x18]
mov rcx, rbx
call fcn.18000c948
test eax, eax
jne 0x1800072ed
mov esi, select
jmp 0x18000717f
movzx eax, r13b
cmp word [rdi + 2], ax
jne 0x180007322
test r13b, r13b
jne 0x180007246
cmp r8, rdx
jne 0x180007322
mov edx, 0x8074b50
mov rcx, rbx
call fcn.18000d650
mov edx, 0x807
mov rcx, rbx
call fcn.18000d650
mov edx, dword [rdi + 8]
mov rcx, rbx
call fcn.18000d650
movzx edx, word [rdi + 0xa]
mov rcx, rbx
call fcn.18000d650
mov esi, 0xffffffff
mov rcx, rbx
cmp qword [rdi + 0x10], rsi
jb 0x180007290
mov edx, esi
call fcn.18000d650
mov eax, esi
jmp 0x1800072a0
mov edx, dword [rdi + 0x10]
call fcn.18000d650
mov rax, qword [rdi + 0x10]
shr rax, 0x10
mov edx, eax
mov rcx, rbx
call fcn.18000d650
mov rcx, rbx
cmp qword [rdi + 0x18], rsi
jb 0x1800072bc
mov edx, esi
call fcn.18000d650
jmp 0x1800072cc
mov edx, dword [rdi + 0x18]
call fcn.18000d650
mov rsi, qword [rdi + 0x18]
shr rsi, 0x10
mov edx, esi
mov rcx, rbx
call fcn.18000d650
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x18000717d
add qword [rbx + 0x18], 0x10
movzx eax, word [rdi + 0x30]
mov word [rdi], ax
mov rax, qword [rbx + 0x68]
test rax, rax
jne 0x1800072fc
mov qword [rbx + 0x68], rdi
jmp 0x18000731b
mov rcx, qword [rax + 0x158]
jmp 0x18000730f
mov rax, rcx
mov rcx, qword [rcx + 0x158]
test rcx, rcx
jne 0x180007305
mov qword [rax + 0x158], rdi
xor eax, eax
jmp 0x180006d35
mov esi, select
jmp 0x18000717f