joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1401516a0
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1e8
mov rax, qword [0x140229948]
xor rax, rsp
mov qword [rsp + 0x1d0], rax
test cl, 2
je 0x140151706
mov ecx, 0x202
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1401516e9
movzx eax, word [rsp + 0x30]
cmp al, 2
jne 0x1401516e3
shr ax, 8
cmp al, 2
je 0x140151706
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.140194380
add rsp, 0x1e8
ret
call fcn.140186c00
test eax, eax
jne 0x14015177f
lea rcx, str.iphlpapi.dll
call fcn.140151500
mov qword [0x140d15228], rax
test rax, rax
je 0x14015174c
lea rdx, str.if_nametoindex
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x140d15220]
test rax, rax
cmovne rcx, rax
mov qword [0x140d15220], rcx
xor edx, edx
mov dword [rsp + 0x20], 3
mov r9d, 2
xor r8d, r8d
lea ecx, [rdx + 6]
call fcn.1401867a0
test al, al
lea rcx, [0x140d158d8]
setne byte [0x140d158d0]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
mov rcx, qword [rsp + 0x1d0]
xor rcx, rsp
call fcn.140194380
add rsp, 0x1e8
ret
Function at 0x140162f00
Capabilities:
Move file

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x60
mov rbx, rcx
movaps xmmword [rsp + 0x50], xmm6
lea rcx, [rsp + 0x30]
mov rdi, rdx
call fcn.140141ba0
mov rcx, rbx
movups xmm6, xmmword [rax]
call case.0x14014a45f.1
mov rcx, rdi
mov rsi, rax
call case.0x14014a45f.1
mov r8d, 1
mov rdx, rax
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x140162fb0
nop dword [rax]
nop word [rax + rax]
lea rcx, [rsp + 0x40]
movdqa xmmword [rsp + 0x20], xmm6
call fcn.140141ba0
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x30], xmm0
call fcn.140141c20
cmp rax, 0x3e8
ja 0x140162fe1
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r8d, 1
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x140162f60
test rsi, rsi
je 0x140162fbd
mov rcx, rsi
call fcn.140195925
test rbx, rbx
je 0x140162fca
mov rcx, rbx
call fcn.140195925
xor eax, eax
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
movaps xmm6, xmmword [rsp + 0x50]
add rsp, 0x60
pop rdi
ret
test rsi, rsi
je 0x140162fee
mov rcx, rsi
call fcn.140195925
test rbx, rbx
je 0x140162ffb
mov rcx, rbx
call fcn.140195925
mov eax, 1
jmp 0x140162fcc
Function at 0x140163570
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 0x14016370e
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x60], rdi
mov rdi, qword [rsp + 0x68]
test rdi, rdi
je 0x1401636ee
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x20], r14
nop
mov rax, qword [rdi + 0x18]
test rax, rax
je 0x1401635de
or rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x1401635d0
inc rbx
jmp 0x1401635e0
xor ebx, ebx
mov eax, dword [rdi + 4]
cmp eax, 2
jne 0x1401635ee
lea r14d, [rax + 0xe]
jmp 0x1401635fb
cmp eax, 0x17
jne 0x140163694
lea r14d, [rax + 5]
cmp qword [rdi + 0x20], 0
je 0x140163694
mov rax, qword [rdi + 0x10]
test rax, rax
je 0x140163694
cmp rax, r14
jb 0x140163694
lea rcx, [rbx + 0x30]
add rcx, r14
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x1401636a3
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 0x140163681
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 0x140163691
mov qword [r15 + 0x28], rsi
mov r15, rsi
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x1401635c0
jmp 0x1401636a9
mov r12d, 8
mov rcx, qword [rsp + 0x68]
mov r14, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x58]
test rcx, rcx
je 0x1401636c3
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test r12d, r12d
je 0x1401636e9
test rbp, rbp
je 0x1401636e5
nop dword [rax]
mov rbx, qword [rbp + 0x28]
mov rcx, rbp
call qword [fcn.140195925]
mov rbp, rbx
test rbx, rbx
jne 0x1401636d0
xor ebp, ebp
jmp 0x1401636fd
test rbp, rbp
jne 0x1401636fd
mov r12d, 0x2af9
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rdi, qword [rsp + 0x60]
mov eax, r12d
mov rbx, qword [rsp + 0x50]
mov qword [r13], rbp
add rsp, 0x28
pop r15
pop r13
pop r12
pop rbp
ret
Function at 0x140163d10
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov rdi, rdx
mov edx, Ordinal_45
mov rsi, r8
mov rbp, rcx
test r8, r8
je 0x140163ddb
nop dword [rax + rax]
mov ebx, 4
lea rdx, [rsp + 0x40]
cmp rsi, rbx
mov r8d, 4
mov rcx, rbp
cmovb rbx, rsi
call fcn.140147db0
cmp eax, 4
jne 0x140163d8e
cmp byte [0x140d15230], 0
jne 0x140163d9a
xor eax, eax
lea rdx, [rsp + 0x40]
xor ecx, ecx
mov dword [rsp + 0x40], eax
lea r9d, [rax + 2]
lea r8d, [rax + 4]
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
mov edx, eax
test eax, eax
jne 0x140163ddd
mov eax, dword [rsp + 0x40]
jmp 0x140163db8
imul eax, dword [0x140d15234], 0x41c64e6d
add eax, 0x3039
mov dword [0x140d15234], eax
rol eax, 0x10
mov dword [rsp + 0x40], eax
xor edx, edx
test rbx, rbx
je 0x140163dd2
sub rsi, rbx
mov byte [rdi], al
inc rdi
shr eax, 8
sub rbx, 1
jne 0x140163dc0
mov dword [rsp + 0x40], eax
test rsi, rsi
jne 0x140163d40
mov eax, edx
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x140163e00
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
sub rdi, 1
je 0x140163ecb
lea rbp, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
nop
mov r8d, 4
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.140147db0
cmp eax, 4
jne 0x140163e94
cmp byte [0x140d15230], 0
jne 0x140163e76
xor eax, eax
lea rdx, [rsp + 0x40]
xor ecx, ecx
mov dword [rsp + 0x40], eax
lea r9d, [rax + 2]
lea r8d, [rax + 4]
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
je 0x140163e98
mov eax, 2
jmp 0x140163ed0
imul eax, dword [0x140d15234], 0x41c64e6d
add eax, 0x3039
mov dword [0x140d15234], eax
rol eax, 0x10
mov dword [rsp + 0x40], eax
jmp 0x140163e98
test eax, eax
jne 0x140163ed0
mov ecx, dword [rsp + 0x40]
cmp ecx, 0xfffffffc
jae 0x140163e30
mov eax, 0x8421085
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 5
imul eax, eax, 0x3e
sub ecx, eax
movzx eax, byte [rcx + rbp]
mov byte [rsi], al
inc rsi
sub rdi, 1
jne 0x140163e30
mov byte [rsi], 0
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x140167160
Capabilities:
Query environment variable

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 r14, rcx
mov ebx, 1
mov edx, ebx
xor ecx, ecx
xor ebp, ebp
call qword [case.0x14014a45f.0]
mov rdi, rax
test rax, rax
je 0x1401671dd
nop word [rax + rax]
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
mov rbp, rdi
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, eax
test eax, eax
je 0x140167208
cmp ebx, esi
je 0x140167208
cmp ebx, 0x8000
ja 0x140167208
cmp ebx, esi
jb 0x140167203
mov edx, ebx
mov rcx, rdi
call qword [case.0x14014a45f.0]
mov rdi, rax
test rax, rax
jne 0x1401671a0
mov rcx, rbp
call qword [fcn.140195925]
xor eax, eax
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
mov rax, rdi
jmp 0x1401671e8
mov rcx, rdi
jmp 0x1401671e0
jmp 0x140167160

