Function at 0x180086320
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 - 0x1390]
mov eax, 0x1490
call fcn.18010a8d0
sub rsp, rax
movaps xmmword [rsp + 0x1480], xmm6
movaps xmmword [rsp + 0x1470], xmm7
mov rax, qword [0x18017e310]
xor rax, rsp
mov qword [rbp + 0x1360], rax
movaps xmm6, xmm2
mov rdi, rdx
mov qword [rbp - 0x70], rcx
xor r12d, r12d
mov qword [rsp + 0x68], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
lea r8d, [r12 + 0x1e]
lea rdx, str.BuildingResourceAmountOverride
lea rcx, [rsp + 0x68]
call fcn.18003d9f0
nop
lea rdx, [rsp + 0x68]
mov rcx, rdi
call fcn.18003e6e0
mov rcx, rax
movsd xmm7, qword [0x1801655d8]
test rax, rax
je 0x180086404
mov edx, dword [0x18017f6e4]
cmp edx, 0x1a4
jg 0x1800863c8
mov eax, dword [rax + 0x44]
jmp 0x1800863f7
lea eax, [rdx - 0x1a5]
cmp eax, 3
jbe 0x1800863f4
movsd xmm0, qword [0x18017fb30]
cmp edx, 0x1a9
jl 0x1800863ee
comisd xmm7, xmm0
jbe 0x1800863ee
mov eax, dword [rcx + 0x4c]
jmp 0x1800863f7
comisd xmm0, xmm7
jb 0x180086404
mov eax, dword [rcx + 0x44]
cmp eax, 0xffffffff
je 0x180086404
movsxd rbx, eax
add rbx, rdi
jmp 0x180086407
mov rbx, r12
mov rdx, qword [rbp - 0x80]
cmp rdx, 0x10
jb 0x180086446
inc rdx
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180086441
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180086441
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180109990
movdqa xmm0, xmmword [0x180165740]
movdqu xmmword [rsp + 0x78], xmm0
mov byte [rsp + 0x68], 0
cmp dword [rbx + 8], 0
je 0x180086be0
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rbp + 0x1354], 0xffffffff
mov dword [rbp - 0x2c], eax
mov ebx, 1
mov edx, ebx
nop dword [rax]
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edx
mov dword [rbp + rdx*4 - 0x2c], eax
inc rdx
cmp rdx, 0x270
jb 0x180086480
mov dword [rbp - 0x30], 0x270
lea rcx, [rbp - 0x30]
call fcn.18009ed40
ucomiss xmm6, dword [0x180165678]
jp 0x1800864bf
jne 0x1800864bf
movzx esi, bl
jmp 0x1800864c2
xor sil, sil
lea rcx, [rbp - 0x30]
call fcn.18009ed40
and eax, 3
lea r14d, [rax + 3]
test sil, sil
je 0x180086529
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rbp + 0x1354], 0xffffffff
mov dword [rbp - 0x2c], eax
nop word [rax + rax]
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, ebx
mov dword [rbp + rbx*4 - 0x2c], eax
inc rbx
cmp rbx, 0x270
jb 0x1800864f0
mov dword [rbp - 0x30], 0x270
lea rcx, [rbp - 0x30]
call fcn.18009ed40
and eax, 3
add r14d, 3
add r14d, eax
lea rdx, str.StaticGameplayTags:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.18008d9c0
mov rbx, rax
mov qword [rsp + 0x48], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x58], xmm0
mov r8d, reloc.WS2_32.dll_select
lea rdx, str.StaticGameplayTags
lea rcx, [rsp + 0x48]
call fcn.18003d9f0
nop
lea rdx, [rsp + 0x48]
mov rcx, rdi
call fcn.18003e6e0
mov rcx, rax
test rax, rax
je 0x1800865c9
mov edx, dword [0x18017f6e4]
cmp edx, 0x1a4
jg 0x18008658d
mov eax, dword [rax + 0x44]
jmp 0x1800865bc
lea eax, [rdx - 0x1a5]
cmp eax, 3
jbe 0x1800865b9
movsd xmm0, qword [0x18017fb30]
cmp edx, 0x1a9
jl 0x1800865b3
comisd xmm7, xmm0
jbe 0x1800865b3
mov eax, dword [rcx + 0x4c]
jmp 0x1800865bc
comisd xmm0, xmm7
jb 0x1800865c9
mov eax, dword [rcx + 0x44]
cmp eax, 0xffffffff
je 0x1800865c9
movsxd rcx, eax
add rcx, rdi
jmp 0x1800865cc
mov rcx, r12
lea rdx, [rsp + 0x68]
call fcn.180040f40
nop
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 0x10
jb 0x1800865e5
mov rax, qword [rax]
mov rdx, rax
mov rcx, rbx
call fcn.180098fb0
mov rcx, rax
call fcn.18008db90
nop
mov rdx, qword [rbp - 0x80]
cmp rdx, 0x10
jb 0x180086638
inc rdx
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180086633
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180086633
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180109990
movdqa xmm0, xmmword [0x180165740]
movdqu xmmword [rsp + 0x78], xmm0
mov byte [rsp + 0x68], 0
mov rdx, qword [rsp + 0x60]
cmp rdx, 0x10
jb 0x18008668b
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180086686
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180086686
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180109990
mov qword [rbp - 0x50], rdi
mov qword [rsp + 0x68], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
mov r8d, recv
lea rdx, str.ResourceType
lea rcx, [rsp + 0x68]
call fcn.18003d9f0
nop
lea rdx, [rsp + 0x68]
mov rcx, rdi
call fcn.18003e6e0
mov rcx, rax
test rax, rax
je 0x180086719
mov edx, dword [0x18017f6e4]
cmp edx, 0x1a4
jg 0x1800866dd
mov eax, dword [rax + 0x44]
jmp 0x18008670c
lea eax, [rdx - 0x1a5]
cmp eax, 3
jbe 0x180086709
movsd xmm0, qword [0x18017fb30]
cmp edx, 0x1a9
jl 0x180086703
comisd xmm7, xmm0
jbe 0x180086703
mov eax, dword [rcx + 0x4c]
jmp 0x18008670c
comisd xmm0, xmm7
jb 0x180086719
mov eax, dword [rcx + 0x44]
cmp eax, 0xffffffff
je 0x180086719
movsxd rcx, eax
add rcx, rdi
jmp 0x18008671c
mov rcx, r12
movzx eax, byte [rcx]
mov byte [rbp - 0x48], al
mov rdx, qword [rbp - 0x80]
cmp rdx, 0x10
jb 0x180086761
inc rdx
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18008675c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x18008675c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180109990
movdqa xmm0, xmmword [0x180165740]
movdqu xmmword [rsp + 0x78], xmm0
mov byte [rsp + 0x68], 0
mov dword [rbp - 0x44], r14d
mov byte [rbp - 0x40], 0
mov byte [rbp - 0x3f], sil
mov ecx, dword [0x18017f614]
mov rax, qword gs:[0x58]
mov esi, 4
mov rbx, qword [rax + rcx*8]
mov eax, dword [rbx + rsi]
cmp dword [0x180180008], eax
jle 0x18008684d
lea rcx, [0x180180008]
call fcn.180109b90
cmp dword [0x180180008], 0xffffffff
jne 0x18008684d
mov qword [rsp + 0x48], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x58], xmm0
mov r8d, 0x23
lea rdx, str.ClientReportDamagedResourceBuilding
lea rcx, [rsp + 0x48]
call fcn.18003d9f0
nop
mov rdi, qword [rbp - 0x70]
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.18003e4a0
mov qword [0x180180c08], rax
mov rdx, qword [rsp + 0x60]
cmp rdx, 0x10
jb 0x18008683f
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180086839
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180086839
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180109990
nop
lea rcx, [0x180180008]
call fcn.180109b30
jmp 0x180086851
mov rdi, qword [rbp - 0x70]
mov rdx, qword [0x180180c08]
test rdx, rdx
je 0x180086be0
lea r8, [rbp - 0x50]
mov rcx, rdi
call qword [0x18017fb20]
mov qword [rsp + 0x68], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
mov r8d, 4
lea rdx, str.Pawn
lea rcx, [rsp + 0x68]
call fcn.18003d9f0
nop
lea rdx, [rsp + 0x68]
mov rcx, rdi
call fcn.18003e6e0
mov rcx, rax
test rax, rax
je 0x1800868f8
mov edx, dword [0x18017f6e4]
cmp edx, 0x1a4
jg 0x1800868bc
mov eax, dword [rax + 0x44]
jmp 0x1800868eb
lea eax, [rdx - 0x1a5]
cmp eax, 3
jbe 0x1800868e8
movsd xmm0, qword [0x18017fb30]
cmp edx, 0x1a9
jl 0x1800868e2
comisd xmm7, xmm0
jbe 0x1800868e2
mov eax, dword [rcx + 0x4c]
jmp 0x1800868eb
comisd xmm0, xmm7
jb 0x1800868f8
mov eax, dword [rcx + 0x44]
cmp eax, 0xffffffff
je 0x1800868f8
movsxd rcx, eax
add rcx, rdi
jmp 0x1800868fb
mov rcx, r12
mov r13, qword [rcx]
mov rdx, qword [rbp - 0x80]
cmp rdx, 0x10
jb 0x18008693d
inc rdx
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180086938
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180086938
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180109990
movdqa xmm0, xmmword [0x180165740]
movdqu xmmword [rsp + 0x78], xmm0
mov byte [rsp + 0x68], 0
mov eax, dword [rbx + rsi]
cmp dword [0x18017fd88], eax
jle 0x1800869fe
lea rcx, [0x18017fd88]
call fcn.180109b90
cmp dword [0x18017fd88], 0xffffffff
jne 0x1800869fe
mov qword [rsp + 0x48], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x58], xmm0
mov r8d, 0x50
lea rdx, str.FortResourceItemDefinition__Game_Items_ResourcePickups_WoodItemData.WoodItemData
lea rcx, [rsp + 0x48]
call fcn.18003d9f0
nop
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.18008f760
mov qword [0x180180a38], rax
mov rdx, qword [rsp + 0x60]
cmp rdx, 0x10
jb 0x1800869f2
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800869ec
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800869ec
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180109990
nop
lea rcx, [0x18017fd88]
call fcn.180109b30
mov eax, dword [rbx + rsi]
cmp dword [0x180180848], eax
jle 0x180086aac
lea rcx, [0x180180848]
call fcn.180109b90
cmp dword [0x180180848], 0xffffffff
jne 0x180086aac
mov qword [rsp + 0x48], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x58], xmm0
mov r8d, 0x52
lea rdx, str.FortResourceItemDefinition__Game_Items_ResourcePickups_StoneItemData.StoneItemData
lea rcx, [rsp + 0x48]
call fcn.18003d9f0
nop
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.18008f760
mov qword [0x180180328], rax
mov rdx, qword [rsp + 0x60]
cmp rdx, 0x10
jb 0x180086aa0
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180086a9a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180086a9a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180109990
nop
lea rcx, [0x180180848]
call fcn.180109b30
mov eax, dword [rbx + rsi]
cmp dword [0x1801808ec], eax
jle 0x180086b5a
lea rcx, [0x1801808ec]
call fcn.180109b90
cmp dword [0x1801808ec], 0xffffffff
jne 0x180086b5a
mov qword [rsp + 0x48], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x58], xmm0
mov r8d, 0x52
lea rdx, str.FortResourceItemDefinition__Game_Items_ResourcePickups_MetalItemData.MetalItemData
lea rcx, [rsp + 0x48]
call fcn.18003d9f0
nop
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.18008f760
mov qword [0x180180938], rax
mov rdx, qword [rsp + 0x60]
cmp rdx, 0x10
jb 0x180086b4e
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180086b48
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180086b48
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180109990
nop
lea rcx, [0x1801808ec]
call fcn.180109b30
mov r15, qword [0x180180a38]
cmp byte [rbp - 0x48], 1
cmove r15, qword [0x180180328]
cmp byte [rbp - 0x48], 2
cmove r15, qword [0x180180938]
mov rcx, rdi
call fcn.1800507b0
mov r14, rax
mov rcx, rdi
call fcn.180044e20
mov edi, r12d
cmp dword [r14 + 8], r12d
jle 0x180086bc5
mov rbx, r12
nop dword [rax + rax]
mov rcx, qword [r14]
mov rsi, qword [rbx + rcx]
test rsi, rsi
je 0x180086bb9
mov rcx, rsi
call fcn.1800515b0
cmp rax, r15
je 0x180086c14
inc edi
add rbx, 8
cmp edi, dword [r14 + 8]
jl 0x180086ba0
mov ecx, dword [rbp - 0x44]
mov byte [rsp + 0x28], 0
mov dword [rsp + 0x20], ecx
mov r8b, 1
mov rdx, r15
mov rcx, qword [rbp - 0x70]
call fcn.180053d70
mov rcx, qword [rbp + 0x1360]
xor rcx, rsp
call fcn.1801098a0
lea r11, [rsp + 0x1490]
mov rbx, qword [r11 + 0x50]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ebx, dword [rbp - 0x44]
mov ecx, ebx
test r13, r13
je 0x180086bc8
mov qword [rsp + 0x48], r12
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x58], xmm0
mov r8d, 9
lea rdx, str.ItemEntry
lea rcx, [rsp + 0x48]
call fcn.18003d9f0
nop
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.18003e6e0
mov rcx, rax
test rax, rax
je 0x180086ca6
mov edx, dword [0x18017f6e4]
cmp edx, 0x1a4
jg 0x180086c6c
mov eax, dword [rax + 0x44]
jmp 0x180086c9b
lea eax, [rdx - 0x1a5]
cmp eax, 3
jbe 0x180086c98
movsd xmm0, qword [0x18017fb30]
cmp edx, 0x1a9
jl 0x180086c92
comisd xmm7, xmm0
jbe 0x180086c92
mov eax, dword [rcx + 0x4c]
jmp 0x180086c9b
comisd xmm0, xmm7
jb 0x180086ca6
mov eax, dword [rcx + 0x44]
cmp eax, 0xffffffff
je 0x180086ca6
movsxd r12, eax
add r12, rsi
mov rdx, qword [rsp + 0x60]
cmp rdx, 0x10
jb 0x180086ce6
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180086ce1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180086ce1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180109990
movdqa xmm0, xmmword [0x180165740]
movdqu xmmword [rsp + 0x58], xmm0
mov byte [rsp + 0x48], 0
mov rcx, r12
call fcn.18004fde0
mov ecx, ebx
cmp dword [rax], 0x3e7
jl 0x180086bc8
mov rdx, r13
lea rcx, [rbp - 0x60]
call fcn.180042970
movsd xmm0, qword [rax]
movsd qword [rbp - 0x70], xmm0
mov eax, dword [rax + 8]
mov dword [rbp - 0x68], eax
mov dword [rsp + 0x28], ebx
mov byte [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rbp - 0x70]
mov rdx, r15
mov rcx, r13
call fcn.180043e90
jmp 0x180086be0