joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180030dd0
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov eax, ecx
lea r9, [rsp + 0x30]
imul rbx, rax, 0x38
mov esi, edx
add rbx, qword [0x180068610]
mov r8, qword [rbx]
movzx eax, byte [rbx + 0x20]
and al, 1
movzx ecx, al
lea rdi, [r8 - 5]
cmove rdi, r8
mov r8d, 0x40
lea rbp, [rcx*2 + 5]
mov rcx, rdi
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x180030e34
mov eax, 0xa
jmp 0x180030ec3
test esi, esi
je 0x180030e56
mov byte [rdi], 0xe9
mov eax, dword [rbx + 8]
sub eax, edi
sub eax, 5
mov dword [rdi + 1], eax
test byte [rbx + 0x20], 1
je 0x180030e79
mov rax, qword [rbx]
mov word [rax], 0xf9eb
jmp 0x180030e79
mov eax, dword [rbx + 0x18]
test byte [rbx + 0x20], 1
mov dword [rdi], eax
je 0x180030e72
movzx eax, word [rbx + 0x1c]
mov word [rdi + 4], ax
movzx eax, byte [rbx + 0x1e]
mov byte [rdi + 6], al
jmp 0x180030e79
movzx eax, byte [rbx + 0x1c]
mov byte [rdi + 4], al
mov r8d, dword [rsp + 0x30]
lea r9, [rsp + 0x30]
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8, rbp
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
and byte [rbx + 0x20], 0xfd
and sil, 1
movzx eax, sil
shl sil, 2
add al, al
or al, byte [rbx + 0x20]
and al, 0xfb
or al, sil
mov byte [rbx + 0x20], al
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x180030ee0
Capabilities:
Suspend thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x18005fcb8]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor r15d, r15d
mov r14d, edx
xor edx, edx
mov qword [rcx], r15
mov rbx, rcx
mov qword [rcx + 8], r15
mov ebp, r8d
mov edi, r15d
lea ecx, [rdx + 4]
call fcn.180044d22
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180031088
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, rax
call fcn.180044d28
test eax, eax
je 0x180031025
lea edi, [r15 + 1]
nop dword [rax]
cmp dword [rsp + 0x20], 0x10
jb 0x180030fe0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [rsp + 0x2c], eax
jne 0x180030fe0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rsp + 0x28], eax
je 0x180030fe0
mov rdx, qword [rbx]
test rdx, rdx
jne 0x180030fa2
mov dword [rbx + 8], pe_nt_image_headers64
mov r8d, 0x200
mov rcx, qword [0x180067f30]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbx], rax
mov rdx, rax
test rax, rax
je 0x180031008
jmp 0x180030fd3
mov eax, dword [rbx + 8]
cmp dword [rbx + 0xc], eax
jb 0x180030fd3
add eax, eax
mov r8, rdx
mov r9d, eax
xor edx, edx
mov dword [rbx + 8], eax
mov rcx, qword [0x180067f30]
shl r9, 2
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov rdx, rax
test rax, rax
je 0x180031008
mov qword [rbx], rax
mov ecx, dword [rbx + 0xc]
mov eax, dword [rsp + 0x28]
mov dword [rdx + rcx*4], eax
inc dword [rbx + 0xc]
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x1c
mov rcx, rsi
call fcn.180044d2e
test eax, eax
jne 0x180030f50
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x180031025
mov r8, qword [rbx]
mov edi, r15d
test r8, r8
je 0x180031025
mov rcx, qword [0x180067f30]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rbx], r15
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x180031088
cmp qword [rbx], r15
je 0x180031083
mov edi, r15d
cmp dword [rbx + 0xc], r15d
jbe 0x180031083
mov rax, qword [rbx]
xor edx, edx
mov ecx, edi
mov r8d, dword [rax + rcx*4]
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x18003107c
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SuspendThread]
mov r8d, ebp
mov edx, r14d
mov rcx, rsi
call fcn.1800315b0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [rbx + 0xc]
jb 0x180031040
mov eax, r15d
jmp 0x18003108d
mov eax, 9
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.180044ff0
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x180031760
Capabilities:
Resume thread

