joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140004a10
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rsi, qword [rcx + 0x20]
sub rsi, qword [rcx + 0x18]
mov eax, dword [rcx + 0x44]
mov rdi, qword [rcx]
movsx ebp, byte [rcx + 0x40]
shr rsi, 4
imul rsi, rax
mov rcx, qword [rdi + 0x18]
mov rbx, qword [rdi + 0x10]
sub rbx, rcx
cmp rsi, rbx
jbe 0x140004a9b
nop
mov r8, rbx
mov edx, ebp
call fcn.14018b3d0
mov rcx, qword [rdi + 0x18]
mov rax, qword [rdi + 8]
add rcx, rbx
mov qword [rdi + 0x18], rcx
cmp rcx, rax
je 0x140004a8c
mov r9, qword [rdi]
sub rcx, rax
mov r8, rcx
mov edx, 1
mov rcx, rax
call fcn.140191600
mov rcx, qword [rdi + 8]
mov qword [rdi + 0x18], rcx
sub rsi, rbx
mov rbx, qword [rdi + 0x10]
sub rbx, rcx
cmp rsi, rbx
ja 0x140004a50
test rsi, rsi
je 0x140004aae
mov r8, rsi
mov edx, ebp
call fcn.14018b3d0
add qword [rdi + 0x18], rsi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140005310
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [rcx + 0x20]
mov rbx, rcx
cmp rax, qword [rcx + 0x18]
jae 0x140005330
inc rax
mov qword [rcx + 0x20], rax
add rsp, 0x20
pop rbx
ret
cmp byte [rcx + 0x38], 0
jne 0x14000537c
mov rax, qword [rcx + 0x28]
mov edx, 1
add qword [rcx + 0x30], rax
mov r9, qword [rcx]
mov r8, qword [rcx + 0x10]
mov rcx, qword [rcx + 8]
call fcn.1401929a8
mov rdx, qword [rbx + 8]
mov qword [rbx + 0x28], rax
mov qword [rbx + 0x20], rdx
lea rcx, [rdx - 1]
add rcx, rax
mov qword [rbx + 0x18], rcx
cmp rax, qword [rbx + 0x10]
jae 0x14000537c
mov byte [rdx + rax], 0
inc qword [rbx + 0x18]
mov byte [rbx + 0x38], 1
add rsp, 0x20
pop rbx
ret
Function at 0x140049b50
Capabilities:
Log keystrokes
Manipulate console buffer

