joyce8/EMBER2024-capa huggingface dataset:
Function at 0x581b40
Capabilities:
Encrypt data using aes via x86 extensions

Disassembly:
sub rsp, 0x98
movaps xmmword [rsp + 0x80], xmm14
movaps xmmword [rsp + 0x70], xmm13
movaps xmmword [rsp + 0x60], xmm12
movaps xmmword [rsp + 0x50], xmm11
movaps xmmword [rsp + 0x40], xmm10
movaps xmmword [rsp + 0x30], xmm9
movaps xmmword [rsp + 0x20], xmm8
movaps xmmword [rsp + 0x10], xmm7
movaps xmmword [rsp], xmm6
aesimc xmm0, xmmword [rdx + 0x10]
aesimc xmm1, xmmword [rdx + 0x20]
aesimc xmm2, xmmword [rdx + 0x30]
aesimc xmm3, xmmword [rdx + 0x40]
aesimc xmm4, xmmword [rdx + 0x50]
aesimc xmm5, xmmword [rdx + 0x60]
aesimc xmm6, xmmword [rdx + 0x70]
aesimc xmm7, xmmword [rdx + 0x80]
aesimc xmm8, xmmword [rdx + 0x90]
aesimc xmm9, xmmword [rdx + 0xa0]
aesimc xmm10, xmmword [rdx + 0xb0]
aesimc xmm11, xmmword [rdx + 0xc0]
aesimc xmm12, xmmword [rdx + 0xd0]
movaps xmm13, xmmword [rdx]
movaps xmm14, xmmword [rdx + 0xe0]
movaps xmmword [rcx], xmm13
movdqa xmmword [rcx + 0x10], xmm0
movdqa xmmword [rcx + 0x20], xmm1
movdqa xmmword [rcx + 0x30], xmm2
movdqa xmmword [rcx + 0x40], xmm3
movdqa xmmword [rcx + 0x50], xmm4
movdqa xmmword [rcx + 0x60], xmm5
movdqa xmmword [rcx + 0x70], xmm6
movdqa xmmword [rcx + 0x80], xmm7
movdqa xmmword [rcx + 0x90], xmm8
movdqa xmmword [rcx + 0xa0], xmm9
movdqa xmmword [rcx + 0xb0], xmm10
movdqa xmmword [rcx + 0xc0], xmm11
movdqa xmmword [rcx + 0xd0], xmm12
movaps xmmword [rcx + 0xe0], xmm14
movaps xmm6, xmmword [rsp]
movaps xmm7, xmmword [rsp + 0x10]
movaps xmm8, xmmword [rsp + 0x20]
movaps xmm9, xmmword [rsp + 0x30]
movaps xmm10, xmmword [rsp + 0x40]
movaps xmm11, xmmword [rsp + 0x50]
movaps xmm12, xmmword [rsp + 0x60]
movaps xmm13, xmmword [rsp + 0x70]
movaps xmm14, xmmword [rsp + 0x80]
add rsp, 0x98
ret
Function at 0x585560
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x60
mov rsi, rcx
cmp qword [rcx], 0
je 0x5855e5
mov dword [rsp + 0x2c], 0
lea rbx, [rsi + 0x10]
lea r8, [rsp + 0x2c]
mov rcx, rbx
xor edx, edx
xor r9d, r9d
call sub.KERNEL32.dll_InitOnceBeginInitialize
mov dword [rsp + 0x28], eax
cmp eax, 1
jne 0x585626
cmp dword [rsp + 0x2c], 0
je 0x58560a
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x58564e
mov edi, eax
inc eax
mov dword [rsi + 0x18], eax
mov rax, qword [0x009bf120]
nop
mov qword [rsi + 8], rax
lock cmpxchg qword [0x009bf120], rsi
jne 0x5855c0
mov byte [0x009bf118], 1
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
jmp 0x58561c
call sub.KERNEL32.dll_TlsAlloc
mov dword [rsp + 0x28], eax
cmp eax, 0xffffffff
je 0x58569a
mov ecx, eax
inc ecx
xor eax, eax
lock cmpxchg dword [rsi + 0x18], ecx
jne 0x58560f
mov edi, dword [rsp + 0x28]
jmp 0x58561c
mov edi, dword [rsi + 0x18]
jmp 0x58561a
mov edi, eax
mov ecx, dword [rsp + 0x28]
call sub.KERNEL32.dll_TlsFree
dec edi
mov eax, edi
add rsp, 0x60
pop rbx
pop rdi
pop rsi
ret
mov qword [rsp + 0x30], 0
lea rdx, [0x00912ab8]
lea r9, str.library_std_src_syswindows_thread_local_key.rs
lea rcx, [rsp + 0x28]
lea r8, [rsp + 0x30]
call fcn.00585cb0
ud2
mov rcx, rbx
mov edx, 4
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
lea rax, str.out_of_TLS_indexes
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 1
lea rax, str.called__Result::unwrap____on_an__Err__value
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rdx, str.library_std_src_syswindows_thread_local_key.rs
lea rcx, [rsp + 0x30]
call fcn.0044f0d0
ud2
lea rax, str.out_of_TLS_indexes
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 1
lea rax, str.called__Result::unwrap____on_an__Err__value
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x30]
call fcn.00585cf0
ud2
Function at 0x585b50
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x008650e8]
test ecx, ecx
je 0x585b80
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x585b99
mov rdi, rax
cmp qword [rax + 8], 0
je 0x585b99
add rdi, 0x10
jmp 0x585c7a
lea rcx, [0x008650d0]
call fcn.00585560
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x585b6d
mov ecx, dword [0x008650e8]
test ecx, ecx
je 0x585c5b
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x585c78
mov rsi, rax
test rax, rax
jne 0x585c2a
movzx eax, byte [0x009bf181]
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x585beb
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x585c94
mov rcx, rax
mov qword [0x009bf100], rax
mov r8d, 0x18
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x585c94
mov rsi, rax
lea rax, [0x008650d0]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x008650e8]
test ecx, ecx
je 0x585c84
dec ecx
mov rdx, rsi
call sub.KERNEL32.dll_TlsSetValue
lea rdi, [rsi + 0x10]
mov rcx, qword [rsi + 0x10]
cmp qword [rsi + 8], 0
mov qword [rsi + 8], 1
mov qword [rsi + 0x10], 0
je 0x585c7a
test rcx, rcx
je 0x585c7a
lock dec qword [rcx]
jne 0x585c7a
call fcn.005d13f0
jmp 0x585c7a
lea rcx, [0x008650d0]
call fcn.00585560
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x585bb8
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x008650d0]
call fcn.00585560
mov ecx, eax
jmp 0x585c22
mov ecx, 8
mov edx, 0x18
call fcn.0044dfd0
ud2

