Function at 0x140028800
Capabilities:
Get system information on windows
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 0x20], rsi
push rbp
lea rbp, [rsp - 0x9a0]
sub rsp, 0xaa0
lea rcx, [0x14036f250]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x140028839
lea rcx, [0x14036f210]
call fcn.140031c30
mov byte [0x14036f258], 1
inc qword [0x14036f248]
xor esi, esi
cmp qword [0x14036f240], rsi
je 0x140028859
inc qword [0x14036f238]
mov qword [0x14036f240], rsi
mov eax, dword [reloc.WS2_32.dll_closesocket]
test eax, eax
je 0x140028d8f
cmp byte [0x14036f1fd], sil
je 0x140028879
cmp eax, 1
je 0x140028d8f
cmp eax, 2
je 0x1400288ae
call fcn.140028e60
test al, al
je 0x1400288ae
lea rcx, [0x14036f250]
mov byte [0x14036f258], sil
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov al, 1
mov rsi, qword [rsp + 0xac8]
add rsp, 0xaa0
pop rbp
ret
mov qword [rsp + 0xab0], rbx
lea rcx, [0x14036f250]
mov qword [rsp + 0xab8], rdi
mov qword [rsp + 0xac0], r14
mov byte [0x14036f258], sil
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
call fcn.14002fb50
mov rbx, rax
test rax, rax
je 0x140028d8b
mov r14d, 1
lea rcx, [rsp + 0x20]
mov dword [reloc.WS2_32.dll_closesocket], r14d
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edx, dword [rsp + 0x40]
cmp edx, 0xffffffff
cmove edx, r14d
mov dword [0x1405771f8], edx
call fcn.14005f6c0
test al, al
jne 0x140028d8b
lea rcx, [0x14036f250]
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x140028945
lea rcx, [0x14036f210]
call fcn.140031c30
mov byte [0x14036f258], r14b
inc qword [0x14036f248]
cmp qword [0x14036f240], rbx
je 0x140028963
inc qword [0x14036f238]
mov qword [0x14036f240], rbx
inc byte [rbx + 1]
cmp byte [rbx + 0x330], sil
jne 0x140028977
mov rcx, rbx
call fcn.1400318c0
call fcn.1400291e0
test al, al
jne 0x140028d69
call fcn.140031da0
mov rdx, rax
mov rcx, rbx
call fcn.14002f550
test al, al
jne 0x140028d69
mov ecx, dword [reloc.WS2_32.dll_bind]
cmp ecx, 2
lea eax, [rcx + 3]
cmove eax, ecx
mov dword [reloc.WS2_32.dll_bind], eax
call fcn.14002f550
test al, al
jne 0x140028d69
movzx eax, byte [0x1403671c7]
neg al
mov dword [reloc.WS2_32.dll_closesocket], esi
movzx eax, byte [0x1403671c6]
sbb dl, dl
and dl, 0x10
neg al
movzx eax, byte [0x1403671c9]
sbb cl, cl
and cl, 8
or dl, cl
neg al
movzx eax, byte [0x1403671c5]
sbb cl, cl
and cl, 4
or dl, cl
neg al
sbb cl, cl
and cl, 2
or dl, cl
cmp byte [0x1403671c4], sil
setne al
or dl, al
or byte [0x14036f1fc], dl
setne byte [0x140357024]
sub byte [rbx + 1], r14b
jne 0x140028a29
mov rcx, rbx
call fcn.1400318c0
lea rcx, [0x14036f250]
mov byte [0x14036f258], sil
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
call fcn.14002ff90
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140577180]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rdi, rdi
jne 0x140028d05
mov ecx, 0xa50
call fcn.1400306e0
mov rdi, rax
test rax, rax
je 0x140028db6
xorps xmm0, xmm0
mov byte [rax], sil
xor eax, eax
mov word [rsp + 0x50], si
xor edx, edx
mov dword [rbp + 0x12], eax
mov r8d, 0xb0
mov word [rbp + 0x16], ax
lea rcx, [rbp + 0x50]
mov qword [rbp + 0x20], rax
mov byte [rbp + 0x28], al
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x78], rsi
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], rsi
mov qword [rbp - 0x70], rsi
mov qword [rbp - 0x68], rsi
mov qword [rbp - 0x60], rsi
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], rsi
mov qword [rbp - 0x48], rsi
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x38], rsi
mov qword [rbp - 0x30], rsi
mov qword [rbp - 0x28], rsi
mov qword [rbp - 0x20], rsi
mov dword [rbp - 0x18], 0x3e8
mov dword [rbp - 0x14], 0x3e8
mov word [rbp - 0x10], 0xffff
movups xmmword [rbp - 0xe], xmm0
mov qword [rbp + 0x18], rsi
movups xmmword [rbp + 2], xmm0
mov qword [rbp + 0x30], rsi
mov qword [rbp + 0x38], rsi
mov qword [rbp + 0x40], rsi
mov qword [rbp + 0x48], rsi
call fcn.1401e1b90
mov qword [rbp + 0x100], r14
mov qword [rbp + 0x108], rsi
mov qword [rbp + 0x110], r14
mov qword [rbp + 0x118], rsi
mov qword [rbp + 0x120], r14
mov qword [rbp + 0x128], rsi
mov qword [rbp + 0x130], r14
mov qword [rbp + 0x138], rsi
mov qword [rbp + 0x140], r14
mov qword [rbp + 0x148], rsi
mov qword [rbp + 0x150], r14
mov qword [rbp + 0x158], rsi
mov qword [rbp + 0x160], r14
mov qword [rbp + 0x168], rsi
mov qword [rbp + 0x170], r14
mov qword [rbp + 0x178], rsi
mov qword [rbp + 0x180], r14
mov qword [rbp + 0x188], rsi
mov qword [rbp + 0x190], r14
mov qword [rbp + 0x198], rsi
mov qword [rbp + 0x1a0], r14
mov qword [rbp + 0x1a8], rsi
mov qword [rbp + 0x1b0], r14
mov qword [rbp + 0x1b8], rsi
mov qword [rbp + 0x1c0], r14
mov qword [rbp + 0x1c8], rsi
mov qword [rbp + 0x1d0], r14
mov qword [rbp + 0x1d8], rsi
mov qword [rbp + 0x1e0], r14
mov qword [rbp + 0x1e8], rsi
mov qword [rbp + 0x1f0], r14
mov qword [rbp + 0x1f8], rsi
mov qword [rbp + 0x200], r14
mov qword [rbp + 0x208], rsi
mov qword [rbp + 0x210], r14
mov qword [rbp + 0x218], rsi
mov qword [rbp + 0x220], r14
mov qword [rbp + 0x228], rsi
mov qword [rbp + 0x230], r14
mov qword [rbp + 0x238], rsi
mov qword [rbp + 0x240], r14
xor eax, eax
mov qword [rbp + 0x248], rsi
xor edx, edx
mov dword [rbp + 0x281], eax
mov r8d, 0x6d8
mov word [rbp + 0x285], ax
lea rcx, [rbp + 0x2b0]
mov byte [rbp + 0x287], al
mov qword [rbp + 0x250], r14
mov qword [rbp + 0x258], rsi
mov qword [rbp + 0x260], r14
mov qword [rbp + 0x268], rsi
mov qword [rbp + 0x270], r14
mov qword [rbp + 0x278], rsi
mov byte [rbp + 0x280], 6
mov qword [rbp + 0x288], rsi
mov qword [rbp + 0x290], rsi
mov qword [rbp + 0x298], rsi
mov qword [rbp + 0x2a0], rsi
mov qword [rbp + 0x2a8], rsi
call fcn.1401e1b90
lea rcx, [rdi + 8]
mov qword [rbp + 0x988], rsi
lea rdx, [rsp + 0x50]
mov byte [rbp + 0x990], sil
mov r8d, 0xa48
call fcn.1401e14e0
mov ecx, dword [0x140577180]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x140028dc8
lea rbx, [rdi + 8]
cmp byte [rbx + 0x330], sil
je 0x140028d1f
xor edx, edx
mov rcx, rbx
call fcn.140030d00
mov rbx, rax
cmp byte [0x140370670], sil
je 0x140028d3e
mov rcx, rbx
call fcn.14005f6f0
xor edx, edx
mov rcx, rbx
call fcn.14005f6f0
test al, al
jne 0x140028d8b
xor al, al
mov rdi, qword [rsp + 0xab8]
mov rbx, qword [rsp + 0xab0]
mov r14, qword [rsp + 0xac0]
mov rsi, qword [rsp + 0xac8]
add rsp, 0xaa0
pop rbp
ret
lea rcx, [0x14036f250]
mov byte [0x14036f258], sil
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub byte [rbx + 1], r14b
jne 0x140028d8b
mov rcx, rbx
call fcn.1400318c0
mov al, 1
jmp 0x140028d40
lea rcx, [0x14036f250]
mov byte [0x14036f258], sil
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov rsi, qword [rsp + 0xac8]
xor al, al
add rsp, 0xaa0
pop rbp
ret
lea rcx, str._jemalloc_:_Error_allocating_TSD_n
call fcn.14002eb70
call fcn.1401f3454
int3
lea rcx, str._jemalloc_:_Error_setting_TSD_n
call fcn.14002eb70
call fcn.1401f3454
int3