Function at 0x140049380
Capabilities:
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
mov ebp, r9d
mov r13d, r8d
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x14017e028]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov rbx, qword [0x1401881f0]
cmp rbx, 1
jbe 0x140049982
mov ecx, dword [0x1401814d8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140049b44
movsxd rcx, dword [rbx]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rbx + 4]
jne 0x140049b44
mov rax, qword [rax + rcx]
mov qword [rsi], rax
mov rbx, qword [0x140188230]
cmp rbx, 1
jbe 0x140049a86
mov ecx, dword [0x1401814d8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140049b4b
movsxd rcx, dword [rbx]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rbx + 4]
jne 0x140049b4b
mov rax, qword [rax + rcx]
mov qword [rsi + 8], rax
cmp r13d, 1
je 0x140049b52
test rax, rax
jne 0x1400498b8
xor eax, eax
mov byte [rsi + 0x10], al
lea r12, [rsi + 0x18]
mov rdi, qword [rdi + 0x18]
mov qword [rsp + 0x30], 0x11be9915
mov rcx, qword [0x1401845a0]
test rcx, rcx
jne 0x140049b59
mov qword [r12], 0
mov qword [rsi + 0x28], 0
mov dword [rsi + 0x30], 0x11be9915
mov byte [rsi + 0x38], 0
mov rdi, qword [0x140188230]
cmp rdi, 1
jbe 0x140049ad3
mov ecx, dword [0x1401814d8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140049b31
movsxd rcx, dword [rdi]
shl rcx, 4
mov qword [rax + rcx], rsi
mov ecx, dword [rdi + 4]
movsxd rdx, dword [rdi]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
mov rdi, qword [0x140189d10]
cmp rdi, 1
jbe 0x140049a39
mov ecx, dword [0x1401814d8]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140049586
movsxd rcx, dword [rdi]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rdi + 4]
jne 0x140049586
mov rax, qword [rax + rcx]
test rax, rax
je 0x140049586
cmp byte [rax], 0
jne 0x140049586
mov eax, dword [0x140189d24]
mov ecx, dword [0x140181920]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140049a04
cmp byte [0x140189d20], 0
je 0x140049586
mov rcx, qword [rsi]
test rcx, rcx
je 0x140049558
mov rax, qword [rsi + 8]
test rax, rax
jne 0x1400498fa
mov edx, r13d
call fcn.14008aa00
mov rax, qword [r12]
test rax, rax
jne 0x140049b8e
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.14008fec0
mov rax, rsi
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
test ebp, ebp
jne 0x140049760
cmp byte [rsi + 0x10], 0
jne 0x140049760
cmp qword [rsi + 8], 0
jne 0x14004953b
cmp byte [rsi + 0x38], 0
jne 0x140049c37
lea rcx, [rsi + 0x40]
call qword [fcn.1400562f0]
mov r14, qword [rsi + 0x40]
mov eax, dword [0x140188208]
mov ecx, dword [0x140181920]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140049918
lea rcx, [0x140188200]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140049b20
mov eax, dword [0x140188228]
mov ecx, dword [0x140181920]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14004994d
cmp qword [0x140188220], 0
je 0x140049742
mov eax, dword [0x140188218]
mov ecx, dword [0x140181920]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400499cf
mov rbp, qword [0x140188210]
movabs r15, 0x7fffffffffffffff
mov rbx, r14
test rbp, rbp
je 0x140049697
mov rax, qword [rbp + 0x1f0]
mov ebx, 0x3938700
xor ecx, ecx
mov edx, 0x3938700
add rdx, rax
setns cl
add rcx, r15
add rbx, rax
cmovo rbx, rcx
cmp rbx, r14
jle 0x140049697
mov qword [rsi + 0x48], rbp
lock inc dword [rbp]
jmp 0x14004974a
mov rax, r14
sub rax, rbx
cmp rax, 0x989680
jl 0x1400496af
mov byte [rbp + 0x200], 1
mov rbx, r14
mov ecx, 0x208
int3
mov qword [rsi + 0x48], 0
lea rcx, [0x140188200]
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov byte [rsi + 0x38], 1
jmp 0x14004953b
mov rax, qword [rsi + 8]
test rax, rax
je 0x14004953b
cmp byte [rax + 0x38], 0
je 0x14004953b
mov rdi, qword [rax + 0x48]
mov qword [rax + 0x48], 0
test rdi, rdi
je 0x14004953b
lock dec dword [rdi]
jne 0x14004953b
mov rcx, rdi
int3
mov al, byte [rax + 0x10]
jmp 0x140049445
cmp r13d, 1
jne 0x140049558
cmp byte [rax + 0x10], 0
jne 0x140049558
call fcn.14013f530
jmp 0x140049558
lea rcx, [0x140188208]
int3
lea rcx, [0x140188228]
int3
lea rcx, [0x1401881f0]
int3
lea rcx, [0x140188218]
int3
lea rcx, [0x140189d24]
int3
lea rcx, [0x140189d10]
int3
lea rcx, [0x140188230]
int3
lea rcx, [0x140188230]
int3
lea rcx, [0x140188200]
call fcn.140041630
jmp 0x1400495f1
test rsi, rsi
je 0x1400494c4
call fcn.1400074b0
jmp 0x1400494ab
xor eax, eax
jmp 0x1400493ea
xor eax, eax
jmp 0x14004942c
mov al, 1
jmp 0x140049445
int3
mov eax, dword [rax + 0x18]
cmp eax, dword [rsi + 0x20]
jbe 0x140049565
movabs rax, 0xaaaaaaaaaaaaaaaa
lea rdi, [rsp + 0x60]
mov qword [rdi], rax
mov rcx, rdi
call qword [fcn.1400562f0]
mov rcx, r12
int3
lea rcx, [rsi + 0x40]
call fcn.140011f00
mov byte [rsi + 0x38], 0
jmp 0x1400495a9