Function at 0x18002aad0
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xe0]
sub rsp, 0x1e0
mov rax, qword [0x1800a8088]
xor rax, rsp
mov qword [rbp + 0xd8], rax
mov rdi, qword [rbp + 0x148]
mov eax, r8d
mov rsi, qword [rbp + reloc.OLEAUT32.dll_VarI8FromCy]
mov r14, rdx
mov r8, qword [rbp + 0x158]
mov r15, qword [rbp + 0x140]
imul r10d, eax, 0x700
mov qword [rbp], rdx
mov rdx, rcx
mov qword [rsp + 0x60], rcx
mov ecx, eax
mov qword [rsp + 0x68], r9
mov dword [rsp + 0x40], eax
mov qword [rbp + 8], rdi
mov qword [rbp + 0x20], rsi
mov qword [rbp + 0x10], r8
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x58], r10d
cmp eax, r10d
ja 0x18002aee1
movzx eax, word [rsp + 0x70]
xor ebx, ebx
mov r13, qword [rbp + 0x18]
movzx r12d, byte [rsp + 0x54]
mov dword [rbp - 0x78], eax
cmp ecx, 0x772e
ja 0x18002b1e5
je 0x18002b15f
cmp ecx, 0x125
ja 0x18002afcf
je 0x18002adb3
mov eax, ecx
sub eax, 0x61
je 0x18002ad44
sub eax, 0xb
je 0x18002ac50
sub eax, 0x5c
je 0x18002abdd
cmp eax, 0x46
jne 0x18002b550
xor edx, edx
lea r8d, [rax - 0x44]
mov rcx, rsi
call fcn.180067298
test eax, eax
jns 0x18002b53d
mov dword [r14], 4
mov rax, rbx
jmp 0x18002aee5
test r15, r15
je 0x18002abd5
mov rax, qword [r15]
mov qword [rbp + 0x18], rax
test rax, rax
jne 0x18002ac0a
xor r9d, r9d
mov qword [rsp + 0x20], r15
xor r8d, r8d
xor edx, edx
mov ecx, VarUI2FromUI1
call fcn.1800523d0
jmp 0x18002b53d
cmp dword [r15 + 0x1c], 0
je 0x18002ac2a
mov rdx, qword [r15 + 0x10]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov rcx, r15
call qword [r15 + OleUIPromptUserA]
mov rdx, qword [r15 + 0x10]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 5
mov rcx, r15
call qword [r15 + OleUIPromptUserA]
mov rcx, r15
call fcn.18006c3d8
jmp 0x18002b53d
cmp qword [rdi], 0
jbe 0x18002b550
mov r11, rsi
mov r10, rdx
sub r11, rdx
nop dword [rax]
nop word [rax + rax]
mov r9d, 0x11a
mov eax, r9d
sub eax, 0x11a
je 0x18002acee
cmp eax, 0x22
jne 0x18002ad12
test rsi, rsi
je 0x18002ac92
mov byte [r11 + r10], r12b
mov edx, dword [r15 + 8]
mov ecx, edx
mov r8, qword [0x1800aa760]
movzx eax, r12b
xor rcx, rax
shr edx, 8
movzx eax, cl
mov ecx, dword [r8 + rax*4]
xor ecx, edx
mov edx, dword [r15 + 0x10]
movzx eax, cl
add eax, dword [r15 + 0xc]
imul r12d, eax, 0x8088405
mov dword [r15 + 8], ecx
mov ecx, edx
shr edx, 8
inc r12d
mov dword [r15 + 0xc], r12d
shr r12d, 0x18
movzx eax, r12b
xor rcx, rax
movzx eax, cl
mov eax, dword [r8 + rax*4]
xor eax, edx
mov dword [r15 + 0x10], eax
jmp 0x18002ad12
cmp dword [r14], 0
movzx r12d, byte [r10]
jne 0x18002ad12
movzx eax, word [r15 + 0x10]
or ax, 2
movzx ecx, ax
mov eax, ecx
xor eax, 1
imul eax, ecx
sar eax, 8
xor r12b, al
add r9d, 0x22
cmp r9d, 0x15e
jb 0x18002ac76
mov rdx, qword [rsp + 0x60]
inc r10
mov rax, r10
sub rax, rdx
cmp rax, qword [rdi]
jb 0x18002ac70
mov r9, qword [rsp + 0x68]
jmp 0x18002b547
test r15, r15
je 0x18002abd5
test rsi, rsi
je 0x18002b132
cmp qword [r9], 0xffffffffffffffff
jl 0x18002b132
mov rdx, qword [rdx]
cmp rdx, qword [rsi + 0x50]
jae 0x18002b132
test byte [rdi], 8
jne 0x18002ad8f
mov rax, qword [rsi + 0x60]
mov rcx, rdx
shl rcx, 6
mov ecx, dword [rax + rcx]
dec ecx
cmp ecx, 2
jbe 0x18002b571
mov ecx, dword [rsp + 0x50]
mov rax, qword [rsi + 0x38]
test rax, rax
je 0x18002b132
movsxd rax, dword [rax + 8]
cmp rdx, rax
jae 0x18002b132
mov rdx, qword [rsp + 0x60]
jmp 0x18002b550
mov qword [rsp + 0x28], rbx
lea r9, [rbp - 0x50]
xor r8d, r8d
mov qword [rsp + 0x20], rbx
mov edx, 0xb7
xor ecx, ecx
call fcn.1800330d0
test al, al
je 0x18002b57e
cmp dword [rbp - 0x50], 2
jb 0x18002afae
mov edi, reloc.OLEAUT32.dll_VarBoolFromStr
nop word [rax + rax]
cmp edi, 0x47b0
ja 0x18002aec5
je 0x18002ae96
cmp edi, 0x7c
je 0x18002ae7d
cmp edi, 0x1838
je 0x18002ae4c
cmp edi, 0x2ff4
jne 0x18002af94
mov eax, 0x69
mov dword [rbp + 0xc6], 0x67006e
mov word [rbp + 0xc4], ax
mov eax, 0x4f
mov word [rbp + 0xca], ax
mov dword [rbp + 0xcc], 0x6a0062
jmp 0x18002af94
mov eax, 0x6c
mov dword [rbp + 0xba], 0x4d0065
mov word [rbp + 0xb8], ax
mov eax, 0x70
mov word [rbp + 0xc2], ax
mov dword [rbp + 0xbe], 0x700061
jmp 0x18002af94
mov dword [rbp + 0xb0], 0x79004d
mov dword [rbp + 0xb4], 0x690046
jmp 0x18002af94
mov eax, 0x65
mov dword [rbp + 0xd2], 0x740063
mov esi, reloc.OLEAUT32.dll_VarUI2FromUI1
mov word [rbp + 0xd0], ax
mov dword [rbp - 0x78], esi
mov word [rbp + 0xd6], bx
mov byte [rsp + 0x54], 1
jmp 0x18002af94
cmp edi, 0x5f6c
je 0x18002af15
cmp edi, 0x7728
je 0x18002af0f
cmp edi, 0x8ee4
jne 0x18002af94
mov rax, qword [rbp - 0x58]
mov rcx, qword [rbp + 0xd8]
xor rcx, rsp
call fcn.1800618d0
mov rbx, qword [rsp + 0x230]
add rsp, 0x1e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov byte [rbp - 0x58], 1
jmp 0x18002af94
movsxd rsi, dword [rbp - 0x78]
lea rcx, [rbp + 0xb0]
mov qword [rsp + 0x28], rcx
xor r9d, r9d
xor edx, edx
movsx eax, si
mov dword [rsp + 0x20], eax
lea r8d, [r9 + 4]
lea rcx, [rdx - 1]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r14, rax
test rax, rax
jne 0x18002af4d
mov byte [rsp + 0x54], al
jmp 0x18002af94
cmp byte [rsp + 0x54], 0
je 0x18002af94
movsx rax, si
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0xf001f
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rcx, rax
mov rsi, rax
call qword [sym.imp.dbghelp.dll_GetTimestampForLoadedLibrary]
test rsi, rsi
je 0x18002af8b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, 0x17bc
cmp edi, 0xa624
jbe 0x18002adf0
mov rsi, qword [rbp + 0x20]
mov r14, qword [rbp]
xor edx, edx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea ecx, [rdx + 4]
call fcn.180035cc0
cmp eax, 3
setae byte [rbp - 0x58]
jmp 0x18002b53d
cmp ecx, 0x2ad1
je 0x18002b0ab
cmp ecx, 0x5541
je 0x18002aff8
cmp ecx, 0x5848
jne 0x18002b550
mov rax, qword [rbp + 0x18]
jmp 0x18002aee5
test byte [rdi], 0x20
mov qword [rbp - 0x68], rbx
jne 0x18002b038
movzx eax, word [rbp + 0xa6]
test ax, ax
je 0x18002b038
test r8, r8
je 0x18002b594
lea rdx, [rsp + 0x78]
mov word [rsp + 0x78], ax
mov ecx, 0x7d
call fcn.180049690
mov qword [rbp - 0x68], rax
cmp rax, 0
je 0x18002b587
test byte [rdi], 4
mov qword [rbp - 0x70], rbx
jne 0x18002b06f
movzx eax, word [rbp + 0xa4]
test ax, ax
je 0x18002b06f
lea rdx, [rsp + 0x70]
mov word [rsp + 0x70], ax
mov ecx, 0xb6
call fcn.180022830
mov qword [rbp - 0x70], rax
cmp rax, 0
je 0x18002b5a1
mov rdi, qword [rsp + 0x60]
lea rcx, [r15 + 0x18]
lea r9, [rbp - 0x48]
mov r8d, 0xdc
mov rdx, rsi
mov eax, dword [rdi]
mov dword [rbp - 0x48], eax
call fcn.1800065a0
mov eax, eax
mov qword [rbp - 8], rax
test rax, rax
je 0x18002abd5
mov r9, qword [rsp + 0x68]
mov rdx, rdi
jmp 0x18002b547
mov eax, dword [rdi]
test al, 0x20
je 0x18002b0b6
or eax, 4
mov dword [rdi], eax
cmp qword [r14], 0
ja 0x18002b0c2
cmp qword [r9], 0
jle 0x18002b0c6
test al, 4
jne 0x18002b132
mov dword [rbp - 0x40], eax
lea rcx, [rbp + 0x70]
mov rax, qword [rdx]
mov r9d, 0x9b
mov qword [rbp + 0x28], rax
lea rdx, [rbp - 0x40]
lea rax, [rbp + 0x28]
mov r8, rsi
mov qword [rsp + 0x20], rax
call fcn.18003fe30
test eax, eax
js 0x18002b5ae
mov r9, qword [rsp + 0x68]
mov rax, qword [r9]
cmp rax, 0xffffffffffffffff
jne 0x18002b10b
mov qword [r9], rbx
mov rax, rbx
mov rcx, qword [r14]
test rcx, rcx
jne 0x18002b11c
test rax, rax
jle 0x18002b542
lea rdx, [rax + rcx]
cmp rdx, rcx
jb 0x18002b132
cmp rdx, qword [rbp + 0x88]
jbe 0x18002b542
mov dword [rsp + 0x40], SafeArrayLock
lea rcx, [r15 + 0x18]
mov dword [rsp + 0x48], ebx
mov r9d, 0x112
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x48]
call fcn.18002d330
mov rax, rbx
jmp 0x18002aee5
mov rcx, rsi
call fcn.180065fa4
mov rdi, qword [rsp + 0x60]
mov ecx, dword [rdi]
test eax, eax
je 0x18002b5d9
mov dword [rbp - 0x38], eax
lea rdx, [rbp - 0x30]
lea rax, [rbp - 0x38]
mov dword [rbp - 0x30], ecx
mov r9, rsi
mov qword [rsp + 0x20], rax
mov r8d, 0xcf
mov rcx, r14
call fcn.18001f540
mov qword [rbp - 0x60], rax
cmp rax, 0
je 0x18002b5c9
mov eax, dword [rdi]
lea r9, [rbp - 0x28]
mov qword [rsp + 0x28], rbx
xor r8d, r8d
mov rdx, r14
mov dword [rbp - 0x28], eax
mov ecx, reloc.OLEAUT32.dll_VarR4FromDec
mov qword [rsp + 0x20], r15
call fcn.18000dbe0
mov qword [rbp - 0x80], rax
test rax, rax
je 0x18002b5bb
mov r9, qword [rsp + 0x68]
mov rdx, rdi
jmp 0x18002b547
cmp ecx, 0xed4e
ja 0x18002b4f2
je 0x18002b468
cmp ecx, 0x7fb1
je 0x18002b21f
cmp ecx, 0x8155
je 0x18002aee1
cmp ecx, 0xaa21
jne 0x18002b550
mov rax, r13
jmp 0x18002aee5
cmp qword [rbp + 0x90], 0
jne 0x18002b25f
lea rax, [rbp + 0x30]
mov dword [rbp - 0x20], ebx
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov r8d, VarR4FromDec
mov qword [rbp + 0x30], rbx
mov rdx, r15
lea rcx, [rbp - 0x20]
call fcn.18002e1e0
mov r13, rax
test rax, rax
je 0x18002abd5
jmp 0x18002b53d
mov edi, 0x7d
mov eax, edi
sub eax, 0x7c
je 0x18002b3f6
cmp eax, 1
jne 0x18002b458
mov rcx, qword [r9]
mov rdx, qword [r14]
lea rax, [rdx + rcx]
test rax, rax
je 0x18002b2f7
cmp qword [rbp - 0x68], 0
jne 0x18002b2f7
cmp qword [rbp - 0x70], 0
jne 0x18002b2f7
test rcx, rcx
jne 0x18002b2a4
mov rcx, qword [rbp + 0x88]
sub rcx, rdx
mov rax, qword [rbp - 8]
lea r9, [rbp - 0x18]
add rax, rdx
mov qword [rsp + 0x38], rbx
mov qword [rbp + 0x38], rax
lea r8, [rbp + 0x38]
mov rax, qword [rsi + 8]
lea rdx, [rbp + 0x70]
mov qword [rsp + 0x30], rax
mov qword [rbp + 0x40], rcx
lea rcx, [rbp + 0x40]
mov dword [rsp + 0x28], 0x23
mov qword [rsp + 0x20], r15
mov dword [rbp - 0x18], ebx
call fcn.180031480
mov r13, rax
test rax, rax
je 0x18002abd5
jmp 0x18002b3a2
mov rax, qword [rbp + 0x90]
lea r9, [rbp - 0x10]
mov qword [rbp + 0x50], rax
lea r8, [rbp + 0x48]
mov rax, qword [rbp - 8]
lea rdx, [rbp + 0x70]
mov qword [rsp + 0x38], rbx
lea rcx, [rbp + 0x50]
mov qword [rbp + 0x48], rax
mov rax, qword [rsi + 8]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x23
mov qword [rsp + 0x20], r15
mov dword [rbp - 0x10], ebx
call fcn.180031480
mov r13, rax
test rax, rax
je 0x18002abd5
mov rax, qword [rbp - 0x68]
test rax, rax
je 0x18002b37a
mov rcx, qword [rbp + 0x10]
xor r9d, r9d
movzx r8d, word [rbp + 0xa6]
mov rdx, r13
mov qword [rsp + 0x20], rcx
mov rcx, r15
call rax
test rax, rax
je 0x18002b60d
mov r13, rax
mov rax, qword [rbp - 0x70]
test rax, rax
je 0x18002b3a2
movzx r8d, word [rbp + 0xa4]
xor r9d, r9d
mov rdx, r13
mov rcx, r15
call rax
test rax, rax
je 0x18002b60d
mov r13, rax
mov rax, qword [rbp + 8]
test byte [rax], 4
je 0x18002b3b9
cmp word [rbp + 0xa4], 0
jne 0x18002b453
mov r9, qword [rsp + 0x68]
mov rcx, qword [r9]
test rcx, rcx
je 0x18002b3d6
add rcx, qword [r14]
cmp rcx, qword [rbp + 0x90]
jne 0x18002b458
mov r9d, VarR8FromI2
mov dword [rsp + 0x48], 1
lea r8, [rsp + 0x48]
mov rdx, r15
mov rcx, r13
call fcn.180003860
jmp 0x18002b447
mov rcx, qword [r9]
mov rdx, qword [r14]
lea rax, [rdx + rcx]
test rax, rax
je 0x18002b458
cmp qword [rbp - 0x70], 0
jne 0x18002b413
cmp qword [rbp - 0x68], 0
je 0x18002b458
test rcx, rcx
jne 0x18002b422
mov rcx, qword [rbp + 0x88]
sub rcx, rdx
mov qword [rbp + 0x60], rcx
lea rax, [rbp + 0x58]
mov qword [rbp + 0x58], rdx
lea r8, [rbp + 0x60]
mov edx, 0xac
mov qword [rsp + 0x20], rax
mov rcx, r13
mov r9, r15
call fcn.180006940
test rax, rax
je 0x18002b60d
mov r13, rax
mov r9, qword [rsp + 0x68]
dec edi
cmp edi, 0x7b
ja 0x18002b264
jmp 0x18002b542
mov rdx, qword [rbp - 0x80]
mov rax, qword [rbp - 0x60]
mov qword [rdx + 0x38], rax
mov qword [rdx + 8], rsi
movsxd rax, dword [rax + 8]
test eax, eax
jne 0x18002b486
mov qword [rdx + 0x60], rbx
jmp 0x18002b4b1
mov rcx, rax
shl rcx, 6
call fcn.18006cfe0
mov rdi, qword [rbp - 0x80]
mov qword [rdi + 0x60], rax
test rax, rax
je 0x18002b62c
mov ecx, dword [rsp + 0x50]
mov r9, qword [rsp + 0x68]
mov r10d, dword [rsp + 0x58]
mov rax, qword [rbp - 0x60]
mov edi, ebx
cmp dword [rax + 8], 0
jle 0x18002ada9
mov rbx, qword [rbp - 0x80]
mov r14, rax
nop dword [rax + rax]
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
lea edx, [r9 + 0x64]
call fcn.180032a10
inc edi
cmp edi, dword [r14 + 8]
jl 0x18002b4d0
mov r14, qword [rbp]
xor ebx, ebx
jmp 0x18002b53d
cmp ecx, 0x1636e
je 0x18002b524
cmp ecx, 0x1d98e
je 0x18002b513
cmp ecx, 0x24fae
jne 0x18002b550
mov rax, qword [rbp - 0x80]
jmp 0x18002aee5
mov rdx, qword [rbp - 0x80]
mov eax, dword [rdx + 0x28]
mov dword [rdx + 0x2c], eax
mov rdx, qword [rsp + 0x60]
jmp 0x18002b550
mov rdx, qword [rbp - 0x80]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 0xc0
xor ecx, ecx
call fcn.180001e30
mov r9, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x60]
mov ecx, dword [rsp + 0x50]
mov r10d, dword [rsp + 0x58]
imul eax, dword [rsp + 0x40], 0x70
add ecx, eax
mov dword [rsp + 0x50], ecx
cmp ecx, r10d
ja 0x18002aee1
mov rdi, qword [rbp + 8]
mov r8, qword [rbp + 0x10]
jmp 0x18002ab72
mov dword [rsp + 0x40], reloc.OLEAUT32.dll_SafeArrayDestroy
jmp 0x18002b13a
mov byte [rbp - 0x58], 0
jmp 0x18002aee1
mov dword [rsp + 0x40], DispInvoke
jmp 0x18002b13a
mov dword [rsp + 0x40], DispInvoke
jmp 0x18002b13a
mov dword [rsp + 0x40], reloc.OLEAUT32.dll_SafeArrayGetDim
jmp 0x18002b13a
mov dword [rsp + 0x40], reloc.OLEAUT32.dll_SafeArrayLock
jmp 0x18002b13a
mov rdx, qword [rbp - 0x60]
mov ecx, 0xf9
call fcn.180022830
mov rcx, rsi
call fcn.180066798
mov rax, rbx
jmp 0x18002aee5
mov dword [rsp + 0x40], ecx
lea r9, [rsp + 0x40]
mov ecx, reloc.OLEAUT32.dll_VarR4FromDec
mov qword [rsp + 0x28], rbx
xor r8d, r8d
mov qword [rsp + 0x20], r15
mov rdx, r14
call fcn.18000dbe0
mov rbx, rax
test rax, rax
je 0x18002b5c9
mov qword [rax + 8], rsi
jmp 0x18002aee5
xor r9d, r9d
mov qword [rsp + 0x20], r13
xor r8d, r8d
xor edx, edx
mov ecx, VarUI2FromUI1
call fcn.1800523d0
mov rax, rbx
jmp 0x18002aee5
mov r9d, 0x11f
mov dword [rsp + 0x40], SafeArrayLock
mov r8, r14
mov qword [rsp + 0x20], rbx
lea rdx, [rsp + 0x40]
xor ecx, ecx
call fcn.18003fe30
xor r9d, r9d
mov qword [rsp + 0x20], rbx
mov r8d, 0xc4
mov rdx, rdi
xor ecx, ecx
call fcn.18002e1e0
mov rax, rbx
jmp 0x18002aee5