Function at 0x18000fb90
Capabilities:
Get thread local storage value
Reference absolute stream path on windows
Set thread local storage value

Disassembly:
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x30
mov r14, rcx
mov qword [rsp + 0x48], rsi
lea rcx, [0x18011c6b0]
call fcn.180094fc0
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x18000fc19
lea edx, [rax + 0x18]
lea ecx, [rax + 1]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rdi, rax
test rax, rax
jne 0x18000fc02
lea r9, str.d:_buildob_bora_15653658cayman_glibglib_srcglibgmem.c:135
mov qword [rsp + 0x20], 0x18
lea r8, str._s:_failed_to_allocate__I64u_bytes
lea edx, [rax + 4]
lea rcx, [0x18009cbc8]
call sym.glib_2.0.dll_g_log
nop dword [rax]
jmp 0x18000fc00
lea rcx, [0x18011c6b0]
call fcn.180094fc0
mov ecx, eax
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov rax, qword [0x18011ef58]
lea rcx, [0x18011e7c8]
call qword [case.0x180005f92.0]
call qword [sym.imp.KERNEL32.dll_GetACP]
lea rsi, [0x18011efd0]
mov r8d, eax
mov rcx, rsi
lea rdx, str.CP_u
call fcn.1800965d0
mov rax, qword [0x18011ef68]
lea rcx, [0x18011e7c8]
call qword [case.0x180005f92.0]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x18000fc90
mov r9, rsi
mov rax, rcx
sub r9, rcx
movzx r8d, byte [rax]
movzx edx, byte [rax + r9]
sub r8d, edx
jne 0x18000fc87
inc rax
test edx, edx
jne 0x18000fc72
test r8d, r8d
je 0x18000fe23
mov qword [rsp + 0x40], rbx
test rcx, rcx
je 0x18000fca0
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x18000fcaf
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rsi
call sym.glib_2.0.dll_g_strdup
lea rcx, str.CHARSET
mov qword [rdi + 8], rax
call sym.glib_2.0.dll_g_getenv
mov rbx, rax
test rax, rax
je 0x18000fcf1
cmp byte [rax], 0
je 0x18000fcf1
lea rdx, [0x1800eb510]
mov rcx, rax
call qword [sym.imp.VCRUNTIME140.dll_strstr]
xor ecx, ecx
test rax, rax
setne cl
jmp 0x18000fe10
mov rax, qword [0x18011ef58]
lea rcx, [0x18011e7c8]
call qword [case.0x180005f92.0]
mov r8, qword [0x18011efe0]
test r8, r8
jne 0x18000fd1f
lea r8, str.CP936
mov qword [0x18011efe0], r8
cmp byte [r8], 0
je 0x18000fdc1
mov r10, 0xffffffffffffffff
mov r9, r8
mov rax, rsi
sub r9, rsi
nop dword [rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r9]
sub edx, ecx
jne 0x18000fd53
inc rax
test ecx, ecx
jne 0x18000fd40
test edx, edx
je 0x18000fdb0
cmp byte [r8], 0x2a
jne 0x18000fd64
cmp byte [r8 + 1], 0
je 0x18000fdb0
mov rax, r10
nop word [rax + rax]
cmp byte [r8 + rax + 1], 0
lea rax, [rax + 1]
jne 0x18000fd70
lea rcx, [rax + 1]
mov rax, r10
add rcx, r8
nop word [rax + rax]
cmp byte [rcx + rax + 1], 0
lea rax, [rax + 1]
jne 0x18000fd90
lea r8, [rax + 1]
add r8, rcx
cmp byte [r8], 0
jne 0x18000fd30
jmp 0x18000fdc1
inc r10
cmp byte [r8 + r10], 0
jne 0x18000fdb0
lea rsi, [r8 + 1]
add rsi, r10
cmp byte [rsi], 0
lea rbx, [0x1800eb8e0]
mov rax, qword [0x18011ef68]
lea rcx, [0x18011e7c8]
cmovne rbx, rsi
call qword [case.0x180005f92.0]
test rbx, rbx
je 0x18000fe07
cmp byte [rbx], 0
je 0x18000fe07
lea rdx, [0x1800eb510]
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_strstr]
xor ecx, ecx
test rax, rax
setne cl
jmp 0x18000fe10
lea rbx, str.US_ASCII
xor ecx, ecx
mov dword [rdi], ecx
mov rcx, rbx
call sym.glib_2.0.dll_g_strdup
mov rbx, qword [rsp + 0x40]
mov qword [rdi + 0x10], rax
mov rsi, qword [rsp + 0x48]
test r14, r14
je 0x18000fe34
mov rax, qword [rdi + 0x10]
mov qword [r14], rax
mov eax, dword [rdi]
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop r14
ret