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

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x20
mov r12, rcx
lea rax, fcn.140153df0
mov qword [rcx], rax
lea rax, [0x1401f3780]
mov qword [rcx + 8], rax
lea rsi, [0x1402271a8]
movabs rax, 0xfffffffe00000000
and rax, rsi
cmp qword [0x14021af08], rax
je 0x140019536
mov qword [r12 + 0x10], rsi
xorps xmm0, xmm0
movups xmmword [r12 + 0x18], xmm0
mov eax, dword [0x140227524]
mov dword [r12 + 0x28], eax
mov eax, dword [0x14022b0e0]
mov ecx, dword [0x140222a94]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400194ec
mov ecx, dword [0x14021aed0]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x14001952f
movsxd rcx, dword [0x14022b0d8]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x14022b0dc]
jne 0x14001952f
mov rcx, qword [rax + rcx]
lea rdi, [r12 + 8]
add rcx, 0x470
mov rdx, r12
call fcn.140020d40
call fcn.140021ec0
mov rbx, rax
call fcn.14010fe40
mov r9, qword [rax]
test r9, r9
je 0x140019068
lock inc dword [r9 + 8]
lea r8, str.ThreadLocalEventBuffer
mov rcx, rbx
mov rdx, rdi
call fcn.140021ff0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebp, eax
lea rcx, [0x1402271b0]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140019547
call fcn.14010fe40
mov r15, qword [rax]
test r15, r15
je 0x1400190a9
lock inc dword [r15 + 8]
movsxd r14, ebp
mov rsi, qword [0x1402274d0]
test rsi, rsi
jne 0x140019294
movabs rdi, 0xaaaaaaaaaaaaaaaa
mov ecx, 0x20
call fcn.14011d790
mov rbx, rax
mov dword [rax + 0x10], r14d
xor eax, eax
mov qword [rbx + 0x18], rax
mov qword [rbx + 8], r14
mov qword [rbx], rax
mov rax, qword [0x1402274e0]
inc rax
js 0x1400190fa
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
jmp 0x140019112
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
addss xmm0, xmm0
mov rcx, rsi
shr rcx, 1
mov eax, esi
and eax, 1
or rax, rcx
test rsi, rsi
js 0x14001912c
cvtsi2ss xmm1, rsi
jmp 0x140019135
cvtsi2ss xmm1, rax
addss xmm1, xmm1
movss xmm2, dword [0x1402274e8]
je 0x14001914c
mulss xmm1, xmm2
ucomiss xmm0, xmm1
jbe 0x140019221
divss xmm0, xmm2
call fcn.140135b9c
cvttss2si rcx, xmm0
mov rdx, rcx
subss xmm0, dword [0x1401e2fa8]
sar rdx, 0x3f
cvttss2si rax, xmm0
and rax, rdx
or rax, rcx
lea rdx, [rsi + rsi]
mov ecx, 1
cmp rsi, 3
jae 0x1400195b0
or rcx, rdx
cmp rcx, rax
cmovb rcx, rax
mov edi, 2
cmp rcx, 1
jne 0x14001935b
cmp rdi, rsi
jbe 0x1400195c1
mov rax, rdi
shr rax, 0x3d
jne 0x1400195dd
lea rcx, [rdi*8]
call fcn.14011d790
mov rcx, qword [0x1402274c8]
mov qword [0x1402274c8], rax
test rcx, rcx
jne 0x1400193c3
mov qword [0x1402274d0], rdi
xor eax, eax
mov rcx, qword [0x1402274c8]
mov qword [rcx + rax*8], 0
inc rax
cmp rdi, rax
jne 0x1400191e3
mov rbp, qword [0x1402274d8]
test rbp, rbp
jne 0x1400193cd
mov rsi, qword [0x1402274d0]
lea rdi, [rsi - 1]
test rsi, rdi
jne 0x1400193aa
and rdi, r14
mov rax, qword [0x1402274c8]
mov rcx, qword [rax + rdi*8]
test rcx, rcx
jne 0x14001934d
lea rcx, [0x1402274d8]
mov rdx, qword [0x1402274d8]
mov qword [rbx], rdx
mov qword [0x1402274d8], rbx
mov qword [rax + rdi*8], rcx
mov rax, qword [rbx]
test rax, rax
jne 0x14001937c
inc qword [0x1402274e0]
mov rcx, qword [rbx + 0x18]
mov qword [rbx + 0x18], r15
test rcx, rcx
jne 0x140019558
lea rcx, [0x1402271b0]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rax, r12
add rsp, 0x20
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov rax, rsi
shr rax, 1
movabs rcx, 0x5555555555555555
and rcx, rax
mov rax, rsi
sub rax, rcx
movabs rcx, 0x3333333333333333
mov rdx, rax
and rdx, rcx
shr rax, 2
and rax, rcx
add rax, rdx
mov rcx, rax
shr rcx, 4
add rcx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rcx
movabs rcx, 0x101010101010101
imul rcx, rax
shr rcx, 0x38
cmp rcx, 1
ja 0x1400194d0
lea rdi, [rsi - 1]
and rdi, r14
mov rax, qword [0x1402274c8]
mov rbx, qword [rax + rdi*8]
test rbx, rbx
je 0x1400190c6
lea r8, [rsi - 1]
mov rbx, qword [rbx]
test rbx, rbx
je 0x1400190c6
mov rax, qword [rbx + 8]
cmp rax, r14
je 0x140019343
cmp ecx, 1
ja 0x1400194ba
and rax, r8
cmp rax, rdi
jne 0x1400190c6
cmp dword [rbx + 0x10], ebp
jne 0x140019319
jmp 0x140019264
mov rax, qword [rcx]
mov qword [rbx], rax
mov qword [rcx], rbx
jmp 0x14001925d
lea rax, [rcx - 1]
test rcx, rax
je 0x1400196f6
call fcn.14010b600
mov rdi, rax
mov rsi, qword [0x1402274d0]
jmp 0x1400191a0
mov rax, qword [rax + 8]
lea rcx, [rsi - 1]
test rsi, rcx
je 0x1400196fe
cmp rax, rsi
jb 0x14001939a
xor edx, edx
div rsi
mov rax, rdx
mov rcx, qword [0x1402274c8]
mov qword [rcx + rax*8], rbx
jmp 0x14001925d
cmp rsi, r14
ja 0x140019706
mov rax, r14
xor edx, edx
div rsi
mov rdi, rdx
jmp 0x140019221
call fcn.14011d780
jmp 0x1400191da
mov r9, qword [rbp + 8]
mov rax, rdi
shr rax, 1
movabs rcx, 0x5555555555555555
and rcx, rax
mov rax, rdi
sub rax, rcx
movabs rcx, 0x3333333333333333
mov rdx, rax
and rdx, rcx
shr rax, 2
and rax, rcx
add rax, rdx
mov rcx, rax
shr rcx, 4
add rcx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rcx
movabs rsi, 0x101010101010101
imul rsi, rax
shr rsi, 0x38
cmp rsi, 1
jbe 0x14001970e
cmp r9, rdi
jb 0x140019447
mov rax, r9
xor edx, edx
div rdi
mov r9, rdx
mov rax, qword [0x1402274c8]
lea rcx, [0x1402274d8]
mov qword [rax + r9*8], rcx
mov rcx, qword [rbp]
test rcx, rcx
je 0x14001920a
lea r8, [rdi - 1]
mov rax, qword [rcx + 8]
cmp esi, 1
jbe 0x14001971a
cmp rax, rdi
jb 0x140019484
xor edx, edx
div rdi
mov rax, rdx
cmp rax, r9
je 0x140019722
mov rdx, qword [0x1402274c8]
cmp qword [rdx + rax*8], 0
mov r11, rcx
jne 0x140019574
mov qword [rdx + rax*8], rbp
mov rbp, rcx
mov r9, rax
mov rcx, qword [rbp]
test rcx, rcx
jne 0x14001946a
jmp 0x14001920a
cmp rax, rsi
jb 0x14001933a
xor edx, edx
div rsi
mov rax, rdx
jmp 0x14001933a
mov rdi, r14
cmp rsi, r14
ja 0x140019301
mov rax, r14
xor edx, edx
div rsi
mov rdi, rdx
jmp 0x140019301
lea rcx, [0x14022b0e0]
call fcn.14011d638
cmp dword [0x14022b0e0], 0xffffffff
jne 0x140019005
mov qword [0x14022b0d8], 0
lea rcx, [0x14022b0d8]
xor edx, edx
call fcn.140012fc0
lea rcx, [0x14022b0e0]
call fcn.14011d5d8
jmp 0x140019005
xor ecx, ecx
jmp 0x14001903a
lea rcx, [0x1402271a8]
call fcn.1400f2260
jmp 0x140018fc7
lea rcx, [0x1402271b0]
call fcn.1400fd520
jmp 0x140019097
lock dec dword [rcx + 8]
jne 0x140019275
add rcx, 8
add rcx, 0xfffffffffffffff8
call fcn.1400e9a50
jmp 0x140019275
mov r10, r11
mov r11, qword [r11]
test r11, r11
je 0x140019588
mov edx, dword [rcx + 0x10]
cmp edx, dword [r11 + 0x10]
je 0x140019574
mov qword [rbp], r11
mov rdx, qword [0x1402274c8]
mov rdx, qword [rdx + rax*8]
mov rdx, qword [rdx]
mov qword [r10], rdx
mov rdx, qword [0x1402274c8]
mov rax, qword [rdx + rax*8]
mov qword [rax], rcx
jmp 0x1400194ac
lea rbp, [rsi - 1]
xor ecx, ecx
test rsi, rbp
setne cl
jmp 0x140019187
jae 0x14001920a
mov rax, qword [0x1402274e0]
test rax, rax
js 0x1400195e2
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
jmp 0x1400195fa
call fcn.14011d580
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
addss xmm0, xmm0
divss xmm0, dword [0x1402274e8]
call fcn.140135b9c
cvttss2si rcx, xmm0
mov rdx, rcx
subss xmm0, dword [0x1401e2fa8]
cvttss2si rax, xmm0
sar rdx, 0x3f
and rax, rdx
or rax, rcx
cmp rsi, 3
jb 0x1400196a9
mov rcx, rsi
shr rcx, 1
movabs rdx, 0x5555555555555555
and rdx, rcx
mov rbp, rsi
sub rbp, rdx
movabs rdx, 0x3333333333333333
mov rcx, rbp
shr rcx, 2
and rbp, rdx
and rcx, rdx
add rcx, rbp
mov rdx, rcx
shr rdx, 4
add rdx, rcx
movabs rcx, 0xf0f0f0f0f0f0f0f
and rcx, rdx
movabs rdx, 0x101010101010101
imul rdx, rcx
shr rdx, 0x38
cmp edx, 1
ja 0x1400196a9
cmp rax, 2
jb 0x1400196b1
dec rax
bsr rcx, rax
xor ecx, 0x3f
neg cl
mov eax, 1
shl rax, cl
jmp 0x1400196b1
mov rcx, rax
call fcn.14010b600
cmp rdi, rax
cmovb rdi, rax
cmp rdi, rsi
jae 0x14001920a
test rdi, rdi
jne 0x1400191a9
mov rcx, qword [0x1402274c8]
mov qword [0x1402274c8], 0
test rcx, rcx
je 0x1400196e6
call fcn.14011d780
mov qword [0x1402274d0], 0
jmp 0x14001920a
mov rdi, rcx
jmp 0x1400191a0
and rax, rcx
jmp 0x14001939a
mov rdi, r14
jmp 0x140019221
lea rax, [rdi - 1]
and r9, rax
jmp 0x140019447
and rax, r8
jmp 0x140019484
mov rbp, rcx
jmp 0x1400194ac