Function at 0x140167210
Capabilities:
Query environment variable

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 r14, rcx
mov ebx, 1
mov edx, ebx
xor ecx, ecx
xor ebp, ebp
call qword [case.0x14014a45f.0]
mov rdi, rax
test rax, rax
je 0x1401671dd
nop word [rax + rax]
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
mov rbp, rdi
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, eax
test eax, eax
je 0x140167208
cmp ebx, esi
je 0x140167208
cmp ebx, 0x8000
ja 0x140167208
cmp ebx, esi
jb 0x140167203
mov edx, ebx
mov rcx, rdi
call qword [case.0x14014a45f.0]
mov rdi, rax
test rax, rax
jne 0x1401671a0
mov rcx, rbp
call qword [fcn.140195925]
xor eax, eax
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
mov rax, rdi
jmp 0x1401671e8
mov rcx, rdi
jmp 0x1401671e0
jmp 0x140167160
Function at 0x140171a10
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0xc0
mov rax, qword [0x140229948]
xor rax, rsp
mov qword [rsp + 0xb0], rax
mov rsi, qword [rcx + 0x20]
lea r8, [rsp + 0x20]
mov rdi, rcx
lea rdx, [rsp + 0x30]
mov rbx, qword [rsi + 0x1e0]
mov rcx, rbx
mov qword [rsp + 0x28], 0xffffffffffffffff
mov dword [rsp + 0x20], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x140171a8c
lea r8, [rsp + 0x20]
mov dword [rsp + 0x20], 0x80
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rsp + 0x28], rax
jmp 0x140171a91
mov rax, qword [rsp + 0x28]
mov rcx, rdi
cmp rax, 0xffffffffffffffff
jne 0x140171ab0
lea rdx, str.Error_accept__ing_server_connect
call fcn.14014e670
mov eax, reloc.WLDAP32.dll_Ordinal_30
jmp 0x140171b3c
lea rdx, str.Connection_accepted_from_server
call fcn.14014e800
mov byte [rsi + 0x305], 0
mov edx, 1
mov rcx, qword [rsp + 0x28]
call fcn.14018bcc0
lea r9, [rsp + 0x28]
mov r8d, 1
mov rdx, rsi
mov rcx, rdi
call fcn.140183fc0
test eax, eax
jne 0x140171b3c
cmp qword [rdi + 0x270], 0
je 0x140171b3a
mov dl, 1
mov rcx, rdi
call fcn.14013c610
mov rdx, qword [rsp + 0x28]
mov r8d, 1
mov rcx, qword [rdi + 0x278]
call qword [rdi + 0x270]
xor edx, edx
mov rcx, rdi
mov ebx, eax
call fcn.14013c610
test ebx, ebx
je 0x140171b3a
mov rdx, rsi
mov rcx, rdi
call fcn.140172050
mov eax, Ordinal_45
jmp 0x140171b3c
xor eax, eax
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.140194380
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rsi, qword [rcx + 0x20]
lea eax, [rdx - 0xc8]
mov rbx, rcx
mov edi, dword [rsi + 0x6e8]
cmp eax, 0x64
jb 0x140173a1d
test edi, edi
jne 0x1401739de
lea rdx, str.disabling_EPRT_usage
call fcn.14014e800
mov byte [rsi + 0x30a], dil
inc edi
mov rcx, rbx
cmp edi, 2
jne 0x140173a07
lea rdx, str.Failed_to_do_PORT
call fcn.14014e670
lea eax, [rdi + 0x1c]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov edx, edi
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
jmp 0x1401747e0
lea rdx, str.Connect_data_stream_actively
call fcn.14014e800
mov rax, qword [rbx + 0x20]
mov byte [rax + 0x6f6], 0
mov rax, qword [rbx + 0x198]
mov rdi, qword [rbx + 0x20]
cmp dword [rax + 0x10], 0
je 0x140173a61
or r8, 0xffffffffffffffff
mov dword [rsp + 0x20], 0xffffffff
or edx, r8d
xor r9d, r9d
mov rcx, rbx
call fcn.140154f10
jmp 0x140173a68
mov byte [rdi + 0x305], 1
mov rbx, qword [rsp + 0x40]
xor eax, eax
mov rsi, qword [rsp + 0x48]
mov byte [rdi + 0x6fc], 1
add rsp, 0x30
pop rdi
ret
Function at 0x140174470
Capabilities:
Check http status code

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rbp, qword [rcx + 0x20]
lea eax, [rdx - 0xc8]
xor edi, edi
movzx esi, r8b
mov rbx, rcx
cmp eax, 0x64
jb 0x1401744ad
lea rdx, str.Couldnt_set_desired_mode
call fcn.14014e670
lea eax, [rdi + 0x11]
jmp 0x140174509
cmp edx, 0xc8
je 0x1401744c4
mov r8d, edx
lea rdx, str.Got_a__03d_response_code_instead_of_the_assumed_200
call fcn.14014e800
cmp sil, 0x13
jne 0x1401744d7
mov rdx, rbp
mov rcx, rbx
call fcn.1401740c0
jmp 0x140174505
cmp sil, 0x14
jne 0x1401744e7
mov rcx, rbx
call fcn.140172e70
jmp 0x140174505
cmp sil, 0x15
jne 0x1401744f2
mov r8b, reloc.WS2_32.dll_listen
jmp 0x1401744fb
cmp sil, 0x16
jne 0x140174507
mov r8b, recv
mov dl, 1
mov rcx, rbx
call fcn.140173bb0
mov edi, eax
mov eax, edi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140177d80
Capabilities:
Send data
Send data on socket

