joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4b636f
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
add edi, edi
mov eax, dword [esi + 0x2a8]
mov edx, dword [esi + ecx*4 + 0x1a8]
mov dword [ebp + 8], edx
mov ebx, dword [esi + edi*8 + 0x1d0]
sub ebx, dword [esi + edi*8 + 0x1d4]
test byte [eax + 0x40], 3
je 0x4b6457
cmp dword [esi + ecx*4 + 0x1bc], 0x4b5df6
jne 0x4b6457
xor eax, eax
cmp dword [esi + edi*8 + 0x1cc], eax
je 0x4b63cb
test ebx, ebx
je 0x4b6457
push eax
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push edx
call fcn.004b5696
add esp, 0x14
cmp eax, 0xffffffff
je 0x4b6457
test al, 1
je 0x4b6457
xor ecx, ecx
cmp dword [esi + edi*8 + 0x1cc], ecx
jne 0x4b6432
mov eax, dword [esi]
mov eax, dword [eax + 0x8e4]
add eax, eax
push eax
mov dword [esi + edi*8 + 0x1d0], eax
call dword [0x5d40cc]
mov ebx, dword [esi + edi*8 + 0x1d0]
pop ecx
xor ecx, ecx
mov dword [esi + edi*8 + 0x1cc], eax
mov dword [esi + edi*8 + 0x1d4], ecx
mov dword [esi + edi*8 + 0x1d8], ecx
test eax, eax
jne 0x4b6432
mov dword [esi + edi*8 + 0x1d0], ecx
jmp 0x4b6457
mov eax, dword [esi + edi*8 + 0x1cc]
add eax, dword [esi + edi*8 + 0x1d4]
push ecx
push ebx
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x4b6457
add dword [esi + edi*8 + 0x1d4], eax
pop edi
pop esi
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test byte [eax + 0x1f8], 1
je 0x4b6539
push eax
call fcn.004afd71
pop ecx
test eax, eax
jne 0x4b6555
xor al, al
pop ebp
ret
mov eax, dword [eax + 0x1a8]
cmp eax, 0xffffffff
je 0x4b6535
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
jmp 0x4b6531
mov al, 1
pop ebp
ret

Function at 0x4b6c36
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 4], 0
mov eax, dword [0x789510]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 0xc], 4
push esi
push 2
pop esi
test eax, eax
jne 0x4b6c7d
push 3
push esi
push eax
push 6
call fcn.004b7d92
add esp, 0x10
test al, al
je 0x4b6c75
mov dword [0x789510], esi
jmp 0x4b6cbd
xor eax, eax
inc eax
mov dword [0x789510], eax
cmp eax, esi
je 0x4b6cbd
push ebx
lea eax, [ebp - 0xc]
mov esi, 0x1001
push eax
lea eax, [ebp - 4]
mov ebx, 0xffff
push eax
push esi
push ebx
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4b6cab
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x4b6cbc
push 4
lea eax, [ebp - 8]
push eax
push esi
push ebx
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4b6e91
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18c
mov eax, dword [0x5d4074]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
cmp dword [ebx + 0x90], 2
mov edi, dword [ebx]
mov dword [ebp - 0x18c], edi
je 0x4b702a
test dword [ebx + 0x284], 0x8000002
push esi
jne 0x4b7022
lea eax, [ebp - 0x188]
mov esi, 0x80
push eax
lea eax, [ebp - 0x184]
mov dword [ebp - 0x188], esi
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4b6f18
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push esi
call fcn.004d85b6
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
jmp 0x4b6f6c
push esi
lea eax, [ebp - 0x104]
mov dword [ebp - 0x188], esi
push 0
push eax
call fcn.0052eb40
add esp, 0xc
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b6f72
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push esi
call fcn.004d85b6
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
jmp 0x4b7018
lea eax, [ebx + 0x138]
push eax
lea esi, [ebx + 0x10a]
lea eax, [ebp - 0x184]
push esi
push eax
call fcn.004b747d
add esp, 0xc
test al, al
jne 0x4b6fbe
call fcn.0053191a
mov esi, eax
call fcn.0053191a
mov edi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push dword [esi]
call fcn.004d85b6
push eax
push dword [edi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
jmp 0x4b7012
push 0xb
pop ecx
lea edi, [ebx + 0x5c]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x16c]
push eax
lea eax, [ebx + 0x13c]
push eax
lea eax, [ebp - 0x104]
movsw word es:[edi], word [esi]
push eax
call fcn.004b747d
add esp, 0xc
test al, al
jne 0x4b7022
call fcn.0053191a
mov esi, eax
call fcn.0053191a
mov edi, eax
lea eax, [ebp - 0x84]
push 0x80
push eax
push dword [esi]
call fcn.004d85b6
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x18c]
call fcn.004b5af1
add esp, 0x1c
jmp 0x4b7029
push ebx
call fcn.004b6bc3
pop ecx
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004a04e0
mov esp, ebp
pop ebp
ret
Function at 0x4b77f0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x5d4074]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 4
mov eax, dword [esi + 0xa90]
shr eax, 0xd
and eax, 1
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 8
push 0xffff
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4b7840
push dword [ebp + 0xc]
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.004b5bc7
add esp, 0xc
jmp 0x4b78b1
push dword [esi + 0xa50]
mov dword [ebp - 0x10], 1
call fcn.004b7a69
push dword [esi + 0xa54]
imul eax, eax, 0x3e8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.004b7a69
pop ecx
pop ecx
imul eax, eax, 0x3e8
xor ecx, ecx
push ecx
push ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push ecx
push ecx
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4b78b1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp + 0xc]
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.004b5bc7
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004a04e0
mov esp, ebp
pop ebp
ret

