joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400446a0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x240
mov rax, qword [0x1400cf070]
xor rax, rsp
mov qword [rsp + 0x230], rax
cmp dword [rcx + 0x32c], 3
mov rdi, rdx
mov rbx, rcx
jne 0x1400448ae
cmp byte [rcx + 0x642], 0
jne 0x1400448ae
cmp byte [rcx + 0x656], 0
jne 0x1400448ae
mov rsi, qword [rcx]
lea r8, [rsp + 0x20]
mov rcx, rdi
mov dword [rsp + 0x20], Ordinal_133
lea rdx, [rsp + 0xb0]
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x14004474d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x130]
mov ecx, eax
mov ebx, eax
call fcn.14006ac10
mov r9, rax
lea rdx, str.getpeername___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rsi
call fcn.1400465e0
jmp 0x1400448b6
xor edx, edx
mov dword [rsp + 0x24], Ordinal_133
mov r8d, Ordinal_133
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memset
lea r8, [rsp + 0x24]
mov rcx, rdi
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1400447b5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x130]
mov ecx, eax
mov ebx, eax
call fcn.14006ac10
mov r9, rax
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rsi
call fcn.1400465e0
jmp 0x1400448b6
mov edx, dword [rsp + 0x20]
lea rdi, [rbx + 0x3fe]
mov r8, rdi
lea r9, [rbx + 0x42c]
lea rcx, [rsp + 0xb0]
call fcn.140043a50
test al, al
jne 0x14004481b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov r8d, 0x100
lea rdx, [rsp + 0x130]
mov ecx, ebx
mov rdi, rax
call fcn.14006ac10
mov r8d, dword [rdi]
lea rdx, str.ssrem_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rsi
call fcn.1400465e0
jmp 0x1400448b6
movups xmm0, xmmword [rdi]
mov eax, dword [rdi + 0x28]
lea r9, [rbx + 0x460]
movups xmm1, xmmword [rdi + 0x10]
mov edx, dword [rsp + 0x24]
lea r8, [rbx + 0x430]
movups xmmword [rbx + 0x2f8], xmm0
lea rcx, [rsp + 0x30]
movsd xmm0, qword [rdi + 0x20]
movups xmmword [rbx + 0x308], xmm1
movsd qword [rbx + 0x318], xmm0
mov dword [rbx + 0x320], eax
movzx eax, word [rdi + 0x2c]
mov word [rbx + 0x324], ax
call fcn.140043a50
test al, al
jne 0x1400448ae
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov r8d, 0x100
lea rdx, [rsp + 0x130]
mov ecx, ebx
mov rdi, rax
call fcn.14006ac10
mov r8d, dword [rdi]
lea rdx, str.ssloc_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rsi
call fcn.1400465e0
jmp 0x1400448b6
mov rcx, rbx
call fcn.1400442c0
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.140073640
lea r11, [rsp + 0x240]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x1400452f0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x1400cf070]
xor rax, rsp
mov qword [rsp + 0x68], rax
xor esi, esi
mov dword [rsp + 0x20], 4
mov eax, esi
lea r9, [rsp + 0x50]
cmp byte [rcx + 0xf7b], al
mov rdi, rdx
mov rbx, rcx
mov edx, 0xffff
setne al
lea r8d, [rsi + 8]
mov rcx, rdi
mov dword [rsp + 0x50], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x14004535f
mov r8, rdi
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
mov rcx, rbx
call fcn.1400466f0
jmp 0x1400453ee
mov ecx, dword [rbx + 0xedc]
mov dword [rsp + 0x58], 1
call fcn.140047610
imul ecx, eax, 0x3e8
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x5c], ecx
mov ecx, dword [rbx + 0xee0]
call fcn.140047610
imul ecx, eax, 0x3e8
lea r8, [rsp + 0x58]
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x54]
mov qword [rsp + 0x38], rsi
mov r9d, recv
mov qword [rsp + 0x30], rax
mov edx, 0x98000004
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x60], ecx
mov rcx, rdi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x1400453ee
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, edi
lea rdx, str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
mov r9d, eax
mov rcx, rbx
call fcn.1400466f0
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.140073640
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret

Function at 0x140046520
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, 0x30
cmp qword [rcx + 0x700], 0
mov rsi, r9
mov rbp, r8
movsxd rbx, edx
mov rdi, rcx
je 0x14004657e
mov dl, 1
call fcn.140030610
mov rax, qword [rdi + 0x658]
mov r9, rsi
mov r8, rbp
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call qword [rdi + 0x700]
xor edx, edx
mov rcx, rdi
mov ebx, eax
call fcn.140030610
mov eax, ebx
jmp 0x1400465c2
cmp ebx, 2
ja 0x1400465c0
mov r9, qword [rdi + 0x650]
lea rdx, [0x14007b320]
lea rcx, [rbx + rbx*2]
add rcx, rdx
mov edx, 2
lea r8d, [rdx - 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r9, qword [rdi + 0x650]
mov r8d, 1
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

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

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, r9
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x1400468d2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, gethostname
mov qword [rbx], 0
cmp eax, 0x2733
mov edx, 0x51
cmove ecx, edx
mov eax, ecx
add rsp, 0x20
pop rbx
ret
mov qword [rbx], rcx
xor eax, eax
add rsp, 0x20
pop rbx
ret
Function at 0x140046a00
Capabilities:
Send data
Send data on socket

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x130
mov rax, qword [0x1400cf070]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov rbx, qword [rsp + 0x180]
mov rsi, r9
movsxd rax, edx
mov rdi, r8
mov r14, rcx
mov rbp, qword [rcx + rax*8 + 0x4c0]
call fcn.140046ed0
test eax, eax
je 0x140046a54
mov dword [rbx], reloc.WLDAP32.dll_Ordinal_27
mov rax, 0xffffffffffffffff
jmp 0x140046ac4
xor r9d, r9d
mov r8d, esi
mov rdx, rdi
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_send]
movsxd rdi, eax
mov dword [rbx], 0
cmp rdi, 0xffffffffffffffff
jne 0x140046ac1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp eax, 0x2733
jne 0x140046a8e
xor edi, edi
mov dword [rbx], 0x51
jmp 0x140046ac1
mov r8d, 0x100
lea rdx, [rsp + 0x20]
mov ecx, esi
call fcn.14006ac10
mov rcx, qword [r14]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.1400465e0
mov rcx, qword [r14]
mov dword [rcx + 0x1248], esi
mov dword [rbx], gethostname
mov rax, rdi
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.140073640
add rsp, 0x130
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
movsxd rcx, edx
mov rax, rcx
shl rax, 5
lea rbx, [rsi + 0x508]
add rbx, rax
mov rax, qword [rsi + 0x688]
mov rdi, qword [rbx + 8]
sub rdi, qword [rbx + 0x10]
test byte [rax + 0x7c], 3
je 0x140046fd2
lea rax, [0x140046920]
cmp qword [rsi + rcx*8 + 0x4e8], rax
jne 0x140046fd2
cmp qword [rbx], 0
je 0x140046f38
test rdi, rdi
je 0x140046fd2
mov rbp, qword [rsi + rcx*8 + 0x4c0]
mov rdx, 0xffffffffffffffff
mov r8, rdx
mov rcx, rbp
xor r9d, r9d
call fcn.140047410
cmp eax, 0xffffffff
je 0x140046fd2
test al, 1
je 0x140046fd2
mov rcx, qword [rbx]
test rcx, rcx
jne 0x140046fa7
mov rax, qword [rsi]
mov ecx, dword [rax + 0xb88]
add ecx, ecx
movsxd rcx, ecx
mov qword [rbx + 8], rcx
call qword [section..data]
mov qword [rbx], rax
mov rcx, rax
test rax, rax
jne 0x140046f8e
lea eax, [rcx + 0x1b]
jmp 0x140046fd4
mov rdi, qword [rbx + 8]
mov qword [rbx + 0x10], 0
mov qword [rbx + 0x18], 0
test rcx, rcx
je 0x140046fca
mov rdx, qword [rbx + 0x10]
xor r9d, r9d
add rdx, rcx
mov r8d, edi
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
test eax, eax
jle 0x140046fd2
add qword [rbx + 0x10], rcx
jmp 0x140046fd2
mov qword [rbx + 8], 0
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 0x140047320
Capabilities:
Get socket status

Disassembly:
push rbx
sub rsp, 0x30
mov r10, rdx
mov rbx, rcx
test rdx, rdx
je 0x140047336
cmp dword [rdx], 0
jne 0x140047354
test r8, r8
je 0x140047341
cmp dword [r8], 0
jne 0x140047354
test r9, r9
je 0x1400473f6
cmp dword [r9], 0
je 0x1400473f6
mov rcx, qword [rsp + 0x60]
lea r11, [rsp + 0x48]
test rcx, rcx
jns 0x140047368
xor r11d, r11d
jmp 0x1400473b5
jle 0x1400473ac
movabs rax, 0x20c49ba5e353f7cf
imul rcx
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
imul rax, rdx, 0x3e8
sub rcx, rax
imul rax, rcx, 0x3e8
mov ecx, 0x7fffffff
cmp rdx, rcx
mov dword [rsp + 0x4c], eax
cmovg rdx, rcx
mov dword [rsp + 0x48], edx
jmp 0x1400473b5
mov qword [rsp + 0x48], 0
test r9, r9
je 0x1400473c0
cmp dword [r9], 0
jne 0x1400473c3
xor r9d, r9d
test r8, r8
je 0x1400473ce
cmp dword [r8], 0
jne 0x1400473d1
xor r8d, r8d
test r10, r10
je 0x1400473dc
cmp dword [r10], 0
jne 0x1400473df
xor r10d, r10d
lea ecx, [rbx + 1]
mov qword [rsp + 0x20], r11
mov rdx, r10
call qword [sym.imp.WS2_32.dll_select]
add rsp, 0x30
pop rbx
ret
mov rcx, qword [rsp + 0x60]
call fcn.140047580
add rsp, 0x30
pop rbx
ret

Function at 0x1400475d0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov edi, ecx
mov rbx, rdx
mov rcx, r8
call fcn.140047620
mov r8d, eax
mov rdx, rbx
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov rbx, qword [rsp + 0x30]
cdqe
add rsp, 0x20
pop rdi
ret
Function at 0x14004c330
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
xor edi, edi
lea rax, [rcx + rdx]
mov rbp, rax
mov rbx, rcx
sub rbp, rcx
mov esi, 0x1505
cmp rcx, rax
cmova rbp, rdi
test rbp, rbp
je 0x14004bfc3
movzx ecx, byte [rbx]
call fcn.14004f470
imul rsi, rsi, 0x21
movsx rcx, al
lea rbx, [rbx + 1]
xor rsi, rcx
inc rdi
cmp rdi, rbp
jb 0x14004bfa4
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
movzx eax, sil
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
push rbx
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
je 0x14004c366
call fcn.14004c6a0
test al, al
jne 0x14004c366
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.14004c600
mov rdx, qword [rsp + 0x30]
mov rcx, rax
add rsp, 0x20
pop rbx
jmp 0x14004bf70
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x14004f190
Capabilities:
Get common file path