Disassembly:
mov r9, qword [rcx + 0x198]
mov r11, rcx
movsxd r10, edx
mov r8d, dword [r9 + r10*4 + 8]
sub r8d, 1
je 0x140177e01
sub r8d, 1
je 0x140177dd8
cmp r8d, 1
jne 0x140177e15
mov ecx, dword [r9 + r10*4 + 0x408]
test ecx, ecx
je 0x140177df9
cmp ecx, r8d
jne 0x140177e15
xor eax, eax
mov dword [r9 + r10*4 + 8], 2
mov r8d, edx
mov dword [r9 + r10*4 + 0x408], eax
mov edx, 0xfb
mov rcx, r11
jmp fcn.140177fa0
mov ecx, dword [r9 + r10*4 + 0x408]
test ecx, ecx
je 0x140177df9
cmp ecx, 1
jne 0x140177e15
xor eax, eax
mov dword [r9 + r10*4 + 8], eax
mov dword [r9 + r10*4 + 0x408], eax
ret
xor eax, eax
mov dword [r9 + r10*4 + 8], eax
ret
xor eax, eax
mov r8d, edx
mov edx, 0xfc
mov dword [r9 + r10*4 + 8], eax
jmp fcn.140177fa0
ret

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

Disassembly:
mov r9, qword [rcx + 0x198]
mov r11, rcx
movsxd r10, edx
mov r8d, dword [r9 + r10*4 + 0xc08]
test r8d, r8d
je 0x140177ec4
sub r8d, 2
je 0x140177e7d
cmp r8d, 1
jne 0x140177eb6
mov ecx, dword [r9 + r10*4 + 0x1008]
test ecx, ecx
je 0x140177e70
cmp ecx, r8d
jne 0x140177eb6
mov dword [r9 + r10*4 + 0xc08], r8d
mov dword [r9 + r10*4 + 0x1008], 0
ret
mov dword [r9 + r10*4 + 0xc08], 0
ret
mov ecx, dword [r9 + r10*4 + 0x1008]
test ecx, ecx
je 0x140177eb7
cmp ecx, 1
jne 0x140177eb6
mov dword [r9 + r10*4 + 0xc08], 3
mov rcx, r11
mov dword [r9 + r10*4 + 0x1008], 0
mov r8d, edx
mov edx, 0xfe
jmp fcn.140177fa0
ret
mov dword [r9 + r10*4 + 0xc08], 1
ret
cmp dword [r9 + r10*4 + 0x1408], 1
jne 0x140177ea9
mov r8d, edx
mov dword [r9 + r10*4 + 0xc08], 1
mov edx, 0xfd
jmp fcn.140177fa0

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

Disassembly:
mov r9, qword [rcx + 0x198]
mov r11, rcx
movsxd r10, edx
mov r8d, dword [r9 + r10*4 + 0xc08]
sub r8d, 1
je 0x140177f7d
sub r8d, 1
je 0x140177f4e
cmp r8d, 1
jne 0x140177f94
mov ecx, dword [r9 + r10*4 + 0x1008]
test ecx, ecx
je 0x140177f72
cmp ecx, r8d
jne 0x140177f94
xor eax, eax
mov dword [r9 + r10*4 + 0xc08], 2
mov r8d, edx
mov dword [r9 + r10*4 + 0x1008], eax
mov edx, 0xfd
mov rcx, r11
jmp fcn.140177fa0
mov ecx, dword [r9 + r10*4 + 0x1008]
test ecx, ecx
je 0x140177f72
cmp ecx, 1
jne 0x140177f94
xor eax, eax
mov dword [r9 + r10*4 + 0xc08], eax
mov dword [r9 + r10*4 + 0x1008], eax
ret
xor eax, eax
mov dword [r9 + r10*4 + 0xc08], eax
ret
xor eax, eax
mov r8d, edx
mov edx, 0xfe
mov dword [r9 + r10*4 + 0xc08], eax
jmp fcn.140177fa0
ret
Function at 0x140177fa0
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov byte [rsp + 0x38], 0xff
mov rcx, qword [rcx + 0x20]
mov edi, r8d
mov esi, edx
mov byte [rsp + 0x3a], dil
xor r9d, r9d
mov byte [rsp + 0x39], sil
lea rdx, [rsp + 0x38]
mov rcx, qword [rcx + 0x1d8]
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140177fff
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbx
mov r8d, eax
call fcn.14014e670
mov r9d, edi
lea rdx, str.SENT
mov r8d, esi
mov rcx, rbx
call fcn.1401777c0
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

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

