Function at 0x18009b640
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1400]
mov eax, 0x1500
call fcn.1800c1020
sub rsp, rax
mov rax, qword [0x1801300c0]
xor rax, rsp
mov qword [rbp + 0x13f0], rax
mov r14, rdx
mov qword [rsp + 0x68], rcx
xor r15d, r15d
cmp byte [rcx + 0xc], r15b
je 0x18009c0c5
cmp byte [0x18022bd54], r15b
jne 0x18009c0c5
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x13b0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x13c0], xmm1
movdqu xmmword [rbp + 0x13d0], xmm0
lea rdx, [rbp + 0x13b0]
mov rcx, r14
call fcn.1800af350
test al, al
je 0x18009c0b9
mov r8, r14
lea rdx, [rbp + 0x1390]
mov rcx, qword [rbp + 0x13b0]
call fcn.1800b0c20
nop
mov r8, r14
lea rdx, [rbp + 0x1380]
mov rcx, qword [rbp + 0x13c0]
call fcn.1800ac010
nop
mov r8, r14
lea rdx, [rbp + 0x1370]
mov rcx, qword [rbp + 0x13b0]
call fcn.1800b0940
nop
mov r8, r14
lea rdx, [rbp + 0x13a0]
mov rcx, qword [rbp + 0x13c0]
call fcn.1800abd70
nop
mov ebx, 0xffffffff
cmp dword [0x18022bdb0], r15d
jne 0x18009b784
mov rdi, qword [rbp + 0x1370]
mov rax, qword [r14]
mov r9, qword [rax + 0xc0]
xor r8d, r8d
mov rdx, qword [rdi + 8]
mov rcx, r14
call r9
test al, al
jne 0x18009bfb7
mov rax, qword [0x180227e40]
mov r8, qword [rax + 0x70]
mov rax, qword [r14]
mov r9, qword [rax + 0x100]
mov rdx, qword [rdi + 8]
mov rcx, r14
call r9
test al, al
je 0x18009bfb7
mov r12d, r15d
mov esi, r15d
nop word [rax + rax]
xorps xmm0, xmm0
movups xmmword [rbp + 0x1320], xmm0
mov r9d, esi
mov r8, r14
lea rdx, [rbp + 0x1320]
mov rcx, qword [rbp + 0x13a0]
call fcn.1800a2db0
nop
mov rcx, qword [rbp + 0x1320]
test rcx, rcx
jne 0x18009b7c3
inc r12d
mov edi, r12d
mov rdx, r14
call fcn.1800a3be0
nop
inc r12d
test al, al
cmovne r12d, edi
mov rcx, qword [rbp + 0x1328]
test rcx, rcx
je 0x18009b818
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009b818
mov rdi, qword [rbp + 0x1328]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, ebx
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18009b818
mov rcx, qword [rbp + 0x1328]
mov rax, qword [rcx]
call qword [rax + 8]
inc esi
cmp esi, 9
jl 0x18009b790
mov dword [rsp + 0x60], r12d
test r12d, r12d
je 0x18009bfb7
mov byte [rsp + 0x50], 0
cmp dword [0x18022bdb0], 1
jne 0x18009b9d8
mov rax, qword [rbp + 0x1370]
cmp qword [rax + 8], 0
jne 0x18009b9d8
xorps xmm0, xmm0
movups xmmword [rbp + 0x1310], xmm0
mov ecx, 0x20
call fcn.1800c01a8
mov rsi, rax
mov qword [rsp + 0x58], rax
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov dword [rax + 8], 1
mov dword [rax + 0xc], 1
lea rax, vtable.std::_Ref_count_obj2_class_GuiScreen_.0
mov qword [rsi], rax
lea rdi, [rsi + 0x10]
mov rdx, r14
mov rcx, rdi
call fcn.1800a1840
nop
xorps xmm0, xmm0
movups xmmword [rbp + 0x1320], xmm0
mov qword [rbp + 0x1320], rdi
mov qword [rbp + 0x1328], rsi
mov r9, qword [rbp + 0x13c0]
mov r8, r14
lea rdx, [rbp + 0x1310]
call fcn.1800a2400
nop
mov eax, ebx
lock xadd dword [rsi + 8], eax
cmp eax, 1
jne 0x18009b8f7
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax]
mov eax, ebx
lock xadd dword [rsi + 0xc], eax
cmp eax, 1
jne 0x18009b8f7
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 8]
mov rdi, qword [rbp + 0x1310]
test rdi, rdi
jne 0x18009b94e
mov rcx, qword [rbp + 0x1318]
test rcx, rcx
je 0x18009bfb7
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009bfb7
mov rdi, qword [rbp + 0x1318]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, ebx
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18009bfb7
mov rcx, qword [rbp + 0x1318]
jmp 0x18009bfb0
mov rsi, qword [rbp + 0x13b0]
mov rax, qword [r14]
mov r9, qword [rax + 0xc0]
xor r8d, r8d
mov rdx, qword [rsi + 8]
mov rcx, r14
call r9
test al, al
jne 0x18009b993
mov rax, qword [rdi + 8]
mov qword [rsp + 0x20], rax
lea r9, str.displayGuiScreen
mov r8, qword [rsi + 8]
mov rdx, r14
mov rcx, qword [0x180228040]
call fcn.1800b46f0
mov byte [rsp + 0x50], 1
mov rcx, qword [rbp + 0x1318]
test rcx, rcx
je 0x18009b9d8
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009b9d8
mov rdi, qword [rbp + 0x1318]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, ebx
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18009b9d8
mov rcx, qword [rbp + 0x1318]
mov rax, qword [rcx]
call qword [rax + 8]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x1358], xmm0
mov qword [rbp + 0x1368], rax
mov rcx, qword [rbp + 0x13b8]
test rcx, rcx
je 0x18009ba02
lock inc dword [rcx + 8]
mov rcx, qword [rbp + 0x13b8]
mov rax, qword [rbp + 0x13b0]
mov qword [rbp + 0x1358], rax
mov qword [rbp + 0x1360], rcx
mov qword [rbp + 0x1368], r14
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x1340], xmm1
mov qword [rbp + 0x1350], r15
mov dword [rsp + 0x58], 9
lea r12, vtable.std::_Ref_count_obj2_class_ItemPotion_.0
nop
xorps xmm0, xmm0
movups xmmword [rbp + 0x1310], xmm0
mov r9d, dword [rsp + 0x58]
mov r8, r14
lea rdx, [rbp + 0x1310]
mov rcx, qword [rbp + 0x1380]
call fcn.1800a0690
nop
xorps xmm0, xmm0
movups xmmword [rbp + 0x1330], xmm0
mov r8, r14
lea rdx, [rbp + 0x1330]
mov rcx, qword [rbp + 0x1310]
call fcn.1800ace90
nop
mov r13, qword [rbp + 0x1330]
test r13, r13
je 0x18009bbf0
mov rdx, r14
mov rcx, r13
call fcn.1800a3be0
test al, al
je 0x18009bbf0
xorps xmm0, xmm0
movups xmmword [rbp + 0x1320], xmm0
mov r8, r14
lea rdx, [rbp + 0x1320]
mov rcx, r13
call fcn.1800a3ab0
nop
mov rdi, qword [rbp + 0x1320]
test rdi, rdi
je 0x18009bbaf
mov rdi, qword [rdi + 8]
mov ecx, 0x20
call fcn.1800c01a8
mov r15, rax
mov qword [rsp + 0x70], rax
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov dword [rax + 8], 1
mov dword [rax + 0xc], 1
mov qword [rax], r12
lea rsi, [rax + 0x10]
mov r8, rdi
mov rdx, r14
mov rcx, rsi
call fcn.1800a45b0
nop
xorps xmm0, xmm0
movups xmmword [rbp + 0x13e0], xmm0
mov qword [rbp + 0x13e0], rsi
mov qword [rbp + 0x13e8], r15
mov r8, qword [r13 + 8]
mov rdx, r14
mov rcx, rsi
call fcn.1800a48d0
mov r8, qword [r13 + 8]
mov rdx, r14
mov rcx, rsi
call fcn.1800a4ba0
test al, al
je 0x18009bb83
mov rdx, qword [rbp + 0x1348]
cmp rdx, qword [rbp + 0x1350]
je 0x18009bb71
mov eax, dword [rsp + 0x58]
mov dword [rdx], eax
add qword [rbp + 0x1348], 4
jmp 0x18009bb83
lea r8, [rsp + 0x58]
lea rcx, [rbp + 0x1340]
call fcn.1800641b0
nop
mov eax, ebx
lock xadd dword [r15 + 8], eax
cmp eax, 1
jne 0x18009bbaf
mov rax, qword [r15]
mov rcx, r15
call qword [rax]
mov eax, ebx
lock xadd dword [r15 + 0xc], eax
cmp eax, 1
jne 0x18009bbaf
mov rax, qword [r15]
mov rcx, r15
call qword [rax + 8]
nop
mov rcx, qword [rbp + 0x1328]
test rcx, rcx
je 0x18009bbf0
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009bbf0
mov rdi, qword [rbp + 0x1328]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, ebx
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18009bbf0
mov rcx, qword [rbp + 0x1328]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rbp + 0x1338]
test rcx, rcx
je 0x18009bc31
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009bc31
mov rdi, qword [rbp + 0x1338]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, ebx
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18009bc31
mov rcx, qword [rbp + 0x1338]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rbp + 0x1318]
test rcx, rcx
je 0x18009bc71
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009bc71
mov rdi, qword [rbp + 0x1318]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, ebx
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18009bc71
mov rcx, qword [rbp + 0x1318]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, dword [rsp + 0x58]
inc eax
mov dword [rsp + 0x58], eax
cmp eax, 0x24
jl 0x18009ba40
mov rax, qword [rbp + 0x1348]
sub rax, qword [rbp + 0x1340]
test rax, 0xfffffffffffffffc
mov r12d, dword [rsp + 0x60]
jne 0x18009bcef
cmp byte [rsp + 0x50], 0
je 0x18009bf14
mov rdi, qword [rbp + 0x13c0]
mov rax, qword [r14]
mov r9, qword [rax + 0xc0]
xor r8d, r8d
mov rdx, qword [rdi + 8]
mov rcx, r14
call r9
test al, al
jne 0x18009bf14
lea r9, str.closeScreen
mov r8, qword [rdi + 8]
mov rdx, r14
mov rcx, qword [0x180228000]
call fcn.1800b46f0
jmp 0x18009bf14
cmp byte [0x180227d40], 0
je 0x18009bd4b
call fcn.1800bfa8c
mov dword [rbp + 0x1304], 0xffffffff
mov dword [rbp - 0x7c], eax
mov edx, 1
nop
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edx
mov dword [rbp + rdx*4 - 0x7c], eax
inc rdx
cmp rdx, 0x270
jb 0x18009bd10
mov dword [rbp - 0x80], 0x270
lea r9, [rbp - 0x80]
lea r8, [rbp + 0x1340]
lea rdx, [rsp + 0x70]
call fcn.180098720
mov edx, dword [0x180227c6c]
lea r8d, [rdx + 0x14]
call fcn.1800776a0
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rbp + 0x1358]
call fcn.18009c100
test al, al
je 0x18009bf14
xor esi, esi
mov rdi, qword [rbp + 0x1340]
mov rax, qword [rbp + 0x1348]
mov qword [rsp + 0x60], rax
cmp rdi, rax
je 0x18009be8d
mov r13d, dword [rdi]
cmp esi, r12d
je 0x18009be8d
lea rcx, [rbp + 0x1358]
call fcn.18009c100
test al, al
je 0x18009bf14
mov r15, qword [rbp + 0x1380]
mov rax, qword [r14]
mov r9, qword [rax + 0xc0]
xor r8d, r8d
mov rdx, qword [r15 + 8]
mov rcx, r14
call r9
test al, al
je 0x18009bddb
xor r15d, r15d
jmp 0x18009bdf8
lea r9, str.windowId
mov r8, qword [r15 + 8]
mov rdx, r14
mov rcx, qword [0x180228240]
call fcn.1800b5820
mov r15d, eax
mov rcx, qword [r14]
mov r9, qword [rcx + 0xc0]
xor r8d, r8d
mov rax, qword [rbp + 0x1390]
mov rdx, qword [rax + 8]
mov rcx, r14
call r9
test al, al
jne 0x18009be65
mov rax, qword [rbp + 0x13c0]
mov rax, qword [rax + 8]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r15d
lea r9, str.windowClick
mov rax, qword [rbp + 0x1390]
mov r8, qword [rax + 8]
mov rdx, r14
mov rcx, qword [0x180228260]
call fcn.1800b4140
mov edx, dword [0x180227bb4]
lea r8d, [rdx + 0xa]
call fcn.1800776a0
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
inc esi
add rdi, 4
cmp rdi, qword [rsp + 0x60]
jne 0x18009bd94
cmp byte [0x180227bd8], 0
je 0x18009bef9
lea rcx, [rbp + 0x1358]
call fcn.18009c100
test al, al
je 0x18009bef9
mov edx, dword [0x180227c6c]
lea r8d, [rdx + 0x14]
call fcn.1800776a0
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rax, qword [r14]
mov r9, qword [rax + 0xc0]
xor r8d, r8d
mov rdi, qword [rbp + 0x13c0]
mov rdx, qword [rdi + 8]
mov rcx, r14
call r9
test al, al
jne 0x18009bef9
lea r9, str.closeScreen
mov r8, qword [rdi + 8]
mov rdx, r14
mov rcx, qword [0x180228000]
call fcn.1800b46f0
cmp byte [0x180227cbc], 0
jne 0x18009bf0b
cmp dword [0x18022bdb0], 1
jne 0x18009bf14
mov rax, qword [rsp + 0x68]
mov byte [rax + 0xc], 0
mov rcx, qword [rbp + 0x1340]
test rcx, rcx
je 0x18009bf76
mov rax, qword [rbp + 0x1350]
sub rax, rcx
sar rax, 2
lea rdx, [rax*4]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18009bf5b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18009c0ef
call fcn.1800c0080
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x1340], xmm0
mov qword [rbp + 0x1350], 0
mov rcx, qword [rbp + 0x1360]
test rcx, rcx
je 0x18009bfb7
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009bfb7
mov rdi, qword [rbp + 0x1360]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, ebx
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18009bfb7
mov rcx, qword [rbp + 0x1360]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rbp + 0x13a8]
test rcx, rcx
je 0x18009bff8
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009bff8
mov rdi, qword [rbp + 0x13a8]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, ebx
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18009bff8
mov rcx, qword [rbp + 0x13a8]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rbp + 0x1378]
test rcx, rcx
je 0x18009c039
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009c039
mov rdi, qword [rbp + 0x1378]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, ebx
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18009c039
mov rcx, qword [rbp + 0x1378]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rbp + 0x1388]
test rcx, rcx
je 0x18009c07a
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009c07a
mov rdi, qword [rbp + 0x1388]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, ebx
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x18009c07a
mov rcx, qword [rbp + 0x1388]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rbp + 0x1398]
test rcx, rcx
je 0x18009c0b9
mov eax, ebx
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x18009c0b9
mov rdi, qword [rbp + 0x1398]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
lock xadd dword [rdi + 0xc], ebx
cmp ebx, 1
jne 0x18009c0b9
mov rcx, qword [rbp + 0x1398]
mov rax, qword [rcx]
call qword [rax + 8]
nop
lea rcx, [rbp + 0x13b0]
call fcn.180062440
mov rcx, qword [rbp + 0x13f0]
xor rcx, rsp
call fcn.1800c0060
mov rbx, qword [rsp + 0x1550]
add rsp, 0x1500
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1800ca864
nop
int3