Function at 0x14013ed80
Capabilities:
Encode data using base64
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
movapd xmmword [rsp + 0x40], xmm6
mov rsi, rcx
mov rax, qword [0x140287028]
xor rax, rsp
mov qword [rsp + 0x38], rax
call fcn.140172a88
mov ebp, dword [rax]
call fcn.140172a88
mov dword [rax], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [0x1402a1970]
cmp rbx, 1
jbe 0x14013f080
mov r14, qword [rsi + 8]
mov ecx, dword [0x140288f70]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x14013f0c7
mov rcx, qword [rbx]
shl rcx, 4
mov qword [rax + rcx], r14
mov ecx, dword [rbx + 8]
mov rdx, qword [rbx]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
mov r14, qword [rsi]
test r14, r14
jne 0x14013eef7
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.140172a88
mov dword [rax], ebp
cmp byte [rsi + 0x38], 0
je 0x14013ee40
mov rbx, qword [rsi + 0x48]
test rbx, rbx
jne 0x14013ef6a
mov byte [rsi + 0x38], 0
mov rax, qword [rsi + 0x18]
test rax, rax
jne 0x14013f24b
mov rdi, qword [rsi + 0x28]
mov qword [rsi + 0x28], 0
test rdi, rdi
jne 0x14013f2aa
mov rax, qword [rsi + 0x18]
test rax, rax
jne 0x14013f2bf
xor ecx, ecx
mov rax, qword [0x14028a5a0]
and rax, rcx
cmp rax, qword [0x14028a588]
je 0x14013f2d8
mov qword [rsi + 0x18], 0
mov rcx, qword [rsi + 8]
mov rax, qword [0x14028a5a0]
and rax, rcx
cmp rax, qword [0x14028a588]
je 0x14013f2e2
mov qword [rsi + 8], 0
mov rcx, qword [rsi]
mov rax, qword [0x14028a5a0]
and rax, rcx
cmp rax, qword [0x14028a588]
je 0x14013f01c
mov qword [rsi], 0
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1401756e0
movaps xmm6, xmmword [rsp + 0x40]
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp qword [rsi + 8], 0
jne 0x14013ee1a
mov rbx, qword [r14 + 0x28]
add rbx, 0x28
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14013f040
mov qword [r14 + 0x20], 0
cmp byte [r14 + 0x3a], 0
jne 0x14013ef55
cmp byte [r14 + 0x38], 0
mov rax, qword [r14 + 0x28]
jne 0x14013f04d
dec dword [rax + 0x120]
cmp byte [r14 + 0x18], 0
je 0x14013f2ec
cmp byte [r14 + 0x19], 0
je 0x14013f026
mov word [r14 + 0x38], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14013ee1a
mov rax, qword [fcn.140158d50]
lea rcx, [0x140171950]
cmp rax, rcx
jne 0x14013f235
lea rdi, [rsp + 0x30]
mov qword [rdi], 0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rdi]
movabs rcx, 0x8637bd05af6
cmp rax, rcx
jg 0x14013f2ee
imul rax, rax, 0xf4240
cqo
idiv qword [0x14029b670]
mov qword [rsp + 0x28], rax
mov r15, qword [rsi + 0x40]
xor ecx, ecx
cmp rax, r15
setns cl
movabs r12, 0x7fffffffffffffff
add rcx, r12
mov r14, rax
sub r14, r15
cmovo r14, rcx
cmp r14, 0xf4240
jge 0x14013f0da
mov rdi, qword [rsi + 0x48]
test rdi, rdi
je 0x14013ee3c
lock dec dword [rdi]
jne 0x14013ee3c
mov rcx, rdi
call fcn.140067cd0
mov rcx, rdi
call fcn.140172a44
jmp 0x14013ee3c
call fcn.1400ebe70
jmp 0x14013eecd
cmp byte [r14 + 0x39], 0
mov rcx, qword [r14 + 0x28]
jne 0x14013f315
dec dword [rcx + 0x124]
jmp 0x14013ef55
mov rcx, rbx
call fcn.1400ec2e0
jmp 0x14013ef1b
mov rcx, qword [rax + 0x40]
mov rdx, qword [rax + 0x100]
dec rdx
mov qword [rax + 0x100], rdx
cmp rcx, qword [rax + 0x48]
je 0x14013f075
cmp qword [rax + 0x110], rdx
jae 0x14013f228
mov word [rax + 0x78], 0
jmp 0x14013ef3f
lea rcx, [0x1402a1970]
call fcn.140007880
test al, al
je 0x14013f326
mov qword [0x1402a1980], 0
lea rbx, [0x1402a1978]
mov qword [0x1402a1978], 0xffffffffffffffff
mov rcx, rbx
xor edx, edx
call fcn.140002400
mov qword [0x1402a1970], rbx
jmp 0x14013eddb
test r14, r14
je 0x14013ee0e
call fcn.14003bc30
jmp 0x14013edf5
mov rcx, qword [rbx + 0x1f0]
mov edx, 0x3938700
lea r8, [rdx + rcx]
sar r8, 0x3f
btc r8, 0x3f
add rdx, rcx
cmovo rdx, r8
cmp rdx, rax
jle 0x14013f332
mov rax, qword [rbx + 0x1f0]
xor ecx, ecx
cmp r15, rax
setns cl
add rcx, r12
sub r15, rax
movabs rdi, 0x8000000000000001
cmovo r15, rcx
lea rax, [r15 + rdi]
cmp rax, 2
jb 0x14013f36c
cvtsi2sd xmm0, r15
divsd xmm0, qword [0x140265f20]
call fcn.1401ae8e8
movsd xmm6, qword [0x14024e9f0]
ucomisd xmm6, xmm0
jb 0x14013f382
maxsd xmm0, qword [0x14024ea08]
cvttsd2si ebp, xmm0
add rdi, r14
cmp rdi, 2
jb 0x14013f17f
xorps xmm0, xmm0
cvtsi2sd xmm0, r14
divsd xmm0, qword [0x140265f20]
jmp 0x14013f187
movsd xmm0, qword [0x140265f28]
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jb 0x14013f399
addsd xmm0, qword [0x14024e590]
call fcn.1401ae8e8
ucomisd xmm6, xmm0
jb 0x14013f3ab
maxsd xmm0, qword [0x14024ea08]
cvttsd2si r14d, xmm0
mov r15, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r12, qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
add r14d, ebp
cmp r14d, 0x3c
mov r13d, 0x3c
cmovl r13d, r14d
lea rdi, [rbx + 8]
mov rcx, rdi
call r15
test al, al
je 0x14013f3c4
cmp ebp, r13d
jge 0x14013f202
movsxd rax, ebp
movsxd rcx, r13d
inc qword [rbx + rax*8 + 0x10]
inc rax
cmp rcx, rax
jne 0x14013f1f5
mov rcx, rdi
call r12
cmp r14d, 0x3d
jl 0x14013eff1
mov rbx, qword [rbx + 0x1f8]
sub r14d, r13d
xor ebp, ebp
test rbx, rbx
jne 0x14013f1c7
jmp 0x14013eff1
movzx ecx, word [rcx + 0x10]
mov word [rax + 0x78], cx
jmp 0x14013ef3f
lea rdi, [rsp + 0x28]
mov rcx, rdi
call qword [case.0x1401d7990.0]
mov rax, qword [rdi]
jmp 0x14013efc1
mov ecx, dword [rsi + 0x20]
cmp dword [rax + 0x18], ecx
jbe 0x14013ee4d
mov rax, qword [rax + 0x10]
shl rcx, 7
cmp dword [rax + rcx + 0x68], 0
je 0x14013ee4d
mov rbx, qword [0x140299b10]
lea rdi, [rbx + 0xc8]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x14013f3d1
mov rcx, qword [rsi + 0x18]
sub rbx, 0xffffffffffffff80
mov edx, dword [rsi + 0x20]
mov r8, rbx
call fcn.1401d05b0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x14013ee4d
mov rcx, rdi
call fcn.1401cfbc0
mov rcx, rdi
call fcn.140172a44
jmp 0x14013ee62
mov rcx, qword [rax + 8]
lock dec dword [rcx + 0x38]
mov rax, qword [rax + 8]
lock inc dword [rax + 0x3c]
mov rcx, qword [rsi + 0x18]
jmp 0x14013ee71
call fcn.1400ebe70
jmp 0x14013ee88
call fcn.1400ebe70
jmp 0x14013eeab
ud2
mov rcx, qword [0x14029b670]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x14013efbc
dec qword [rcx + 0x108]
call fcn.1401f4c10
jmp 0x14013ef55
mov rbx, qword [0x1402a1970]
jmp 0x14013eddb
lea rdi, [rsp + 0x30]
mov rcx, rdi
mov rdx, rax
call fcn.1400bc7d0
mov rdi, qword [rdi]
test rdi, rdi
je 0x14013f103
lock dec dword [rdi]
jne 0x14013f103
mov rcx, rdi
call fcn.140067cd0
mov rcx, rdi
call fcn.140172a44
jmp 0x14013f103
shr r15, 0x3f
lea rax, [0x140265f10]
movsd xmm0, qword [rax + r15*8]
jmp 0x14013f139
xor eax, eax
ucomisd xmm0, qword [0x14024ea08]
mov ebp, 0x7fffffff
cmovb ebp, eax
jmp 0x14013f164
addsd xmm0, qword [0x14024e9f8]
call fcn.1401ae4ec
jmp 0x14013f1a2
xor eax, eax
ucomisd xmm0, qword [0x14024ea08]
mov r14d, 0x7fffffff
cmovb r14d, eax
jmp 0x14013f1b9
mov rcx, rdi
call fcn.1400ec2e0
jmp 0x14013f1ea
mov rcx, rdi
call fcn.1400ec2e0
jmp 0x14013f289