Disassembly:
push rbx
sub rsp, 0x90
mov rax, qword [0x14028a3e8]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov rbx, rcx
mov ecx, dword [rcx + 0x58]
btr ecx, 0xc
mov eax, ecx
sub dword [rbx + 0x7c], 1
mov dword [rbx + 0x58], ecx
jne 0x140049b9b
test cl, 1
jne 0x140049b9b
test cl, 4
je 0x140049b9b
and eax, 0xfffffffb
mov dword [rbx + 0x58], eax
test al, 8
je 0x140049b9b
mov rax, qword [rbx + 8]
dec dword [rax + 8]
mov eax, dword [rbx + 0x58]
mov qword [rsp + 0xb0], rsi
mov qword [rsp + 0x88], rdi
bt eax, 0x10
jae 0x140049d3c
bt eax, 0x19
jae 0x140049bf9
mov rcx, qword [rbx + 0x110]
lea r9, [rsp + 0x40]
xor eax, eax
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x70], eax
lea r8d, [rax + 1]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleInputW]
test eax, eax
jne 0x140049d3c
call qword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x140049d3e
bt eax, 0x15
jb 0x140049d3c
mov rcx, qword [0x140296af0]
mov edx, 0xffffffff
xor edi, edi
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x140049d64
mov eax, 2
xchg dword [0x140296acc], eax
cmp eax, 1
je 0x140049c4f
mov rcx, qword [0x140296af0]
lea edx, [rdi + 1]
xor r8d, r8d
call qword [sym.imp.KERNEL32.DLL_ReleaseSemaphore]
test eax, eax
je 0x140049d64
jmp 0x140049d35
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0xa8], rbp
lea rcx, str.conout_
mov dword [rsp + 0x28], 0x80
mov edx, 0xc0000000
mov qword [rsp + 0x80], r14
lea r8d, [r9 + 3]
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.DLL_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x140049cb2
lea rdx, [0x140296ad0]
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140049cb2
lock or dword [0x140296ae8], 1
mov esi, 1
mov dword [rsp + 0x50], 0xd0001
mov r14d, reloc.WS2_32.dll_listen
mov word [rsp + 0x48], si
mov ecx, r14d
mov dword [rsp + 0x4c], esi
xor edx, edx
call qword [sym.imp.USER32.dll_MapVirtualKeyW]
mov rcx, qword [rbx + 0x110]
lea r9, [rsp + 0x44]
mov r8d, esi
mov word [rsp + 0x54], ax
lea rdx, [rsp + 0x48]
mov word [rsp + 0x56], r14w
mov dword [rsp + 0x58], edi
call qword [sym.imp.KERNEL32.DLL_WriteConsoleInputW]
mov r14, qword [rsp + 0x80]
test eax, eax
jne 0x140049d16
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
cmp rbp, 0xffffffffffffffff
je 0x140049d25
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov rbp, qword [rsp + 0xa8]
test edi, edi
je 0x140049d35
mov eax, edi
jmp 0x140049d3e
or dword [rbx + 0x58], 0x200000
xor eax, eax
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140189130
add rsp, 0x90
pop rbx
ret
call fcn.14019c3b8
int3
Function at 0x140049dc0
Capabilities:
Manipulate console buffer

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x60
mov rax, qword [0x14028a3e8]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov r14, qword [rsp + 0xb8]
mov esi, r9d
movzx ebp, r8b
mov edi, edx
mov rbx, rcx
cmp dword [r14], 0
je 0x140049dfe
mov eax, 0xffffffff
jmp 0x140049f27
mov qword [rsp + 0x58], r12
xor r12d, r12d
mov qword [rsp + 0x50], r15
movzx r15d, byte [rsp + 0xb0]
mov rcx, qword [rbx + 0x110]
lea rdx, [rsp + 0x28]
call qword [sym.imp.KERNEL32.DLL_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x140049e33
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [r14], eax
movsx eax, word [rsp + 0x34]
mov edx, edi
movsx r8d, word [rsp + 0x38]
movsx r11d, word [rsp + 0x28]
sub r8d, eax
mov eax, dword [0x14028b68c]
inc r8d
movsx r9d, word [rsp + 0x2e]
mov dword [0x14028b7d0], r11d
mov dword [0x14028b7c0], r8d
cmp eax, 0xffffffff
jne 0x140049e70
mov eax, r9d
jmp 0x140049e7d
mov ecx, r9d
sub ecx, r8d
inc ecx
cmp eax, ecx
cmovl eax, ecx
movsx r10d, word [rsp + 0x2a]
lea ecx, [r8 + rax]
cmp ecx, r10d
jle 0x140049e92
mov eax, r10d
sub eax, r8d
test eax, eax
lea ecx, [r9 + rsi]
cmovs eax, r12d
mov dword [0x14028b68c], eax
test r15b, r15b
jne 0x140049eaa
lea ecx, [rax + rsi]
cmp ecx, eax
jge 0x140049eb2
mov ecx, eax
jmp 0x140049ebf
lea r9d, [r8 + rax]
cmp ecx, r9d
jl 0x140049ebf
lea ecx, [r9 - 1]
test bpl, bpl
je 0x140049ecb
movsx edx, word [rsp + 0x2c]
add edx, edi
test edx, edx
jns 0x140049ed4
mov edx, r12d
jmp 0x140049edd
cmp edx, r11d
jl 0x140049edd
lea edx, [r11 - 1]
mov word [rsp + 0x22], cx
mov rcx, qword [rbx + 0x110]
mov word [rsp + 0x20], dx
mov edx, dword [rsp + 0x20]
call qword [sym.imp.KERNEL32.DLL_SetConsoleCursorPosition]
test eax, eax
jne 0x140049f1b
call qword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x57
je 0x140049e14
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [r14], eax
mov eax, 0xffffffff
jmp 0x140049f1d
xor eax, eax
mov r12, qword [rsp + 0x58]
mov r15, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140189130
add rsp, 0x60
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x14004ef70
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 0x14004efaa
xor ebp, ebp
test rdx, rdx
je 0x14004ef96
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 0x14004efc0
mov rbx, rdi
nop dword [rax]
test rbx, rbx
je 0x14004efe9
movzx eax, word [rcx + rbx*2 - 2]
dec rbx
cmp ax, 0x5c
je 0x14004efe9
cmp ax, 0x2f
jne 0x14004efd0
mov qword [rsp + 0x50], r15
test rbx, rbx
jne 0x14004f041
test r14, r14
je 0x14004f033
mov ecx, 0x20a
call qword [fcn.140192c64]
mov qword [r14], rax
test rax, rax
je 0x14004f0cb
mov rdx, rax
mov ecx, 0x104
call qword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryW]
test eax, eax
jne 0x14004f033
mov rcx, qword [r14]
call fcn.140045ce0
xor ebp, ebp
lea eax, [rbx - 1]
mov qword [r14], rbp
jmp 0x14004f0ad
mov rcx, rsi
call fcn.1401a04a8
mov qword [r12], rax
jmp 0x14004f0ab
xor ebp, ebp
lea r15, [rbx + rbx]
test r14, r14
je 0x14004f076
lea rcx, [r15 + 4]
call qword [fcn.140192c64]
mov qword [r14], rax
test rax, rax
je 0x14004f0cb
lea r8, [rbx + 1]
mov rdx, rsi
mov rcx, rax
call fcn.14019d74c
mov rax, qword [r14]
mov word [rax + r15 + 2], bp
sub rdi, rbx
lea rbx, [rdi + rdi]
mov rcx, rbx
call qword [fcn.140192c64]
mov qword [r12], rax
test rax, rax
je 0x14004f0cb
lea rdx, [rsi + 2]
mov rcx, rax
add rdx, r15
lea r8, [rdi - 1]
call fcn.14019d74c
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, recv
call fcn.140053360
int3
Function at 0x1400501b0
Capabilities:
Send data
Send data on socket

