Function at 0x14000b490
Capabilities:
Get thread local storage value
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x148
cmp qword [0x1400b4778], 0
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov byte [rbp - 0x141], 1
je 0x14000b5d8
mov ebx, dword [0x1400b8628]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rbx + 0x20]
lea rcx, [rbp - 0x130]
mov rdx, rbp
mov qword [rbp - 0x140], rax
lea rax, [rbp - 0x140]
mov qword [rbx + 0x20], rax
call sub.msvcrt.dll__setjmp
cdqe
mov qword [rbp - 0x138], rax
test rax, rax
jne 0x14000b600
xor ebx, ebx
cmp qword [rbp + 0x10], 0
je 0x14000b58e
mov rcx, qword [rbp + 0x10]
call sub.msvcrt.dll_strlen
mov ebx, dword [0x1400b8628]
mov rdi, rax
mov eax, 7
cmp rdi, rax
cmovge rax, rdi
mov r12, rax
lea r13, [rax + 0x11]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
mov esi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r8, [rbx + 0x38]
mov rdx, r13
lea rcx, [0x14002e020]
call fcn.140008d80
mov rdx, qword [rbp + 0x10]
lea r8, [rdi + 1]
mov qword [rax + 8], r12
lea rcx, [rax + 0x10]
mov rbx, rax
mov qword [rax], rdi
call sub.msvcrt.dll_memcpy
mov rcx, rbx
call qword [0x1400b4778]
mov ebx, dword [0x1400b8628]
mov byte [rbp - 0x141], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rbx + 0x20]
cmp qword [rbp - 0x138], 0
mov rax, qword [rax]
mov qword [rbx + 0x20], rax
jne 0x14000b6b0
movzx eax, byte [rbp - 0x141]
test al, al
jne 0x14000b6f2
add rsp, 0x148
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop rbp
ret
mov ebx, dword [0x1400b8628]
mov r13, qword [sym.imp.KERNEL32.dll_GetLastError]
call r13
mov r12, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov ecx, ebx
call r12
mov ecx, esi
mov rdi, qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, rax
call rdi
mov rax, qword [rbx + 0x20]
mov rax, qword [rax]
mov qword [rbp - 0x138], 0
mov qword [rbx + 0x20], rax
mov ebx, dword [0x1400b8628]
call r13
mov esi, eax
mov ecx, ebx
call r12
mov ecx, esi
mov rbx, rax
call rdi
mov rax, qword [rbx + 0x28]
lea rcx, [rbx + 0x28]
mov rsi, qword [rax + 0x28]
call fcn.1400079c0
test al, al
jne 0x14000b69e
test rsi, rsi
je 0x14000b678
add qword [rsi - 0x10], 8
mov rax, qword [rbx + 0x28]
cmp rax, 0xfff
jbe 0x14000b69e
mov rdx, qword [rax - 0x10]
lea r13, [rax - 0x10]
sub rdx, 8
mov qword [rax - 0x10], rdx
cmp rdx, 7
jbe 0x14000b730
mov qword [rbx + 0x28], rsi
cmp qword [rbp - 0x138], 0
je 0x14000b5d8
mov ebx, dword [0x1400b8628]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, esi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x14000b768
call fcn.14000a770
movzx eax, byte [rbp - 0x141]
test al, al
je 0x14000b5e7
mov ecx, 2
call qword [fcn.14002d730]
mov r8, qword [rbp + 0x18]
mov rcx, qword [rbp + 0x10]
mov edx, 1
mov rbx, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, rbx
call sub.msvcrt.dll_fflush
nop
add rsp, 0x148
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop rbp
ret
mov edi, dword [0x1400b8628]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r12d
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rcx, [rdi + 0x50]
mov rdx, r13
call fcn.140005ad0
mov qword [rbx + 0x28], rsi
jmp 0x14000b6a2
call fcn.14000b3b0
nop
nop
push rbx
sub rsp, 0x20
lea rbx, str.olqgmghqsvnxjrruytiktjwbcqiher_n
cmp ecx, 2
je 0x14000b7c0
lea rbx, str.whvzpaglrwujnexiijbkjtnbirulihal__ystytvobbfmnjvvpzbxjkifb___n
cmp ecx, 0xb
je 0x14000b7c0
lea rbx, str.jiywixrtwqqxbiypdhodqgjmlyrqad_n
cmp ecx, 0x16
je 0x14000b7c0
lea rbx, str.cxduzvywafutxybawucgydwlw_n
cmp ecx, 8
je 0x14000b7c0
cmp ecx, 4
lea rbx, str.zkrbghpxrppgkbwkztodyzjjrw_n
lea rax, str.jnnpjiqscpmtxo_n
cmovne rbx, rax
nop word [rax + rax]
mov rcx, rbx
call sub.msvcrt.dll_strlen
mov rcx, rbx
mov rdx, rax
call fcn.14000b490
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rsi, rcx
mov rdi, rdx
test rcx, rcx
je 0x14000b8f7
cmp qword [rcx], 0
jle 0x14000b8f7
mov r13, qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12, qword [sym.imp.KERNEL32.dll_TlsGetValue]
xor ebp, ebp
jmp 0x14000b860
test dil, dil
je 0x14000b910
mov rdx, qword [rbx + 0x88]
mov rax, qword [rbx + 0x80]
cmp rdx, rax
jle 0x14000b928
mov r15, qword [rbx + 0x90]
mov qword [r15 + rax*8], r10
add qword [rbx + 0x80], 1
add rbp, 1
cmp qword [rsi], rbp
jle 0x14000b8f7
mov rax, rbp
mov ebx, dword [0x1400b8628]
shl rax, 4
mov r15, qword [rsi + rax + 0x18]
call r13
mov ecx, ebx
mov r14d, eax
call r12
mov ecx, r14d
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r15, r15
je 0x14000b853
lea r10, [r15 - 0x10]
cmp dil, 2
je 0x14000b8a8
jbe 0x14000b820
cmp dil, 3
je 0x14000b829
jmp 0x14000b853
mov rax, qword [r15 - 0x10]
mov qword [rsp + 0x28], r10
sub rax, 8
mov qword [r15 - 0x10], rax
cmp rax, 7
ja 0x14000b853
mov ebx, dword [0x1400b8628]
add rbp, 1
call r13
mov r14d, eax
mov ecx, ebx
call r12
mov ecx, r14d
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdx, qword [rsp + 0x28]
lea rcx, [rbx + 0x50]
call fcn.140005ad0
cmp qword [rsi], rbp
jg 0x14000b860
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [rbx + 0x38]
mov rdx, r10
call fcn.1400084a0
jmp 0x14000b853
lea rax, [rdx + rdx*2]
mov r14d, dword [0x1400b8628]
mov qword [rsp + 0x38], r10
mov rdx, rax
shr rdx, 0x3f
add rdx, rax
sar rdx, 1
mov qword [rbx + 0x88], rdx
mov qword [rsp + 0x28], rdx
call r13
mov ecx, r14d
mov r15d, eax
call r12
mov ecx, r15d
mov r14, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdx, qword [rsp + 0x28]
lea rcx, [r14 + 0xa0]
lea rdx, [rdx*8 + 0x10]
call fcn.140003e30
mov qword [rax + 8], 1
lea r15, [rax + 0x10]
mov rax, qword [rbx + 0x80]
mov rdx, qword [rbx + 0x90]
mov rcx, r15
lea r8, [rax*8]
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx + 0x90]
mov r14d, dword [0x1400b8628]
mov qword [rsp + 0x28], rax
call r13
mov ecx, r14d
mov dword [rsp + 0x34], eax
call r12
mov ecx, dword [rsp + 0x34]
mov r14, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsp + 0x28]
lea rcx, [r14 + 0xa0]
lea rdx, [rax - 0x10]
call fcn.140005230
mov qword [rbx + 0x90], r15
mov r10, qword [rsp + 0x38]
mov rax, qword [rbx + 0x80]
jmp 0x14000b847