Function at 0x586900
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x00865108]
test ecx, ecx
je 0x5869c6
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x58692d
mov rsi, rax
cmp byte [rax + 8], 0
jne 0x5869c0
mov ecx, dword [0x00865108]
test ecx, ecx
je 0x5869e8
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x586a05
mov rsi, rax
test rax, rax
jne 0x5869ba
movzx eax, byte [0x009bf181]
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x58697f
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x586a20
mov rcx, rax
mov qword [0x009bf100], rax
mov r8d, 0x10
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x586a20
mov rsi, rax
lea rax, [0x008650f0]
mov qword [rsi], rax
mov byte [rsi + 8], 0
mov ecx, dword [0x00865108]
test ecx, ecx
je 0x586a10
dec ecx
mov rdx, rsi
call sub.KERNEL32.dll_TlsSetValue
mov word [rsi + 8], 1
add rsi, 9
jmp 0x586a07
lea rcx, [0x008650f0]
call fcn.00585560
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x586920
jmp 0x58692d
lea rcx, [0x008650f0]
call fcn.00585560
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x58694c
xor esi, esi
mov rax, rsi
add rsp, 0x20
pop rsi
ret
lea rcx, [0x008650f0]
call fcn.00585560
mov ecx, eax
jmp 0x5869b2
mov ecx, 8
mov edx, 0x10
call fcn.0044dfd0
ud2
Function at 0x586fc0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
movups xmm0, xmmword [0x00912448]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rcx, rdx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call sub.ntdll.dll_NtWriteFile
cmp eax, 0x103
jne 0x587031
mov rcx, rdi
mov edx, 0xffffffff
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [rsp + 0x60]
cmp eax, 0x103
je 0x587067
test eax, eax
js 0x587042
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x58705a
mov ecx, eax
call sub.ntdll.dll_RtlNtStatusToDosError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
add rsp, 0xa8
pop rdi
pop rsi
ret
mov dword [rsp + 0x58], 0
mov byte [rsp + 0x5c], 0
lea rax, [0x009124a8]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call fcn.00585970
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x70]
call fcn.00584d70
mov ecx, 7
int 0x29
ud2