Disassembly:
push rdi
sub rsp, 0x20
cmp qword [rcx], 0
mov rdi, rcx
je 0x1800317cf
mov qword [rsp + 0x30], rbx
xor ebx, ebx
cmp dword [rcx + 0xc], ebx
jbe 0x1800317b8
mov qword [rsp + 0x38], rsi
mov rax, qword [rdi]
xor edx, edx
mov r8d, dword [rax + rbx*4]
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rsi, rax
test rax, rax
je 0x1800317ac
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
cmp ebx, dword [rdi + 0xc]
jb 0x180031780
mov rsi, qword [rsp + 0x38]
mov r8, qword [rdi]
xor edx, edx
mov rcx, qword [0x180067f30]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x1800318d0
Capabilities:
Get system information on windows

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x80
mov rdi, rcx
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov r14, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
cmp rdi, 0x40000000
jbe 0x180031910
lea rax, [rdi - 0x40000000]
cmp r14, rax
cmovb r14, rax
mov rsi, qword [0x180068608]
lea r15, [rdi + 0x40000000]
cmp rcx, r15
cmovbe r15, rcx
sub r15, 0xfff
test rsi, rsi
je 0x18003194e
cmp rsi, r14
jb 0x180031946
cmp rsi, r15
jae 0x180031946
cmp qword [rsi + 8], 0
jne 0x180031b17
mov rsi, qword [rsi]
test rsi, rsi
jne 0x180031931
mov qword [rsp + 0xa0], rbx
mov rbx, rdi
mov qword [rsp + 0xa8], rbp
mov qword [rsp + 0xb0], r12
mov r12d, 0x40
cmp rdi, r14
jb 0x1800319e2
nop dword [rax]
nop dword [rax + rax]
mov ebp, dword [rsp + 0x48]
mov rax, rbx
xor edx, edx
div rbp
sub rbx, rdx
sub rbx, rbp
cmp rbx, r14
jb 0x1800319d9
nop word [rax + rax]
mov r8d, 0x30
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x1800319d9
cmp dword [rsp + 0x70], 0x10000
je 0x180031a5b
mov rbx, qword [rsp + 0x58]
cmp rbx, rbp
jb 0x1800319d9
sub rbx, rbp
cmp rbx, r14
jae 0x1800319a0
test rsi, rsi
jne 0x180031ac0
cmp rdi, r15
ja 0x180031aff
nop dword [rax + rax]
mov ebp, dword [rsp + 0x48]
xor edx, edx
mov rax, rdi
mov ebx, ebp
div rbp
mov eax, ebp
sub rax, rdx
add rax, rdi
mov rdi, rax
cmp rax, r15
ja 0x180031aff
mov r8d, 0x30
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x180031aff
cmp dword [rsp + 0x70], 0x10000
je 0x180031a91
xor edx, edx
lea edi, [rbp - 1]
add rdi, qword [rsp + 0x68]
add rdi, qword [rsp + 0x50]
mov rax, rdi
div rbx
sub rdi, rdx
cmp rdi, r15
jbe 0x180031a12
jmp 0x180031aff
test rbx, rbx
je 0x1800319d9
mov r9d, r12d
mov edx, 0x1000
mov r8d, 0x3000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x180031ac0
cmp rbx, r14
jae 0x180031980
jmp 0x1800319e2
test rdi, rdi
je 0x180031aff
mov r9d, r12d
mov edx, 0x1000
mov r8d, 0x3000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x180031ac0
cmp rdi, r15
jbe 0x1800319f0
jmp 0x180031aff
xor edx, edx
lea rcx, [rsi + 0x40]
mov dword [rsi + 0x10], edx
nop dword [rax]
mov qword [rcx], rdx
mov rax, rcx
mov qword [rsi + 8], rcx
add r12, 0x40
add rcx, 0x40
mov rdx, rax
cmp r12, 0xfc0
jbe 0x180031ad0
mov rax, qword [0x180068608]
mov qword [rsi], rax
mov qword [0x180068608], rsi
mov r12, qword [rsp + 0xb0]
mov rbp, qword [rsp + 0xa8]
mov rbx, qword [rsp + 0xa0]
mov rax, rsi
mov rsi, qword [rsp + 0xb8]
add rsp, 0x80
pop r15
pop r14
pop rdi
ret
Function at 0x1800342a0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov r11, rsp
mov byte [r11 + 0x20], r9b
push rbx
push rsi
push rdi
sub rsp, 0xb0
mov rax, qword [0x18005fcb8]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov rsi, rcx
mov qword [rsp + 0x20], rdx
mov dword [rsp + 0x60], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
xor edx, edx
mov qword [r11 - 0x40], rdx
mov qword [r11 - 0x38], 0xf
mov byte [rsp + 0x78], dl
mov byte [r11 - 0x30], dl
movups xmm1, xmmword [r8]
movups xmmword [rsp + 0x28], xmm1
movsd xmm0, qword [r8 + 0x10]
movsd qword [rsp + 0x38], xmm0
movd eax, xmm1
cmp eax, 6
jne 0x1800344d4
mov edi, dword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
cmp edi, 1
jb 0x180034339
lea rdx, [rsp + 0x98]
mov rcx, rbx
call fcn.180032880
mov rdx, qword [rsp + 0x88]
cmp edi, 2
jb 0x180034354
lea rcx, [rbx + 0x18]
lea rdx, [rsp + 0x78]
call fcn.180032950
mov rdx, qword [rsp + 0x88]
cmp edi, 3
jb 0x18003436d
movups xmm0, xmmword [rbx + 0x30]
movaps xmmword [rsp + 0x60], xmm0
movsd xmm1, qword [rbx + 0x40]
movsd qword [rsp + 0x70], xmm1
lea r8, [rsp + 0x78]
cmp qword [rsp + 0x90], 0x10
cmovae r8, qword [rsp + 0x78]
xor ecx, ecx
movabs r9, 0xcbf29ce484222325
test rdx, rdx
je 0x1800343b4
movabs r10, 0x100000001b3
nop dword [rax]
movzx eax, byte [rcx + r8]
xor r9, rax
imul r9, r10
inc rcx
cmp rcx, rdx
jb 0x1800343a0
lea r8, [rsp + 0x78]
lea rdx, [rsp + 0x28]
mov rcx, rsi
call fcn.180003f00
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x180034462
cmp rcx, qword [rsi + 8]
je 0x180034462
mov rcx, qword [rcx + 0x68]
test rcx, rcx
je 0x1800344fd
mov rax, qword [rcx]
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x28]
call qword [rax + 0x10]
mov rbx, qword [rax]
mov qword [rax], 0
mov rdi, qword [rsp + 0x28]
test rdi, rdi
je 0x180034435
mov rsi, qword [rdi + 0x18]
test rsi, rsi
je 0x180034428
mov rcx, rsi
call fcn.1800182f0
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, 0x20
mov rcx, rdi
call fcn.180044f54
test rbx, rbx
je 0x180034462
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x180034454
mov rcx, rdi
call fcn.1800182f0
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, 0x20
mov rcx, rbx
call fcn.180044f54
nop
mov rcx, qword [rsp + 0x20]
call fcn.18003a470
nop
mov rdx, qword [rsp + 0x90]
cmp rdx, 0x10
jb 0x1800344b4
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800344af
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800344af
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
jmp 0x180034462
call fcn.180044f54
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.180044ff0
add rsp, 0xb0
pop rdi
pop rsi
pop rbx
ret
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x48], xmm0
mov qword [r11 - 0x70], rax
lea rcx, [r11 - 0x80]
call fcn.180017500
lea rdx, [0x18005c318]
lea rcx, [rsp + 0x48]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
call sub.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_
int3
Function at 0x1800345a0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x70
mov rax, qword [0x18005fcb8]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rbx, rdx
mov rdi, rcx
cmp qword [rdx + 0x18], 0x10
jb 0x1800345c9
mov rdx, qword [rdx]
movabs r9, 0xcbf29ce484222325
mov r8, qword [rbx + 0x10]
xor ecx, ecx
test r8, r8
je 0x180034603
movabs r10, 0x100000001b3
nop dword [rax + rax]
movzx eax, byte [rcx + rdx]
xor r9, rax
imul r9, r10
inc rcx
cmp rcx, r8
jb 0x1800345f0
mov r8, rbx
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.180003f00
mov rcx, qword [rax + 8]
test rcx, rcx
jne 0x180034620
mov rcx, qword [rdi + 8]
cmp rcx, qword [rdi + 8]
jne 0x180034641
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.180044ff0
mov rbx, qword [rsp + 0x90]
add rsp, 0x70
pop rdi
ret
lea rdx, str.Function_name_already_bound:_._Please_use_unique_function_names
lea rcx, [rsp + 0x20]
call fcn.180032d50
mov r8, rbx
mov rdx, qword [rax]
lea rcx, [rsp + 0x48]
call fcn.180032a10
nop
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.180033100
lea rdx, [0x18005c910]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3