Disassembly:
cmp edx, 0x1f
jne 0x14017834f
push rsi
push rdi
push r15
sub rsp, 0x30
mov rdi, qword [rcx + 0x198]
mov rsi, rcx
mov r15, qword [rcx + 0x20]
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x28], rbp
lea rbx, [rdi + 0x1eb8]
mov qword [rsp + 0x20], r14
lea r14, [rdi + 0x1cb8]
mov qword [rbx], r14
cmp r14, rbx
jae 0x1401781eb
mov byte [r14], 0xff
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x1401781f9
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140178207
mov byte [rax], Ordinal_32
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rdi + 0x1caa]
movzx ebp, ax
mov word [rsp + 0x58], ax
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rbx]
movzx r8d, ax
mov word [rsp + 0x50], ax
cmp rcx, rbx
jae 0x140178240
mov byte [rcx], bpl
inc qword [rbx]
mov rdx, qword [rbx]
mov rbp, qword [rsp + 0x28]
cmp rdx, rbx
jae 0x140178257
movzx ecx, byte [rsp + 0x59]
mov byte [rdx], cl
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140178265
mov byte [rax], r8b
inc qword [rbx]
mov rcx, qword [rbx]
cmp rcx, rbx
jae 0x140178277
movzx eax, byte [rsp + 0x51]
mov byte [rcx], al
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140178285
mov byte [rax], 0xff
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140178293
mov byte [rax], 0xf0
inc qword [rbx]
mov rax, qword [rbx]
lea r8, [rdi + 0x1cba]
mov r9, rax
mov qword [rdi + 0x1ec0], rax
sub r9, r14
mov qword [rbx], r14
sub r9, 2
mov edx, 0x3e
mov rcx, rsi
call fcn.140177900
mov rcx, qword [r15 + 0x1d8]
xor r9d, r9d
mov rdx, r14
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov r14, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x60]
test eax, eax
jns 0x1401782fb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rsi
mov r8d, eax
call fcn.14014e670
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, rsi
call fcn.140178030
mov rcx, qword [r15 + 0x1d8]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140178347
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rsi
mov r8d, eax
call fcn.14014e670
add rsp, 0x30
pop r15
pop rdi
pop rsi
ret
Function at 0x140179570
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0xd0
mov rax, qword [0x140229948]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rax, qword [rcx + 0x20]
mov rsi, rcx
xor r9d, r9d
xor edi, edi
mov rbx, qword [rax + 0x600]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x30], 0x80
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r8d, dword [rbx + 0x144]
mov rdx, qword [rbx + 0x150]
add r8d, 4
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.WS2_32.dll_recvfrom]
mov dword [rbx + 0x13c], eax
cmp dword [rbx + 0x138], edi
jne 0x140179606
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xb8]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x138], eax
mov r8d, dword [rbx + 0x13c]
cmp r8d, 4
jge 0x140179646
lea rdx, str.Received_too_short_packet
mov rcx, rsi
call fcn.14014e670
mov dword [rbx + 0xc], 7
mov eax, edi
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.140194380
add rsp, 0xd0
pop rdi
pop rsi
pop rbx
ret
mov rax, qword [rbx + 0x150]
movzx ecx, byte [rax]
movzx edx, byte [rax + 1]
shl ecx, 8
or edx, ecx
mov dword [rbx + 0xc], edx
sub edx, 3
je 0x140179740
sub edx, 1
je 0x140179719
sub edx, 1
je 0x1401796ab
cmp edx, 1
je 0x140179693
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rsi
lea rdx, [0x1401ff880]
call fcn.14014e670
jmp 0x140179719
add r8d, 0xfffffffe
lea rdx, [rax + 2]
mov rcx, rbx
call fcn.1401791e0
mov edi, eax
test eax, eax
je 0x140179719
jmp 0x14017962b
mov qword [rsp + 0xf8], rbp
xor edx, edx
lea rbp, [rax + 4]
mov qword [rsp + 0x100], r14
lea eax, [r8 - 4]
movsxd r14, eax
mov rax, qword [rbx + 0x150]
mov r8, r14
movzx ecx, byte [rax + 2]
movzx eax, byte [rax + 3]
shl ecx, 8
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rbp
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x140179709
sub rax, rbp
cmp rax, r14
jae 0x140179709
mov r8, rbp
lea rdx, str.TFTP_error:__s
mov rcx, rsi
call fcn.14014e800
mov rbp, qword [rsp + 0xf8]
mov r14, qword [rsp + 0x100]
mov rcx, rsi
call fcn.14015fe50
test eax, eax
je 0x140179629
mov edx, 5
mov rcx, rbx
call fcn.14017a190
mov eax, Ordinal_45
jmp 0x14017962b
cmp r8d, 4
jle 0x140179719
movzx ecx, byte [rax + 2]
movzx eax, byte [rax + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x14c]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x140179719
lea eax, [r8 - 4]
mov edx, 1
mov r8, qword [rbx + 0x150]
mov rcx, rsi
add r8, 4
movsxd r9, eax
call fcn.14014ed60
mov edi, eax
test eax, eax
je 0x140179719
mov edx, 5
mov rcx, rbx
call fcn.14017a190
jmp 0x140179629
Function at 0x14017a190
Capabilities:
Send data
Send data on socket