Function at 0x5878c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x008650c8]
test ecx, ecx
je 0x5878ed
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x587906
cmp qword [rax + 8], 0
je 0x587906
add rax, 0x10
add rsp, 0x20
pop rsi
ret
lea rcx, [0x008650b0]
call fcn.00585560
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x5878dc
mov ecx, dword [0x008650c8]
test ecx, ecx
je 0x5879b1
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x5879ce
mov rsi, rax
test rax, rax
jne 0x587993
movzx eax, byte [0x009bf181]
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x587958
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x5879e6
mov rcx, rax
mov qword [0x009bf100], rax
mov r8d, 0x20
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x5879e6
mov rsi, rax
lea rax, [0x008650b0]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x008650c8]
test ecx, ecx
je 0x5879d6
dec ecx
mov rdx, rsi
call sub.KERNEL32.dll_TlsSetValue
mov qword [rsi + 8], 1
lea rax, [rsi + 0x10]
mov qword [rsi + 0x10], 0
mov byte [rsi + 0x18], 0
add rsp, 0x20
pop rsi
ret
lea rcx, [0x008650b0]
call fcn.00585560
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x587925
xor eax, eax
add rsp, 0x20
pop rsi
ret
lea rcx, [0x008650b0]
call fcn.00585560
mov ecx, eax
jmp 0x58798b
mov ecx, 8
mov edx, 0x20
call fcn.0044dfd0
ud2
Function at 0x58b6c0
Capabilities:
Read file via mapping

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0xc8
mov rax, r8
mov rsi, rcx
mov dword [rsp + 0x38], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
mov dword [rsp + 0x50], 7
mov qword [rsp + 0x54], 0
mov word [rsp + 0x5c], 0
mov byte [rsp + 0x58], 1
lea r8, [rsp + 0x38]
mov rcx, rdx
mov rdx, rax
call fcn.005a4970
mov rdi, rdx
test rax, rax
je 0x58b750
mov qword [rsp + 0x80], rax
lea rcx, [rsp + 0x88]
mov qword [rsp + 0x88], rdi
call fcn.00584cb0
mov qword [rsi], 0
add rsp, 0xc8
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
lea rcx, [rsp + 0x38]
mov rdx, rdi
call fcn.005a4b90
cmp dword [rsp + 0x38], 2
jne 0x58b77f
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x80], 2
jmp 0x58b7cb
movups xmm0, xmmword [rsp + 0x38]
movups xmm1, xmmword [rsp + 0x48]
movups xmm2, xmmword [rsp + 0x58]
movups xmm3, xmmword [rsp + 0x68]
movaps xmmword [rsp + 0x80], xmm0
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0xc0], rax
movaps xmmword [rsp + 0xb0], xmm3
movaps xmmword [rsp + 0xa0], xmm2
movaps xmmword [rsp + 0x90], xmm1
cmp qword [rsp + 0x80], 2
jne 0x58b7f7
lea rcx, [rsp + 0x88]
call fcn.00584cb0
mov qword [rsi], 0
mov rcx, rdi
add rsp, 0xc8
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
jmp sub.KERNEL32.dll_CloseHandle
mov r12, qword [rsp + 0xb8]
test rdi, rdi
je 0x58b855
mov qword [rsp + 0x80], 0
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x80]
mov rcx, rax
mov rdx, rdi
mov r8, rax
call sub.KERNEL32.dll_DuplicateHandle
test eax, eax
je 0x58b8d1
mov rbx, qword [rsp + 0x80]
jmp 0x58b857
xor ebx, ebx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rcx, rbx
xor edx, edx
mov r8d, 2
xor r9d, r9d
call sub.KERNEL32.dll_CreateFileMappingA
test rax, rax
je 0x58b8c0
mov r14, rax
mov qword [rsp + 0x20], r12
mov rcx, rax
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call sub.KERNEL32.dll_MapViewOfFile
mov r15, rax
mov rcx, r14
call sub.KERNEL32.dll_CloseHandle
test r15, r15
je 0x58b8c0
mov qword [rsi + 8], rbx
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], r12
mov qword [rsi], 1
jmp 0x58b8fd
mov qword [rsi], 0
mov rcx, rbx
call sub.KERNEL32.dll_CloseHandle
jmp 0x58b8fd
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x38], 1
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x40], rax
call fcn.00584cb0
mov qword [rsi], 0
mov rcx, rdi
call sub.KERNEL32.dll_CloseHandle
jmp 0x58b73f
Function at 0x5a5310
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x4a8
mov rsi, rcx
lea rcx, [rsp + 0xa8]
call fcn.00587ef0
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x5a547b
mov qword [rsp + 0x38], rsi
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 2
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
mov r8d, 0x200
mov eax, 2
mov qword [rsp + 0x28], rax
xor ebx, ebx
mov esi, 0xffffffff
xor r14d, r14d
xor r13d, r13d
cmp r8, 0x201
jae 0x5a53d0
jmp 0x5a53af
jae 0x5a5491
cmp r8, 0x201
jae 0x5a53d0
mov edi, 0x200
lea rbp, [rsp + 0xa8]
mov r12, r8
jmp 0x5a5417
sub r8, r13
sub r14, r13
cmp r14, r8
jae 0x5a53f7
lea rcx, [rsp + 0x48]
mov rdx, r13
call fcn.00588330
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov rbx, qword [rsp + 0x50]
cmp rbx, rsi
mov r13d, 0xffffffff
cmovb r13, rbx
mov qword [rsp + 0x58], r13
mov r14, rbx
mov rdi, r13
mov rbp, qword [rsp + 0x28]
mov r12, r13
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov rcx, qword [rsp + 0x30]
mov rdx, rbp
mov r8d, r12d
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov r15d, eax
test eax, eax
jne 0x5a5442
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x5a5541
mov r8d, r15d
cmp r12, r8
jne 0x5a53a0
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x5a556b
add r12, r12
cmp r12, rsi
cmovae r12, rsi
mov r8, r12
cmp r8, 0x201
jb 0x5a53af
jmp 0x5a53d0
lea rcx, [rsp + 0xb0]
call fcn.00584cb0
mov byte [rsi + 0x18], 2
jmp 0x5a5511
cmp rdi, r8
jb 0x5a5585
lea rcx, [rsp + 0x88]
mov rdx, rbp
call fcn.0058a330
movups xmm0, xmmword [rsp + 0x88]
movups xmm1, xmmword [rsp + 0x98]
movaps xmmword [rsp + 0x70], xmm1
movaps xmmword [rsp + 0x60], xmm0
mov rsi, qword [rsp + 0x38]
test rbx, rbx
je 0x5a54e1
mov rcx, qword [0x009bf100]
xor edx, edx
mov r8, qword [rsp + 0x28]
call sub.KERNEL32.dll_HeapFree
cmp byte [rsp + 0x78], 2
jne 0x5a5526
mov byte [rsi + 0x18], 2
lea rcx, [rsp + 0x60]
call fcn.00584cb0
cmp qword [rsp + 0x40], 0
je 0x5a5511
mov rcx, qword [0x009bf100]
xor edx, edx
mov r8, qword [rsp + 0x30]
call sub.KERNEL32.dll_HeapFree
nop
add rsp, 0x4a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
movaps xmm0, xmmword [rsp + 0x60]
movaps xmm1, xmmword [rsp + 0x70]
movups xmmword [rsi + 0x10], xmm1
movups xmmword [rsi], xmm0
cmp qword [rsp + 0x40], 0
jne 0x5a54fe
jmp 0x5a5511
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x60], rax
mov byte [rsp + 0x78], 2
mov rsi, qword [rsp + 0x38]
test rbx, rbx
jne 0x5a54ce
jmp 0x5a54e1
lea rcx, [0x0094e82b]
lea r8, str.library_std_src_syswindowsmod.rs
mov edx, 0x28
call fcn.0044fe30
jmp 0x5a559a
lea rax, str.library_std_src_syswindowsmod.rs
mov rcx, r8
mov rdx, rdi
mov r8, rax
call fcn.0044fa90
ud2
Function at 0x5a7440
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
movups xmm0, xmmword [0x00912448]
movaps xmmword [rsp + 0x60], xmm0
mov eax, 0xffffffff
cmp r9, rax
cmovb rax, r9
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r8
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rcx, rdx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call sub.ntdll.dll_NtReadFile
cmp eax, 0x103
jne 0x5a74aa
mov rcx, rdi
mov edx, 0xffffffff
call sub.KERNEL32.dll_WaitForSingleObject
mov eax, dword [rsp + 0x60]
cmp eax, 0xc0000011
jne 0x5a74b9
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
jmp 0x5a74f0
cmp eax, 0x103
je 0x5a74fa
test eax, eax
js 0x5a74d6
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
mov qword [rsi], 0
jmp 0x5a74f0
mov ecx, eax
call sub.ntdll.dll_RtlNtStatusToDosError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
add rsp, 0xa8
pop rdi
pop rsi
ret
mov dword [rsp + 0x58], 0
mov byte [rsp + 0x5c], 0
lea rax, [0x009124a8]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 1
lea rax, [rsp + 0x50]
mov qword [rsp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x90], xmm0
lea rcx, [rsp + 0x58]
lea rdx, [rsp + 0x78]
call fcn.00585970
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x70]
call fcn.00584d70
mov ecx, 7
int 0x29
ud2

