joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140213830
Capabilities:
Get memory capacity

Disassembly:
sub rsp, 0x78
mov rax, qword [0x140343618]
xor rax, rsp
mov qword [rsp + 0x60], rax
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov rcx, qword [rsp + 0x28]
mov rdx, 0xffffffffffffffff
test eax, eax
cmove rcx, rdx
mov rax, rcx
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140243d80
add rsp, 0x78
ret

Function at 0x1402138d0
Capabilities:
Query environment variable

Disassembly:
push r14
push r15
sub rsp, 0x478
mov rax, qword [0x140343618]
xor rax, rsp
mov qword [rsp + 0x450], rax
mov r14, r8
mov r15, rdx
test rcx, rcx
je 0x140213ad1
test rdx, rdx
je 0x140213ad1
test r8, r8
je 0x140213ad1
cmp qword [r8], 0
je 0x140213ad1
lea r8, [rsp + 0x40]
mov edx, 0xffffffff
call fcn.140212f50
test eax, eax
jne 0x140213ad6
mov qword [rsp + 0x4a8], rbx
xor ecx, ecx
mov qword [rsp + 0x470], rbp
lea rbx, [rsp + 0x50]
mov qword [rsp + 0x468], rsi
mov qword [rsp + 0x460], rdi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbp, qword [rsp + 0x40]
lea rdx, [rsp + 0x50]
mov rcx, rbp
mov r8d, 0x200
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
cmp rdi, 0x200
jb 0x1402139c5
lea rax, [rsp + 0x50]
cmp rbx, rax
je 0x140213992
mov rcx, rbx
call fcn.14020e8a0
inc edi
mov esi, edi
lea rcx, [rdi + rdi]
call fcn.14020ea50
mov rbx, rax
test rax, rax
je 0x1402139ea
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8d, edi
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
cmp rdi, rsi
jae 0x140213980
mov rcx, rbp
call fcn.14020e8a0
test rdi, rdi
jne 0x140213a05
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140213a05
mov ecx, eax
call fcn.140220130
mov edi, eax
jmp 0x140213a9b
mov edi, 0xfffff027
test rbp, rbp
je 0x140213a9b
mov rcx, rbp
call fcn.14020e8a0
jmp 0x140213a9b
xor edi, edi
mov r8, rbx
mov qword [rsp + 0x38], rdi
xor edx, edx
mov qword [rsp + 0x30], rdi
mov ecx, 0xfde9
mov dword [rsp + 0x28], edi
lea r9d, [rdi - 1]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x140213a43
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140220130
mov edi, eax
jmp 0x140213a9b
mov rcx, qword [r14]
mov eax, eax
cmp rax, rcx
jbe 0x140213a57
mov qword [r14], rax
mov edi, 0xfffff024
jmp 0x140213a9b
mov qword [rsp + 0x38], rdi
mov r9d, 0xffffffff
mov qword [rsp + 0x30], rdi
mov r8, rbx
mov dword [rsp + 0x28], ecx
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x140213a95
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140220130
mov edi, eax
jmp 0x140213a9b
lea ecx, [rax - 1]
mov qword [r14], rcx
mov rsi, qword [rsp + 0x468]
lea rax, [rsp + 0x50]
mov rbp, qword [rsp + 0x470]
cmp rbx, rax
je 0x140213abd
mov rcx, rbx
call fcn.14020e8a0
mov rbx, qword [rsp + 0x4a8]
mov eax, edi
mov rdi, qword [rsp + 0x460]
jmp 0x140213ad6
mov eax, 0xfffff019
mov rcx, qword [rsp + 0x450]
xor rcx, rsp
call fcn.140243d80
add rsp, 0x478
pop r15
pop r14
ret
Function at 0x140213b00
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x130
mov rax, qword [0x140343618]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov rdi, rdx
mov rsi, rcx
test rcx, rcx
je 0x140213be0
test rdx, rdx
je 0x140213be0
cmp qword [rdx], 0
je 0x140213be0
call fcn.14021c890
mov edx, 0x100
lea rcx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
je 0x140213b69
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140220130
jmp 0x140213ba7
mov qword [rsp + 0x150], rbx
lea rax, [rsp + 0x20]
mov rbx, 0xffffffffffffffff
mov byte [rsp + 0x11f], 0
inc rbx
cmp byte [rax + rbx], 0
jne 0x140213b85
cmp rbx, qword [rdi]
jb 0x140213bc8
lea rax, [rbx + 1]
mov qword [rdi], rax
mov eax, 0xfffff024
mov rbx, qword [rsp + 0x150]
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.140243d80
mov rsi, qword [rsp + 0x158]
add rsp, 0x130
pop rdi
ret
lea r8, [rbx + 1]
mov rcx, rsi
lea rdx, [rsp + 0x20]
call fcn.140246390
xor eax, eax
mov qword [rdi], rbx
jmp 0x140213b9f
mov eax, 0xfffff019
jmp 0x140213ba7
Function at 0x140213ca0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x20], rbp
push rdi
sub rsp, 0x40
mov rdi, rdx
mov rbp, rcx
test rcx, rcx
je 0x140213e26
test rdx, rdx
je 0x140213e26
cmp qword [rdx], 0
je 0x140213e26
xor edx, edx
mov qword [rsp + 0x58], rsi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, eax
test eax, eax
jne 0x140213cfd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov rsi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
jmp fcn.140220130
inc rsi
mov qword [rsp + 0x50], rbx
lea rcx, [rsi + rsi]
call fcn.14020ea50
mov rbx, rax
test rax, rax
jne 0x140213d20
mov eax, 0xfffff027
jmp 0x140213db4
mov rdx, rbx
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, eax
test rax, rax
jne 0x140213d49
mov rcx, rbx
call fcn.14020e8a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140220130
jmp 0x140213db4
mov qword [rsp + 0x60], r14
xor r14d, r14d
cmp word [rbx + rax*2 - 2], 0x5c
jne 0x140213d6c
cmp rax, 3
jne 0x140213d66
cmp word [rbx + 2], 0x3a
je 0x140213d6c
mov word [rbx + rax*2 - 2], r14w
mov qword [rsp + 0x38], r14
mov r9d, 0xffffffff
mov qword [rsp + 0x30], r14
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x140213dc9
mov rcx, rbx
call fcn.14020e8a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.140220130
mov r14, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
mov esi, eax
mov rax, qword [rdi]
cmp rsi, rax
jbe 0x140213de5
mov rcx, rbx
call fcn.14020e8a0
mov eax, 0xfffff024
mov qword [rdi], rsi
jmp 0x140213daf
mov qword [rsp + 0x38], r14
mov r9d, 0xffffffff
mov qword [rsp + 0x30], r14
mov r8, rbx
mov dword [rsp + 0x28], eax
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rcx, rbx
mov esi, eax
call fcn.14020e8a0
test esi, esi
je 0x140213da2
lea ecx, [rsi - 1]
xor eax, eax
mov qword [rdi], rcx
jmp 0x140213daf
mov rbp, qword [rsp + 0x68]
mov eax, 0xfffff019
add rsp, 0x40
pop rdi
ret
Function at 0x140215940
Capabilities:
Read file via mapping

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov r14, rdx
mov rdi, rcx
mov eax, dword [rcx + 0x150]
mov dword [rsp + 0x90], eax
mov eax, dword [rdx]
and al, 3
cmp al, 1
jne 0x1402159a2
mov dword [rcx + 0x14c], 5
mov ecx, 5
call fcn.140220130
movsxd rdx, eax
mov qword [rdi + 0x88], rdx
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
cmp byte [rdx + 4], 0
je 0x1402159d6
mov dword [rcx + 0x14c], 1
mov ecx, 1
call fcn.140220130
movsxd rcx, eax
mov qword [rdi + 0x88], rcx
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rcx, qword [rcx + 0x180]
cmp rcx, 0xffffffffffffffff
jne 0x1402159e7
mov rcx, qword [rdx + 0x18]
mov r12, qword [rdx + 0x10]
xor r13d, r13d
cmp rcx, r12
jge 0x140215b85
mov r8d, r13d
mov eax, dword [rdi + 0x170]
test eax, eax
je 0x140215a1f
mov rdx, qword [rdi + 0x178]
mov r9d, eax
nop
mov eax, dword [rdx]
add r8, rax
lea rdx, [rdx + 0x10]
sub r9, 1
jne 0x140215a10
sub r12, rcx
cmp r8, r12
cmovl r12, r8
test r12, r12
je 0x140215b85
lea rbx, [r12 + rcx]
mov r8d, dword [0x140349eb8]
mov rax, rcx
cqo
idiv r8
mov rax, rdx
mov qword [rsp + 0x38], rdx
sub rcx, rdx
add rax, r12
mov r8, rcx
shr r8, 0x20
mov qword [rsp + 0x20], rax
mov r9d, ecx
mov edx, 4
mov rcx, qword [r14 + 8]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rdx, rax
mov qword [rsp + 0x98], rax
test rax, rax
jne 0x140215aae
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi + 0x14c], eax
mov ecx, eax
call fcn.140220130
movsxd rcx, eax
mov qword [rdi + 0x88], rcx
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rsi, r13
mov r15d, r13d
cmp r15d, dword [rdi + 0x170]
jae 0x140215b3b
cmp rsi, r12
jae 0x140215b3b
mov ecx, r15d
shl rcx, 4
add rcx, qword [rdi + 0x178]
mov r14d, dword [rcx]
mov rax, r12
sub rax, rsi
cmp r14, rax
cmovae r14, rax
mov dword [rsp + 0x30], r13d
add rdx, rsi
add rdx, qword [rsp + 0x38]
mov r8, r14
mov rcx, qword [rcx + 8]
call fcn.140246390
nop
add rsi, r14
inc r15d
mov rdx, qword [rsp + 0x98]
jmp 0x140215ab4
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x140215a81
cmp qword [rdi + 0x180], 0xffffffffffffffff
jne 0x140215b6e
mov rdx, qword [rsp + 0x88]
mov qword [rdx + 0x18], rbx
mov ecx, dword [rsp + 0x90]
call fcn.140217980
mov qword [rdi + 0x88], r12
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov qword [rdi + 0x88], r13
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
Function at 0x140217e10
Capabilities:
Get system information on windows

Disassembly:
sub rsp, 0x58
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x48]
lea rcx, [0x140349e90]
mov dword [0x140349eb8], eax
call fcn.140220f90
test eax, eax
jne 0x140217e6d
lea rax, [0x1405d1ec8]
mov edx, 0x100
lea rcx, [0x140349ec0]
xor r8d, r8d
nop
mov qword [rax], rcx
add rcx, 0x2880
mov qword [rax - 8], r8
lea rax, [rax + 0x10]
sub rdx, 1
jne 0x140217e50
add rsp, 0x58
ret
lea rdx, str.uv_mutex_init
mov ecx, eax
call fcn.140220080
int3
Function at 0x140219d60
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x20], rbp
push rsi
push r12
push r14
sub rsp, 0x20
mov r12, r8
mov r14, rdx
mov rsi, rcx
test rcx, rcx
jne 0x140219d9a
xor ebp, ebp
test rdx, rdx
je 0x140219d86
mov qword [rdx], rbp
mov qword [r8], rbp
xor eax, eax
mov rbp, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop r12
pop rsi
ret
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x48], rdi
mov rdi, 0xffffffffffffffff
nop dword [rax + rax]
inc rdi
cmp word [rcx + rdi*2], 0
jne 0x140219db0
mov rbx, rdi
nop dword [rax]
test rbx, rbx
je 0x140219dd9
movzx eax, word [rcx + rbx*2 - 2]
dec rbx
cmp ax, 0x5c
je 0x140219dd9
cmp ax, 0x2f
jne 0x140219dc0
mov qword [rsp + 0x50], r15
test rbx, rbx
jne 0x140219e3f
test r14, r14
je 0x140219e31
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ebx, eax
test eax, eax
je 0x140219e2a
mov ecx, ebx
add rcx, rcx
call fcn.14020ea50
mov qword [r14], rax
test rax, rax
je 0x140219ec7
mov rdx, rax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x140219e31
mov rcx, qword [r14]
call fcn.14020e8a0
xor ebp, ebp
mov qword [r14], rbp
mov eax, 0xffffffff
jmp 0x140219ea9
mov rcx, rsi
call fcn.14025f1c8
mov qword [r12], rax
jmp 0x140219ea7
xor ebp, ebp
lea r15, [rbx + rbx]
test r14, r14
je 0x140219e73
lea rcx, [r15 + 4]
call fcn.14020ea50
mov qword [r14], rax
test rax, rax
je 0x140219ec7
lea r8, [rbx + 1]
mov rdx, rsi
mov rcx, rax
call fcn.14025cc9c
mov rax, qword [r14]
mov word [rax + r15 + 2], bp
sub rdi, rbx
lea rbx, [rdi + rdi]
mov rcx, rbx
call fcn.14020ea50
mov qword [r12], rax
test rax, rax
je 0x140219ec7
lea rdx, [rsi + 2]
mov rcx, rax
add rdx, r15
lea r8, [rdi - 1]
call fcn.14025cc9c
mov rax, qword [r12]
mov word [rbx + rax - 2], bp
xor eax, eax
mov r15, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop r12
pop rsi
ret
lea rdx, str.uv__malloc
mov ecx, 0xe
call fcn.140220080
int3

Function at 0x14021a1c0
Capabilities:
Resolve dns

Disassembly:
push rbx
sub rsp, 0x20
mov rdx, qword [rcx + 0x40]
lea r9, [rcx + 0x48]
mov r8, qword [r9]
mov rbx, rcx
mov rcx, qword [rcx + 0x38]
mov qword [r9], 0
call qword [sym.imp.WS2_32.dll_GetAddrInfoW]
mov ecx, eax
call fcn.14021a140
mov dword [rbx + 0x58], eax
add rsp, 0x20
pop rbx
ret

Function at 0x14021a6d0
Capabilities:
Set socket configuration

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
push rbx
sub rsp, 0x30
mov rbx, rdx
mov dword [rsp + 0x20], 4
mov rcx, rbx
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 8
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x14021a714
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
add rsp, 0x30
pop rbx
ret
cmp dword [rsp + 0x50], 0
je 0x14021a73f
mov edx, 6
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x58]
mov rcx, rbx
lea r8d, [rdx - 3]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x14021a708
xor eax, eax
add rsp, 0x30
pop rbx
ret
Function at 0x14021a750
Capabilities:
Set socket configuration

Disassembly:
mov dword [rsp + 0x18], r8d
sub rsp, 0x38
mov rcx, rdx
mov dword [rsp + 0x20], 4
mov edx, 6
lea r9, [rsp + 0x50]
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x14021a788
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
add rsp, 0x38
ret
xor eax, eax
add rsp, 0x38
ret

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

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
xor r9d, r9d
mov r11d, edx
mov rdi, rcx
mov r10d, r9d
mov ebx, r9d
cmp edx, 2
jb 0x14020e871
lea eax, [rdx - 2]
mov qword [rsp + 0x10], rsi
shr eax, 1
mov r8, rcx
inc eax
mov edx, eax
lea esi, [rax + rax]
lea rcx, [rax + rax]
mov eax, dword [r8]
lea r8, [r8 + 0x20]
add r9, rax
mov eax, dword [r8 - 0x10]
add r10, rax
sub rdx, 1
jne 0x14020e842
cmp esi, r11d
mov rsi, qword [rsp + 0x10]
jb 0x14020e880
lea rax, [r10 + r9]
add rax, rbx
mov rbx, qword [rsp + 0x18]
pop rdi
ret
test r11d, r11d
je 0x14020e886
mov rcx, r9
nop dword [rax]
add rcx, rcx
mov ebx, dword [rdi + rcx*8]
lea rax, [r10 + r9]
add rax, rbx
mov rbx, qword [rsp + 0x18]
pop rdi
ret
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
cmp dword [rcx + 0x100], 0
mov ebx, r8d
mov rdi, rdx
jbe 0x14020fec9
mov eax, 0xfffff008
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
lea r9, [rsp + 0x30]
call fcn.140212040
test eax, eax
je 0x14020feea
mov ecx, dword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.140220130
mov edx, ebx
mov rcx, rdi
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp 0x14020e810
mov eax, dword [rcx + 0x58]
test al, 1
je 0x140212dbd
mov eax, 0xfffff00d
ret
bt eax, 0xf
jb 0x140212dc9
mov eax, 0xfffff031
ret
mov eax, dword [rcx + 0x10]
cmp eax, 7
je 0x140212deb
cmp eax, 0xc
je 0x140212de6
cmp eax, 0xe
je 0x140212de1
mov eax, 0xfffff02a
ret
jmp 0x14020fea0
jmp 0x14021a790
mov eax, 0xfffff008
ret
sub rsp, 0x48
cmp dword [rcx + 0x100], 0
jbe 0x14021a7a7
mov eax, 0xfffff008
add rsp, 0x48
ret
mov rcx, qword [rcx + 0x110]
lea r9, [rsp + 0x50]
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], eax
call qword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x14021a7e0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140220130
add rsp, 0x48
ret
mov eax, dword [rsp + 0x50]
add rsp, 0x48
ret
Function at 0x14021a820
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rsi, rcx
mov rdi, r8
mov rcx, qword [r8 + 0x70]
mov rbx, rdx
cmp rcx, 0xffffffffffffffff
jne 0x14021a8a0
mov eax, dword [rdx + 0x58]
test al, 0x40
je 0x14021a918
mov edx, eax
and edx, 0xffffffbf
sub dword [rbx + 0x7c], 1
mov dword [rbx + 0x58], edx
jne 0x14021a875
test dl, 1
jne 0x14021a875
test al, 4
je 0x14021a875
and eax, 0xffffffbb
mov dword [rbx + 0x58], eax
test al, 8
je 0x14021a875
mov rax, qword [rbx + 8]
dec dword [rax + 8]
cmp qword [rbx + 0x100], 0
je 0x14021a918
mov ecx, dword [r8 + 0x40]
call fcn.140222300
mov ecx, eax
call fcn.140220130
mov edx, eax
mov rcx, rbx
call qword [rbx + 0x100]
jmp 0x14021a918
cmp dword [r8 + 0x40], 0
jl 0x14021a8f5
lea r9, [rdx + 0x110]
mov dword [rsp + 0x20], 8
mov edx, 0xffff
mov r8d, 0x700b
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x14021a8f5
mov rax, qword [rbx + 0x130]
mov qword [rdi + 0x1a8], rax
mov rax, qword [rbx + 0x100]
mov qword [rbx + 0x130], rdi
test rax, rax
je 0x14021a918
xor edx, edx
mov rcx, rbx
call rax
jmp 0x14021a918
mov rcx, qword [rdi + 0x70]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rdi + 0x70], 0xffffffffffffffff
test byte [rbx + 0x58], 0x40
je 0x14021a918
mov rdx, rdi
mov rcx, rbx
call fcn.14021b4d0
mov ecx, dword [rbx + 0x78]
mov eax, dword [rbx + 0x58]
dec ecx
mov dword [rbx + 0x78], ecx
test al, 1
je 0x14021a941
test ecx, ecx
jne 0x14021a941
test al, 0x20
jne 0x14021a941
or eax, 0x20
mov dword [rbx + 0x58], eax
mov rax, qword [rsi + 0x50]
mov qword [rbx + 0x50], rax
mov qword [rsi + 0x50], rbx
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x14021a960
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
sub dword [rdx + 0x7c], 1
mov rbp, r8
mov rbx, rdx
mov rdi, rcx
jne 0x14021a99f
mov eax, dword [rdx + 0x58]
test al, 1
jne 0x14021a99f
test al, 4
je 0x14021a99f
and eax, 0xfffffffb
mov dword [rdx + 0x58], eax
test al, 8
je 0x14021a99f
mov rax, qword [rdx + 8]
dec dword [rax + 8]
dec dword [rcx + 0x20]
xor edx, edx
mov eax, dword [rbx + 0x118]
mov esi, edx
test eax, eax
je 0x14021a9b8
mov dword [rbx + 0x118], edx
jmp 0x14021aa0c
mov ecx, dword [r8 + 0x40]
test ecx, ecx
js 0x14021aa07
test byte [rbx + 0x58], 1
je 0x14021a9cd
mov esi, 0x3e3
jmp 0x14021aa0e
mov rcx, qword [rbx + 0x110]
xor r9d, r9d
mov dword [rsp + 0x20], edx
mov r8d, 0x7010
mov edx, 0xffff
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x14021a9ff
or dword [rbx + 0x58], 0xc080
inc dword [rdi + 0xa8]
jmp 0x14021aa0e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x14021aa0c
call fcn.140222300
mov esi, eax
mov ecx, esi
call fcn.140220130
mov edx, eax
mov rcx, rbp
call qword [rbp + 0x70]
mov ecx, dword [rbx + 0x78]
mov eax, dword [rbx + 0x58]
dec ecx
mov dword [rbx + 0x78], ecx
test al, 1
je 0x14021aa46
test ecx, ecx
jne 0x14021aa46
test al, 0x20
jne 0x14021aa46
or eax, 0x20
mov dword [rbx + 0x58], eax
mov rax, qword [rdi + 0x50]
mov qword [rbx + 0x50], rax
mov qword [rdi + 0x50], rbx
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x14021b780
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x50
xorps xmm0, xmm0
lea rbx, [rdx + 0x80]
movups xmmword [rbx + 0x40], xmm0
lea r14, [rbx + 0x40]
xor ebp, ebp
movups xmmword [r14 + 0x10], xmm0
or dword [rdx + 0x58], 0x40000
lea rax, [0x1405d2ef0]
movups xmmword [r14], xmm0
mov rsi, rdx
mov rdi, rcx
movups xmmword [r14 + 0x10], xmm0
test dword [rdx + 0x58], 0x80000
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x40], ebp
je 0x14021b7e6
mov rax, qword [rbx + 0x70]
or rax, 1
mov qword [rbx + 0x58], rax
mov rcx, qword [rsi + 0x110]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], rbp
lea r9, [rsp + 0x78]
mov qword [rsp + 0x28], r14
lea rdx, [rsp + 0x40]
mov r8d, 1
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x70], ebp
call qword [sym.imp.WS2_32.dll_WSARecv]
mov ecx, dword [rsi + 0x58]
inc dword [rsi + 0x78]
bts ecx, 0x10
mov dword [rsi + 0x58], ecx
test eax, eax
jne 0x14021b864
bt ecx, 0x11
jae 0x14021b8c3
mov eax, dword [rsp + 0x78]
mov qword [rbx + 0x48], rax
mov qword [rbx + 0x68], rbp
mov rax, qword [rdi + 0x48]
test rax, rax
je 0x14021b8b9
mov rax, qword [rax + 0x68]
mov qword [rbx + 0x68], rax
mov rax, qword [rdi + 0x48]
mov qword [rax + 0x68], rbx
mov qword [rdi + 0x48], rbx
jmp 0x14021b92f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x14021b8c3
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jg 0x14021b883
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x14021b891
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
movzx eax, ax
or eax, 0x80070000
cdqe
mov qword [r14], rax
mov qword [rbx + 0x68], rbp
mov rax, qword [rdi + 0x48]
test rax, rax
je 0x14021b8b9
mov rax, qword [rax + 0x68]
mov qword [rbx + 0x68], rax
mov rax, qword [rdi + 0x48]
mov qword [rax + 0x68], rbx
mov qword [rdi + 0x48], rbx
jmp 0x14021b92f
mov qword [rbx + 0x68], rbx
mov qword [rdi + 0x48], rbx
jmp 0x14021b92f
test dword [rsi + 0x58], 0x80000
je 0x14021b92f
cmp qword [rbx + 0x78], 0xffffffffffffffff
lea rcx, [rbx + 0x78]
jne 0x14021b92f
mov rdx, qword [rbx + 0x70]
lea r8, [0x14021a540]
mov dword [rsp + 0x28], 4
mov r9, rbx
mov dword [rsp + 0x20], 0xffffffff
call qword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
jne 0x14021b92f
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x14021b911
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14021b91f
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx eax, ax
or eax, 0x80070000
cdqe
mov rdx, rbx
mov rcx, rdi
mov qword [r14], rax
call fcn.14021a7f0
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
Function at 0x14021ba00
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
cmp qword [rdx + 0x110], 0xffffffffffffffff
mov esi, r9d
mov rdi, r8
mov dword [rsp + 0x38], 1
mov rbx, rdx
mov rbp, rcx
je 0x14021ba3c
mov eax, 0xfffff00e
jmp 0x14021bb2b
lea r8, [rsp + 0x38]
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x14021ba5f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x14021bb2b
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
jne 0x14021ba7e
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14021bb2b
mov rdx, qword [rbp + 0x38]
xor r9d, r9d
mov r8, rdi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test rax, rax
jne 0x14021baa3
cmp dword [rsp + 0x50], eax
je 0x14021ba73
or dword [rbx + 0x58], 0x80000
mov ecx, dword [0x1405e13d4]
cmp esi, 0x17
mov eax, dword [rbx + 0x58]
cmove ecx, dword [0x1405e13d0]
bt eax, 0x13
jb 0x14021bad9
test ecx, ecx
jne 0x14021bad9
mov dl, 3
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFileCompletionNotificationModes]
test eax, eax
je 0x14021ba73
or dword [rbx + 0x58], 0x20000
mov eax, dword [rbx + 0x58]
bt eax, 0x18
jae 0x14021baf4
mov r8d, 1
mov rdx, rdi
mov rcx, rbx
call fcn.14021a750
test eax, eax
jne 0x14021bb2b
test dword [rbx + 0x58], 0x2000000
je 0x14021bb16
mov r9d, 0x3c
mov rdx, rdi
mov rcx, rbx
lea r8d, [r9 - 0x3b]
call fcn.14021a6d0
test eax, eax
jne 0x14021bb2b
mov qword [rbx + 0x110], rdi
cmp esi, 0x17
jne 0x14021bb29
or dword [rbx + 0x58], 0x400000
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x14021bb40
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, 0x30
cmp qword [rcx + 0x110], 0xffffffffffffffff
mov esi, r9d
mov r15d, r8d
mov rdi, rdx
mov rbx, rcx
jne 0x14021bbd8
test sil, 1
je 0x14021bb84
cmp word [rdx], 0x17
je 0x14021bb84
mov eax, 0x57
jmp 0x14021bc3c
movzx ecx, word [rdx]
xor r8d, r8d
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x14021bba8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x14021bc3c
movzx r9d, word [rdi]
mov r8, rbp
mov rcx, qword [rbx + 8]
mov rdx, rbx
mov dword [rsp + 0x20], 0
call fcn.14021ba00
mov r14d, eax
test eax, eax
je 0x14021bbd8
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, r14d
jmp 0x14021bc3c
cmp word [rdi], 0x17
jne 0x14021bc08
mov rcx, qword [rbx + 0x110]
lea r9, [rsp + 0x50]
mov edx, 0x29
mov dword [rsp + 0x20], 4
and esi, 1
mov dword [rsp + 0x50], esi
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbx + 0x110]
mov r8d, r15d
mov rdx, rdi
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x14021bc33
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2740
jne 0x14021bc3c
mov dword [rbx + 0x118], eax
or dword [rbx + 0x58], 0x2000
xor eax, eax
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret