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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x120
movsxd rax, edx
mov rbx, r9
mov rdi, r8
mov rsi, qword [rcx + rax*8 + 0x4c0]
mov rbp, rcx
call fcn.1400194d0
test eax, eax
je 0x140019648
mov rax, qword [rsp + 0x150]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_27
or rax, 0xffffffffffffffff
jmp 0x1400196c3
xor r9d, r9d
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x150]
movsxd rbx, eax
mov dword [rsi], 0
cmp rbx, 0xffffffffffffffff
jne 0x1400196c0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp eax, 0x2733
jne 0x14001968a
xor ebx, ebx
mov dword [rsi], 0x51
jmp 0x1400196c0
lea rdx, [rsp + 0x20]
mov r8d, 0x100
mov ecx, eax
call fcn.1400076f0
mov rcx, qword [rbp]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140019080
mov r11, qword [rbp]
mov dword [r11 + 0x1378], edi
mov dword [rsi], gethostname
mov rax, rbx
lea r11, [rsp + 0x120]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret

Function at 0x14001d160
Capabilities:
Read file on windows

Disassembly:
sub rsp, 0x28
call sub.MSVCR120.dll__read
cdqe
add rsp, 0x28
ret

Function at 0x14001e8b0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push rbx
sub rsp, 0x30
mov rbx, rcx
test rcx, rcx
je 0x14001e98f
mov rdx, rcx
lea r8, [rsp + 0x40]
mov ecx, 2
call fcn.14004e0a0
test eax, eax
jne 0x14001e98f
lea r8, [rsp + 0x20]
lea ecx, [rax + 0x17]
mov rdx, rbx
call fcn.14004e0a0
test eax, eax
jne 0x14001e98f
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], rdi
xor eax, eax
mov rdi, rbx
xor esi, esi
repne scasb al, byte [rdi]
lea edx, [rsi + 0x2e]
not rcx
lea r8, [rcx - 1]
lea rdi, [rcx - 1]
mov rcx, rbx
call fcn.14004e0f0
test rax, rax
je 0x14001e94b
sub rax, rbx
lea edx, [rsi + 0x2e]
mov rcx, rbx
mov r8, rax
call fcn.14004e0f0
mov rsi, rax
test rax, rax
je 0x14001e94b
inc rsi
mov rcx, rbx
sub rcx, rsi
add rdi, rcx
test rsi, rsi
cmovne rbx, rsi
lea rsi, [rbx + rdi]
mov edi, 0x1505
cmp rbx, rsi
jae 0x14001e97b
movzx ecx, byte [rbx]
call fcn.140023bf0
inc rbx
movsx rcx, al
imul rdi, rdi, 0x21
xor rdi, rcx
cmp rbx, rsi
jb 0x14001e960
mov rsi, qword [rsp + 0x48]
movzx eax, dil
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop rbx
ret
xor eax, eax
add rsp, 0x30
pop rbx
ret
Function at 0x140020df0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x60
xor esi, esi
mov rdi, rdx
mov rbx, rcx
mov eax, esi
lea r9, [rsp + 0x70]
lea r8d, [rsi + 8]
cmp dword [rcx + 0x1068], eax
mov edx, 0xffff
mov rcx, rdi
setne al
mov dword [rsp + 0x20], 4
mov dword [rsp + 0x70], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140020e5e
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
mov r8, rdi
mov rcx, rbx
call fcn.140018f20
mov rbx, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x88]
add rsp, 0x60
pop rdi
ret
mov ecx, dword [rbx + 0xf44]
mov dword [rsp + 0x50], 1
call fcn.14001d0c0
mov ecx, dword [rbx + 0xf48]
imul eax, eax, 0x3e8
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x54], eax
call fcn.14001d0c0
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rsi
lea r8, [rsp + 0x50]
mov r9d, ntohl
mov edx, 0x98000004
imul eax, eax, 0x3e8
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x58], eax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x30], rax
mov rcx, rdi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x140020ef0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
mov r8d, edi
mov r9d, eax
mov rcx, rbx
call fcn.140018f20
mov rbx, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x88]
add rsp, 0x60
pop rdi
ret
Function at 0x140021980
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
sub rsp, 0x1a0
mov rsi, rcx
mov rbx, rdx
lea rcx, [rsp + 0x20]
xor edx, edx
mov r8d, 0x80
mov dword [rsp + 0x1c0], 0x80
call sub.MSVCR120.dll_memset
lea r8, [rsp + 0x1c0]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140021a0d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0xa0]
mov r8d, 0x100
mov ecx, eax
mov ebx, eax
call fcn.1400076f0
mov rcx, qword [rsi]
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r9, rax
mov r8d, ebx
call fcn.140019080
mov rbx, qword [rsp + 0x1b8]
add rsp, 0x1a0
pop rsi
ret
movzx ecx, word [rsp + 0x20]
cmp ecx, 2
je 0x140021a5f
cmp ecx, 0x17
jne 0x140021a66
lea rdx, [rsp + 0x28]
lea r8, [rsi + 0x430]
mov r9d, reloc.WLDAP32.dll_Ordinal_46
call fcn.14004f3e0
test rax, rax
je 0x140021a66
movzx ecx, word [rsp + 0x22]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r11d, ax
mov dword [rsi + 0x460], r11d
mov rbx, qword [rsp + 0x1b8]
add rsp, 0x1a0
pop rsi
ret
lea rdx, [rsp + 0x24]
jmp 0x140021a21
mov byte [rsi + 0x430], 0
mov qword [rsp + 0x1b0], rdi
mov dword [rsi + 0x460], 0
call sub.MSVCR120.dll__errno
mov dword [rax], 0x273f
call sub.MSVCR120.dll__errno
mov rbx, rax
call sub.MSVCR120.dll__errno
mov ecx, dword [rbx]
lea rdx, [rsp + 0xa0]
mov r8d, 0x100
mov rdi, rax
call fcn.1400076f0
mov r8d, dword [rdi]
mov rcx, qword [rsi]
lea rdx, str.ssloc_inet_ntop___failed_with_errno__d:__s
mov r9, rax
call fcn.140019080
mov rdi, qword [rsp + 0x1b0]
mov rbx, qword [rsp + 0x1b8]
add rsp, 0x1a0
pop rsi
ret

