Function at 0x1801962f0
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x158
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xd0], 0xfffffffffffffffe
mov rsi, rcx
mov dword [rdx + 0x14], 6
mov qword [rbp + 8], rdx
mov rax, qword [rdx]
mov qword [rbp - 0x28], rax
lea rax, [0x1801a8355]
mov qword [rbp - 8], rax
mov qword [rbp], 7
movzx eax, byte [0x18028ecd1]
mov ecx, 0x18
mov edx, 8
call fcn.18006a570
mov qword [rbp + 0x98], rax
test rax, rax
je 0x180196a5e
lea rax, [rbp - 8]
mov qword [rbp + 0x50], rax
lea rax, [0x180067d10]
mov qword [rbp + 0x58], rax
lea rax, [0x1801a8368]
mov qword [rbp + 0xa0], rax
mov qword [rbp + 0xa8], 1
mov qword [rbp + 0xc0], 0
lea rax, [rbp + 0x50]
mov qword [rbp + 0xb0], rax
mov qword [rbp + 0xb8], 1
lea rcx, [rbp - 0x58]
lea rdx, [rbp + 0xa0]
call fcn.1801776a0
mov qword [rbp - 0x20], rsi
mov rax, qword [rbp - 0x48]
mov rcx, qword [rbp + 0x98]
mov qword [rcx + 0x10], rax
movdqu xmm0, xmmword [rbp - 0x58]
movdqu xmmword [rcx], xmm0
mov qword [rbp + 0x80], 1
mov qword [rbp + 0x88], rcx
mov qword [rbp + 0x90], 1
mov rax, qword [0x180277178]
movzx eax, byte [rax]
test al, al
jne 0x180196538
mov ecx, dword [0x18028e858]
test cl, 1
jne 0x180196538
cmp ecx, 0x100
jae 0x180196449
mov edx, ecx
or edx, 0x20000000
mov eax, ecx
lock cmpxchg dword [0x18028e858], edx
jne 0x180196449
lea rax, [0x18028e858]
movd xmm0, ecx
pshufd xmm0, xmm0, 0x50
jmp 0x18019648d
lea rdx, [0x18028e858]
lea r9, [0x18028e840]
lea rcx, [rbp + 0xa0]
lea r8, [rbp + 0x28]
call fcn.1801844d0
mov eax, dword [rbp + 0xa0]
test eax, eax
je 0x1801964ff
cmp eax, 2
je 0x180196538
mov rax, qword [rbp + 0xa8]
movq xmm0, qword [rbp + 0xb0]
lea rcx, [0x18028e840]
mov qword [rbp + 0x50], rcx
mov qword [rbp + 0x58], rax
movq qword [rbp + 0x60], xmm0
lea rcx, [rbp + 0xa0]
lea rdx, [rbp + 0x50]
call fcn.180197510
mov r8d, dword [rbp + 0xb0]
mov rcx, qword [rbp + 0xa8]
mov eax, r8d
or eax, 0x20000000
mov edx, dword [rbp + 0xb4]
lock cmpxchg dword [rcx], edx
je 0x180196538
xor edx, r8d
or edx, 0x20000000
mov eax, dword [rcx]
nop
mov r8d, eax
xor r8d, edx
lock cmpxchg dword [rcx], r8d
jne 0x1801964e0
cmp eax, 0x40000000
jb 0x180196538
xor eax, edx
mov edx, eax
call fcn.1801958d0
jmp 0x180196538
mov rcx, qword [rbp + 0xa8]
mov edx, 0xffffff00
lock xadd dword [rcx], edx
mov eax, edx
and eax, 0x3fffff00
cmp eax, 0x100
setne al
cmp edx, 0x40000000
setb r8b
or r8b, al
jne 0x180196538
add edx, 0xffffff00
call fcn.1801958d0
mov rcx, qword [0x18028e840]
test rcx, rcx
je 0x180196b38
mov rdi, qword [rbp - 8]
mov rbx, qword [rbp]
mov rax, qword [0x18028e848]
mov qword [rbp + 0x78], rax
lea rax, [rcx + 8]
mov qword [rbp + 0x98], rcx
movzx ecx, word [rcx + 0x21a]
mov qword [rbp + 0x40], rcx
lea ecx, [rcx*8]
lea r13, [rcx + rcx*2]
mov rsi, 0xffffffffffffffff
xor r15d, r15d
nop word cs:[rax + rax]
cmp r13, r15
je 0x1801965f0
lea r14, [rax + 0x18]
mov rdx, qword [rax + 8]
mov r8, qword [rax + 0x10]
mov r12, rbx
sub r12, r8
cmovb r8, rbx
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcmp
cdqe
test eax, eax
cmovne r12, rax
xor ecx, ecx
test r12, r12
setne cl
mov eax, 0xff
cmovs ecx, eax
add r15, 0x18
inc rsi
mov rax, r14
cmp cl, 1
je 0x180196590
movzx eax, cl
test eax, eax
jne 0x1801965f4
jmp 0x18019661a
mov rsi, qword [rbp + 0x40]
mov rcx, qword [rbp + 0x98]
mov rax, qword [rbp + 0x78]
sub rax, 1
jb 0x180196b38
mov qword [rbp + 0x78], rax
mov rcx, qword [rcx + rsi*8 + 0x220]
jmp 0x18019655b
lea rdx, str.._Dwarf_Fortress.exe
lea rcx, [rbp + 0xa0]
mov r8d, 0x14
call fcn.180164750
mov rbx, qword [rbp + 0x98]
mov rdx, qword [rbp + 0xa0]
mov r9, qword [rbp + 0xa8]
mov rax, rdx
neg rax
jo 0x180196a72
mov rax, qword [rbp + 0xb0]
mov ecx, 1
test rax, rax
mov qword [rbp + 0x40], r9
mov qword [rbp + 0x78], rdx
je 0x180196692
mov r10d, 0x40
cmp rax, 0x40
jb 0x180196697
mov r10, r9
and r10, 3
je 0x1801969ec
mov ecx, 3
mov eax, 4
jmp 0x180196697
xor r10d, r10d
xor eax, eax
movabs r8, 0x8000000000000004
mov qword [rbp + 0x50], r8
mov qword [rbp + 0x58], rcx
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x68], r10
lea rax, [rbp + 0x50]
mov qword [rbp + 0x28], rax
lea rax, [0x180067d60]
mov qword [rbp + 0x30], rax
lea rax, [0x1801a83b8]
mov qword [rbp + 0xa0], rax
mov qword [rbp + 0xa8], 1
mov qword [rbp + 0xc0], 0
lea rax, [rbp + 0x28]
mov qword [rbp + 0xb0], rax
mov qword [rbp + 0xb8], 1
lea rcx, [rbp - 0x40]
lea rdx, [rbp + 0xa0]
call fcn.1801776a0
mov rsi, qword [rbp + 0x90]
cmp rsi, qword [rbp + 0x80]
jne 0x18019672a
lea rcx, [rbp + 0x80]
call fcn.180014e80
mov rax, qword [rbp + 0x88]
lea rcx, [rsi + rsi*2]
mov rdx, qword [rbp - 0x30]
mov qword [rax + rcx*8 + 0x10], rdx
movdqu xmm0, xmmword [rbp - 0x40]
movdqu xmmword [rax + rcx*8], xmm0
inc rsi
mov qword [rbp + 0x90], rsi
lea rcx, [rbp + 0x50]
call fcn.180039540
xor edi, edi
mov rdx, qword [rbp + 0x78]
test rdx, rdx
je 0x180196775
mov r8d, 1
mov rcx, qword [rbp + 0x40]
call fcn.18006a580
test dil, dil
je 0x180196b38
mov dword [rbp + 0x4c], esi
lea rax, [rbp + 0x4c]
mov qword [rbp + 0x50], rax
lea rax, [fcn.18017f6a0]
mov qword [rbp + 0x58], rax
lea rax, str.0x
mov qword [rbp + 0xa0], rax
mov qword [rbp + 0xa8], 1
mov qword [rbp + 0xc0], 0
lea rax, [rbp + 0x50]
mov qword [rbp + 0xb0], rax
mov qword [rbp + 0xb8], 1
lea rcx, [rbp + 0x10]
lea rdx, [rbp + 0xa0]
call fcn.1801776a0
mov rsi, qword [rbp + 0x90]
cmp rsi, qword [rbp + 0x80]
jne 0x1801967fa
lea rcx, [rbp + 0x80]
call fcn.180014e80
mov rax, qword [rbp + 0x88]
lea rcx, [rsi + rsi*2]
mov rdx, qword [rbp + 0x20]
mov qword [rax + rcx*8 + 0x10], rdx
movdqu xmm0, xmmword [rbp + 0x10]
movdqu xmmword [rax + rcx*8], xmm0
inc rsi
mov qword [rbp + 0x90], rsi
mov rax, qword [rbx + r15 + 0xf8]
test rax, rax
je 0x180196b38
mov rcx, qword [rbx + r15 + 0x100]
mov edx, dword [rbp + 0x4c]
mov r8d, 0xff
movzx r10d, word [rax + 0x13e]
lea r9d, [r10*8]
lea rsi, [r9 + r9*2]
mov r9, 0xffffffffffffffff
xor r11d, r11d
nop word cs:[rax + rax]
mov rdi, rsi
add rdi, r11
je 0x1801968b0
xor edi, edi
cmp dword [rax + r9*4 + 0x114], edx
setne dil
cmova edi, r8d
inc r9
add r11, 0xffffffffffffffe8
cmp dil, 1
je 0x180196870
movzx r10d, dil
test r10d, r10d
jne 0x1801968b3
jmp 0x1801968ca
mov r9, r10
sub rcx, 1
jb 0x180196b38
mov rax, qword [rax + r9*8 + 0x140]
jmp 0x180196844
sub rax, r11
add rax, 0xfffffffffffffff0
mov qword [rbp - 0x18], rax
lea rax, [rbp - 8]
mov qword [rbp + 0x50], rax
lea rax, [0x180067d10]
mov qword [rbp + 0x58], rax
lea rax, [rbp - 0x18]
mov qword [rbp + 0x60], rax
lea rax, [0x180067d30]
mov qword [rbp + 0x68], rax
lea rax, [0x1801a8418]
mov qword [rbp + 0xa0], rax
mov qword [rbp + 0xa8], 2
mov qword [rbp + 0xc0], 0
lea rax, [rbp + 0x50]
mov qword [rbp + 0xb0], rax
mov qword [rbp + 0xb8], 2
lea rcx, [rbp + 0x28]
lea rdx, [rbp + 0xa0]
call fcn.1801776a0
mov rsi, qword [rbp + 0x90]
test rsi, rsi
je 0x180196982
mov rdi, qword [rbp + 0x88]
add rdi, 8
jmp 0x180196969
add rdi, 0x18
dec rsi
je 0x180196982
mov rdx, qword [rdi - 8]
test rdx, rdx
je 0x180196960
mov rcx, qword [rdi]
mov r8d, 1
call fcn.18006a580
jmp 0x180196960
mov rax, qword [rbp + 0x80]
test rax, rax
je 0x1801969a8
mov rcx, qword [rbp + 0x88]
shl rax, 3
lea rdx, [rax + rax*2]
mov r8d, 8
call fcn.18006a580
mov rax, qword [rbp + 0x38]
mov rcx, qword [rbp - 0x28]
mov qword [rcx + 0x10], rax
movups xmm0, xmmword [rbp + 0x28]
movups xmmword [rcx], xmm0
mov rax, qword [rbp + 8]
mov dword [rax + 0x14], 1
movups xmm0, xmmword [rax]
mov rcx, qword [rbp - 0x20]
movups xmmword [rcx], xmm0
mov rax, qword [rax + 0x10]
mov qword [rcx + 0x10], rax
add rsp, 0x158
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
movzx ecx, word [r9]
cmp rcx, 0x5a4d
jne 0x180196a32
mov r8d, dword [r9 + 0x3c]
mov ecx, 1
cmp rax, r8
jbe 0x180196a41
lea r10, [r8 + 0x88]
cmp r10, rax
ja 0x180196697
add r8, r9
mov r10, r8
and r10, 7
je 0x180196a49
mov ecx, 3
mov eax, 8
jmp 0x180196697
movabs r8, 0x8000000000000007
jmp 0x1801966a1
mov r10, r8
jmp 0x180196697
mov esi, dword [r8 + 8]
mov dil, 1
test rdx, rdx
jne 0x180196766
jmp 0x180196775
mov ecx, 8
mov edx, 0x18
call fcn.18019decf
jmp 0x180196c2d
movabs rax, 0x8000000000000004
mov qword [rbp + 0x50], rax
mov qword [rbp + 0x58], 0
mov qword [rbp + 0x60], r9
mov byte [rbp + 0x70], 0
lea rax, [rbp + 0x50]
mov qword [rbp + 0x28], rax
lea rax, [0x180067d60]
mov qword [rbp + 0x30], rax
lea rax, [0x1801a83e8]
mov qword [rbp + 0xa0], rax
mov qword [rbp + 0xa8], 1
mov qword [rbp + 0xc0], 0
lea rax, [rbp + 0x28]
mov qword [rbp + 0xb0], rax
mov qword [rbp + 0xb8], 1
lea rcx, [rbp + 0x10]
lea rdx, [rbp + 0xa0]
call fcn.1801776a0
mov rsi, qword [rbp + 0x90]
cmp rsi, qword [rbp + 0x80]
jne 0x180196b09
lea rcx, [rbp + 0x80]
call fcn.180014e80
mov rax, qword [rbp + 0x88]
lea rcx, [rsi + rsi*2]
mov rdx, qword [rbp + 0x20]
mov qword [rax + rcx*8 + 0x10], rdx
movups xmm0, xmmword [rbp + 0x10]
movups xmmword [rax + rcx*8], xmm0
inc rsi
mov qword [rbp + 0x90], rsi
lea rcx, [rbp + 0x50]
call fcn.180039540
mov rdx, qword [rbp + 0x88]
mov r8, qword [rbp + 0x90]
mov qword [rsp + 0x20], 3
lea r9, [0x1801a8438]
lea rcx, [rbp + 0xa0]
call fcn.180041120
mov rax, qword [rbp + 0xb0]
mov qword [rbp + 0x60], rax
movdqu xmm0, xmmword [rbp + 0xa0]
movdqa xmmword [rbp + 0x50], xmm0
lea rax, [rbp + 0x50]
mov qword [rbp - 0x18], rax
lea rax, [0x180015400]
mov qword [rbp - 0x10], rax
lea rax, [0x1801a8450]
mov qword [rbp + 0xa0], rax
mov qword [rbp + 0xa8], 1
mov qword [rbp + 0xc0], 0
lea rax, [rbp - 0x18]
mov qword [rbp + 0xb0], rax
mov qword [rbp + 0xb8], 1
lea rcx, [rbp + 0x28]
lea rdx, [rbp + 0xa0]
call fcn.1801776a0
mov rdx, qword [rbp + 0x50]
test rdx, rdx
je 0x180196bef
mov rcx, qword [rbp + 0x58]
mov r8d, 1
call fcn.18006a580
movdqu xmm0, xmmword [rbp + 0x28]
movdqa xmmword [rbp + 0xa0], xmm0
mov rdx, qword [rbp + 0x38]
mov qword [rbp + 0xb0], rdx
mov rcx, qword [rbp + 0xa8]
mov qword [rbp + 0x98], rcx
call fcn.180038290
lea rdx, str.srcoffsetsplatform.rs
lea rcx, [rbp + 0xa0]
call fcn.180197880
ud2