Function at 0x409e10
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
movaps xmmword [rsp + 0x70], xmm6
mov qword [rsp + 0x28], rcx
mov rsi, qword [rcx + 0x30]
test rsi, rsi
je 0x409f42
mov rax, qword [rsp + 0x28]
mov rbx, qword [rax + 0x40]
test rbx, rbx
je 0x409f15
mov rdi, qword [rax + 0x48]
movdqa xmm0, xmmword [rdi]
pmovmskb eax, xmm0
not eax
lea r14, [rdi + 0x10]
mov r15, rdi
jmp 0x409e92
mov rax, qword [r12 - 8]
lea rcx, [r12 - 0x10]
mov rdx, qword [r12 - 0x20]
mov r8, qword [r12 - 0x18]
call qword [rax + 0x20]
mov eax, ebp
test rbx, rbx
je 0x409f19
test ax, ax
je 0x409ea0
lea ebp, [rax - 1]
and ebp, eax
jmp 0x409ec7
movdqa xmm0, xmmword [r14]
pmovmskb eax, xmm0
add r15, 0xfffffffffffffd00
add r14, 0x10
cmp ax, 0xffff
je 0x409ea0
mov ecx, 0xfffffffe
sub ecx, eax
not eax
mov ebp, eax
and ebp, ecx
tzcnt eax, eax
neg rax
lea rax, [rax + rax*2]
shl rax, 4
lea r12, [r15 + rax]
dec rbx
cmp byte [r15 + rax - 0x30], 2
jb 0x409e70
mov rax, qword [r12 - 0x28]
mov r9, qword [rax + 0x18]
lea rcx, [rax + 0x10]
mov rdx, qword [rax]
mov r8, qword [rax + 8]
call qword [r9 + 0x20]
mov r8, qword [r12 - 0x28]
mov rcx, qword [0x00576170]
xor edx, edx
call sub.kernel32.dll_HeapFree
jmp 0x409e70
mov rdi, qword [rax + 0x48]
lea rax, [rsi + 1]
mov ecx, 0x30
mul rcx
add rsi, rax
cmp rsi, 0xffffffffffffffef
je 0x409f42
sub rdi, rax
mov rcx, qword [0x00576170]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
mov rax, qword [rsp + 0x28]
mov r9, qword [rax + 0x60]
test r9, r9
je 0x40a5e2
mov rax, qword [rsp + 0x28]
mov rbx, qword [rax + 0x70]
test rbx, rbx
je 0x40a5b0
mov qword [rsp + 0x50], r9
mov rax, qword [rax + 0x78]
lea rcx, [rax + 0x10]
movdqa xmm0, xmmword [rax]
pmovmskb edi, xmm0
not edi
xorps xmm6, xmm6
mov qword [rsp + 0x48], rax
mov rdx, rax
jmp 0x409fa7
add edi, esi
inc edi
test rbx, rbx
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
je 0x40a5a4
test di, di
mov qword [rsp + 0x68], rbx
jne 0x409fde
nop word cs:[rax + rax]
movdqa xmm0, xmmword [rcx]
pmovmskb eax, xmm0
mov edi, eax
add edi, edi
not edi
add rdx, 0xfffffffffffffb80
add rcx, 0x10
add di, ax
je 0x409fc0
mov qword [rsp + 0x60], rcx
tzcnt eax, edi
neg rax
lea rax, [rax + rax*8]
lea rsi, [rdx + rax*8]
mov qword [rsp + 0x58], rdx
cmp byte [rdx + rax*8 - 0x48], 2
jb 0x40a027
mov rax, qword [rsi - 0x40]
mov r9, qword [rax + 0x18]
lea rcx, [rax + 0x10]
mov rdx, qword [rax]
mov r8, qword [rax + 8]
call qword [r9 + 0x20]
mov r8, qword [rsi - 0x40]
mov rcx, qword [0x00576170]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov rax, qword [rsi - 0x20]
lea rcx, [rsi - 0x28]
mov rdx, qword [rsi - 0x38]
mov r8, qword [rsi - 0x30]
call qword [rax + 0x20]
mov qword [rsp + 0x40], rsi
mov rsi, qword [rsi - 8]
test rsi, rsi
je 0x40a560
mov rax, qword [rsp + 0x40]
mov r13, qword [rax - 0x10]
xor ebx, ebx
mov qword [rsp + 0x30], rsi
jmp 0x40a06c
inc rbx
cmp rbx, rsi
je 0x40a560
lea r15, [rbx + rbx*8]
mov rcx, qword [r13 + r15*8 + 0x10]
test rcx, rcx
je 0x40a0b4
mov rax, qword [r13 + r15*8 + 0x18]
call qword [rax]
mov rax, qword [r13 + r15*8 + 0x18]
cmp qword [rax + 8], 0
je 0x40a0b4
lea rcx, [r15*8 + 0x10]
add rcx, r13
mov r8, qword [rcx]
cmp qword [rax + 0x10], 0x11
jb 0x40a0a6
mov r8, qword [r8 - 8]
mov rcx, qword [0x00576170]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov rax, qword [r13 + r15*8 + 0x20]
lock dec qword [rax]
jne 0x40a0d2
lea rax, [r15*8 + 0x20]
add rax, r13
mov rcx, qword [rax]
call fcn.004084c0
lea rax, [r15*8 + 0x30]
add rax, r13
cmp byte [r13 + r15*8 + 0x40], 2
jne 0x40a2b0
mov rcx, qword [rax]
lock dec qword [rcx]
jne 0x40a0fa
mov rcx, qword [rax]
call fcn.00408220
mov rbp, qword [r13 + r15*8 + 0x38]
lock dec qword [rbp + 0x1c8]
jne 0x40a530
mov qword [rsp + 0x38], rbx
mov eax, 1
lock xadd qword [rbp + 0x88], rax
mov r14, rax
and r14, 0xffffffffffffffe0
and eax, 0x1f
mov rcx, qword [rbp + 0x80]
mov rdx, qword [rcx + 0x2300]
mov r8, r14
sub r8, rdx
shr r8, 5
cmp r8, rax
seta r12b
jmp 0x40a181
mfence
mov rax, qword [rbp + 0x88]
mov qword [rbx + 0x2318], rax
movabs rax, 0x100000000
lock or qword [rbx + 0x2310], rax
mov al, 1
pause
mov rdx, qword [rcx + 0x2300]
mov r12d, eax
mov rbx, rcx
cmp rdx, r14
je 0x40a480
mov rcx, qword [rbx + 0x2308]
test rcx, rcx
jne 0x40a270
mov rsi, qword [rbx + 0x2300]
mov rax, qword [0x00576170]
test rax, rax
jne 0x40a1c5
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x40aa88
mov qword [0x00576170], rax
mov r8d, 0x2320
mov rcx, rax
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x40aa88
mov rdx, rax
add rsi, 0x20
mov qword [rax + 0x2300], rsi
movups xmmword [rax + 0x2308], xmm6
mov qword [rax + 0x2318], 0
xor eax, eax
lock cmpxchg qword [rbx + 0x2308], rdx
jne 0x40a210
mov rcx, rdx
jmp 0x40a270
mov rcx, rax
mov rax, qword [rax + 0x2300]
mov r8, rax
xor r8, 0x20
and eax, 0x20
lea rax, [r8 + rax*2]
mov qword [rdx + 0x2300], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x2308], rdx
je 0x40a270
mov r8, rax
nop
pause
mov rax, qword [r8 + 0x2300]
mov r9, rax
xor r9, 0x20
and eax, 0x20
lea rax, [r9 + rax*2]
mov qword [rdx + 0x2300], rax
xor eax, eax
lock cmpxchg qword [r8 + 0x2308], rdx
mov r8, rax
jne 0x40a240
nop
mov rdx, qword [rbx + 0x2310]
xor eax, eax
test r12b, r12b
je 0x40a175
mov edx, edx
cmp edx, 0xffffffff
jne 0x40a175
mov rax, rbx
lock cmpxchg qword [rbp + 0x80], rcx
je 0x40a150
xor eax, eax
jmp 0x40a175
mov rcx, qword [rax]
lock dec qword [rcx]
jne 0x40a2c1
mov rcx, qword [rax]
call fcn.00408220
mov rbp, qword [r13 + r15*8 + 0x38]
lock dec qword [rbp + 0x1c8]
jne 0x40a530
mov qword [rsp + 0x38], rbx
mov eax, 1
lock xadd qword [rbp + 0x88], rax
mov r14, rax
and r14, 0xffffffffffffffe0
and eax, 0x1f
mov rcx, qword [rbp + 0x80]
mov rdx, qword [rcx + 0x2300]
mov r8, r14
sub r8, rdx
shr r8, 5
cmp r8, rax
seta r12b
jmp 0x40a351
mfence
mov rax, qword [rbp + 0x88]
mov qword [rbx + 0x2318], rax
movabs rax, 0x100000000
lock or qword [rbx + 0x2310], rax
mov al, 1
pause
mov rdx, qword [rcx + 0x2300]
mov r12d, eax
mov rbx, rcx
cmp rdx, r14
je 0x40a4c0
mov rcx, qword [rbx + 0x2308]
test rcx, rcx
jne 0x40a440
mov rsi, qword [rbx + 0x2300]
mov rax, qword [0x00576170]
test rax, rax
jne 0x40a395
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x40aa88
mov qword [0x00576170], rax
mov r8d, 0x2320
mov rcx, rax
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x40aa88
mov rdx, rax
add rsi, 0x20
mov qword [rax + 0x2300], rsi
movups xmmword [rax + 0x2308], xmm6
mov qword [rax + 0x2318], 0
xor eax, eax
lock cmpxchg qword [rbx + 0x2308], rdx
jne 0x40a3e0
mov rcx, rdx
jmp 0x40a440
mov rcx, rax
mov rax, qword [rax + 0x2300]
mov r8, rax
xor r8, 0x20
and eax, 0x20
lea rax, [r8 + rax*2]
mov qword [rdx + 0x2300], rax
xor eax, eax
lock cmpxchg qword [rcx + 0x2308], rdx
je 0x40a440
mov r8, rax
nop
pause
mov rax, qword [r8 + 0x2300]
mov r9, rax
xor r9, 0x20
and eax, 0x20
lea rax, [r9 + rax*2]
mov qword [rdx + 0x2300], rax
xor eax, eax
lock cmpxchg qword [r8 + 0x2308], rdx
mov r8, rax
jne 0x40a410
nop
mov rdx, qword [rbx + 0x2310]
xor eax, eax
test r12b, r12b
je 0x40a345
mov edx, edx
cmp edx, 0xffffffff
jne 0x40a345
mov rax, rbx
lock cmpxchg qword [rbp + 0x80], rcx
je 0x40a320
xor eax, eax
jmp 0x40a345
movabs rax, 0x200000000
lock or qword [rbx + 0x2310], rax
mov rax, qword [rbp + 0x110]
nop dword [rax]
mov rcx, rax
or rcx, 2
lock cmpxchg qword [rbp + 0x110], rcx
jne 0x40a4a0
jmp 0x40a4f2
movabs rax, 0x200000000
lock or qword [rbx + 0x2310], rax
mov rax, qword [rbp + 0x110]
nop dword [rax]
mov rcx, rax
or rcx, 2
lock cmpxchg qword [rbp + 0x110], rcx
jne 0x40a4e0
test rax, rax
mov rsi, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
jne 0x40a530
mov rcx, qword [rbp + 0x100]
mov rax, qword [rbp + 0x108]
mov qword [rbp + 0x108], 0
lock and qword [rbp + 0x110], 0xfffffffffffffffd
test rax, rax
je 0x40a530
call qword [rax + 8]
nop dword [rax + rax]
lea rax, [r15*8 + 0x38]
add rax, r13
mov rcx, qword [rax]
lock dec qword [rcx]
jne 0x40a060
mov rcx, qword [rax]
call fcn.004085b0
jmp 0x40a060
mov eax, edi
xor eax, 0xfffffffe
mov ecx, edi
and ecx, 0xfffffffe
lea eax, [rax + rcx*2]
inc eax
mov esi, edi
not esi
or esi, eax
mov rbx, qword [rsp + 0x68]
dec rbx
mov rax, qword [rsp + 0x40]
cmp qword [rax - 0x18], 0
je 0x409f90
mov r8, qword [rax - 0x10]
mov rcx, qword [0x00576170]
xor edx, edx
call sub.kernel32.dll_HeapFree
jmp 0x409f90
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x48]
jmp 0x40a5b4
mov r8, qword [rax + 0x78]
lea rax, [r9 + 1]
mov ecx, 0x48
mul rcx
add rax, 0xf
and rax, 0xfffffffffffffff0
add r9, rax
cmp r9, 0xffffffffffffffef
je 0x40a5e2
sub r8, rax
mov rcx, qword [0x00576170]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov rax, qword [rsp + 0x28]
mov r9, qword [rax + 0x90]
test r9, r9
je 0x40a95b
mov rax, qword [rsp + 0x28]
mov r13, qword [rax + 0xa0]
test r13, r13
je 0x40a92e
mov qword [rsp + 0x50], r9
mov r12, qword [rax + 0xa8]
lea r14, [r12 + 0x10]
movdqa xmm0, xmmword [r12]
pmovmskb eax, xmm0
not eax
mov qword [rsp + 0x48], r12
jmp 0x40a642
lea r13, [rsi + r13*2]
inc r13
mov eax, ebp
test r13, r13
je 0x40a922
test ax, ax
je 0x40a650
lea ebp, [rax - 1]
and ebp, eax
jmp 0x40a677
movdqa xmm0, xmmword [r14]
pmovmskb eax, xmm0
add r12, 0xfffffffffffffb00
add r14, 0x10
cmp ax, 0xffff
je 0x40a650
mov ecx, 0xfffffffe
sub ecx, eax
not eax
mov ebp, eax
and ebp, ecx
tzcnt eax, eax
neg rax
lea rax, [rax + rax*4]
shl rax, 4
lea rsi, [r12 + rax]
cmp byte [r12 + rax - 0x50], 2
jb 0x40a6bb
mov rax, qword [rsi - 0x48]
mov r9, qword [rax + 0x18]
lea rcx, [rax + 0x10]
mov rdx, qword [rax]
mov r8, qword [rax + 8]
call qword [r9 + 0x20]
mov r8, qword [rsi - 0x48]
mov rcx, qword [0x00576170]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov rax, qword [rsi - 0x28]
lea rcx, [rsi - 0x30]
mov rdx, qword [rsi - 0x40]
mov r8, qword [rsi - 0x38]
call qword [rax + 0x20]
mov qword [rsp + 0x30], rsi
mov r10, qword [rsi - 8]
test r10, r10
je 0x40a820
mov dword [rsp + 0x68], ebp
mov qword [rsp + 0x40], r13
mov r9, qword [rsp + 0x30]
mov rax, qword [r9 - 0x10]
mov rcx, qword [r9 - 0x20]
cmp rax, rcx
mov rdx, rcx
mov r8d, 0
cmovb rdx, r8
sub rax, rdx
mov r11, rcx
sub r11, rax
lea rbp, [rax + r10]
mov qword [rsp + 0x60], r10
mov rdx, r10
mov qword [rsp + 0x58], r11
sub rdx, r11
cmova rbp, rcx
mov rsi, qword [r9 - 0x18]
cmovb rdx, r8
mov qword [rsp + 0x38], rdx
sub rbp, rax
jne 0x40a860
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x60], rax
mov r13, qword [rsp + 0x40]
mov ebp, dword [rsp + 0x68]
jbe 0x40a820
xor ebx, ebx
jmp 0x40a76e
mov rbx, rdi
cmp qword [rsp + 0x38], rdi
je 0x40a820
mov r15, qword [rsi + rbx*8]
mov al, 1
xchg byte [r15 + 0x80], al
mov al, 1
xchg byte [r15 + 0x60], al
test al, al
jne 0x40a7a6
mov rcx, qword [r15 + 0x50]
mov rax, qword [r15 + 0x58]
mov qword [r15 + 0x58], 0
mov edx, 0
xchg byte [r15 + 0x60], dl
test rax, rax
je 0x40a7a6
call qword [rax + 8]
mov al, 1
xchg byte [r15 + 0x78], al
lea rdi, [rbx + 1]
add r15, 0x68
test al, al
jne 0x40a7d0
je 0x40a7d8
mov rax, qword [rsi + rbx*8]
lock dec qword [rax]
jne 0x40a760
jmp 0x40a803
mov r15d, 0
jne 0x40a7ba
mov rcx, qword [r15]
mov rax, qword [r15 + 8]
mov qword [r15 + 8], 0
test rax, rax
je 0x40a7ef
call qword [rax + 0x18]
xor eax, eax
xchg byte [r15 + 0x10], al
mov rax, qword [rsi + rbx*8]
lock dec qword [rax]
jne 0x40a760
mov rcx, qword [rsi + rbx*8]
call fcn.004093a0
jmp 0x40a760
mov rsi, r13
xor rsi, 0xfffffffffffffffe
and r13, 0xfffffffffffffffe
mov rax, qword [rsp + 0x30]
cmp qword [rax - 0x20], 0
je 0x40a630
mov r8, qword [rax - 0x18]
mov rcx, qword [0x00576170]
xor edx, edx
call sub.kernel32.dll_HeapFree
jmp 0x40a630
lea rbx, [rsi + rax*8]
xor r15d, r15d
jmp 0x40a87c
mov r15, rdi
cmp rbp, rdi
je 0x40a73d
mov r13, qword [rbx + r15*8]
mov al, 1
xchg byte [r13 + 0x80], al
mov al, 1
xchg byte [r13 + 0x60], al
test al, al
jne 0x40a8b4
mov rcx, qword [r13 + 0x50]
mov rax, qword [r13 + 0x58]
mov qword [r13 + 0x58], 0
mov edx, 0
xchg byte [r13 + 0x60], dl
test rax, rax
je 0x40a8b4
call qword [rax + 8]
mov al, 1
xchg byte [r13 + 0x78], al
lea rdi, [r15 + 1]
add r13, 0x68
test al, al
jne 0x40a8e0
je 0x40a8e8
mov rax, qword [rbx + r15*8]
lock dec qword [rax]
jne 0x40a870
jmp 0x40a914
mov r13d, 0
jne 0x40a8c8
mov rcx, qword [r13]
mov rax, qword [r13 + 8]
mov qword [r13 + 8], 0
test rax, rax
je 0x40a900
call qword [rax + 0x18]
xor eax, eax
xchg byte [r13 + 0x10], al
mov rax, qword [rbx + r15*8]
lock dec qword [rax]
jne 0x40a870
mov rcx, qword [rbx + r15*8]
call fcn.004093a0
jmp 0x40a870
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x48]
jmp 0x40a935
mov r8, qword [rax + 0xa8]
lea rax, [r9 + 1]
mov ecx, 0x50
mul rcx
add r9, rax
cmp r9, 0xffffffffffffffef
je 0x40a95b
sub r8, rax
mov rcx, qword [0x00576170]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov r8, qword [rsp + 0x28]
mov rsi, qword [r8 + 0xe8]
test rsi, rsi
je 0x40a9ca
mov bl, 1
mov al, 1
xchg byte [rsi + 0x40], al
mov al, 1
xchg byte [rsi + 0x20], al
test al, al
jne 0x40a999
mov rcx, qword [rsi + 0x10]
mov rax, qword [rsi + 0x18]
mov qword [rsi + 0x18], 0
xor edx, edx
xchg byte [rsi + 0x20], dl
test rax, rax
je 0x40a999
call qword [rax + 8]
xchg byte [rsi + 0x38], bl
add rsi, 0x28
xor edi, edi
test bl, bl
cmove rdi, rsi
mov r8, qword [rsp + 0x28]
je 0x40aa51
mov rcx, qword [r8 + 0xe8]
lock dec qword [rcx]
jne 0x40a9ca
call fcn.0040aaa0
mov r8, qword [rsp + 0x28]
mov rcx, qword [r8 + 0xc0]
lock dec qword [rcx]
jne 0x40a9e8
mov rdx, qword [r8 + 0xc8]
call fcn.00409d00
mov r8, qword [rsp + 0x28]
mov rcx, qword [r8 + 0x20]
test rcx, rcx
je 0x40aa05
lock dec qword [rcx]
jne 0x40aa05
mov rdx, qword [r8 + 0x28]
call fcn.00409d90
mov r8, qword [rsp + 0x28]
cmp r8, 0xffffffffffffffff
je 0x40aa38
lock dec qword [r8 + 8]
jne 0x40aa38
mov rcx, qword [0x00576170]
xor edx, edx
movaps xmm6, xmmword [rsp + 0x70]
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp sub.kernel32.dll_HeapFree
movaps xmm6, xmmword [rsp + 0x70]
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rdi]
mov rax, qword [rdi + 8]
mov qword [rdi + 8], 0
test rax, rax
je 0x40aa68
call qword [rax + 0x18]
xor eax, eax
xchg byte [rdi + 0x10], al
mov r8, qword [rsp + 0x28]
mov rcx, qword [r8 + 0xe8]
lock dec qword [rcx]
je 0x40a9c0
jmp 0x40a9ca
mov ecx, 0x2320
mov edx, 8
call fcn.004043b0
ud2