Function at 0x140021d70
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
mov eax, dword [0x140148a90]
mov rbx, rcx
mov dword [rsp + 0x50], 0x4020
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x58], 4
test eax, eax
jne 0x140021dcd
lea r9d, [rax + 3]
lea r8d, [rax + 2]
lea ecx, [rax + 6]
xor edx, edx
call fcn.140025670
test eax, eax
je 0x140021dc1
mov dword [0x140148a90], 2
add rsp, 0x30
pop rbx
ret
mov dword [0x140148a90], 1
jmp 0x140021dd2
cmp eax, 2
je 0x140021e24
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x48]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x140021e03
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x48], eax
jg 0x140021e24
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rbx
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
add rsp, 0x30
pop rbx
ret

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

Disassembly:
sub rsp, 0x28
cmp dword [rcx + 0x558], 0
je 0x140021f1d
call fcn.14000ed80
test eax, eax
jne 0x140021f48
xor eax, eax
add rsp, 0x28
ret
mov rcx, qword [rcx + 0x4c0]
cmp rcx, 0xffffffffffffffff
je 0x140021f16
mov r9d, 2
lea rdx, [rsp + 0x30]
lea r8d, [r9 - 1]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x140021f48
add rsp, 0x28
ret
mov eax, 1
add rsp, 0x28
ret
Function at 0x1400248d0
Capabilities:
Resolve dns

