Function at 0x100387860
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa0
mov rax, qword [0x1004946a0]
xor rax, rsp
mov qword [rsp + 0x98], rax
lea r15, [0x100000000]
lea r8, section..data
mov rax, qword [rcx + 0x10]
lea r9, [rax + 0xd]
mov r13d, 0xfffffff
mov qword [rsp + 0x78], rcx
mov r14d, dword [rax + 1]
lea rdi, [r9 - 1]
mov ebp, dword [rax + 5]
and rbp, r13
mov ecx, dword [rax + 9]
and rcx, r13
and r14, r13
add rbp, r15
mov qword [rsp + 0x60], rdx
xor r12d, r12d
cmp rdi, r8
mov qword [rsp + 0x88], rcx
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x70], r14
jb 0x10038791c
mov ecx, dword [0x10005e244]
mov eax, dword [0x1002f3aa4]
imul ecx, eax
mov eax, ecx
add rax, r8
cmp rdi, rax
jae 0x10038791c
mov rax, rdi
sub rax, r8
cqo
mov ecx, dword [0x1002f3aa4]
idiv rcx
mov edx, dword [0x1002f3aa4]
imul rdx, rax
add r8, rdx
jmp 0x10038791f
mov r8, r12
cmp r8, r12
jne 0x10038792e
mov r8, rdi
and r8, 0xffffffffffff0000
mov esi, ebp
sub r9, r8
lea rax, [r9 - 0x40]
cmp rax, r12
cmovl rax, r12
lea rdi, [rax + r8]
sub esi, r15d
xor eax, eax
mov dword [rsp + 0x2c], esi
lea ecx, [rax + 0x40]
rep stosb byte [rdi], al
mov edi, dword [0x1002f3aa4]
sub rdi, r14
add rdi, 1
cmp rdi, r12
mov r9, rdi
je 0x100387998
mov rcx, qword [0x100495210]
imul rcx, rcx, 0x343fd
shl rax, 0x10
add rcx, 0x269ec3
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
shr r9, 0x10
jne 0x10038796c
mov qword [0x100495210], rcx
mov ecx, esi
xor edx, edx
div rdi
lea rbx, [rdx + r8]
mov rdx, r14
mov qword [rsp + 0x58], rbx
mov r8, rbx
mov eax, 0x8a80dfd8
mov dil, r12b
mov rdx, qword [r14 + rbp]
mov qword [rsp + 0x50], rdx
lea rcx, [rsp + 0x50]
mov eax, 0x688bdb4c
mov rcx, r15
mov r10, qword [rsp + 0x50]
mov rax, qword [0x1003f4900]
mov r9d, dword [rsp + 0x54]
and r10, r13
mov qword [rsp + 0x30], r12
and r9, r13
mov r13d, 4
add r10, r15
sub rcx, rax
mov qword [rsp + 0x20], rcx
jne 0x100387a81
cmp r9, r12
mov r11, r12
jbe 0x100387d9e
mov ecx, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x30]
mov esi, 0xd4afbe6b
movzx eax, byte [r10 + r11]
add r11, 1
sub eax, 0x2b504195
add r8d, eax
add eax, ecx
imul rax, rsi
mov qword [rsp + 0x20], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x20]
lea edx, [rcx + rax*2 - 0x7fffffff]
sar ecx, 0x1f
btr ecx, 0x1f
sub edx, ecx
mov eax, edx
sar eax, 0x1f
btr eax, 0x1f
add eax, edx
imul rax, rsi
mov qword [rsp + 0x20], rax
mov ecx, dword [rsp + 0x20]
shr rax, 0x20
add ecx, eax
add r8d, ecx
cmp r11, r9
jb 0x100387a19
mov dword [rsp + 0x34], ecx
mov dword [rsp + 0x30], r8d
jmp 0x100387d9a
movsxd rcx, dword [0x10000003c]
mov r8d, dword [rcx + r15 + 0xb0]
add r8, r15
lea rax, [r10 + r9]
mov edx, dword [rcx + r15 + 0xb4]
mov qword [rsp + 0x80], rax
mov eax, r10d
sub eax, r15d
mov ecx, eax
mov rsi, rcx
mov r11d, eax
mov rax, 0xfffffffffffff000
and r11, rax
lea r12, [rcx + r9]
lea rcx, [rdx + r8]
mov qword [rsp + 0x40], rcx
mov r15, r12
sub rsi, r11
and r15, rax
sub r12, r15
mov qword [rsp + 0x48], r12
jmp 0x100387aee
mov eax, dword [r8]
cmp rax, r11
jae 0x100387af3
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rcx
jne 0x100387adf
xor ebx, ebx
cmp r8, rcx
je 0x100387b2d
mov eax, dword [r8]
cmp rax, r11
jne 0x100387b2d
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x100387b28
mov ax, word [r8 + rbx*2 + 8]
and eax, 0xfff
cmp rax, rsi
jae 0x100387b28
add rbx, 1
cmp rbx, rcx
jne 0x100387b0f
mov rcx, qword [rsp + 0x40]
mov esi, 0xd4afbe6b
mov rbp, qword [rsp + 0x20]
mov r9d, dword [rsp + 0x30]
mov edx, dword [rsp + 0x34]
cmp r8, rcx
je 0x100387d12
mov eax, dword [r8]
cmp rax, r15
ja 0x100387d12
mov edi, dword [r8 + 4]
lea rax, [rdi - 8]
shr rax, 1
cmp rbx, rax
jne 0x100387b81
add r8, rdi
cmp r8, rcx
je 0x100387d12
mov eax, dword [r8]
cmp rax, r15
ja 0x100387d12
xor ebx, ebx
jmp 0x100387b55
mov eax, dword [r8]
cmp rax, r15
jne 0x100387b9d
mov ax, word [r8 + rbx*2 + 8]
and eax, 0xfff
cmp rax, r12
jae 0x100387d12
mov rax, rbx
add rbx, 1
test word [r8 + rax*2 + 8], 0xf000
je 0x100387b40
xor edi, edi
movzx r11d, word [r8 + rax*2 + 8]
lea rax, [0x100000000]
mov r12d, r11d
and r12d, 0xfff
add r12d, dword [r8]
add r12, rax
mov rax, r12
sub rax, r10
je 0x100387c3b
mov r14, rax
movzx eax, byte [rdi + r10]
add rdi, 1
sub eax, 0x2b504195
add r9d, eax
add eax, edx
imul rax, rsi
mov qword [rsp + 0x38], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x38]
lea edx, [rcx + rax*2 - 0x7fffffff]
sar ecx, 0x1f
btr ecx, 0x1f
sub edx, ecx
mov eax, edx
sar eax, 0x1f
btr eax, 0x1f
add eax, edx
imul rax, rsi
mov qword [rsp + 0x38], rax
shr rax, 0x20
mov edx, dword [rsp + 0x38]
add edx, eax
add r9d, edx
cmp rdi, r14
jb 0x100387bd8
mov dword [rsp + 0x34], edx
mov dword [rsp + 0x30], r9d
mov rax, qword [r12]
shr r11d, 0xc
mov qword [rsp + 0x38], rax
cmp r11d, 3
je 0x100387c5e
sub r11d, 0xa
neg r11d
sbb r10d, r10d
add r10d, 3
jmp 0x100387c64
mov r10d, 2
mov r11, rbp
neg r11
sub r10d, 2
je 0x100387c8c
cmp r10d, 1
je 0x100387c7c
or r10, 0xffffffffffffffff
jmp 0x100387c94
add rax, r11
mov r10d, 8
mov qword [rsp + 0x38], rax
jmp 0x100387c94
add dword [rsp + 0x38], r11d
mov r10, r13
xor r11d, r11d
test r10, r10
je 0x100387d00
movzx eax, byte [rsp + r11 + 0x38]
add r11, 1
sub eax, 0x2b504195
add r9d, eax
add eax, edx
imul rax, rsi
mov qword [rsp + 0x20], rax
mov ecx, dword [rsp + 0x20]
shr rax, 0x20
lea edx, [rcx + rax*2 - 0x7fffffff]
sar ecx, 0x1f
btr ecx, 0x1f
sub edx, ecx
mov eax, edx
sar eax, 0x1f
btr eax, 0x1f
add eax, edx
imul rax, rsi
mov qword [rsp + 0x20], rax
shr rax, 0x20
mov edx, dword [rsp + 0x20]
add edx, eax
add r9d, edx
cmp r11, r10
jb 0x100387c9c
mov dword [rsp + 0x34], edx
mov dword [rsp + 0x30], r9d
mov rcx, qword [rsp + 0x40]
add r10, r12
mov r12, qword [rsp + 0x48]
jmp 0x100387b40
mov rbp, qword [rsp + 0x68]
mov r11, qword [rsp + 0x80]
mov r14, qword [rsp + 0x70]
xor r12d, r12d
sub r11, r10
mov r8, r12
mov dil, r8b
je 0x100387d95
movzx eax, byte [r10 + r8]
add r8, 1
sub eax, 0x2b504195
add r9d, eax
add eax, edx
imul rax, rsi
mov qword [rsp + 0x20], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x20]
lea edx, [rcx + rax*2 - 0x7fffffff]
sar ecx, 0x1f
btr ecx, 0x1f
sub edx, ecx
mov eax, edx
sar eax, 0x1f
btr eax, 0x1f
add eax, edx
imul rax, rsi
mov qword [rsp + 0x20], rax
mov edx, dword [rsp + 0x20]
shr rax, 0x20
add edx, eax
add r9d, edx
cmp r8, r11
jb 0x100387d32
mov dword [rsp + 0x34], edx
mov dword [rsp + 0x30], r9d
mov rbx, qword [rsp + 0x58]
mov esi, dword [rsp + 0x2c]
mov rcx, r12
mov al, cl
add rcx, 1
and eax, 7
mov al, byte [rsp + rax + 0x30]
cmp rcx, 8
mov byte [rsp + rcx + 0x8f], al
jb 0x100387da1
mov eax, 0x78e437c0
mov r10, rbx
mov r15, rbp
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rbx
mov r12b, r14b
and r12d, 7
je 0x100388276
mov ebx, esi
not ebx
xor r8d, r8d
xor r11d, r11d
xor r10d, r10d
test r12d, r12d
mov dword [rsp + 0x40], r8d
mov dword [rsp + 0x48], r11d
jle 0x100387e37
lea r9d, [r8 + 0x38]
movzx edx, byte [r15]
cmp r10d, r13d
jge 0x100387e14
lea ecx, [r9 - 0x20]
shl edx, cl
or r11d, edx
jmp 0x100387e1c
mov ecx, r9d
shl edx, cl
or r8d, edx
add r10d, 1
add r15, 1
sub r9d, 8
cmp r10d, r12d
jl 0x100387e00
mov dword [rsp + 0x48], r11d
mov dword [rsp + 0x40], r8d
movzx r11d, word [rsp + 0x94]
movzx r9d, word [rsp + 0x92]
mov ecx, esi
movzx r10d, word [rsp + 0x96]
movzx r8d, ax
sub ecx, eax
sub ecx, r10d
xor ebx, ecx
mov ecx, r8d
xor ecx, ebx
mov esi, ebx
rol ecx, 3
ror esi, 9
imul ecx, r11d
add esi, ecx
xor esi, dword [rsp + 0x2c]
mov edx, esi
mov ecx, esi
xor edx, r10d
shr ecx, 3
rol edx, 6
imul edx, r9d
add edx, ecx
xor ebx, edx
mov ecx, ebx
mov edx, dword [rsp + 0x94]
xor edx, ebx
ror edx, 0xc
rol ecx, 0xa
imul edx, r8d
xor ecx, edx
xor esi, ecx
mov edx, eax
xor edx, esi
rol edx, 1
mov ecx, esi
rol ecx, 0xf
imul edx, r10d
add ecx, edx
xor ebx, ecx
mov ecx, ebx
not ecx
ror ecx, 0xb
add ecx, r11d
imul ecx, r8d
xor esi, ecx
mov edx, esi
sub edx, r11d
mov ecx, esi
shr ecx, 0xc
imul edx, r9d
sub edx, ecx
xor ebx, edx
mov edx, ebx
mov ecx, ebx
sub edx, dword [rsp + 0x94]
ror edx, 0xa
ror ecx, 7
imul edx, r8d
add ecx, edx
xor esi, ecx
mov edx, esi
sub edx, eax
ror edx, 0xf
mov ecx, esi
rol ecx, 3
imul edx, r10d
xor ecx, edx
xor ebx, ecx
lea edx, [rbx + rax]
ror edx, 0xd
mov ecx, ebx
ror ecx, 0xb
imul edx, r11d
add ecx, edx
mov edx, dword [rsp + 0x94]
xor esi, ecx
xor r11d, esi
mov ecx, esi
ror ecx, 0xd
imul r11d, r9d
add ecx, r11d
xor ebx, ecx
mov ecx, eax
xor r9d, r9d
xor ecx, ebx
mov r11d, dword [rsp + 0x40]
xor ebx, r11d
mov r8d, ebx
sub edx, ecx
xor edx, dword [rsp + 0x48]
xor esi, edx
mov edx, esi
test r12d, r12d
jle 0x100387f86
mov rcx, qword [rsp + 0x20]
cmp r9d, r13d
jge 0x100387f6a
rol edx, 8
mov byte [rcx], dl
add rcx, 1
xor dil, dl
jmp 0x100387f78
rol r8d, 8
mov byte [rcx], r8b
add rcx, 1
xor dil, r8b
add r9d, 1
cmp r9d, r12d
jl 0x100387f57
mov qword [rsp + 0x20], rcx
lea ecx, [r12 - 4]
test ecx, ecx
jle 0x10038825e
sub r13d, ecx
shl r13d, 3
mov ecx, r13d
shr ebx, cl
shl ebx, cl
mov r12d, dword [rsp + 0x48]
mov r10, qword [rsp + 0x20]
mov r13, r14
shr r13, 3
je 0x1003881a8
movzx edx, word [rsp + 0x96]
movzx r14d, ax
movzx ebp, word [rsp + 0x94]
movzx ecx, word [rsp + 0x92]
mov dword [rsp + 0x40], edx
mov dword [rsp + 0x2c], ecx
movzx r8d, byte [r15 + 4]
movzx r9d, byte [r15]
shl r9d, 8
movzx ecx, byte [r15 + 1]
shl r8d, 8
add r15, 8
or r9d, ecx
shl r9d, 8
movzx ecx, byte [r15 - 6]
or r9d, ecx
movzx ecx, byte [r15 - 5]
shl r9d, 8
or r9d, ecx
movzx ecx, byte [r15 - 3]
or r8d, ecx
movzx ecx, byte [r15 - 2]
xor esi, r9d
shl r8d, 8
or r8d, ecx
shl r8d, 8
movzx ecx, byte [r15 - 1]
or r8d, ecx
mov ecx, esi
sub ecx, eax
sub ecx, edx
mov edx, r14d
xor ecx, r8d
xor ebx, ecx
mov ecx, ebx
xor edx, ebx
rol edx, 3
ror ecx, 9
imul edx, ebp
add ecx, edx
xor esi, ecx
movzx ecx, word [rsp + 0x96]
mov edx, esi
xor edx, ecx
rol edx, 6
movzx ecx, word [rsp + 0x92]
imul edx, ecx
mov ecx, esi
shr ecx, 3
add edx, ecx
xor ebx, edx
mov ecx, ebx
mov edx, dword [rsp + 0x94]
xor edx, ebx
ror edx, 0xc
rol ecx, 0xa
imul edx, r14d
xor ecx, edx
xor esi, ecx
mov edx, eax
xor edx, esi
mov ecx, esi
rol edx, 1
rol ecx, 0xf
imul edx, dword [rsp + 0x40]
add ecx, edx
xor ebx, ecx
mov ecx, ebx
not ecx
ror ecx, 0xb
add ecx, ebp
imul ecx, r14d
xor esi, ecx
mov edx, esi
movzx ecx, word [rsp + 0x92]
sub edx, ebp
imul edx, ecx
mov ecx, esi
shr ecx, 0xc
sub edx, ecx
xor ebx, edx
mov ecx, ebx
mov edx, ebx
sub edx, dword [rsp + 0x94]
ror edx, 0xa
ror ecx, 7
imul edx, r14d
add ecx, edx
xor esi, ecx
mov ecx, esi
mov edx, esi
sub edx, eax
ror edx, 0xf
rol ecx, 3
imul edx, dword [rsp + 0x40]
xor ecx, edx
xor ebx, ecx
mov ecx, ebx
lea edx, [rbx + rax]
ror edx, 0xd
ror ecx, 0xb
imul edx, ebp
add ecx, edx
xor esi, ecx
mov edx, esi
mov ecx, ebp
xor ecx, esi
ror edx, 0xd
imul ecx, dword [rsp + 0x2c]
add edx, ecx
xor ebx, edx
mov ecx, eax
mov edx, dword [rsp + 0x94]
xor ecx, ebx
xor ebx, r11d
sub edx, ecx
mov byte [r10 + 7], bl
mov r11d, r8d
xor edx, r12d
xor esi, edx
mov r12d, r9d
movzx edx, word [rsp + 0x96]
mov byte [r10 + 3], sil
xor dil, sil
ror esi, 8
xor dil, bl
ror ebx, 8
xor dil, sil
mov byte [r10 + 2], sil
mov byte [r10 + 6], bl
ror esi, 8
xor dil, bl
ror ebx, 8
mov byte [r10 + 1], sil
mov byte [r10 + 5], bl
xor dil, sil
ror esi, 8
xor dil, bl
mov byte [r10], sil
ror ebx, 8
mov byte [r10 + 4], bl
add r10, 8
mov cl, bl
xor cl, sil
xor dil, cl
ror esi, 8
ror ebx, 8
sub r13, 1
jne 0x100387fdc
mov rbp, qword [rsp + 0x68]
mov r14, qword [rsp + 0x70]
cmp dil, byte [r14 + rbp + 8]
je 0x10038829e
call fcn.1002d3e40
mov r11, rax
mov ebx, 0xffff
lea r10, [0x1003e8888]
mov rax, 0xfffffffffffff000
mov rsi, qword [rsp + 0x78]
lea r8, [rsi + 0x18]
and r8, 0xfffffffffffffff8
and r11, rax
lea r9, [r8 + 0xfff]
mov qword [rsi + 0x10], r10
mov rcx, qword [0x100495210]
and r9, rax
xor edi, edi
imul rcx, rcx, 0x343fd
shl rdi, 0x10
add rcx, 0x269ec3
mov rax, rcx
shr rax, 0x10
movzx edx, ax
or rdi, rdx
shr rbx, 0x10
jne 0x1003881f5
mov qword [0x100495210], rcx
movabs rax, 0x8000800080008001
mul rdi
shr rdx, 0xf
imul rdx, rdx, 0xffff
sub rdi, rdx
add rdi, 1
mov rax, qword [rsp + 0x60]
mov qword [rax + 0x98], r11
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x60], 0
jmp 0x100388294
xor ebx, ebx
test ecx, ecx
jns 0x100387fa1
neg ecx
shl ecx, 3
shr esi, cl
shl esi, cl
jmp 0x100387fa1
mov r11d, esi
not r11d
mov r12d, esi
xor ebx, ebx
xor esi, esi
jmp 0x100387fab
mov rax, qword [rsp + 0x60]
mov qword [r8], rax
add r8, 8
cmp r8, r9
jb 0x100388288
jmp 0x1003883b8
mov rax, qword [0x1003f4900]
mov rbx, rbp
lea r15, [0x100000000]
mov rsi, r15
mov r12, qword [rsp + 0x58]
sub rbx, r12
sub rsi, rax
jne 0x1003882c8
test rbx, rbx
je 0x10038839c
xor edi, edi
mov r11, r12
sub r11, rbp
sub ebp, r15d
lea r13d, [r14 + rbp]
lea r14, [0x1000016e8]
mov rcx, qword [0x1000016e8]
lea r8d, [rcx - 1]
test r8d, r8d
js 0x10038831b
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r14 + rdx*4 + 4]
and r9d, 0xfffffff
cmp ebp, r9d
jae 0x100388311
lea r8d, [rax - 1]
jmp 0x100388316
jbe 0x100388320
lea edi, [rax + 1]
cmp r8d, edi
jge 0x1003882ee
movsxd r10, edi
jmp 0x100388395
movsxd r10, eax
jmp 0x100388395
mov edx, dword [r14 + r10*4 + 4]
mov eax, edx
and eax, 0xfffffff
cmp eax, r13d
jae 0x10038839c
mov r8, rdx
mov edi, edx
sar edx, 0x1e
shl edi, 2
and r8d, 0xfffffff
and edx, 3
sar edi, 0x1e
add r8, r15
xor r9d, r9d
and edi, 3
sub edi, 1
je 0x100388370
sub edi, 1
je 0x10038836b
cmp edi, 1
jne 0x100388376
mov r9, rsi
jmp 0x100388376
mov r9, rbx
jmp 0x100388376
mov r9, rsi
sub r9, rbx
sub edx, 2
je 0x100388386
cmp edx, 1
jne 0x100388391
add qword [r8 + r11], r9
jmp 0x10038838a
add dword [r8 + r11], r9d
mov rcx, qword [0x1000016e8]
add r10, 1
mov eax, ecx
cmp r10, rax
jb 0x100388325
mov eax, dword [0x1002f3aa4]
mov eax, 0xd17b92a9
mov rsi, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x88]
lea r10, [r12 + rdx]
mov qword [rsi + 0x10], r10
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.1002d532c
mov rbx, qword [rsp + 0xf0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret