Function at 0x18003a5f0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov dword [rsp + 0x34], r8d
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], rcx
mov r15, qword [0x180277178]
movzx eax, byte [r15]
test al, al
jne 0x18003a6a6
mov ebp, dword [0x18028e9b8]
test bpl, 1
jne 0x18003a6a6
cmp ebp, 0xff
ja 0x18003a875
mov ecx, ebp
or ecx, 0x20000000
mov eax, ebp
lock cmpxchg dword [0x18028e9b8], ecx
jne 0x18003a875
lea r14, [0x18028e9b8]
xor ecx, ecx
call sub.kernel32.dll_GetModuleHandleW
mov qword [0x18028e9b0], rax
mov eax, ebp
or eax, 0x20000000
mov ecx, 1
lock cmpxchg dword [r14], ecx
je 0x18003a6a6
and ebp, 0xdfffffff
xor ebp, 0x20000001
mov eax, dword [r14]
nop dword [rax]
mov ecx, eax
xor ecx, ebp
lock cmpxchg dword [r14], ecx
jne 0x18003a690
cmp eax, 0x40000000
jae 0x18003a96b
movzx eax, byte [r15]
test al, al
jne 0x18003a6bd
mov ecx, dword [0x18028e938]
test cl, 1
je 0x18003a808
mov rdx, qword [0x18028e920]
test rdx, rdx
je 0x18003a97c
mov rax, qword [0x18028e928]
mov qword [rsp + 0x28], rax
mov r13d, 0xf
lea r14, [0x1801a3de0]
mov ebp, 0xff
lea rax, [rdx + 0x168]
movzx ecx, word [rdx + 0x272]
mov qword [rsp + 0x68], rcx
lea ecx, [rcx*8]
lea rbx, [rcx + rcx*2]
mov qword [rsp + 0x50], rdx
lea rdi, [rdx - 8]
mov rsi, 0xffffffffffffffff
nop dword [rax]
test rbx, rbx
je 0x18003a780
lea r12, [rax + 0x18]
mov rdx, qword [rax + 8]
mov r8, qword [rax + 0x10]
mov r15, r8
sub r15, 0xf
cmovae r8, r13
neg r15
mov rcx, r14
call sub.VCRUNTIME140.dll_memcmp
cdqe
test eax, eax
cmovne r15, rax
xor ecx, ecx
test r15, r15
setne cl
cmovs ecx, ebp
add rbx, 0xffffffffffffffe8
add rdi, 0x20
inc rsi
mov rax, r12
cmp cl, 1
je 0x18003a720
movzx eax, cl
test eax, eax
je 0x18003a7ab
jmp 0x18003a785
mov rsi, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x28]
sub rax, 1
jb 0x18003a97c
mov qword [rsp + 0x28], rax
mov rdx, qword [rdx + rsi*8 + 0x278]
jmp 0x18003a6eb
cmp qword [rdi - 8], 4
jne 0x18003a7e0
mov rax, qword [rdi - 0x10]
mov rcx, qword [rdi]
mov eax, dword [rax]
bswap eax
xor edx, edx
cmp eax, 0x73656c67
setae dl
cmp eax, 0x73656c66
sbb edx, 0
add rcx, qword [0x18028e9b0]
xor eax, eax
test edx, edx
cmove rax, rcx
jmp 0x18003a7e2
xor eax, eax
mov rcx, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov r8d, dword [rsp + 0x34]
call rax
nop
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp ecx, 0xff
ja 0x18003a8b5
mov edx, ecx
or edx, 0x20000000
mov eax, ecx
lock cmpxchg dword [0x18028e938], edx
jne 0x18003a8b5
lea rax, [0x18028e938]
movd xmm0, ecx
pshufd xmm0, xmm0, 0x50
lea rcx, [0x18028e920]
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x78], rax
movq qword [rsp + 0x80], xmm0
lea r14, [rsp + 0x38]
lea rdx, [rsp + 0x70]
mov rcx, r14
call fcn.1801921a0
mov rcx, r14
call fcn.180039340
jmp 0x18003a6bd
lea rdx, [0x18028e9b8]
lea r9, [0x18028e9b0]
lea rcx, [rsp + 0x38]
lea r8, [rsp + 0x27]
call fcn.1801844d0
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x18003a933
cmp eax, 2
je 0x18003a6a6
mov r14, qword [rsp + 0x40]
mov ebp, dword [rsp + 0x48]
jmp 0x18003a65c
lea rdx, [0x18028e938]
lea r9, [0x18028e920]
lea rcx, [rsp + 0x38]
lea r8, [rsp + 0x27]
call fcn.1801844d0
mov eax, dword [rsp + 0x38]
test eax, eax
je 0x18003a8f3
cmp eax, 2
je 0x18003a6bd
mov rax, qword [rsp + 0x40]
movq xmm0, qword [rsp + 0x48]
jmp 0x18003a83c
mov rcx, qword [rsp + 0x40]
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 0x18003a6bd
add edx, 0xffffff00
call fcn.18018f9c0
jmp 0x18003a6bd
mov rcx, qword [rsp + 0x40]
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 0x18003a6a6
add edx, 0xffffff00
jmp 0x18003a972
xor eax, ebp
mov rcx, r14
mov edx, eax
call fcn.18018f9c0
jmp 0x18003a6a6
lea rcx, [0x1801a3e00]
call fcn.18019e0f0
int3