Function at 0x180035bc0
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x1e0
mov rax, qword [0x18005fcb8]
xor rax, rsp
mov qword [rsp + 0x1d0], rax
movzx edi, dl
mov rbx, rcx
mov eax, 1
lock xadd dword [0x180067f78], eax
inc eax
cmp eax, 1
jne 0x180035c0d
lea ecx, [rax + 1]
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_WSAStartup]
xchg dword [0x180067f7c], eax
test dil, dil
je 0x180035c20
xor eax, eax
lock xadd dword [0x180067f7c], eax
test eax, eax
jne 0x180035c44
mov rax, rbx
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.180044ff0
mov rbx, qword [rsp + 0x1f0]
add rsp, 0x1e0
pop rdi
ret
mov dword [rsp + 0x20], eax
call fcn.180038c70
lea rdx, str.winsock
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x20]
call fcn.180038a80
int3

Function at 0x180036b40
Capabilities:
Set socket configuration

Disassembly:
push rdi
sub rsp, 0x20
mov rdi, qword [rcx]
cmp rdi, 0xffffffffffffffff
je 0x180036bfd
mov qword [rsp + 0x38], rbx
xor ecx, ecx
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov ebx, eax
call fcn.180038c70
mov rbp, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
mov rbx, qword [rsp + 0x38]
mov esi, eax
je 0x180036bf3
call fcn.180038c70
mov rcx, qword [rax + 8]
cmp qword [rbp + 8], rcx
jne 0x180036ba5
cmp esi, 0x2733
je 0x180036bbc
call fcn.180038c70
mov rdx, qword [rax + 8]
cmp qword [rbp + 8], rdx
jne 0x180036bf3
cmp esi, 0x4d5
jne 0x180036bf3
lea r8, [rsp + 0x30]
mov dword [rsp + 0x30], 0
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
call fcn.180038c70
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x180037650
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbx
push rdi
sub rsp, 0x28
mov rbx, rcx
mov ecx, dword [0x180067f70]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
xor edi, edi
test rax, rax
je 0x1800376a9
mov rax, qword [rax + 8]
test rax, rax
je 0x1800376a9
mov rcx, qword [rax]
test rcx, rcx
je 0x1800376a9
mov qword [rax], rdi
movzx eax, byte [rcx]
cmp rax, rbx
jb 0x1800376a4
mov byte [rcx + rbx], al
mov rax, rcx
add rsp, 0x28
pop rdi
pop rbx
ret
call fcn.180045b00
lea rcx, [rbx + 1]
call fcn.180044f18
cmp rbx, 0xff
movzx ecx, bl
cmova ecx, edi
mov byte [rax + rbx], cl
add rsp, 0x28
pop rdi
pop rbx
ret

Function at 0x1800376d0
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbx
push rdi
sub rsp, 0x28
mov rbx, rcx
mov rdi, rdx
mov ecx, dword [0x180067f70]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x1800376fd
mov r8, qword [rax + 8]
jmp 0x180037700
xor r8d, r8d
cmp rdi, 0xff
ja 0x180037724
test r8, r8
je 0x180037724
cmp qword [r8], 0
jne 0x180037724
movzx eax, byte [rbx + rdi]
mov byte [rbx], al
mov qword [r8], rbx
add rsp, 0x28
pop rdi
pop rbx
ret
mov rcx, rbx
add rsp, 0x28
pop rdi
pop rbx
jmp fcn.180045b00
Function at 0x180037740
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
mov rsi, r9
mov r14, rdx
mov rbp, rcx
mov edi, r15d
cmp rcx, 0xffffffffffffffff
je 0x18003787c
test r8b, r8b
je 0x1800377ba
movzx eax, byte [rdx]
test al, 8
je 0x1800377ba
or al, 8
mov dword [rsp + 0x60], r15d
xor ecx, ecx
mov byte [rdx], al
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea r9, [rsp + 0x60]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, pe_nt_image_headers64
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_setsockopt]
call fcn.180038c70
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
mov edi, eax
call fcn.180038c70
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
test edi, edi
je 0x18003787c
call fcn.180038c70
mov rcx, qword [rsi + 8]
mov rax, qword [rax + 8]
cmp qword [rcx + 8], rax
jne 0x18003780f
cmp dword [rsi], 0x2733
je 0x18003782a
call fcn.180038c70
mov rcx, qword [rsi + 8]
mov rax, qword [rax + 8]
cmp qword [rcx + 8], rax
jne 0x180037895
cmp dword [rsi], 0x4d5
jne 0x180037895
lea r8, [rsp + 0x60]
mov dword [rsp + 0x60], r15d
mov edx, 0x8004667e
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_ioctlsocket]
and byte [r14], 0xfc
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
mov edi, eax
call fcn.180038c70
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
test edi, edi
jne 0x180037895
lea rax, [0x18005fc98]
mov dword [rsp + 0x30], r15d
mov qword [rsp + 0x38], rax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
mov rbx, qword [rsp + 0x68]
mov eax, edi
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret

Function at 0x180038ce0
Capabilities:
Send data
Send data on socket

Disassembly:
push rbx
sub rsp, 0x50
mov rbx, qword [rcx + 8]
lea rax, [rsp + 0x60]
xor ecx, ecx
mov qword [rsp + 0x48], rax
mov byte [rsp + 0x60], 0
mov dword [rsp + 0x40], 1
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
lea r9, [rsp + 0x68]
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov rcx, rbx
mov dword [rsp + 0x68], eax
lea r8d, [rax + 1]
mov dword [rsp + 0x20], eax
call qword [sym.imp.WS2_32.dll_WSASend]
call fcn.180038c70
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
je 0x180038d4b
cmp eax, 0x4d2
jne 0x180038d50
call fcn.180038c70
add rsp, 0x50
pop rbx
ret
Function at 0x180038d60
Capabilities:
Terminate thread

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [rcx + 0x10]
lea rdx, [rsp + 0x20]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rax, qword [rcx + 8]
mov rbx, rcx
mov r9d, 0xffffffff
mov qword [rsp + 0x28], rax
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
lock xadd dword [0x180067f80], eax
mov rcx, qword [rbx + 8]
test eax, eax
je 0x180038dbd
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
add rsp, 0x30
pop rbx
ret
mov rdx, rcx
xor r8d, r8d
lea rcx, [fcn.180003460]
call qword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov rcx, qword [rbx + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add rsp, 0x30
pop rbx
ret

Function at 0x180039590
Capabilities:
Set socket configuration

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rdi, qword [rcx]
mov rsi, rcx
cmp rdi, 0xffffffffffffffff
je 0x180039658
mov qword [rsp + 0x48], rbx
xor ecx, ecx
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x20], r14
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov ebx, eax
call fcn.180038c70
mov r14, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
mov rbx, qword [rsp + 0x48]
mov ebp, eax
je 0x180039647
call fcn.180038c70
mov rcx, qword [rax + 8]
cmp qword [r14 + 8], rcx
jne 0x1800395f9
cmp ebp, 0x2733
je 0x180039610
call fcn.180038c70
mov rdx, qword [rax + 8]
cmp qword [r14 + 8], rdx
jne 0x180039647
cmp ebp, 0x4d5
jne 0x180039647
lea r8, [rsp + 0x40]
mov dword [rsp + 0x40], 0
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
call fcn.180038c70
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x50]
mov qword [rsi], 0xffffffffffffffff
add rsp, 0x28
pop rdi
pop rsi
ret
Function at 0x180039660
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
xor ebx, ebx
mov dword [rsp + 0x20], ebx
lea rsi, [0x18005fc98]
mov qword [rsp + 0x28], rsi
mov rdi, qword [rcx + 0x10]
mov eax, ebx
lock xadd dword [rdi + 0x30], eax
test eax, eax
jne 0x1800396b1
mov rcx, rdi
call fcn.180039bc0
mov dword [rsp + 0x20], ebx
mov qword [rsp + 0x28], rsi
movaps xmm0, xmmword [rsp + 0x20]
movdqa xmmword [rsp + 0x20], xmm0
jmp 0x180039744
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x30], rdi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov ecx, dword [0x180067f70]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x30]
mov ecx, dword [0x180067f70]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
lea r8, [rsp + 0x20]
mov dl, 1
mov rcx, rdi
call fcn.1800385e0
test rax, rax
je 0x180039723
nop dword [rax]
lea rax, [rbx + 1]
cmp rbx, 0xffffffffffffffff
cmove rax, rbx
mov rbx, rax
lea r8, [rsp + 0x20]
mov dl, 1
mov rcx, rdi
call fcn.1800385e0
test rax, rax
jne 0x180039700
mov rdx, qword [rsp + 0x40]
mov ecx, dword [0x180067f70]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x180039744
call fcn.180045b00
cmp dword [rsp + 0x20], 0
jne 0x18003975e
mov rax, rbx
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
lea rcx, [rsp + 0x20]
call fcn.180038a50
int3
mov rcx, qword [rcx]
add rcx, 8
jmp 0x180039660

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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
xor ebx, ebx
mov dword [rsp + 0x20], ebx
lea rsi, [0x18005fc98]
mov qword [rsp + 0x28], rsi
mov rdi, qword [rcx + 0x10]
mov eax, ebx
lock xadd dword [rdi + 0x30], eax
test eax, eax
jne 0x1800396b1
mov rcx, rdi
call fcn.180039bc0
mov dword [rsp + 0x20], ebx
mov qword [rsp + 0x28], rsi
movaps xmm0, xmmword [rsp + 0x20]
movdqa xmmword [rsp + 0x20], xmm0
jmp 0x180039744
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x30], rdi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov ecx, dword [0x180067f70]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x30]
mov ecx, dword [0x180067f70]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
lea r8, [rsp + 0x20]
mov dl, 1
mov rcx, rdi
call fcn.1800385e0
test rax, rax
je 0x180039723
nop dword [rax]
lea rax, [rbx + 1]
cmp rbx, 0xffffffffffffffff
cmove rax, rbx
mov rbx, rax
lea r8, [rsp + 0x20]
mov dl, 1
mov rcx, rdi
call fcn.1800385e0
test rax, rax
jne 0x180039700
mov rdx, qword [rsp + 0x40]
mov ecx, dword [0x180067f70]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x180039744
call fcn.180045b00
cmp dword [rsp + 0x20], 0
jne 0x18003975e
mov rax, rbx
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
lea rcx, [rsp + 0x20]
call fcn.180038a50
int3
mov rcx, qword [rcx]
add rcx, 8
jmp 0x180039660