Function at 0x5a9110
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x00865128]
test ecx, ecx
je 0x5a9140
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x5a9159
mov rdi, rax
cmp qword [rax + 8], 0
je 0x5a9159
add rdi, 0x10
jmp 0x5a923a
lea rcx, [0x00865110]
call fcn.00585560
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x5a912d
mov ecx, dword [0x00865128]
test ecx, ecx
je 0x5a921b
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x5a9238
mov rsi, rax
test rax, rax
jne 0x5a91ea
movzx eax, byte [0x009bf181]
mov rcx, qword [0x009bf100]
test rcx, rcx
jne 0x5a91ab
call sub.KERNEL32.dll_GetProcessHeap
test rax, rax
je 0x5a9254
mov rcx, rax
mov qword [0x009bf100], rax
mov r8d, 0x18
xor edx, edx
call sub.KERNEL32.dll_HeapAlloc
test rax, rax
je 0x5a9254
mov rsi, rax
lea rax, [0x00865110]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x00865128]
test ecx, ecx
je 0x5a9244
dec ecx
mov rdx, rsi
call sub.KERNEL32.dll_TlsSetValue
lea rdi, [rsi + 0x10]
mov rcx, qword [rsi + 0x10]
cmp qword [rsi + 8], 0
mov qword [rsi + 8], 1
mov qword [rsi + 0x10], 0
je 0x5a923a
test rcx, rcx
je 0x5a923a
lock dec qword [rcx]
jne 0x5a923a
call fcn.005a9270
jmp 0x5a923a
lea rcx, [0x00865110]
call fcn.00585560
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x5a9178
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x00865110]
call fcn.00585560
mov ecx, eax
jmp 0x5a91e2
mov ecx, 8
mov edx, 0x18
call fcn.0044dfd0
ud2
Function at 0x5a9a20
Capabilities:
Resolve dns

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x88
mov ebx, r9d
mov rsi, rcx
lea rcx, [rsp + 0x30]
call fcn.0044e1a0
mov r8, qword [rsp + 0x30]
test r8, r8
je 0x5a9a7e
lea rax, str.file_name_contained_an_unexpected_NUL_byte
mov qword [rsi + 8], rax
mov qword [rsi], 1
cmp qword [rsp + 0x38], 0
je 0x5a9af5
mov rcx, qword [0x009bf100]
xor edx, edx
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r14
jmp sub.KERNEL32.dll_HeapFree
mov rdi, qword [rsp + 0x38]
mov r14, qword [rsp + 0x40]
xorps xmm0, xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x58], 1
mov qword [rsp + 0x28], 0
lea r8, [rsp + 0x50]
lea r9, [rsp + 0x28]
mov rcx, rdi
xor edx, edx
call sub.WS2_32.dll_getaddrinfo
test eax, eax
je 0x5a9b03
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
mov byte [rdi], 0
test r14, r14
je 0x5a9af5
mov rcx, qword [0x009bf100]
xor edx, edx
mov r8, rdi
call sub.KERNEL32.dll_HeapFree
nop
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r14
ret
mov rax, qword [rsp + 0x28]
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rax
mov word [rsi + 0x18], bx
xor eax, eax
mov qword [rsi], rax
mov byte [rdi], 0
test r14, r14
jne 0x5a9ae4
jmp 0x5a9af5
Function at 0x5aa360
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rsi, rcx
test dx, dx
mov eax, 2
mov edi, 0x17
cmove edi, eax
mov dword [rsp + 0x28], 0x81
mov dword [rsp + 0x20], 0
mov ecx, edi
mov edx, 1
xor r8d, r8d
xor r9d, r9d
call sub.WS2_32.dll_WSASocketW
cmp rax, 0xffffffffffffffff
je 0x5aa3ae
mov qword [rsi + 8], rax
mov qword [rsi], 0
jmp 0x5aa41e
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2726
je 0x5aa3c1
cmp eax, 0x2739
jne 0x5aa40b
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
mov ecx, edi
mov edx, 1
xor r8d, r8d
xor r9d, r9d
call sub.WS2_32.dll_WSASocketW
cmp rax, 0xffffffffffffffff
je 0x5aa406
mov rdi, rax
mov rcx, rax
mov edx, 1
xor r8d, r8d
call sub.KERNEL32.dll_SetHandleInformation
test eax, eax
je 0x5aa425
mov qword [rsi + 8], rdi
jmp 0x5aa3a5
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
add rsp, 0x38
pop rdi
pop rsi
ret
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
mov rcx, rdi
add rsp, 0x38
pop rdi
pop rsi
jmp fcn.0060b80c

Function at 0x5aa4d0
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x38
xor r9d, r9d
cmp r8d, 0x3b9aca00
je 0x5aa52e
mov r9d, 0x3e8
mov rax, rdx
mul r9
mov r9d, 0xffffffff
jo 0x5aa52e
mov edx, r8d
imul rdx, rdx, 0x431bde83
shr rdx, 0x32
add rax, rdx
jb 0x5aa52e
imul edx, edx, 0xf4240
xor r10d, r10d
sub r8d, edx
setne r10b
add rax, r10
jb 0x5aa52e
mov r9d, 0xffffffff
cmp rax, r9
cmovb r9, rax
test r9, r9
je 0x5aa56e
mov dword [rsp + 0x34], r9d
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov edx, 0xffff
mov r8d, 0x1006
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
je 0x5aa55c
xor eax, eax
add rsp, 0x38
ret
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
add rsp, 0x38
ret
lea rax, str.cannot_set_a_0_duration_timeout
add rsp, 0x38
ret

Function at 0x5aa580
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x38
xor r9d, r9d
cmp r8d, 0x3b9aca00
je 0x5aa5de
mov r9d, 0x3e8
mov rax, rdx
mul r9
mov r9d, 0xffffffff
jo 0x5aa5de
mov edx, r8d
imul rdx, rdx, 0x431bde83
shr rdx, 0x32
add rax, rdx
jb 0x5aa5de
imul edx, edx, 0xf4240
xor r10d, r10d
sub r8d, edx
setne r10b
add rax, r10
jb 0x5aa5de
mov r9d, 0xffffffff
cmp rax, r9
cmovb r9, rax
test r9, r9
je 0x5aa61e
mov dword [rsp + 0x34], r9d
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov edx, 0xffff
mov r8d, 0x1005
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
je 0x5aa60c
xor eax, eax
add rsp, 0x38
ret
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
add rsp, 0x38
ret
lea rax, str.cannot_set_a_0_duration_timeout
add rsp, 0x38
ret