Disassembly:
push rbx
push rbp
push rdi
sub rsp, 0x20
mov rbx, rcx
xor ebp, ebp
lea rcx, [0x14007c8f8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
test rax, rax
jne 0x14004f1ba
add rsp, 0x20
pop rdi
pop rbp
pop rbx
ret
lea rdx, [0x14007c910]
mov qword [rsp + 0x48], r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x14007c920]
mov rcx, rbx
mov r14, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcspbrk]
test rax, rax
je 0x14004f21e
mov rcx, rbx
test r14, r14
je 0x14004f208
xor edx, edx
lea r8d, [rdx + 8]
call r14
mov r14, qword [rsp + 0x48]
mov rbp, rax
add rsp, 0x20
pop rdi
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov r14, qword [rsp + 0x48]
mov rbp, rax
add rsp, 0x20
pop rdi
pop rbp
pop rbx
ret
test r14, r14
je 0x14004f256
lea rdx, str.AddDllDirectory
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14004f256
xor edx, edx
mov r8d, 0x800
mov rcx, rbx
call r14
mov r14, qword [rsp + 0x48]
mov rbp, rax
add rsp, 0x20
pop rdi
pop rbp
pop rbx
ret
xor edx, edx
mov qword [rsp + 0x50], r15
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov r15d, eax
test eax, eax
je 0x14004f31a
mov rdi, 0xffffffffffffffff
mov qword [rsp + 0x40], rsi
mov rdx, rdi
nop
inc rdx
cmp word [rbx + rdx*2], bp
jne 0x14004f280
lea ecx, [rax + 1]
add rcx, rdx
add rcx, rcx
call qword [section..data]
mov rsi, rax
test rax, rax
je 0x14004f30c
mov edx, r15d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x14004f30c
mov rax, rdi
cmp word [rsi + rax*2 + 2], bp
lea rax, [rax + 1]
jne 0x14004f2b3
mov dword [rsi + rax*2], 0x5c
cmp word [rsi + rdi*2 + 2], bp
lea rdi, [rdi + 1]
jne 0x14004f2c5
lea rcx, [rdi + rdi]
sub rcx, rbx
add rcx, rsi
nop word [rax + rax]
movzx eax, word [rbx]
mov word [rcx + rbx], ax
lea rbx, [rbx + 2]
test ax, ax
jne 0x14004f2e0
mov rcx, rsi
test r14, r14
je 0x14004f303
xor edx, edx
lea r8d, [rdx + 8]
call r14
jmp 0x14004f309
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbp, rax
mov rcx, rsi
call qword [str._I_a_]
mov rsi, qword [rsp + 0x40]
mov r15, qword [rsp + 0x50]
mov rax, rbp
mov r14, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
pop rbp
pop rbx
ret
Function at 0x14004f380
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x1400cf070]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
test cl, 2
je 0x14004f3e6
mov ecx, 0x202
lea rdx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x14004f3c9
movzx eax, word [rsp + 0x20]
cmp al, 2
jne 0x14004f3c3
shr ax, 8
cmp al, 2
je 0x14004f3e6
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.140073640
add rsp, 0x1d8
ret
lea rcx, [0x14007c8c8]
call fcn.14004f190
mov qword [0x1400d0fb8], rax
test rax, rax
je 0x14004f423
lea rdx, str.if_nametoindex
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400d0fb0]
test rax, rax
cmovne rcx, rax
mov qword [0x1400d0fb0], rcx
xor edx, edx
lea r9d, [rdx + 3]
lea r8d, [rdx + 2]
lea ecx, [rdx + 6]
call fcn.14006b6d0
test al, al
lea rcx, [0x1400d4438]
setne byte [0x1400d4430]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.140073640
add rsp, 0x1d8
ret
Function at 0x14004faf0
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x1400cf070]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov edx, 1
mov dword [rsp + 0x34], reloc.WS2_32.dll_recv
mov ebp, 2
mov dword [rsp + 0x30], 1
mov ecx, ebp
mov rsi, r9
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14004fb45
jmp 0x14004fcf4
mov qword [rsp + 0x80], rbx
mov ecx, 0x7f000001
xor ebx, ebx
mov word [rsp + 0x38], bp
mov qword [rsp + 0x40], rbx
call qword [sym.imp.WS2_32.dll_htonl]
lea r9, [rsp + 0x30]
mov word [rsp + 0x3a], bx
mov edx, 0xffff
mov dword [rsp + 0x3c], eax
lea r8d, [rbx + 4]
mov qword [rsi + 8], 0xffffffffffffffff
mov rcx, rdi
mov qword [rsi], 0xffffffffffffffff
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x14004fccb
lea r8d, [rbx + 0x10]
mov rcx, rdi
lea rdx, [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x14004fccb
lea r8, [rsp + 0x34]
mov rcx, rdi
lea rdx, [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x14004fccb
lea edx, [rbx + 1]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x14004fccb
xor r8d, r8d
lea edx, [rbx + 1]
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsi], rax
cmp rax, 0xffffffffffffffff
je 0x14004fccb
lea r8d, [rbx + 0x10]
mov rcx, rax
lea rdx, [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x14004fccb
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rsi + 8], rax
cmp rax, 0xffffffffffffffff
je 0x14004fccb
mov r9, rsi
lea r8, [0x1400c0b88]
lea edx, [rbx + 0xc]
lea rcx, [rsp + 0x48]
call fcn.1400497a0
lea rax, [rsp + 0x48]
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rax + rbx], 0
jne 0x14004fc65
mov rcx, qword [rsi]
lea rdx, [rsp + 0x48]
xor r9d, r9d
mov r8d, ebx
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
cmp rcx, rbx
jne 0x14004fccb
mov rcx, qword [rsi + 8]
lea rdx, [rsp + 0x54]
xor r9d, r9d
lea r8d, [r9 + 0xc]
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
cmp rcx, rbx
jne 0x14004fccb
mov r8, rbx
lea rdx, [rsp + 0x54]
lea rcx, [rsp + 0x48]
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
jne 0x14004fccb
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x14004fcec
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rsi + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
mov rbx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140073640
lea r11, [rsp + 0x70]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x14004fd50
Capabilities:
Resolve dns

