Function at 0x1800259f0
Capabilities:
Get thread local storage value
Hash data using sha512
Read file on windows
Set thread local storage value

Disassembly:
push rbx
push rbp
push rdi
sub rsp, 0x80
mov rbp, rcx
mov ecx, 0x10110
mov rbx, rdx
call sym.dcapi.dll_secure_alloc
mov rdi, rax
test rax, rax
jne 0x180025a21
lea eax, [rdi + 9]
add rsp, 0x80
pop rdi
pop rbp
pop rbx
ret
mov qword [rsp + 0xa0], rsi
mov qword [rsp + 0xa8], r12
xor r12d, r12d
mov qword [rsp + 0x30], r12
lea r8d, [r12 + 1]
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x180025a6d
lea esi, [rax + 0xe]
jmp 0x180025be2
movabs rax, 0x6a09e667f3bcc908
lea r9, [rsp + 0xb0]
lea rdx, [rdi + 0xd0]
mov qword [rdi], rax
movabs rax, 0xbb67ae8584caa73b
mov r8d, 0x10000
mov qword [rdi + 8], rax
movabs rax, 0x3c6ef372fe94f82b
mov rcx, rbx
mov qword [rdi + 0x10], rax
movabs rax, 0xa54ff53a5f1d36f1
mov dword [rdi + 0x48], r12d
mov qword [rdi + 0x18], rax
movabs rax, 0x510e527fade682d1
mov qword [rdi + 0x40], r12
mov qword [rdi + 0x20], rax
movabs rax, 0x9b05688c2b3e6c1f
mov qword [rsp + 0x20], r12
mov qword [rdi + 0x28], rax
movabs rax, 0x1f83d9abfb41bd6b
mov qword [rdi + 0x30], rax
movabs rax, 0x5be0cd19137e2179
mov qword [rdi + 0x38], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180025b54
nop dword [rax + rax]
mov eax, dword [rsp + 0xb0]
test eax, eax
je 0x180025b54
lea rdx, [rdi + 0xd0]
mov r8d, eax
mov rcx, rdi
call fcn.18001df60
lea r9, [rsp + 0xb0]
lea rdx, [rdi + 0xd0]
mov r8d, 0x10000
mov rcx, rbx
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180025b10
lea rdx, [rdi + 0x100d0]
mov rcx, rdi
call fcn.18001de80
movsxd rdx, dword [rbp]
mov eax, pe_nt_image_headers64
sub eax, edx
lea rcx, [rdx + rbp + 4]
xor edx, edx
movsxd r8, eax
call fcn.180011ff0
mov rcx, rdi
lea rdx, [rbp + 4]
sub rcx, rbp
mov r8d, 4
nop dword [rax]
mov eax, dword [rcx + rdx + 0x100cc]
add rdx, 0x10
add dword [rdx - 0x10], eax
mov eax, dword [rcx + rdx + 0x100c0]
add dword [rdx - 0xc], eax
mov eax, dword [rcx + rdx + 0x100c4]
add dword [rdx - 8], eax
mov eax, dword [rcx + rdx + 0x100c8]
add dword [rdx - 4], eax
dec r8
jne 0x180025b90
mov eax, dword [rbp]
mov ecx, 0x40
mov esi, r12d
cmp eax, ecx
cmovg ecx, eax
mov dword [rbp], ecx
test rbx, rbx
je 0x180025be2
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x18003cd00]
mov qword [rsp + 0x40], rdi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x180025c3a
mov qword [rsp + 0x30], r12
lea rcx, str..dcrypt
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x180025c7d
mov ecx, dword [0x18003cd00]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
mov qword [rsp + 0x38], r12
lea rax, [rsp + 0xb8]
lea r8, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov r9d, 8
mov edx, 0x220064
mov rcx, rdi
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x180025cc8
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x180025cc8
mov rcx, qword [rsp + 0x40]
lea rdx, [rsp + 0x48]
mov r8d, 0x30
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
cmp rax, 0x30
jne 0x180025cc8
mov rcx, qword [rsp + 0x40]
cmp qword [rsp + 0x48], rcx
jne 0x180025ccd
cmp qword [rsp + 0x50], rcx
jne 0x180025ccd
mov rdi, rcx
mov rcx, qword [rsp + 0x60]
xor eax, eax
rep stosb byte [rdi], al
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualUnlock]
mov rcx, qword [rsp + 0x40]
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r12, qword [rsp + 0xa8]
mov eax, esi
mov rsi, qword [rsp + 0xa0]
add rsp, 0x80
pop rdi
pop rbp
pop rbx
ret