Disassembly:
push rbx
push r13
push r14
push r15
sub rsp, 0x28
mov r15, r9
xor ebx, ebx
xor r13d, r13d
mov qword [r9], rbx
lea r9, [rsp + 0x68]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov r14d, eax
test eax, eax
jne 0x140024a5f
mov qword [rsp + 0x58], rsi
mov rsi, qword [rsp + 0x68]
mov qword [rsp + 0x60], rdi
test rsi, rsi
je 0x140024a40
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x20], r12
nop
mov rdi, qword [rsi + 0x18]
test rdi, rdi
je 0x140024939
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
not rcx
mov r12, rcx
jmp 0x14002493c
xor r12d, r12d
mov eax, dword [rsi + 4]
cmp eax, 2
jne 0x140024949
lea ebp, [rax + 0xe]
jmp 0x140024955
cmp eax, 0x17
jne 0x1400249e7
lea ebp, [rax + 5]
cmp qword [rsi + 0x20], 0
je 0x1400249e7
mov rax, qword [rsi + 0x10]
test rax, rax
je 0x1400249e7
cmp rax, rbp
jb 0x1400249e7
lea rcx, [r12 + rbp + 0x30]
call qword [sub.MSVCR120.dll_malloc]
mov rdi, rax
test rax, rax
je 0x1400249f6
mov ecx, dword [rsi]
mov r8, rbp
mov dword [rax], ecx
mov ecx, dword [rsi + 4]
mov dword [rax + 4], ecx
mov ecx, dword [rsi + 8]
mov dword [rax + 8], ecx
mov ecx, dword [rsi + 0xc]
mov dword [rax + 0x10], ebp
mov dword [rax + 0xc], ecx
xor eax, eax
lea rcx, [rdi + 0x30]
mov qword [rdi + 0x20], rcx
mov qword [rdi + 0x18], rax
mov qword [rdi + 0x28], rax
mov rdx, qword [rsi + 0x20]
call sub.MSVCR120.dll_memcpy
test r12, r12
je 0x1400249d4
mov rcx, qword [rdi + 0x20]
mov r8, r12
add rcx, rbp
mov qword [rdi + 0x18], rcx
mov rdx, qword [rsi + 0x18]
call sub.MSVCR120.dll_memcpy
test rbx, rbx
cmove rbx, rdi
test r13, r13
je 0x1400249e4
mov qword [r13 + 0x28], rdi
mov r13, rdi
mov rsi, qword [rsi + 0x28]
test rsi, rsi
jne 0x140024920
jmp 0x1400249fc
mov r14d, 8
mov rcx, qword [rsp + 0x68]
mov r12, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x50]
test rcx, rcx
je 0x140024a16
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test r14d, r14d
je 0x140024a3b
test rbx, rbx
je 0x140024a35
mov rdi, qword [rbx + 0x28]
mov rcx, rbx
call qword [sub.MSVCR120.dll_free]
mov rbx, rdi
test rdi, rdi
jne 0x140024a20
xor eax, eax
mov ebx, eax
jmp 0x140024a4f
test rbx, rbx
jne 0x140024a4f
mov r14d, 0x2af9
mov ecx, r14d
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rdi, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x58]
mov qword [r15], rbx
mov eax, r14d
add rsp, 0x28
pop r15
pop r14
pop r13
pop rbx
ret
Function at 0x140024ee0
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 + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x60
mov edx, 1
mov edi, 2
mov rsi, r9
lea r8d, [rdx + 5]
mov ecx, edi
mov dword [rsp + 0x34], reloc.WS2_32.dll_recv
mov dword [rsp + 0x30], 1
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400250d4
xor eax, eax
mov ecx, 0x7f000001
mov qword [rsp + 0x38], rax
mov word [rsp + 0x38], di
mov qword [rsp + 0x40], rax
call qword [sym.imp.WS2_32.dll_htonl]
lea r9, [rsp + 0x30]
lea r8d, [rdi + 2]
mov dword [rsp + 0x3c], eax
xor eax, eax
mov edx, 0xffff
mov rcx, rbx
mov qword [rsi + 8], 0xffffffffffffffff
mov qword [rsi], 0xffffffffffffffff
mov word [rsp + 0x3a], ax
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1400250b8
lea r8d, [rdi + 0xe]
lea rdx, [rsp + 0x38]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x1400250b8
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x38]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x1400250b8
lea edx, [rdi - 1]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x1400250b8
lea edx, [rdi - 1]
xor r8d, r8d
mov ecx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsi], rax
cmp rax, 0xffffffffffffffff
je 0x1400250b8
lea r8d, [rdi + 0xe]
lea rdx, [rsp + 0x38]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1400250b8
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rsi + 8], rax
cmp rax, 0xffffffffffffffff
je 0x1400250b8
lea r8, [0x140119be0]
lea edx, [rdi + 0xa]
lea rcx, [rsp + 0x48]
mov r9, rsi
call fcn.14000c260
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x48]
lea rdx, [rsp + 0x48]
xor r9d, r9d
repne scasb al, byte [rdi]
not rcx
lea rdi, [rcx - 1]
lea r8d, [rcx - 1]
mov rcx, qword [rsi]
call qword [sym.imp.WS2_32.dll_send]
movsxd rdx, eax
cmp rdx, rdi
jne 0x1400250b8
mov rcx, qword [rsi + 8]
xor r9d, r9d
lea rdx, [rsp + 0x54]
lea r8d, [r9 + 0xc]
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
cmp rcx, rdi
jne 0x1400250b8
lea rdx, [rsp + 0x54]
lea rcx, [rsp + 0x48]
mov r8, rdi
call sub.MSVCR120.dll_memcmp
test eax, eax
jne 0x1400250b8
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
mov rcx, rbx
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 rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
or eax, 0xffffffff
add rsp, 0x60
pop rdi
ret
Function at 0x1400251d0
Capabilities:
Create thread

Disassembly:
sub rsp, 0x38
xor eax, eax
mov r9, rdx
mov r8, rcx
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], eax
call sub.MSVCR120.dll__beginthreadex
test rax, rax
je 0x1400251f9
cmp rax, 0xffffffffffffffff
jne 0x1400251fb
xor eax, eax
add rsp, 0x38
ret
Function at 0x140028290
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
push rsi
push rdi
push r12
sub rsp, 0x50
mov rdi, r8
xor r12d, r12d
mov rbx, r9
mov rsi, rdx
mov rbp, rcx
mov r8, r9
mov rcx, rdi
xor edx, edx
mov qword [rax - 0x28], r12
mov qword [rax - 0x30], r12
mov dword [rax + 0x20], r12d
mov dword [rax - 0x38], 4
mov dword [rax - 0x34], ebx
call sub.MSVCR120.dll_memset
mov r9d, dword [rsp + 0x90]
lea rcx, [rsp + 0x40]
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 0xf0000040
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x1400283ac
mov edx, dword [rsp + 0x98]
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x14002838a
mov rcx, qword [rsp + 0x38]
xor r9d, r9d
mov r8d, esi
mov rdx, rbp
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x14002838a
mov rcx, qword [rsp + 0x38]
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x88]
lea edx, [r12 + 4]
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x14002838a
mov eax, dword [rsp + 0x88]
cmp rbx, rax
jb 0x14002838a
mov rcx, qword [rsp + 0x38]
lea r9, [rsp + 0x34]
lea edx, [r12 + 2]
mov r8, rdi
mov dword [rsp + 0x20], r12d
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14002839a
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1400283ac
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x50
pop r12
pop rdi
pop rsi
ret

Function at 0x14002a940
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 r12
sub rsp, 0x20
mov r12, rcx
mov ebx, 1
xor ecx, ecx
mov edx, ebx
xor ebp, ebp
call qword [0x140147580]
mov rdi, rax
test rax, rax
je 0x14002a9bd
nop word [rax + rax]
mov r8d, ebx
mov rdx, rdi
mov rcx, r12
mov rbp, rdi
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, eax
test eax, eax
je 0x14002a9e8
cmp ebx, esi
je 0x14002a9e8
cmp ebx, 0x8000
ja 0x14002a9e8
cmp ebx, esi
jb 0x14002a9e3
mov edx, ebx
mov rcx, rdi
call qword [0x140147580]
mov rdi, rax
test rax, rax
jne 0x14002a980
mov rcx, rbp
call qword [sub.MSVCR120.dll_free]
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 r12
ret
mov rax, rdi
jmp 0x14002a9c8
mov rcx, rdi
jmp 0x14002a9c0
jmp 0x14002a940
Function at 0x14002a9f0
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 r12
sub rsp, 0x20
mov r12, rcx
mov ebx, 1
xor ecx, ecx
mov edx, ebx
xor ebp, ebp
call qword [0x140147580]
mov rdi, rax
test rax, rax
je 0x14002a9bd
nop word [rax + rax]
mov r8d, ebx
mov rdx, rdi
mov rcx, r12
mov rbp, rdi
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, eax
test eax, eax
je 0x14002a9e8
cmp ebx, esi
je 0x14002a9e8
cmp ebx, 0x8000
ja 0x14002a9e8
cmp ebx, esi
jb 0x14002a9e3
mov edx, ebx
mov rcx, rdi
call qword [0x140147580]
mov rdi, rax
test rax, rax
jne 0x14002a980
mov rcx, rbp
call qword [sub.MSVCR120.dll_free]
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 r12
ret
mov rax, rdi
jmp 0x14002a9c8
mov rcx, rdi
jmp 0x14002a9c0
jmp 0x14002a940
Function at 0x140031380
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov rax, rsp
push rbx
push rdi
push r12
sub rsp, 0xb0
mov rbx, qword [rcx + 0xa80]
mov rdi, qword [rcx]
mov dword [rax + 8], 0x80
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
lea rax, [rax + 8]
mov qword [rsp + 0x28], rax
mov r12, rcx
mov rcx, qword [rbx + 0x18]
lea rax, [rsp + 0x30]
add r8d, 4
xor r9d, r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x14003140b
movsxd r8, dword [rsp + 0xd0]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x30]
call sub.MSVCR120.dll_memcpy
mov r11d, dword [rsp + 0xd0]
mov dword [rbx + 0x150], r11d
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xd8], rbp
mov qword [rsp + 0xe0], rsi
cmp r8d, 4
jge 0x14003145c
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.140019080
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0xe0]
mov rbp, qword [rsp + 0xd8]
add rsp, 0xb0
pop r12
pop rdi
pop rbx
ret
mov rcx, qword [rbx + 0x168]
movzx eax, byte [rcx]
shl ax, 8
movzx edx, ax
movzx eax, byte [rcx + 1]
or edx, eax
mov dword [rbx + 0xc], edx
sub edx, 3
je 0x140031531
dec edx
je 0x1400315af
dec edx
je 0x1400314ce
dec edx
je 0x1400314aa
lea r8, str.Internal_error:_Unexpected_packet
lea rdx, [0x14011bc54]
mov rcx, rdi
call fcn.140019080
jmp 0x1400315af
mov rdx, qword [rbx + 0x168]
add r8d, 0xfffffffe
mov rcx, rbx
add rdx, 2
call fcn.14002fe60
test eax, eax
je 0x1400315af
jmp 0x140031440
mov rdx, qword [rbx + 0x168]
mov rsi, qword [rbx + 0x168]
lea eax, [r8 - 4]
movsxd rbp, eax
movzx eax, byte [rdx + 2]
add rsi, 4
shl ax, 8
mov r8, rbp
movzx ecx, ax
movzx eax, byte [rdx + 3]
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rsi
call sub.MSVCR120.dll_memchr
test rax, rax
je 0x1400315af
sub rax, rsi
cmp rax, rbp
jae 0x1400315af
lea rdx, str.TFTP_error:__s_n
mov r8, rsi
mov rcx, rdi
call fcn.140018f20
jmp 0x1400315af
cmp r8d, 4
jle 0x1400315af
mov rcx, qword [rbx + 0x168]
movzx eax, byte [rcx + 2]
shl ax, 8
movzx edx, ax
movzx eax, byte [rcx + 3]
or edx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, edx
jne 0x1400315af
lea eax, [r8 - 4]
lea r8, [rcx + 4]
mov edx, 1
movsxd r9, eax
mov rcx, r12
call fcn.140019490
mov esi, eax
test eax, eax
je 0x14003158e
mov edx, 5
mov rcx, rbx
call fcn.140031300
mov eax, esi
jmp 0x140031440
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.140029260
mov rcx, r12
call fcn.1400299a0
test eax, eax
je 0x14003143e
mov edx, 5
mov rcx, rbx
call fcn.140031300
mov eax, Ordinal_46
jmp 0x140031440
Function at 0x140031940
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
cmp dword [rcx + 0x1030], 0
movsxd r10, r9d
mov r11, rcx
je 0x140031a6d
cmp r8d, 0xff
jne 0x1400319a4
lea eax, [r10 - 0xec]
mov r8, rdx
cmp eax, 0x13
ja 0x140031991
lea rcx, [0x140000000]
lea rdx, str._s_IAC__s_n
mov r9, qword [rcx + r10*8 + 0x11bf40]
mov rcx, r11
add rsp, 0x38
jmp fcn.140018f20
lea rdx, str._s_IAC__d_n
mov r9d, r10d
add rsp, 0x38
jmp fcn.140018f20
cmp r8d, 0xfb
jne 0x1400319b6
lea r9, str.WILL
jmp 0x1400319f4
cmp r8d, 0xfc
jne 0x1400319c8
lea r9, str.WONT
jmp 0x1400319f4
cmp r8d, 0xfd
jne 0x1400319da
lea r9, [0x14011c32c]
jmp 0x1400319f4
xor r9d, r9d
cmp r8d, 0xfe
lea rax, str.DONT
cmove r9, rax
test r9, r9
je 0x140031a56
cmp r10d, 0x27
jg 0x140031a2a
lea rcx, [0x140000000]
mov rcx, qword [rcx + r10*8 + 0x11c560]
test rcx, rcx
jne 0x140031a3a
mov r8, rdx
lea rdx, str._s__s__d_n
mov rcx, r11
mov dword [rsp + 0x20], r10d
call fcn.140018f20
add rsp, 0x38
ret
cmp r10d, 0xff
jne 0x140031a0e
lea rcx, str.EXOPL
mov r8, rdx
mov qword [rsp + 0x20], rcx
lea rdx, str._s__s__s_n
mov rcx, r11
call fcn.140018f20
add rsp, 0x38
ret
mov r9d, r8d
mov r8, rdx
lea rdx, [0x14011c7c8]
mov dword [rsp + 0x20], r10d
call fcn.140018f20
add rsp, 0x38
ret

Function at 0x140031a80
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]
xor r9d, r9d
mov rbx, rcx
mov rcx, qword [rcx + 0x4c0]
mov edi, r8d
mov esi, edx
mov byte [rax + 0x11], dl
mov byte [rax + 0x12], r8b
lea r8d, [r9 + 3]
lea rdx, [rax + 0x10]
mov byte [rax + 0x10], 0xff
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140031ade
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140019080
mov rcx, qword [rbx]
lea rdx, str.SENT
mov r9d, edi
mov r8d, esi
call fcn.140031940
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

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

Disassembly:
sub rsp, 0x28
mov rax, qword [rcx]
movsxd r9, edx
mov r11, rcx
mov r8, qword [rax + 0x1b0]
mov r10d, dword [r8 + r9*4 + 0xc08]
test r10d, r10d
je 0x140031c94
sub r10d, 2
je 0x140031c4a
dec r10d
jne 0x140031c7e
mov ecx, dword [r8 + r9*4 + 0x1008]
test ecx, ecx
je 0x140031c39
dec ecx
jne 0x140031c7e
mov dword [r8 + r9*4 + 0xc08], 1
mov dword [r8 + r9*4 + 0x1008], ecx
add rsp, 0x28
ret
mov dword [r8 + r9*4 + 0xc08], 0
add rsp, 0x28
ret
mov ecx, dword [r8 + r9*4 + 0x1008]
test ecx, ecx
je 0x140031c83
dec ecx
jne 0x140031c7e
mov dword [r8 + r9*4 + 0x1008], ecx
mov dword [r8 + r9*4 + 0xc08], 3
mov rcx, r11
mov r8d, edx
mov edx, 0xfe
call fcn.140031a80
add rsp, 0x28
ret
mov dword [r8 + r9*4 + 0xc08], 1
add rsp, 0x28
ret
cmp dword [r8 + r9*4 + 0x1408], 1
jne 0x140031c71
mov dword [r8 + r9*4 + 0xc08], 1
mov r8d, edx
mov edx, 0xfd
add rsp, 0x28
jmp fcn.140031a80
Function at 0x140031cc0
Capabilities:
Send data
Send data on socket

Disassembly:
sub rsp, 0x28
mov rax, qword [rcx]
movsxd r9, edx
mov r11, rcx
mov r8, qword [rax + 0x1b0]
mov r10d, dword [r8 + r9*4 + 0xc08]
dec r10d
je 0x140031d5f
dec r10d
je 0x140031d38
dec r10d
jne 0x140031d76
mov ecx, dword [r8 + r9*4 + 0x1008]
test ecx, ecx
je 0x140031d29
dec ecx
jne 0x140031d76
xor eax, eax
mov dword [r8 + r9*4 + 0xc08], 2
mov rcx, r11
mov dword [r8 + r9*4 + 0x1008], eax
mov r8d, edx
mov edx, 0xfd
add rsp, 0x28
jmp fcn.140031a80
xor eax, eax
mov dword [r8 + r9*4 + 0xc08], eax
add rsp, 0x28
ret
mov ecx, dword [r8 + r9*4 + 0x1008]
test ecx, ecx
je 0x140031d29
dec ecx
jne 0x140031d76
xor eax, eax
mov dword [r8 + r9*4 + 0xc08], eax
mov dword [r8 + r9*4 + 0x1008], eax
add rsp, 0x28
ret
xor eax, eax
mov dword [r8 + r9*4 + 0xc08], eax
mov r8d, edx
mov edx, 0xfe
call fcn.140031a80
add rsp, 0x28
ret

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

Disassembly:
sub rsp, 0x28
mov rax, qword [rcx]
movsxd r9, edx
mov r11, rcx
mov r8, qword [rax + 0x1b0]
mov r10d, dword [r8 + r9*4 + 8]
dec r10d
je 0x140031ecf
dec r10d
je 0x140031eab
dec r10d
jne 0x140031ee3
mov ecx, dword [r8 + r9*4 + 0x408]
test ecx, ecx
je 0x140031e9f
dec ecx
jne 0x140031ee3
xor eax, eax
mov dword [r8 + r9*4 + 8], 2
mov rcx, r11
mov dword [r8 + r9*4 + 0x408], eax
mov r8d, edx
mov edx, 0xfb
add rsp, 0x28
jmp fcn.140031a80
xor eax, eax
mov dword [r8 + r9*4 + 8], eax
add rsp, 0x28
ret
mov ecx, dword [r8 + r9*4 + 0x408]
test ecx, ecx
je 0x140031e9f
dec ecx
jne 0x140031ee3
xor eax, eax
mov dword [r8 + r9*4 + 8], eax
mov dword [r8 + r9*4 + 0x408], eax
add rsp, 0x28
ret
xor eax, eax
mov dword [r8 + r9*4 + 8], eax
mov r8d, edx
mov edx, 0xfc
call fcn.140031a80
add rsp, 0x28
ret