Disassembly:
push rbp
push r12
push r13
push r15
sub rsp, 0x28
mov r13, r9
xor ebp, ebp
mov qword [r9], rbp
xor r15d, r15d
lea r9, [rsp + 0x68]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov r12d, eax
test eax, eax
jne 0x14004fed9
mov qword [rsp + 0x60], rdi
mov rdi, qword [rsp + 0x68]
test rdi, rdi
je 0x14004febe
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x20], r14
nop
mov rax, qword [rdi + 0x18]
test rax, rax
je 0x14004fdbe
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rax + rbx], 0
jne 0x14004fdb0
inc rbx
jmp 0x14004fdc0
xor ebx, ebx
mov eax, dword [rdi + 4]
cmp eax, 2
jne 0x14004fdce
lea r14d, [rax + 0xe]
jmp 0x14004fddb
cmp eax, 0x17
jne 0x14004fe74
lea r14d, [rax + 5]
cmp qword [rdi + 0x20], 0
je 0x14004fe74
mov rax, qword [rdi + 0x10]
test rax, rax
je 0x14004fe74
cmp rax, r14
jb 0x14004fe74
lea rcx, [rbx + 0x30]
add rcx, r14
call qword [section..data]
mov rsi, rax
test rax, rax
je 0x14004fe83
mov ecx, dword [rdi]
mov r8, r14
mov dword [rax], ecx
mov ecx, dword [rdi + 4]
mov dword [rax + 4], ecx
mov ecx, dword [rdi + 8]
mov dword [rax + 8], ecx
mov ecx, dword [rdi + 0xc]
mov dword [rax + 0xc], ecx
lea rcx, [rsi + 0x30]
mov dword [rax + 0x10], r14d
xor eax, eax
mov qword [rsi + 0x18], rax
mov qword [rsi + 0x28], rax
mov qword [rsi + 0x20], rcx
mov rdx, qword [rdi + 0x20]
call sub.VCRUNTIME140.dll_memcpy
test rbx, rbx
je 0x14004fe61
mov rcx, qword [rsi + 0x20]
mov r8, rbx
add rcx, r14
mov qword [rsi + 0x18], rcx
mov rdx, qword [rdi + 0x18]
call sub.VCRUNTIME140.dll_memcpy
test rbp, rbp
cmove rbp, rsi
test r15, r15
je 0x14004fe71
mov qword [r15 + 0x28], rsi
mov r15, rsi
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x14004fda0
jmp 0x14004fe89
mov r12d, 8
mov rcx, qword [rsp + 0x68]
mov r14, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
test rcx, rcx
je 0x14004fea8
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test r12d, r12d
je 0x14004feb9
mov rcx, rbp
call fcn.14004fd20
xor ebp, ebp
jmp 0x14004fecd
test rbp, rbp
jne 0x14004fecd
mov r12d, 0x2af9
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rdi, qword [rsp + 0x60]
mov eax, r12d
mov qword [r13], rbp
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
ret