Disassembly:
mov dword [rsp + 0x18], r8d
push rbx
sub rsp, 0x40
mov eax, dword [rcx + 0x58]
mov rbx, rdx
test al, 1
je 0x1400501cf
mov eax, 0xfffff00d
add rsp, 0x40
pop rbx
ret
bt eax, 0xf
jb 0x1400501e0
mov eax, 0xfffff031
add rsp, 0x40
pop rbx
ret
mov eax, dword [rcx + 0x10]
cmp eax, 7
je 0x14005027e
cmp eax, 0xc
je 0x14005022e
cmp eax, 0xe
je 0x140050201
mov eax, 0xfffff02a
add rsp, 0x40
pop rbx
ret
cmp dword [rcx + 0x100], 0
ja 0x14005027e
lea r9, [rsp + 0x60]
call fcn.14004a800
test eax, eax
je 0x140050226
mov ecx, dword [rsp + 0x60]
add rsp, 0x40
pop rbx
jmp fcn.140053410
mov eax, dword [rbx]
add rsp, 0x40
pop rbx
ret
cmp dword [rcx + 0x100], 0
ja 0x14005027e
mov rcx, qword [rcx + 0x110]
lea r9, [rsp + 0x60]
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], eax
lea r8d, [rax + 1]
call qword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x140050274
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
add rsp, 0x40
pop rbx
jmp fcn.140053410
mov eax, dword [rsp + 0x60]
add rsp, 0x40
pop rbx
ret
mov eax, 0xfffff008
add rsp, 0x40
pop rbx
ret