Function at 0x4b78c0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x5d4074]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
push esi
push 4
inc ecx
mov esi, dword [eax]
lea eax, [ebp - 0x88]
push eax
push ecx
push 6
push dword [ebp + 0xc]
mov dword [ebp - 0x88], ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4b7924
push 0x80
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004d85b6
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004b5bc7
add esp, 0x18
jmp 0x4b7931
push str.TCP_NODELAY_set_n
push esi
call fcn.004b5bc7
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004a04e0
mov esp, ebp
pop ebp
ret

Function at 0x4b7a4f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.0054f66f
Function at 0x4b7c5b
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push str.kernel32
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 4], eax
test eax, eax
je 0x4b7d8d
push ebx
push edi
push 0x5927a4
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [ebp + 8]
mov ebx, eax
push 0x5c36ec
push edi
mov dword [ebp - 8], ebx
call fcn.00549ec4
pop ecx
pop ecx
test eax, eax
je 0x4b7cb1
test ebx, ebx
je 0x4b7ca8
push 8
jmp 0x4b7ccc
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
jmp 0x4b7cd0
test ebx, ebx
je 0x4b7cd7
push str.AddDllDirectory
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4b7cd7
push 0x800
push esi
push edi
call ebx
mov esi, eax
jmp 0x4b7d89
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
je 0x4b7d89
mov ecx, edi
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x4b7cf1
sub ecx, ebx
sar ecx, 1
lea eax, [ecx + edx]
lea eax, [eax*2 + 2]
push eax
call dword [0x5d40cc]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x4b7d81
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x4b7d81
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x4b7d2b
sub ecx, edx
sar ecx, 1
mov dword [ebx + ecx*2], 0x5c
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x4b7d46
sub ecx, edx
sar ecx, 1
lea ecx, [ebx + ecx*2]
sub ecx, edi
movzx eax, word [edi]
mov word [ecx + edi], ax
lea edi, [edi + 2]
test ax, ax
jne 0x4b7d5a
mov eax, dword [ebp - 8]
test eax, eax
je 0x4b7d78
push 8
push esi
push ebx
call eax
jmp 0x4b7d7f
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
push ebx
call dword [0x5d40d0]
pop ecx
pop edi
mov eax, esi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4b7ec5
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x5d4074]
xor eax, ebp
mov dword [ebp - 4], eax
test byte [ebp + 8], 2
je 0x4b7f12
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4b7ef9
push 2
pop eax
jmp 0x4b7f4b
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x4b7f0a
shr eax, 8
cmp al, 2
je 0x4b7f12
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x4b7ef4
call fcn.004d9a24
test eax, eax
jne 0x4b7f4b
push 3
push 2
push eax
push 6
call fcn.004b7d92
add esp, 0x10
test al, al
je 0x4b7f42
push 0x79e548
mov byte [0x79e540], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
jmp 0x4b7f49
mov byte [0x79e540], 0
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a04e0
mov esp, ebp
pop ebp
ret
Function at 0x4c312a
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
push edi
xor edi, edi
and dword [ebp - 0xc], edi
and dword [eax], edi
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
mov dword [ebp - 4], edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4c3294
push esi
mov esi, dword [ebp - 8]
mov dword [ebp - 0x10], esi
test esi, esi
je 0x4c3280
push ebx
cmp dword [esi + 4], 2
jne 0x4c321f
cmp dword [esi + 0x18], 0
je 0x4c321f
cmp dword [esi + 0x10], 0
jbe 0x4c321f
cmp dword [esi + 0x10], 0x10
jb 0x4c321f
push 0x20
call dword [0x5d40cc]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x4c3274
mov ecx, dword [esi]
mov dword [ebx], ecx
mov ecx, dword [esi + 4]
mov dword [ebx + 4], ecx
mov ecx, dword [esi + 8]
mov dword [ebx + 8], ecx
mov eax, dword [esi + 0xc]
and dword [ebx + 0x18], 0
and dword [ebx + 0x14], 0
and dword [ebx + 0x1c], 0
push 0x10
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], 0x10
call dword [0x5d40cc]
mov dword [ebx + 0x18], eax
pop ecx
test eax, eax
je 0x4c3268
mov esi, dword [esi + 0x18]
mov edi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x10]
cmp dword [esi + 0x14], 0
je 0x4c3207
push dword [esi + 0x14]
call dword [0x5d40d8]
mov dword [ebx + 0x14], eax
pop ecx
test eax, eax
je 0x4c3251
mov edi, dword [ebp - 4]
test edi, edi
mov eax, dword [ebp - 0xc]
cmove edi, ebx
mov dword [ebp - 4], edi
test eax, eax
je 0x4c321c
mov dword [eax + 0x1c], ebx
mov dword [ebp - 0xc], ebx
mov esi, dword [esi + 0x1c]
mov dword [ebp - 0x10], esi
test esi, esi
jne 0x4c316c
mov esi, dword [ebp - 0x14]
cmp dword [ebp - 8], 0
pop ebx
je 0x4c3240
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x4c3279
push dword [ebp - 4]
call fcn.004c30f5
pop ecx
xor edi, edi
jmp 0x4c328c
push 8
pop esi
push dword [ebx + 0x18]
call dword [0x5d40d0]
push ebx
call dword [0x5d40d0]
pop ecx
pop ecx
jmp 0x4c3230
push 8
pop esi
push ebx
call dword [0x5d40d0]
jmp 0x4c3265
push 8
pop esi
jmp 0x4c3230
mov edi, dword [ebp - 4]
test edi, edi
jne 0x4c328c
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0x14]
mov dword [eax], edi
mov eax, esi
pop esi
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x4c34ff
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
xor eax, eax
push eax
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
push eax
call fcn.0053fb74
add esp, 0x18
test eax, eax
je 0x4c351f
cmp eax, 0xffffffff
jne 0x4c3521
xor eax, eax
pop ebp
ret
Function at 0x4c4e03
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
push edi
push 4
pop edi
push esi
push ebx
push dword [ebp + 0x10]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], edi
mov dword [ebp + 0x14], esi
call fcn.0052eb40
add esp, 0xc
lea eax, [ebp - 8]
push 0xf0000000
push dword [ebp + 0x18]
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x4c4ebc
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push dword [ebp + 0x1c]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4c4e9f
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4c4e9f
push ebx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp - 4]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
call edi
test eax, eax
je 0x4c4e9f
cmp esi, dword [ebp - 0xc]
jb 0x4c4e9f
push ebx
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 2
push dword [ebp - 4]
call edi
cmp dword [ebp - 4], ebx
je 0x4c4ead
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp dword [ebp - 8], ebx
je 0x4c4ebc
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4c9649
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x5d4074]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4c9684
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.004b5af1
add esp, 0xc
jmp 0x4c96ac
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x4c969f
shr eax, 8
test al, al
jne 0x4c969f
xor eax, eax
jmp 0x4c96af
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.004b5af1
pop ecx
pop ecx
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004a04e0
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
push 0
mov byte [ebp + 0xa], al
lea eax, [ebp + 8]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0x1a8]
mov byte [ebp + 8], 0xff
mov byte [ebp + 9], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4c9e8d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.004b5af1
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push dword [esi]
call fcn.004c97c9
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x4c9fa0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 0xc], 0x1f
mov eax, dword [ebp + 8]
push ebx
mov eax, dword [eax]
mov dword [ebp - 4], eax
mov ebx, dword [eax + 0x154]
jne 0x4ca0f6
push edi
lea eax, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], eax
cmp eax, edi
jae 0x4c9fd7
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c9fe2
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c9fed
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebx + 0x1ca8]
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
mov word [ebp - 0xc], ax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [edi]
mov word [ebp - 0x14], ax
cmp ecx, edi
jae 0x4ca01d
mov al, byte [ebp - 0xc]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4ca02a
mov al, byte [ebp - 0xb]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4ca037
mov al, byte [ebp - 0x14]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4ca044
mov al, byte [ebp - 0x13]
mov byte [ecx], al
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4ca04f
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4ca05a
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
lea esi, [ebx + 0x1cb0]
mov dword [ebx + 0x1eb4], eax
sub eax, esi
sub eax, 2
mov dword [edi], esi
mov edi, dword [ebp - 4]
push eax
lea eax, [ebx + 0x1cb2]
push eax
push 0x3e
push edi
call fcn.004c98b6
add esp, 0x10
push 0
push 3
push esi
mov esi, dword [ebp + 8]
push dword [esi + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4ca0b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.004b5af1
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push esi
call fcn.004c9ea5
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [esi + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
pop esi
test eax, eax
jns 0x4ca0f5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.004b5af1
add esp, 0xc
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4ca0fb
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90c
mov eax, dword [0x5d4074]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x104]
push esi
push edi
mov esi, 0x80
mov dword [ebp - 0x908], ebx
push esi
xor edi, edi
push edi
push eax
call fcn.0052eb40
push esi
lea eax, [ebp - 0x84]
push edi
push eax
call fcn.0052eb40
mov esi, dword [ebx]
mov dword [ebp - 0x90c], esi
mov ebx, dword [esi + 0x154]
mov eax, dword [ebx + 0x1eb4]
sub eax, dword [ebx + 0x1eb0]
add eax, 2
push eax
lea eax, [ebx + 0x1cb0]
push eax
push 0x3c
push esi
call fcn.004c98b6
mov eax, dword [ebx + 0x1eb0]
add esp, 0x28
movzx ecx, byte [eax]
inc eax
mov dword [ebx + 0x1eb0], eax
cmp ecx, 0x18
je 0x4ca2cf
cmp ecx, 0x23
je 0x4ca2ab
cmp ecx, 0x27
jne 0x4ca360
push edi
push ecx
push 0xfa
push 0xff
push str._c_c_c_c
lea eax, [ebp - 0x904]
push 0x800
push eax
call fcn.004c1780
mov ebx, dword [ebx + 0x1cac]
add esp, 0x1c
push 4
pop edi
test ebx, ebx
je 0x4ca245
mov ecx, dword [ebx]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4ca1cf
sub ecx, edx
lea esi, [edi + 1]
add esi, ecx
cmp esi, 0x7fa
jae 0x4ca238
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x104]
push eax
push str._127_____127s
push dword [ebx]
call fcn.0048f3e0
add esp, 0x10
test eax, eax
je 0x4ca238
lea eax, [ebp - 0x84]
push eax
push 1
lea eax, [ebp - 0x104]
push eax
push 0
mov eax, 0x800
sub eax, edi
push str._c_s_c_s
push eax
lea eax, [ebp - 0x904]
add eax, edi
push eax
call fcn.004c1780
add esp, 0x1c
mov edi, esi
mov ebx, dword [ebx + 4]
test ebx, ebx
jne 0x4ca1ca
mov esi, dword [ebp - 0x90c]
push 0xf0
push 0xff
mov eax, 0x800
sub eax, edi
push 0x595d7c
push eax
lea eax, [ebp - 0x904]
add eax, edi
push eax
call fcn.004c1780
add esp, 0x14
lea eax, [edi + 2]
push 0
push eax
lea eax, [ebp - 0x904]
push eax
mov eax, dword [ebp - 0x908]
push dword [eax + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4ca2a5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004b5af1
add esp, 0xc
push edi
jmp 0x4ca34e
add ebx, 0x1c28
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4ca2b6
push 0xf0
mov eax, 0xff
push eax
push ebx
push 0
push 0x23
jmp 0x4ca2f1
add ebx, 0x1c08
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4ca2da
push 0xf0
mov eax, 0xff
push eax
push ebx
push 0
push 0x18
push 0xfa
push eax
push str._c_c_c_c_s_c_c
sub ecx, edx
lea eax, [ebp - 0x904]
push 0x800
push eax
lea edi, [ecx + 6]
call fcn.004c1780
add esp, 0x28
lea eax, [ebp - 0x904]
push 0
push edi
push eax
mov eax, dword [ebp - 0x908]
push dword [eax + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4ca34a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004b5af1
add esp, 0xc
lea eax, [edi - 2]
push eax
lea eax, [ebp - 0x902]
push eax
push 0x3e
push esi
call fcn.004c98b6
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a04e0
mov esp, ebp
pop ebp
ret
Function at 0x4cae3a
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x5d4074]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [eax + 0x4a8]
mov ebx, dword [eax]
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x84]
mov dword [ebp - 0x88], 0x80
push eax
mov eax, dword [edi + 0x154]
push 0
push 4
pop esi
add eax, esi
push eax
push dword [edi + 0x15c]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [edi + 0x148], 0
mov dword [edi + 0x14c], eax
jne 0x4caecd
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push eax
lea eax, [edi + 0xc8]
push eax
call fcn.0052e100
mov eax, dword [ebp - 0x88]
add esp, 0xc
mov dword [edi + 0x148], eax
mov edx, dword [edi + 0x14c]
cmp edx, esi
jge 0x4caefe
push str.Received_too_short_packet
push ebx
call fcn.004b5af1
pop ecx
pop ecx
mov dword [edi + 0xc], 7
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a04e0
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x15c]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
mov dword [edi + 0xc], ecx
sub ecx, 3
je 0x4cafb5
sub ecx, 1
je 0x4cb037
sub ecx, 1
je 0x4caf65
sub ecx, 1
je 0x4caf44
push str.Internal_error:_Unexpected_packet
push 0x5c038c
push ebx
call fcn.004b5af1
jmp 0x4cb034
lea eax, [edx - 2]
push eax
mov eax, dword [edi + 0x15c]
add eax, 2
push eax
push edi
call fcn.004cac44
add esp, 0xc
test eax, eax
je 0x4cb037
jmp 0x4caeed
mov eax, dword [edi + 0x15c]
add eax, esi
lea esi, [edx - 4]
mov dword [ebp - 0x8c], eax
mov eax, dword [edi + 0x15c]
push esi
push dword [ebp - 0x8c]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
mov dword [edi + 8], ecx
call fcn.004cab5b
pop ecx
pop ecx
cmp eax, esi
jae 0x4cb037
push dword [ebp - 0x8c]
push str.TFTP_error:__s_n
push ebx
call fcn.004b5bc7
jmp 0x4cb034
cmp edx, esi
jle 0x4cb037
mov eax, dword [edi + 0x15c]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 0x40]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x4cb037
lea eax, [edx - 4]
push eax
mov eax, dword [edi + 0x15c]
add eax, esi
push eax
push 1
push dword [ebp - 0x90]
call fcn.004b5a49
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4cb00c
push 5
push edi
call fcn.004cb7dc
pop ecx
pop ecx
mov eax, esi
jmp 0x4caeed
mov eax, dword [edi + 0x14c]
sub eax, 4
cdq
add dword [ebx + 0xa0], eax
adc dword [ebx + 0xa4], edx
push dword [ebx + 0xa4]
push dword [ebx + 0xa0]
push ebx
call fcn.004bf5b5
add esp, 0xc
push dword [ebp - 0x90]
call fcn.004bf85b
pop ecx
test eax, eax
je 0x4caeeb
push 5
push edi
call fcn.004cb7dc
pop ecx
pop ecx
push 0x2a
pop eax
jmp 0x4caeed