Disassembly:
sub rsp, 0x28
mov r8d, dword [rcx]
mov r9, qword [rcx + 0x10]
test r8d, r8d
je 0x14017a1f7
sub r8d, 1
je 0x14017a1ee
sub r8d, 1
je 0x14017a1e5
lea rdx, [0x1401ff880]
mov rcx, r9
cmp r8d, 1
je 0x14017a1d2
lea r8, str.Internal_state_machine_error
call fcn.14014e670
mov eax, 0x47
add rsp, 0x28
ret
lea r8, str.TFTP_finished
call fcn.14014e800
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp fcn.14017a300
add rsp, 0x28
jmp fcn.1401797a0
add rsp, 0x28
jmp fcn.140179ae0
Function at 0x140184240
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
mov eax, dword [0x140d15238]
mov rbx, rcx
mov dword [rsp + 0x50], 0x4020
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x58], 4
test eax, eax
jne 0x1401842a4
lea r9d, [rax + 2]
mov dword [rsp + 0x20], 3
xor r8d, r8d
lea ecx, [rax + 6]
xor edx, edx
call fcn.1401867a0
test al, al
je 0x140184298
mov dword [0x140d15238], 2
add rsp, 0x30
pop rbx
ret
mov dword [0x140d15238], 1
jmp 0x1401842a9
cmp eax, 2
je 0x1401842fb
lea rax, [rsp + 0x58]
mov edx, 0xffff
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r8d, 0x1001
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1401842da
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x48], eax
jg 0x1401842fb
lea r9, [rsp + 0x50]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
add rsp, 0x30
pop rbx
ret