Function at 0x1400503b0
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
xor ebx, ebx
mov r9, rdx
mov r8, rcx
mov qword [rsp + 0x28], rbx
xor edx, edx
mov dword [rsp + 0x20], ebx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
cmovbe rbx, rax
mov rax, rbx
add rsp, 0x30
pop rbx
ret
Function at 0x14005d080
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbp, qword [rcx]
mov edi, r8d
mov esi, edx
mov byte [rax + 0x10], 0xff
xor r9d, r9d
mov byte [rax + 0x11], sil
mov rbx, rcx
mov byte [rax + 0x12], dil
mov rcx, qword [rcx + 0x4c0]
lea rdx, [rax + 0x10]
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x14005d0df
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.1400465e0
mov rcx, qword [rbx]
lea rdx, str.SENT
mov r9d, edi
mov r8d, esi
call fcn.14005c860
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x14005e740
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0xd0
mov rax, qword [0x1400cf070]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rdi, qword [rcx + 0x790]
lea rax, [rsp + 0x30]
mov rsi, qword [rcx]
mov r15, rcx
mov dword [rsp + 0x30], Ordinal_133
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov r8d, dword [rdi + 0x15c]
lea r14, [rdi + 0x168]
mov rdx, qword [r14]
add r8d, 4
mov rcx, qword [rdi + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rdi + 0x150], 0
mov dword [rdi + 0x154], eax
jne 0x14005e7dd
movsxd r8, dword [rsp + 0x30]
lea rcx, [rdi + 0xd0]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rdi + 0x150], eax
mov r9d, dword [rdi + 0x154]
mov qword [rsp + 0xf8], rbx
mov qword [rsp + 0x100], rbp
cmp r9d, 4
jge 0x14005e847
lea rdx, str.Received_too_short_packet
mov rcx, rsi
call fcn.1400465e0
mov dword [rdi + 0xc], 7
xor eax, eax
mov rbp, qword [rsp + 0x100]
mov rbx, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.140073640
mov rsi, qword [rsp + 0x108]
add rsp, 0xd0
pop r15
pop r14
pop rdi
ret
mov rcx, r14
call fcn.14005e270
movzx r8d, ax
mov dword [rdi + 0xc], r8d
sub r8d, 3
je 0x14005e8f6
sub r8d, 1
je 0x14005e965
sub r8d, 1
je 0x14005e8b2
cmp r8d, 1
je 0x14005e892
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rsi
lea rdx, [0x1400c07a0]
call fcn.1400465e0
jmp 0x14005e965
mov rdx, qword [r14]
lea r8d, [r9 - 2]
add rdx, 2
mov rcx, rdi
call fcn.14005e490
test eax, eax
je 0x14005e965
jmp 0x14005e812
mov rbp, qword [r14]
lea eax, [r9 - 4]
mov rcx, r14
movsxd rbx, eax
call fcn.14005e250
movzx r9d, ax
lea rcx, [rbp + 4]
mov rdx, rbx
mov dword [rdi + 8], r9d
call fcn.14005e210
cmp rax, rbx
jae 0x14005e965
lea r8, [rbp + 4]
mov rcx, rsi
lea rdx, str.TFTP_error:__s_n
call fcn.1400466f0
jmp 0x14005e965
cmp r9d, 4
jle 0x14005e965
mov rcx, r14
call fcn.14005e250
movzx ecx, word [rdi + 0x48]
inc ecx
cmp cx, ax
jne 0x14005e965
mov r8, qword [r14]
lea eax, [r9 - 4]
movsxd r9, eax
add r8, 4
mov edx, 1
mov rcx, r15
call fcn.140046500
mov ebx, eax
test eax, eax
je 0x14005e944
mov edx, 5
mov rcx, rdi
call fcn.14005f280
mov eax, ebx
jmp 0x14005e812
mov eax, dword [rdi + 0x154]
mov rcx, rsi
sub eax, 4
cdqe
add qword [rsi + 0xf8], rax
mov rdx, qword [rsi + 0xf8]
call fcn.140045700
mov rcx, r15
call fcn.140045990
test eax, eax
je 0x14005e810
mov edx, 5
mov rcx, rdi
call fcn.14005f280
mov eax, Ordinal_46
jmp 0x14005e812