joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400659f0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x140189020]
test ecx, ecx
je 0x140065ab6
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jb 0x140065a1d
mov rsi, rax
cmp byte [rax + 8], 0
jne 0x140065ab0
mov ecx, dword [0x140189020]
test ecx, ecx
je 0x140065ad8
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x140065af5
mov rsi, rax
test rax, rax
jne 0x140065aaa
movzx eax, byte [0x140228121]
mov rcx, qword [0x140228110]
test rcx, rcx
jne 0x140065a6f
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x140065b10
mov rcx, rax
mov qword [0x140228110], rax
mov r8d, 0x10
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x140065b10
mov rsi, rax
lea rax, [0x140189008]
mov qword [rsi], rax
mov byte [rsi + 8], 0
mov ecx, dword [0x140189020]
test ecx, ecx
je 0x140065b00
dec ecx
mov rdx, rsi
call sub.kernel32.dll_TlsSetValue
mov word [rsi + 8], 1
add rsi, 9
jmp 0x140065af7
lea rcx, [0x140189008]
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jae 0x140065a10
jmp 0x140065a1d
lea rcx, [0x140189008]
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jne 0x140065a3c
xor esi, esi
mov rax, rsi
add rsp, 0x20
pop rsi
ret
lea rcx, [0x140189008]
call fcn.14006ae00
mov ecx, eax
jmp 0x140065aa2
ud2

Function at 0x140066c80
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
sub rsp, 0x38
xorps xmm0, xmm0
movaps xmmword [rsp + 0x20], xmm0
lea rcx, [rsp + 0x20]
mov edx, 0x10
call sub.advapi32.dll_SystemFunction036
test al, al
je 0x140066cae
mov rax, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
add rsp, 0x38
ret
call fcn.140072440
ud2
Function at 0x140068440
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x70
mov rsi, rcx
movabs r14, 0x8000000000000000
lea rcx, [rsp + 0x40]
call fcn.140077270
mov rcx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x48]
cmp rcx, r14
je 0x1400684a3
mov rdx, qword [rsp + 0x50]
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rdx
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x58]
call fcn.14006b760
mov rbx, qword [rsp + 0x28]
cmp rbx, r14
jne 0x14006850c
mov rax, qword [rsp + 0x30]
mov ecx, eax
and ecx, 3
lea rdx, [rcx - 2]
cmp rdx, 2
jb 0x1400684fd
test rcx, rcx
je 0x1400684fd
lea rdi, [rax - 1]
mov rbx, qword [rax - 1]
mov r15, qword [rax + 7]
mov rcx, rbx
call qword [r15]
cmp qword [r15 + 8], 0
je 0x1400684ec
cmp qword [r15 + 0x10], 0x11
jb 0x1400684db
mov rbx, qword [rbx - 8]
mov rcx, qword [0x140228110]
xor edx, edx
mov r8, rbx
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x140228110]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
mov qword [rsi], r14
add rsp, 0x70
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret
mov rdi, qword [rsp + 0x30]
mov r15, qword [rsp + 0x38]
mov rcx, rdi
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x140068530
mov qword [rsi], rbx
mov qword [rsi + 8], rdi
mov qword [rsi + 0x10], r15
jmp 0x140068500
mov qword [rsi], r14
test rbx, rbx
je 0x140068500
mov rcx, qword [0x140228110]
xor edx, edx
mov r8, rdi
add rsp, 0x70
pop rbx
pop rdi
pop rsi
pop r14
pop r15
jmp sub.kernel32.dll_HeapFree

Function at 0x1400699c0
Capabilities:
Create directory

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x68
mov r8, rdx
mov rdx, rcx
movabs rbx, 0x8000000000000000
lea rcx, [rsp + 0x20]
call fcn.140077270
mov rax, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
cmp rax, rbx
je 0x140069a67
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x38]
mov r8b, 1
call fcn.140066670
mov r14, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
cmp r14, rbx
jne 0x140069a2c
mov rsi, rdi
jmp 0x140069a67
mov rcx, rdi
xor edx, edx
call sub.kernel32.dll_CreateDirectoryW
mov ebx, eax
test eax, eax
jne 0x140069a4b
call sub.kernel32.dll_GetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
test r14, r14
je 0x140069a61
mov rcx, qword [0x140228110]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
test ebx, ebx
je 0x140069a67
xor esi, esi
mov rax, rsi
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x140069a80
Capabilities:
Delete file

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x68
mov r8, rdx
mov rdx, rcx
movabs rbx, 0x8000000000000000
lea rcx, [rsp + 0x20]
call fcn.140077270
mov rax, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
cmp rax, rbx
je 0x140069b25
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x38]
mov r8b, 1
call fcn.140066670
mov r14, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
cmp r14, rbx
jne 0x140069aec
mov rsi, rdi
jmp 0x140069b25
mov rcx, rdi
call sub.kernel32.dll_DeleteFileW
mov ebx, eax
test eax, eax
jne 0x140069b09
call sub.kernel32.dll_GetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
test r14, r14
je 0x140069b1f
mov rcx, qword [0x140228110]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
test ebx, ebx
je 0x140069b25
xor esi, esi
mov rax, rsi
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r14
ret

Function at 0x14006ae00
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x30
mov rsi, rcx
cmp qword [rcx], 0
je 0x14006ae85
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
cmp eax, 1
jne 0x14006aebc
cmp dword [rsp + 0x2c], 0
je 0x14006aead
call sub.kernel32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x14006aebe
mov edi, eax
inc eax
mov dword [rsi + 0x18], eax
mov rax, qword [0x140228050]
nop word cs:[rax + rax]
mov qword [rsi + 8], rax
lock cmpxchg qword [0x140228050], rsi
jne 0x14006ae60
mov byte [0x140228048], 1
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call sub.kernel32.dll_InitOnceComplete
jmp 0x14006aeb2
call sub.kernel32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x14006aebc
mov edi, eax
mov ecx, eax
inc ecx
xor eax, eax
lock cmpxchg dword [rsi + 0x18], ecx
je 0x14006aeb2
mov esi, eax
mov ecx, edi
call sub.kernel32.dll_TlsFree
dec esi
mov edi, esi
jmp 0x14006aeb2
mov edi, dword [rsi + 0x18]
dec edi
mov eax, edi
add rsp, 0x30
pop rbx
pop rdi
pop rsi
ret
ud2
mov rcx, rbx
mov edx, 4
xor r8d, r8d
call sub.kernel32.dll_InitOnceComplete
ud2
Function at 0x14006aed0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x140189068]
test ecx, ecx
je 0x14006af00
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jb 0x14006af19
mov rdi, rax
cmp qword [rax + 8], 0
je 0x14006af19
add rdi, 0x10
jmp 0x14006affa
lea rcx, [0x140189050]
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jae 0x14006aeed
mov ecx, dword [0x140189068]
test ecx, ecx
je 0x14006afdb
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x14006aff8
mov rsi, rax
test rax, rax
jne 0x14006afaa
movzx eax, byte [0x140228121]
mov rcx, qword [0x140228110]
test rcx, rcx
jne 0x14006af6b
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x14006b014
mov rcx, rax
mov qword [0x140228110], rax
mov r8d, 0x18
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x14006b014
mov rsi, rax
lea rax, [0x140189050]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x140189068]
test ecx, ecx
je 0x14006b004
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 0x14006affa
test rcx, rcx
je 0x14006affa
lock dec qword [rcx]
jne 0x14006affa
call fcn.140066f90
jmp 0x14006affa
lea rcx, [0x140189050]
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jne 0x14006af38
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x140189050]
call fcn.14006ae00
mov ecx, eax
jmp 0x14006afa2
ud2
Function at 0x14006b020
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x140189088]
test ecx, ecx
je 0x14006b050
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jb 0x14006b069
mov rdi, rax
cmp qword [rax + 8], 0
je 0x14006b069
add rdi, 0x10
jmp 0x14006b14a
lea rcx, [0x140189070]
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jae 0x14006b03d
mov ecx, dword [0x140189088]
test ecx, ecx
je 0x14006b12b
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x14006b148
mov rsi, rax
test rax, rax
jne 0x14006b0fa
movzx eax, byte [0x140228121]
mov rcx, qword [0x140228110]
test rcx, rcx
jne 0x14006b0bb
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x14006b164
mov rcx, rax
mov qword [0x140228110], rax
mov r8d, 0x18
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x14006b164
mov rsi, rax
lea rax, [0x140189070]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x140189088]
test ecx, ecx
je 0x14006b154
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 0x14006b14a
test rcx, rcx
je 0x14006b14a
lock dec qword [rcx]
jne 0x14006b14a
call fcn.140066d40
jmp 0x14006b14a
lea rcx, [0x140189070]
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jne 0x14006b088
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x140189070]
call fcn.14006ae00
mov ecx, eax
jmp 0x14006b0f2
ud2

Function at 0x14006b830
Capabilities:
Create thread

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x38
mov rbx, r8
mov r14, rdx
mov rdi, rcx
movzx eax, byte [0x140228121]
mov rcx, qword [0x140228110]
test rcx, rcx
jne 0x14006b86d
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x14006b91d
mov rcx, rax
mov qword [0x140228110], rax
mov r8d, 0x10
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x14006b91d
mov rsi, rax
mov qword [rax], r14
mov qword [rax + 8], rbx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x10000
lea r8, [0x14006b920]
xor ebx, ebx
xor ecx, ecx
mov rdx, rdi
mov r9, rax
call sub.kernel32.dll_CreateThread
mov rdx, rax
test rax, rax
jne 0x14006b910
mov rdi, qword [rsi]
mov rbx, qword [rsi + 8]
mov rcx, rdi
call qword [rbx]
cmp qword [rbx + 8], 0
je 0x14006b8eb
cmp qword [rbx + 0x10], 0x11
jb 0x14006b8da
mov rdi, qword [rdi - 8]
mov rcx, qword [0x140228110]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x140228110]
xor edx, edx
mov r8, rsi
call sub.kernel32.dll_HeapFree
call sub.kernel32.dll_GetLastError
mov edx, eax
shl rdx, 0x20
or rdx, 2
mov ebx, 1
mov rax, rbx
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r14
ret
ud2
Function at 0x14006c8d0
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x38
xor r9d, r9d
cmp r8d, 0x3b9aca00
je 0x14006c92e
mov r9d, 0x3e8
mov rax, rdx
mul r9
mov r9d, 0xffffffff
jo 0x14006c92e
mov edx, r8d
imul rdx, rdx, 0x431bde83
shr rdx, 0x32
add rax, rdx
jb 0x14006c92e
imul edx, edx, 0xf4240
xor r10d, r10d
sub r8d, edx
setne r10b
add rax, r10
jb 0x14006c92e
mov r9d, 0xffffffff
cmp rax, r9
cmovb r9, rax
test r9, r9
je 0x14006c96e
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 0x14006c95c
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_timeoutconnection_timed_out
add rsp, 0x38
ret

Function at 0x14006c980
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x38
xor r9d, r9d
cmp r8d, 0x3b9aca00
je 0x14006c9de
mov r9d, 0x3e8
mov rax, rdx
mul r9
mov r9d, 0xffffffff
jo 0x14006c9de
mov edx, r8d
imul rdx, rdx, 0x431bde83
shr rdx, 0x32
add rax, rdx
jb 0x14006c9de
imul edx, edx, 0xf4240
xor r10d, r10d
sub r8d, edx
setne r10b
add rax, r10
jb 0x14006c9de
mov r9d, 0xffffffff
cmp rax, r9
cmovb r9, rax
test r9, r9
je 0x14006ca1e
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 0x14006ca0c
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_timeoutconnection_timed_out
add rsp, 0x38
ret
Function at 0x140072330
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.140003c00
mov rax, qword [rsp + 0x30]
movabs rcx, 0x8000000000000000
cmp rax, rcx
jne 0x1400723c8
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 0x1400723fe
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
jne 0x14007241c
jmp 0x14007242d
lea rcx, str.file_name_contained_an_unexpected_NUL_byte
mov qword [rsi + 8], rcx
mov qword [rsi], 1
test rax, rax
je 0x14007242d
mov r8, qword [rsp + 0x38]
mov rcx, qword [0x140228110]
xor edx, edx
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r14
jmp sub.kernel32.dll_HeapFree
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
je 0x14007242d
mov rcx, qword [0x140228110]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
nop
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x140075400
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
movups xmm0, xmmword [0x1401ae110]
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 0x14007546a
mov rcx, rdi
mov edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [rsp + 0x60]
cmp eax, 0xc0000011
jne 0x140075479
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
jmp 0x1400754b0
cmp eax, 0x103
je 0x1400754ba
test eax, eax
js 0x140075496
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
mov qword [rsi], 0
jmp 0x1400754b0
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, str.fatal_runtime_error:_I_O_error:_operation_failed_to_complete_synchronously_n
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.1400788c0
mov rcx, rax
call fcn.14009c8e0
mov ecx, 7
int 0x29
ud2

Function at 0x140075760
Capabilities:
Write file on windows

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov rdi, rdx
mov rsi, rcx
movups xmm0, xmmword [0x1401ae110]
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 0x1400757d1
mov rcx, rdi
mov edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
mov eax, dword [rsp + 0x60]
cmp eax, 0x103
je 0x140075807
test eax, eax
js 0x1400757e2
mov rax, qword [rsp + 0x68]
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x1400757fa
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, str.fatal_runtime_error:_I_O_error:_operation_failed_to_complete_synchronously_n
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.1400788c0
mov rcx, rax
call fcn.14009c8e0
mov ecx, 7
int 0x29
ud2
Function at 0x140075870
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 0x1400758be
mov qword [rsi + 8], rax
mov qword [rsi], 0
jmp 0x14007592e
call sub.ws2_32.dll_WSAGetLastError
cmp eax, 0x2726
je 0x1400758d1
cmp eax, 0x2739
jne 0x14007591b
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 0x140075916
mov rdi, rax
mov rcx, rax
mov edx, 1
xor r8d, r8d
call sub.kernel32.dll_SetHandleInformation
test eax, eax
je 0x140075935
mov qword [rsi + 8], rdi
jmp 0x1400758b5
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 sub.ws2_32.dll_closesocket
Function at 0x1400766f0
Capabilities:
Generate random numbers via winapi
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rsi, rcx
mov ecx, dword [0x140189048]
test ecx, ecx
je 0x140076723
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jb 0x14007673c
mov rcx, rax
cmp qword [rax + 8], 0
je 0x14007673c
add rcx, 0x10
jmp 0x140076858
lea rcx, [0x140189030]
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 2
jae 0x140076710
mov ecx, dword [0x140189048]
test ecx, ecx
je 0x140076839
dec ecx
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
je 0x140076856
mov rdi, rax
test rax, rax
jne 0x1400767d1
movzx eax, byte [0x140228121]
mov rcx, qword [0x140228110]
test rcx, rcx
jne 0x14007678e
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x140076875
mov rcx, rax
mov qword [0x140228110], rax
mov r8d, 0x20
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x140076875
mov rdi, rax
lea rax, [0x140189030]
mov qword [rdi], rax
mov qword [rdi + 8], 0
mov ecx, dword [0x140189048]
test ecx, ecx
je 0x140076862
dec ecx
mov rdx, rdi
call sub.kernel32.dll_TlsSetValue
test rsi, rsi
je 0x1400767ee
mov rcx, qword [rsi]
mov rax, qword [rsi + 8]
mov rdx, qword [rsi + 0x10]
mov qword [rsi], 0
cmp rcx, 1
je 0x140076823
xorps xmm0, xmm0
movaps xmmword [rsp + 0x20], xmm0
lea rdx, [rsp + 0x20]
xor ecx, ecx
mov r8d, 0x10
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
js 0x14007681e
mov rax, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
jmp 0x140076823
call fcn.140066c80
mov qword [rdi + 8], 1
lea rcx, [rdi + 0x10]
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], rdx
jmp 0x140076858
lea rcx, [0x140189030]
call fcn.14006ae00
mov ecx, eax
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jne 0x14007675b
xor ecx, ecx
mov rax, rcx
add rsp, 0x38
pop rdi
pop rsi
ret
lea rcx, [0x140189030]
call fcn.14006ae00
mov ecx, eax
jmp 0x1400767c9
ud2
Function at 0x140077000
Capabilities:
Connect socket

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x40
mov rbx, r8
mov rsi, rcx
test rdx, rdx
je 0x140077022
mov qword [rsi + 8], rbx
mov qword [rsi], 1
jmp 0x1400770ee
mov rax, qword [0x1402280f0]
cmp rax, 3
jne 0x1400770f7
movzx edx, word [rbx]
lea rcx, [rsp + 0x20]
call fcn.140075870
cmp qword [rsp + 0x20], 0
mov rdi, qword [rsp + 0x28]
je 0x14007705d
mov qword [rsi + 8], rdi
mov qword [rsi], 1
jmp 0x1400770ee
cmp word [rbx], 0
je 0x14007707e
movups xmm0, xmmword [rbx + 4]
mov eax, dword [rbx + 0x14]
mov edx, dword [rbx + 0x18]
movzx ecx, word [rbx + 0x1c]
mov r8d, 0x1c
mov r9w, 0x17
jmp 0x140077093
mov eax, dword [rbx + 2]
movzx ecx, word [rbx + 6]
mov r8d, 0x10
mov r9w, 2
xorps xmm0, xmm0
rol cx, 8
mov word [rsp + 0x20], r9w
mov word [rsp + 0x22], cx
mov dword [rsp + 0x24], eax
movups xmmword [rsp + 0x28], xmm0
mov dword [rsp + 0x38], edx
lea rdx, [rsp + 0x20]
mov rcx, rdi
call sub.ws2_32.dll_connect
cmp eax, 0xffffffff
je 0x1400770ce
mov qword [rsi + 8], rdi
mov qword [rsi], 0
jmp 0x1400770ee
call sub.ws2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
mov rcx, rdi
call sub.ws2_32.dll_closesocket
nop
add rsp, 0x40
pop rbx
pop rdi
pop rsi
ret
call fcn.14006c870
jmp 0x140077033
Function at 0x14008c300
Capabilities:
Receive data
Receive data on socket

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rbx, r9
mov rdi, r8
mov r14, rdx
mov rsi, rcx
mov rax, qword [rsp + 0xb0]
test r9, r9
je 0x14008c354
mov rbp, rax
add rbp, 0x400
jb 0x14008c354
mov rcx, rbp
and rcx, 0x1fff
je 0x14008c359
mov edx, 0x2000
sub rdx, rcx
add rbp, rdx
setb cl
test cl, 1
je 0x14008c359
mov ebp, 0x2000
mov r12, qword [rdi]
mov r15, qword [rdi + 0x10]
cmp rbx, 1
setne cl
test rax, rax
sete al
or al, cl
mov rdx, r15
cmp al, 1
jne 0x14008c3b3
mov rax, r12
sub rax, r15
mov rdx, r15
cmp rax, 0x20
jae 0x14008c3b3
lea rcx, [rsp + 0x38]
mov rdx, r14
mov r8, rdi
call fcn.14008c540
cmp qword [rsp + 0x38], 0
mov rax, qword [rsp + 0x40]
jne 0x14008c4fe
test rax, rax
je 0x14008c519
mov rdx, qword [rdi + 0x10]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rsi
mov r15, qword [r14]
xor esi, esi
nop word cs:[rax + rax]
mov r13, qword [rdi]
cmp rdx, r13
jne 0x14008c40e
cmp r13, r12
jne 0x14008c40e
lea rcx, [rsp + 0x38]
mov rdx, r14
mov r8, rdi
call fcn.14008c540
cmp qword [rsp + 0x38], 0
mov rax, qword [rsp + 0x40]
jne 0x14008c4f9
mov rdx, qword [rdi + 0x10]
test rax, rax
je 0x14008c509
mov r13, qword [rdi]
cmp rdx, r13
je 0x14008c4af
sub r13, rdx
add rdx, qword [rdi + 8]
cmp r13, rbp
cmovae r13, rbp
cmp r13, 0x7fffffff
mov r8d, 0x7fffffff
cmovb r8, r13
mov rcx, r15
xor r9d, r9d
call sub.ws2_32.dll_recv
cmp eax, 0xffffffff
je 0x14008c4cc
cdqe
cmp rsi, rax
mov rcx, rsi
cmovbe rcx, rax
cmp rcx, r13
ja 0x14008c537
mov rdx, qword [rdi + 0x10]
test rax, rax
je 0x14008c4e1
mov rsi, rcx
sub rsi, rax
add rdx, rax
mov qword [rdi + 0x10], rdx
cmp rbx, 1
je 0x14008c3d0
cmp rcx, r13
mov r8, 0xffffffffffffffff
cmovne rbp, r8
lea rcx, [rbp*2]
test rbp, rbp
cmovs rcx, r8
cmp r13, rbp
cmovb rcx, rbp
cmp rax, r13
cmove rbp, rcx
jmp 0x14008c3d0
mov r8d, 0x20
mov rcx, rdi
mov rdx, r13
call fcn.1400938d0
mov r13, qword [rdi]
mov rdx, qword [rdi + 0x10]
jmp 0x14008c417
call sub.ws2_32.dll_WSAGetLastError
cmp eax, 0x274a
jne 0x14008c4f1
cmp rsi, r13
ja 0x14008c537
mov rdx, qword [rdi + 0x10]
mov rsi, qword [rsp + 0x28]
sub rdx, qword [rsp + 0x30]
mov qword [rsi + 8], rdx
jmp 0x14008c521
shl rax, 0x20
or rax, 2
mov rsi, qword [rsp + 0x28]
mov qword [rsi + 8], rax
mov eax, 1
jmp 0x14008c523
sub rdx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x28]
mov qword [rsi + 8], rdx
jmp 0x14008c521
mov qword [rsi + 8], 0
xor eax, eax
mov qword [rsi], rax
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2