Function at 0x140050380
Capabilities:
Create thread
Resume thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x30
mov rbx, rcx
mov rdi, r8
mov ecx, 0x18
mov rsi, rdx
call qword [fcn.140192c64]
mov r14, rax
test rax, rax
jne 0x1400503bb
mov eax, 0xfffff027
jmp 0x140050444
mov qword [rax + 8], rdi
lea r8, [0x140050290]
xor edi, edi
mov qword [rax], rsi
mov qword [rsp + 0x28], rdi
mov r9, r14
xor edx, edx
mov dword [rsp + 0x20], 4
xor ecx, ecx
call fcn.14019ea44
test rax, rax
jne 0x140050432
call fcn.140193ba0
mov esi, dword [rax]
call fcn.140193ba0
mov rcx, r14
mov ebx, dword [rax]
call qword [fcn.140192488]
call fcn.140193ba0
mov dword [rax], ebx
test esi, esi
je 0x140050442
cmp esi, 0xb
je 0x14005042b
cmp esi, 0xd
je 0x140050424
cmp esi, 0x16
setne dil
lea eax, [rdi - 0xfe7]
jmp 0x140050444
mov eax, 0xfffff004
jmp 0x140050444
mov eax, 0xfffff008
jmp 0x140050444
mov qword [rbx], rax
mov rcx, rax
mov qword [r14 + 0x10], rax
call qword [sym.imp.KERNEL32.DLL_ResumeThread]
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop r14
ret

Function at 0x140050a40
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x48
mov rcx, rdx
mov dword [rsp + 0x30], 1
mov edx, 6
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x30]
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x140050a7b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
add rsp, 0x48
ret
xor eax, eax
add rsp, 0x48
ret
Function at 0x140050a90
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x40
mov rbx, rdx
mov dword [rsp + 0x38], AdjustTokenPrivileges
mov rcx, rbx
mov dword [rsp + 0x30], 1
lea r9, [rsp + 0x30]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 8
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x140050adb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
add rsp, 0x40
pop rbx
ret
cmp dword [rsp + 0x30], 0
je 0x140050b06
mov edx, 6
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x38]
mov rcx, rbx
lea r8d, [rdx - 3]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x140050acf
xor eax, eax
add rsp, 0x40
pop rbx
ret

Function at 0x140050b10
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp qword [rdx + 0x110], 0xffffffffffffffff
mov esi, r9d
mov rdi, r8
mov dword [rsp + 0x50], 1
mov rbx, rdx
mov rbp, rcx
je 0x140050b4c
mov eax, 0xfffff00e
jmp 0x140050c18
lea r8, [rsp + 0x50]
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x140050b6f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x140050c18
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.DLL_SetHandleInformation]
test eax, eax
jne 0x140050b8e
call qword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x140050c18
mov rdx, qword [rbp + 0x38]
xor r9d, r9d
mov r8, rdi
mov rcx, rdi
call qword [sym.imp.KERNEL32.DLL_CreateIoCompletionPort]
test rax, rax
je 0x140050b83
mov ecx, dword [0x140296dc0]
cmp esi, 0x17
mov eax, dword [rbx + 0x58]
cmove ecx, dword [0x140296dbc]
bt eax, 0x13
jb 0x140050bdc
test ecx, ecx
jne 0x140050bdc
mov dl, 3
mov rcx, rdi
call qword [sym.imp.KERNEL32.DLL_SetFileCompletionNotificationModes]
test eax, eax
je 0x140050b83
or dword [rbx + 0x58], 0x20000
mov eax, dword [rbx + 0x58]
bt eax, 0x18
jae 0x140050bee
mov rdx, rdi
call fcn.140050a40
test eax, eax
jne 0x140050c18
test dword [rbx + 0x58], 0x2000000
je 0x140050c03
mov rdx, rdi
call fcn.140050a90
test eax, eax
jne 0x140050c18
mov qword [rbx + 0x110], rdi
cmp esi, 0x17
jne 0x140050c16
or dword [rbx + 0x58], 0x400000
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140050ea0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov dword [rsp + 0x20], r9d
push rsi
push rdi
push r14
sub rsp, 0x30
cmp qword [rcx + 0x110], 0xffffffffffffffff
mov r14d, r8d
mov rdi, rdx
mov rbx, rcx
jne 0x140050f14
movzx ecx, word [rdx]
xor r8d, r8d
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140050eee
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x140050f79
movzx r9d, word [rdi]
mov r8, rsi
mov rcx, qword [rbx + 8]
mov rdx, rbx
call fcn.140050b10
mov ebp, eax
test eax, eax
je 0x140050f14
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, ebp
jmp 0x140050f79
cmp word [rdi], 0x17
jne 0x140050f45
mov rcx, qword [rbx + 0x110]
lea r9, [rsp + 0x68]
mov edx, 0x29
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbx + 0x110]
mov r8d, r14d
mov rdx, rdi
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x140050f70
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2740
jne 0x140050f79
mov dword [rbx + 0x118], eax
or dword [rbx + 0x58], 0x2000
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
Function at 0x140051280
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
xor eax, eax
lea rbx, [rdx + 0x80]
mov qword [rbx + 0x40], rax
lea r14, [rbx + 0x40]
mov qword [r14 + 8], rax
xor ebp, ebp
mov qword [r14 + 0x10], rax
mov rdi, rdx
mov qword [r14 + 0x18], rax
mov rsi, rcx
or dword [rdx + 0x58], 0x40000
lea rax, [0x140296ae6]
mov qword [rsp + 0x48], rax
xor eax, eax
mov qword [r14], rax
mov qword [r14 + 8], rax
mov qword [r14 + 0x10], rax
mov qword [r14 + 0x18], rax
test dword [rdx + 0x58], 0x80000
mov dword [rsp + 0x40], ebp
je 0x1400512f4
mov rax, qword [rbx + 0x70]
or rax, 1
mov qword [rbx + 0x58], rax
mov rcx, qword [rdi + 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]
test eax, eax
jne 0x14005137f
mov eax, dword [rdi + 0x58]
bt eax, 0x11
jae 0x1400513e7
bts eax, 0x10
mov dword [rdi + 0x58], eax
mov eax, dword [rsp + 0x78]
mov qword [rbx + 0x48], rax
inc dword [rdi + 0x78]
mov qword [rbx + 0x68], rbp
mov rax, qword [rsi + 0x48]
test rax, rax
je 0x140051372
mov rax, qword [rax + 0x68]
mov qword [rbx + 0x68], rax
mov rax, qword [rsi + 0x48]
mov qword [rax + 0x68], rbx
mov qword [rsi + 0x48], rbx
jmp 0x14005145d
mov qword [rbx + 0x68], rbx
mov qword [rsi + 0x48], rbx
jmp 0x14005145d
call qword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x3e5
je 0x1400513e7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jg 0x14005139e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x1400513ac
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 [rsi + 0x48]
test rax, rax
je 0x1400513da
mov rax, qword [rax + 0x68]
mov qword [rbx + 0x68], rax
mov rax, qword [rsi + 0x48]
mov qword [rax + 0x68], rbx
mov qword [rsi + 0x48], rbx
inc dword [rdi + 0x78]
jmp 0x14005145d
mov qword [rbx + 0x68], rbx
mov qword [rsi + 0x48], rbx
inc dword [rdi + 0x78]
jmp 0x14005145d
or dword [rdi + 0x58], 0x10000
inc dword [rdi + 0x78]
test dword [rdi + 0x58], 0x80000
je 0x14005145d
cmp qword [rbx + 0x78], 0xffffffffffffffff
lea rcx, [rbx + 0x78]
jne 0x14005145d
mov rdx, qword [rbx + 0x70]
lea r8, [0x140050f90]
mov dword [rsp + 0x28], 4
mov r9, rbx
mov dword [rsp + 0x20], 0xffffffff
call qword [sym.imp.KERNEL32.DLL_RegisterWaitForSingleObject]
test eax, eax
jne 0x14005145d
call qword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jg 0x14005143f
call qword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x14005144d
call qword [sym.imp.KERNEL32.DLL_GetLastError]
movzx eax, ax
or eax, 0x80070000
cdqe
mov rdx, rbx
mov rcx, rsi
mov qword [r14], rax
call fcn.140050a10
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 0x140051ba0
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 0x140051c1f
mov eax, dword [rdx + 0x58]
test al, 0x40
je 0x140051c97
mov edx, eax
and edx, 0xffffffbf
sub dword [rbx + 0x7c], 1
mov dword [rbx + 0x58], edx
jne 0x140051bf5
test dl, 1
jne 0x140051bf5
test al, 4
je 0x140051bf5
and eax, 0xffffffbb
mov dword [rbx + 0x58], eax
test al, 8
je 0x140051bf5
mov rax, qword [rbx + 8]
dec dword [rax + 8]
mov r9, qword [rbx + 0x100]
test r9, r9
je 0x140051c97
mov ecx, dword [r8 + 0x40]
call fcn.140056180
mov ecx, eax
call fcn.140053410
mov edx, eax
mov rcx, rbx
call r9
jmp 0x140051c97
cmp dword [r8 + 0x40], 0
jl 0x140051c74
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 0x140051c74
mov rax, qword [rbx + 0x130]
mov qword [rdi + 0x1a8], rax
mov rax, qword [rbx + 0x100]
mov qword [rbx + 0x130], rdi
test rax, rax
je 0x140051c97
xor edx, edx
mov rcx, rbx
call rax
jmp 0x140051c97
mov rcx, qword [rdi + 0x70]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rdi + 0x70], 0xffffffffffffffff
test byte [rbx + 0x58], 0x40
je 0x140051c97
mov rdx, rdi
mov rcx, rbx
call fcn.140050fd0
mov ecx, dword [rbx + 0x78]
mov eax, dword [rbx + 0x58]
dec ecx
mov dword [rbx + 0x78], ecx
test al, 1
je 0x140051cc0
test ecx, ecx
jne 0x140051cc0
test al, 0x20
jne 0x140051cc0
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 0x140054130
Capabilities:
Connect pipe
Create pipe

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x40
mov rdi, rdx
xor ebp, ebp
mov qword [rax - 0x10], rbp
mov rbx, r8
mov dword [rax - 0x18], ebp
mov rsi, rcx
mov dword [rax - 0x20], 0x10000
mov r9d, 0xff
mov rcx, qword [rdi + 0x120]
xor r8d, r8d
mov edx, 0x40040003
mov dword [rax - 0x28], 0x10000
call qword [sym.imp.KERNEL32.DLL_CreateNamedPipeW]
mov qword [rbx + 0x70], rax
cmp rax, 0xffffffffffffffff
jne 0x1400541e2
call qword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jg 0x14005419b
call qword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x1400541a9
call qword [sym.imp.KERNEL32.DLL_GetLastError]
movzx eax, ax
or eax, 0x80070000
cdqe
mov qword [rbx + 0x40], rax
mov qword [rbx + 0x68], rbp
mov rax, qword [rsi + 0x48]
test rax, rax
je 0x1400541d5
mov rax, qword [rax + 0x68]
mov qword [rbx + 0x68], rax
mov rax, qword [rsi + 0x48]
mov qword [rax + 0x68], rbx
mov qword [rsi + 0x48], rbx
jmp 0x1400542c8
mov qword [rbx + 0x68], rbx
mov qword [rsi + 0x48], rbx
jmp 0x1400542c8
mov r8, rax
mov dword [rsp + 0x20], ebp
mov rdx, rdi
mov rcx, rsi
call fcn.140053930
test eax, eax
je 0x14005421c
mov rcx, qword [rbx + 0x70]
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov qword [rbx + 0x70], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jg 0x14005419b
call qword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x1400541a9
xor eax, eax
mov qword [rsp + 0x50], r14
mov qword [rbx + 0x40], rax
lea rdx, [rbx + 0x40]
mov qword [rbx + 0x48], rax
mov qword [rbx + 0x50], rax
mov qword [rbx + 0x58], rax
mov rcx, qword [rbx + 0x70]
call qword [sym.imp.KERNEL32.DLL_ConnectNamedPipe]
test eax, eax
jne 0x1400542c3
call qword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x3e5
je 0x1400542c3
call qword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x217
jne 0x140054264
mov rax, rbp
jmp 0x140054298
mov rcx, qword [rbx + 0x70]
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov qword [rbx + 0x70], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jg 0x140054288
call qword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x140054296
call qword [sym.imp.KERNEL32.DLL_GetLastError]
movzx eax, ax
or eax, 0x80070000
cdqe
mov qword [rbx + 0x40], rax
mov qword [rbx + 0x68], rbp
mov rax, qword [rsi + 0x48]
test rax, rax
je 0x1400542bb
mov rax, qword [rax + 0x68]
mov qword [rbx + 0x68], rax
mov rax, qword [rsi + 0x48]
mov qword [rax + 0x68], rbx
jmp 0x1400542bf
mov qword [rbx + 0x68], rbx
mov qword [rsi + 0x48], rbx
mov r14, qword [rsp + 0x50]
inc dword [rdi + 0x78]
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret