joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180166ff0
Capabilities:
Send data
Send data on socket

Disassembly:
push rbp
push rdi
push r14
sub rsp, 0x40
xor r14d, r14d
mov rdi, rdx
mov rbp, rcx
cmp dword [rdx + 0xd8], r14d
jle 0x180167125
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x78], rsi
nop dword [rax]
mov rbx, qword [rdi + 0xe0]
cmp rbx, qword [rdi + 0xe8]
je 0x180167041
mov rax, qword [rbx + 0x48]
mov qword [rdi + 0xe0], rax
mov qword [rax + 0x50], r14
jmp 0x180167054
test rbx, rbx
je 0x180167067
mov qword [rdi + 0xe0], r14
mov qword [rdi + 0xe8], r14
test rbx, rbx
je 0x180167067
mov qword [rbx + 0x48], r14
mov qword [rbx + 0x50], r14
dec dword [rdi + 0xd8]
mov eax, dword [rbx + 0x30]
lea rdx, [rbx + 0x30]
sub dword [rdi + 0x58], eax
lock xadd dword [rdi + 0x5c], eax
mov rax, qword [rdi + 0xc8]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x68], r14d
mov qword [rbx + 0x58], rax
mov rcx, qword [rbx + 0x58]
mov dword [rbx + 0x28], 3
lea r9, [rsp + 0x68]
mov r8d, 1
mov qword [rsp + 0x28], rbx
mov esi, r14d
mov dword [rbx + 0x44], 2
mov dword [rsp + 0x20], r14d
call qword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x1801670c8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lock dec dword [rbx + 0x44]
je 0x1801670da
test esi, esi
je 0x180167103
cmp esi, 0x3e5
je 0x1801670ff
lea rcx, [rbp + 0x100]
mov rdx, rbx
call fcn.180126a20
test eax, eax
jne 0x1801670ff
mov rcx, qword [rbx + 0x20]
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
jne 0x180167110
cmp dword [rdi + 0xd8], r14d
jg 0x180167020
mov rbx, qword [rsp + 0x60]
mov eax, esi
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop rdi
pop rbp
ret
mov eax, r14d
add rsp, 0x40
pop r14
pop rdi
pop rbp
ret
Function at 0x180167140
Capabilities:
Get file size

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xd0
mov qword [rbp - 0x21], 0xfffffffffffffffe
mov qword [rsp + 0x128], rbx
mov rax, qword [0x1802658e0]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r15, r9
mov r10, r8
mov qword [rbp - 0x69], rdx
mov qword [rbp - 0x61], rcx
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x59], xmm0
xor edi, edi
mov r14d, edi
mov qword [rbp - 0x49], rdi
mov r12d, edi
mov qword [rbp - 0x39], rdi
test r9, r9
je 0x1801671a6
mov eax, dword [r9]
jmp 0x1801671a8
mov eax, edi
mov rsi, qword [rbp + 0x7f]
test rsi, rsi
je 0x1801671b5
mov ecx, dword [rsi]
jmp 0x1801671b7
mov ecx, edi
mov r13d, 0x3fffff
sub r13d, ecx
sub r13d, eax
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x18016720a
call fcn.180144c30
mov ecx, eax
mov rbx, qword [rbp - 0x59]
test eax, eax
jns 0x18016720e
jmp 0x1801672c0
mov qword [rbp - 0x59], rax
lea rdx, [rbp - 0x6d]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp - 0x71], eax
cmp eax, 0xffffffff
jne 0x18016722e
call fcn.180144c30
mov ecx, eax
test eax, eax
js 0x180167255
mov rax, qword [rbp - 0x71]
test rax, rax
je 0x1801672b0
mov ecx, r13d
cmp rax, rcx
ja 0x1801672b0
mov rdx, rbx
lea rcx, [rbp - 0x49]
call fcn.18015d1f0
mov ecx, eax
mov r12, qword [rbp - 0x39]
mov r14, qword [rbp - 0x49]
test ecx, ecx
js 0x1801672c0
mov eax, dword [rbp - 0x41]
mov dword [rbp - 9], eax
mov qword [rbp - 1], r14
test r15, r15
je 0x180167272
movups xmm0, xmmword [r15]
movups xmmword [rbp - 0x19], xmm0
jmp 0x18016727c
xor eax, eax
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x11], rax
test rsi, rsi
je 0x18016728a
movups xmm0, xmmword [rsi]
movups xmmword [rbp + 7], xmm0
jmp 0x180167294
xor eax, eax
mov qword [rbp + 7], rax
mov qword [rbp + 0xf], rax
mov rcx, qword [rbp - 0x61]
mov rax, qword [rcx]
mov r9d, 3
lea r8, [rbp - 0x19]
mov rdx, qword [rbp - 0x69]
call qword [rax + reloc.WS2_32.dll_recv]
mov esi, eax
jmp 0x1801672cb
mov ecx, 0x800700df
mov edx, 0x800703ee
test rax, rax
cmove ecx, edx
movzx ecx, cx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, edi
test r14, r14
je 0x1801672e4
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x1801672e4
call fcn.180144c30
mov edi, eax
test r12, r12
je 0x180167300
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x180167300
test edi, edi
js 0x180167300
call fcn.180144c30
nop
test rbx, rbx
je 0x18016730e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.180179370
mov rbx, qword [rsp + 0x128]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x180168940
Capabilities:
Connect socket

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rdx
mov rbx, rcx
test r8d, r8d
je 0x1801689c0
mov rdx, qword [rcx + 0x30]
mov rcx, qword [rcx + 0x28]
mov r8d, 0x30
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x180168a3a
cmp word [rdi], 2
mov rcx, qword [rbx + 0x28]
mov eax, reloc.WS2_32.dll_recv
mov r8d, 0x1c
mov rdx, rdi
cmove r8d, eax
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x1801689b0
cmp eax, 0xffffffff
jne 0x180168a3a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x180168a3a
mov eax, 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
cmp word [rdx], 2
mov rcx, qword [rcx + 0x28]
mov eax, reloc.WS2_32.dll_recv
mov r8d, 0x1c
cmove r8d, eax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x180168a3a
mov rdx, qword [rbx + 0x30]
mov rcx, qword [rbx + 0x28]
mov r8d, 0x23
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x180168a3a
mov dword [rbx + 0x68], 1
xor ecx, ecx
mov dword [rbx + 0x6c], 1
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x160]
cmp eax, 2
jne 0x1801689b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
test eax, eax
cmove eax, ecx
mov ecx, eax
call qword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x180168e70
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov eax, dword [rcx + 0x20c]
mov rbx, rcx
test eax, eax
jne 0x180168f5e
nop dword [rax + rax]
mov r8d, dword [rbx + 0x44]
mov rdx, qword [rbx + 0x80]
mov rcx, qword [rbx + 0x28]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test eax, eax
jle 0x180168f07
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r9, qword [rbx]
mov rdx, qword [rbx + 0x80]
mov r8d, edi
mov rcx, rbx
call qword [r9 + 0x180]
cmp eax, 2
jne 0x180168f10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
test eax, eax
cmove eax, ecx
mov dword [rbx + 0x18], 1
mov dword [rbx + 0x1c], 4
mov dword [rbx + 0x20], eax
mov dword [rbx + 0x24], 1
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
cmp eax, 0xffffffff
je 0x180168f51
test eax, eax
je 0x180168f2e
mov eax, dword [rbx + 0x20c]
test eax, eax
je 0x180168e90
mov eax, 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov dword [rbx + 0x18], 1
mov qword [rbx + 0x1c], 5
mov dword [rbx + 0x24], 1
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x180168ee2
mov eax, 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x180169240
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
mov eax, dword [rdx + 0x30]
mov r14, r8
mov rdi, rdx
mov rsi, rcx
cmp eax, dword [rdx + 0x28]
je 0x1801692f8
nop
mov r8d, dword [rsi + 0x44]
mov eax, dword [rdi + 0x30]
mov rdx, qword [rdi + 0x28]
sub eax, dword [rdi + 0x28]
mov rcx, qword [rsi + 0x28]
cmp eax, r8d
cmovl r8d, eax
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
mov ebp, eax
test eax, eax
jle 0x1801692e7
lea rcx, [rsi + 0x1a8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub dword [rsi + 0x208], ebp
lea rcx, [rsi + 0x1a8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsi]
mov rdx, qword [rdi + 0x28]
mov r8d, ebp
mov rcx, rsi
call qword [rax + 0x170]
mov eax, dword [rdi + 0x30]
sub eax, dword [rdi + 0x28]
cmp eax, ebp
cmovl ebp, eax
movsxd rax, ebp
add qword [rdi + 0x28], rax
jmp 0x1801692ec
cmp eax, 0xffffffff
je 0x180169318
mov eax, dword [rdi + 0x30]
cmp eax, dword [rdi + 0x28]
jne 0x180169270
mov eax, 1
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x18016932e
mov dword [r14], 1
jmp 0x1801692f8
mov dword [rsi + 0x20], eax
mov dword [rsi + 0x18], 1
mov dword [rsi + 0x1c], 3
xor eax, eax
mov dword [rsi + 0x24], 1
jmp 0x1801692fd
Function at 0x180169880
Capabilities:
Get file size

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xd0
mov qword [rbp - 0x21], 0xfffffffffffffffe
mov qword [rsp + 0x120], rbx
mov rax, qword [0x1802658e0]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rsi, r9
mov r15, r8
mov r10, rdx
mov qword [rbp - 0x61], rcx
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x59], xmm0
xor edi, edi
mov r14d, edi
mov qword [rbp - 0x49], rdi
mov r12d, edi
mov qword [rbp - 0x39], rdi
test r8, r8
je 0x1801698e5
mov ecx, dword [r8]
jmp 0x1801698e7
mov ecx, edi
test r9, r9
je 0x1801698f1
mov eax, dword [r9]
jmp 0x1801698f3
mov eax, edi
mov r13d, 0x3fffff
sub r13d, eax
sub r13d, ecx
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x180169946
call fcn.180144c30
mov ecx, eax
mov rbx, qword [rbp - 0x59]
test eax, eax
jns 0x18016994a
jmp 0x1801699f8
mov qword [rbp - 0x59], rax
lea rdx, [rbp - 0x65]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rbp - 0x69], eax
cmp eax, 0xffffffff
jne 0x18016996a
call fcn.180144c30
mov ecx, eax
test eax, eax
js 0x180169991
mov rax, qword [rbp - 0x69]
test rax, rax
je 0x1801699e8
mov ecx, r13d
cmp rax, rcx
ja 0x1801699e8
mov rdx, rbx
lea rcx, [rbp - 0x49]
call fcn.18015d1f0
mov ecx, eax
mov r12, qword [rbp - 0x39]
mov r14, qword [rbp - 0x49]
test ecx, ecx
js 0x1801699f8
mov eax, dword [rbp - 0x41]
mov dword [rbp - 9], eax
mov qword [rbp - 1], r14
test r15, r15
je 0x1801699ae
movups xmm0, xmmword [r15]
movups xmmword [rbp - 0x19], xmm0
jmp 0x1801699b8
xor eax, eax
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x11], rax
test rsi, rsi
je 0x1801699c6
movups xmm0, xmmword [rsi]
movups xmmword [rbp + 7], xmm0
jmp 0x1801699d0
xor eax, eax
mov qword [rbp + 7], rax
mov qword [rbp + 0xf], rax
mov rcx, qword [rbp - 0x61]
mov rax, qword [rcx]
mov r8d, 3
lea rdx, [rbp - 0x19]
call qword [rax + 0x18]
mov esi, eax
jmp 0x180169a03
mov ecx, 0x800700df
mov edx, 0x800703ee
test rax, rax
cmove ecx, edx
movzx ecx, cx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, edi
test r14, r14
je 0x180169a1c
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x180169a1c
call fcn.180144c30
mov edi, eax
test r12, r12
je 0x180169a38
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x180169a38
test edi, edi
js 0x180169a38
call fcn.180144c30
nop
test rbx, rbx
je 0x180169a46
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.180179370
mov rbx, qword [rsp + 0x120]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x18016a180
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x50
xor ebp, ebp
movzx esi, r8w
mov rdi, rdx
mov rbx, rcx
test rdx, rdx
je 0x18016a1ae
cmp word [rdx], bp
jne 0x18016a1b5
lea rdi, str.0.0.0.0
mov rcx, rdi
mov word [rsp + 0x30], bp
call fcn.18015d2e0
mov r15d, reloc.WS2_32.dll_recv
mov word [rsp + 0x30], ax
lea r14d, [r15 + 0xc]
cmp ax, 2
je 0x18016a221
cmp ax, 0x17
je 0x18016a21c
mov ecx, 0x2741
call qword [sym.imp.WS2_32.dll_WSASetLastError]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx + 0x8c], 3
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r11, [rsp + 0x50]
mov eax, ebp
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
mov ecx, r14d
jmp 0x18016a224
mov ecx, r15d
movzx edx, ax
lea rax, [rsp + 0x78]
mov dword [rsp + 0x78], ecx
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_WSAStringToAddressW]
test eax, eax
jne 0x18016a1e8
test si, si
je 0x18016a25d
movzx ecx, si
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x32], ax
movzx eax, word [rsp + 0x30]
mov edx, 1
lea r8d, [rdx + 5]
mov ecx, eax
mov word [rbx + 0x68], ax
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbx + 0x78], rax
cmp rax, 0xffffffffffffffff
je 0x18016a1e8
mov r8d, dword [rbx + 0x3c]
test r8d, r8d
je 0x18016a298
mov edx, 1
cmp dword [rbx + 0x40], ebp
ja 0x18016a29a
mov edx, ebp
mov r9d, dword [rbx + 0x40]
mov rcx, rax
call fcn.18015dfa0
test eax, eax
jne 0x18016a3b4
mov edx, dword [rbx + 8]
mov rcx, qword [rbx + 0x78]
call fcn.18015e030
test eax, eax
jne 0x18016a3bf
mov rcx, qword [rbx + 0x78]
lea r8, [rsp + 0x78]
mov edx, 0x8004667e
mov dword [rsp + 0x78], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x18016a3ca
cmp word [rsp + 0x30], 2
mov rcx, qword [rbx + 0x78]
lea rdx, [rsp + 0x30]
cmove r14d, r15d
mov r8d, r14d
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x18016a39f
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rbx]
mov rdx, qword [rbx + 0x78]
mov rcx, rbx
call qword [rax + 0x248]
cmp eax, 2
je 0x18016a380
mov edx, dword [rbx + 0x1c]
mov rcx, qword [rbx + 0x78]
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x18016a36b
mov rcx, qword [rbx + 0x78]
call fcn.18015dda0
mov rcx, qword [rbx + 0x78]
mov qword [rbx + 0x50], rax
call fcn.18015de20
mov rcx, qword [rbx + 0x78]
mov qword [rbx + 0x58], rax
call fcn.18015df20
mov ebp, 1
mov qword [rbx + 0x60], rax
jmp 0x18016a200
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx + 0x8c], 6
jmp 0x18016a1f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
mov dword [rbx + 0x8c], 5
test eax, eax
cmove eax, ecx
jmp 0x18016a1f8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx + 0x8c], 4
jmp 0x18016a1f8
mov ecx, 0x80004005
call fcn.180127e80
int3
mov ecx, 0x80004005
call fcn.180127e80
int3
mov ecx, 0x80004005
call fcn.180127e80
int3
Function at 0x18016a3e0
Capabilities:
Create thread

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
xor r14d, r14d
mov rbp, rcx
mov esi, r14d
cmp dword [rcx + 0x18], r14d
jbe 0x18016a4ee
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rdi
nop word [rax + rax]
lea r8, [0x18016b9b0]
mov r9, rbp
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r14d
call fcn.18017b9a4
mov rdi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x18016a4d1
lea rbx, [rbp + 0x90]
lea rcx, [rsp + 0x50]
mov rax, qword [rbx + 8]
cmp rcx, rax
jae 0x18016a48f
mov rcx, qword [rbx]
lea rdx, [rsp + 0x50]
cmp rcx, rdx
ja 0x18016a48f
lea rdi, [rsp + 0x50]
sub rdi, rcx
sar rdi, 3
cmp rax, qword [rbx + 0x10]
jne 0x18016a47a
mov rcx, rbx
call fcn.180162910
mov rdx, qword [rbx + 8]
test rdx, rdx
je 0x18016a4a9
mov rax, qword [rbx]
mov rcx, qword [rax + rdi*8]
mov qword [rdx], rcx
jmp 0x18016a4a9
cmp rax, qword [rbx + 0x10]
jne 0x18016a49d
mov rcx, rbx
call fcn.180162910
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x18016a4a9
mov qword [rcx], rdi
add qword [rbx + 8], 8
inc esi
cmp esi, dword [rbp + 0x18]
jb 0x18016a410
mov eax, 1
mov rbx, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 0x8c], 8
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, r14d
jmp 0x18016a4be
mov eax, 1
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret

Function at 0x18016ae00
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov r11, qword [rcx + 0x1d0]
mov rbx, r9
mov rdi, r8
test r11, r11
je 0x18016ae7f
mov r10d, dword [rcx + 0x1c8]
mov rcx, qword [rcx + 0x210]
lea rax, [rdx - 1]
xor edx, edx
div r10
movzx r8d, byte [rcx + rdx]
cmp rax, r8
jne 0x18016ae7f
mov rcx, qword [r11 + rdx*8]
xor eax, eax
cmp rcx, 0xf
seta al
cmp eax, 1
jne 0x18016ae7f
test rcx, rcx
je 0x18016ae7f
cmp dword [rcx + 0x48], 0
je 0x18016ae7f
mov r9, qword [rsp + 0x60]
mov rcx, qword [rcx + 0xc8]
mov r8, rbx
mov rdx, rdi
mov dword [rsp + 0x60], eax
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
jmp fcn.18015dcb0
xor eax, eax
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x18016be10
Capabilities:
Set socket configuration

Disassembly:
push rbp
push rsi
push r12
sub rsp, 0x70
mov rsi, rcx
mov rcx, qword [rcx + 0x80]
mov rbp, r8
mov r12, rdx
xor r9d, r9d
xor r8d, r8d
mov edx, 0xfffffff1
call qword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
je 0x18016c015
cmp word [rsi + 0x68], 2
mov ecx, reloc.WS2_32.dll_recv
lea rax, [rsp + 0x90]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x48]
mov r8d, 0x1c
mov qword [rsp + 0x30], rax
cmove r8d, ecx
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x28], rax
add r8d, ecx
mov rcx, qword [rbp + 0x38]
lea rax, [rsp + 0x50]
mov r9d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x68], r14
call qword [rsi + 0x58]
mov rax, qword [rsi]
mov r14, qword [rbp + 0x58]
mov rcx, rsi
mov qword [rsp + 0x40], 0
call qword [rax + 0x58]
test eax, eax
je 0x18016bfcb
lea rcx, [rsi + 0x1c8]
lea r8, [rsp + 0x40]
call fcn.180167b00
test eax, eax
je 0x18016bfcb
mov rdx, qword [rsp + 0x40]
mov qword [rsp + 0x98], rbx
mov r8, r14
mov rcx, rsi
mov qword [rsp + 0xa0], rdi
mov qword [rsp + 0x60], r15
call fcn.18016a960
mov r15, rax
lea rcx, [rax + 0x70]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r9, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x40]
mov r8, r15
mov rcx, rsi
call fcn.18016abd0
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 0x700b
mov rcx, r14
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x20], 8
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rdx, qword [rsi + 0x80]
xor r9d, r9d
mov r8, r15
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsi]
mov rdx, r15
mov rcx, rsi
call qword [rax + 0x250]
lea rcx, [r15 + 0x70]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdi, qword [rsp + 0xa0]
cmp ebx, 2
mov rbx, qword [rsp + 0x98]
mov rdx, r15
mov rcx, rsi
je 0x18016bfab
mov r8, rbp
call fcn.18016c2f0
mov r15, qword [rsp + 0x60]
mov r14, qword [rsp + 0x68]
add rsp, 0x70
pop r12
pop rsi
pop rbp
ret
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 0
call fcn.18016ab10
mov rdx, rbp
mov rcx, rsi
call fcn.18016aca0
jmp 0x18016bf98
mov edx, 2
mov rcx, r14
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
lea rcx, [rsi + 0xf8]
mov rdx, rbp
call fcn.180126a20
test eax, eax
jne 0x18016bf9d
mov rcx, qword [rbp + 0x20]
mov r8, rbp
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r14, qword [rsp + 0x68]
add rsp, 0x70
pop r12
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.180127e80
int3
Function at 0x18016c820
Capabilities:
Send data
Send data on socket

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rdx
push r12
push r14
push r15
sub rsp, 0x70
xor eax, eax
mov r14d, r9d
mov r12, r8
mov r15, rcx
test r9d, r9d
jle 0x18016c983
mov qword [r11 + 8], rbx
mov qword [r11 - 0x20], rbp
mov qword [r11 - 0x28], rsi
mov qword [r11 - 0x30], rdi
lea rax, [rcx + 0xc8]
mov qword [r11 - 0x38], r13
mov ebx, dword [r15 + 0x24]
mov rcx, rax
cmp r14d, ebx
cmovl ebx, r14d
mov ebp, ebx
call fcn.180167540
mov rsi, rax
test ebx, ebx
jns 0x18016c880
mov ebp, dword [r15 + 0x24]
mov rcx, qword [rax + 0x38]
movsxd r13, ebx
mov rdx, r12
mov r8, r13
mov dword [rax + 0x30], ebp
call fcn.18017dd20
mov rcx, qword [rsp + 0x98]
mov eax, ebx
lock xadd dword [rcx + 0x58], eax
mov rax, qword [rcx + 0xc8]
xor edx, edx
mov dword [rsi + 0x28], 3
mov qword [rsp + 0x30], rdx
mov qword [rsi + 0x58], rax
mov rcx, qword [rsi + 0x58]
mov dword [rsp + 0xa8], edx
mov ebp, edx
lea r8d, [rdx + 1]
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], edx
lea r9, [rsp + 0xa8]
lea rdx, [rsi + 0x30]
mov dword [rsi + 0x44], 2
call qword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x18016c8fd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x3e5
mov eax, 0
cmove ebp, eax
lock dec dword [rsi + 0x44]
je 0x18016c915
test ebp, ebp
je 0x18016c93e
lea rcx, [r15 + 0xf8]
mov rdx, rsi
call fcn.180126a20
test eax, eax
jne 0x18016c93a
mov rcx, qword [rsi + 0x20]
mov r8, rsi
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
test ebp, ebp
jne 0x18016c956
sub r14d, ebx
add r12, r13
lea rax, [r15 + 0xc8]
test r14d, r14d
jg 0x18016c860
jmp 0x18016c965
neg ebx
mov rdx, qword [rsp + 0x98]
lock xadd dword [rdx + 0x58], ebx
mov rdi, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x90]
mov r13, qword [rsp + 0x50]
mov eax, ebp
mov rbp, qword [rsp + 0x68]
add rsp, 0x70
pop r15
pop r14
pop r12
ret
Function at 0x18016cc70
Capabilities:
Send data
Send data on socket

Disassembly:
push rbp
push rdi
push r14
sub rsp, 0x40
xor r14d, r14d
mov rdi, rdx
mov rbp, rcx
cmp dword [rdx + 0xd8], r14d
jle 0x18016cda5
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x78], rsi
nop dword [rax]
mov rbx, qword [rdi + 0xe0]
cmp rbx, qword [rdi + 0xe8]
je 0x18016ccc1
mov rax, qword [rbx + 0x48]
mov qword [rdi + 0xe0], rax
mov qword [rax + 0x50], r14
jmp 0x18016ccd4
test rbx, rbx
je 0x18016cce7
mov qword [rdi + 0xe0], r14
mov qword [rdi + 0xe8], r14
test rbx, rbx
je 0x18016cce7
mov qword [rbx + 0x48], r14
mov qword [rbx + 0x50], r14
dec dword [rdi + 0xd8]
mov eax, dword [rbx + 0x30]
lea rdx, [rbx + 0x30]
sub dword [rdi + 0x58], eax
lock xadd dword [rdi + 0x5c], eax
mov rax, qword [rdi + 0xc8]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x68], r14d
mov qword [rbx + 0x58], rax
mov rcx, qword [rbx + 0x58]
mov dword [rbx + 0x28], 3
lea r9, [rsp + 0x68]
mov r8d, 1
mov qword [rsp + 0x28], rbx
mov esi, r14d
mov dword [rbx + 0x44], 2
mov dword [rsp + 0x20], r14d
call qword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x18016cd48
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lock dec dword [rbx + 0x44]
je 0x18016cd5a
test esi, esi
je 0x18016cd83
cmp esi, 0x3e5
je 0x18016cd7f
lea rcx, [rbp + 0xf8]
mov rdx, rbx
call fcn.180126a20
test eax, eax
jne 0x18016cd7f
mov rcx, qword [rbx + 0x20]
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
jne 0x18016cd90
cmp dword [rdi + 0xd8], r14d
jg 0x18016cca0
mov rbx, qword [rsp + 0x60]
mov eax, esi
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r14
pop rdi
pop rbp
ret
mov eax, r14d
add rsp, 0x40
pop r14
pop rdi
pop rbp
ret