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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x1f0], 0
je 0x10046ff2
push eax
call fcn.1003edcc
pop ecx
test eax, eax
jne 0x1004700e
xor eax, eax
pop ebp
ret
mov eax, dword [eax + 0x1a8]
cmp eax, 0xffffffff
je 0x10046fee
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
jmp 0x10046fea
xor eax, eax
inc eax
pop ebp
ret

Function at 0x100475a5
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x100b7404]
and dword [ebp - 4], 0
push esi
push 2
mov dword [ebp - 8], 0x4020
mov dword [ebp - 0xc], 4
pop esi
test eax, eax
jne 0x100475ec
push 3
push esi
push eax
push 6
call fcn.10052447
add esp, 0x10
test eax, eax
je 0x100475e4
mov dword [0x100b7404], esi
jmp 0x1004762c
xor eax, eax
inc eax
mov dword [0x100b7404], eax
cmp eax, esi
je 0x1004762c
push ebx
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
mov esi, 0x1001
push esi
mov ebx, 0xffff
push ebx
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1004761a
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x1004762b
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
leave
ret

Function at 0x100476e9
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 8]
push 4
mov esi, dword [edi]
xor ecx, ecx
lea eax, [ebp + 8]
push eax
inc ecx
push ecx
push 6
push dword [ebp + 0xc]
mov dword [ebp + 8], ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1004772d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.10052f6d
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.100468bd
add esp, 0x14
jmp 0x1004773a
push str.TCP_NODELAY_set_n
push esi
call fcn.100468bd
pop ecx
pop ecx
pop edi
pop esi
pop ebp
ret
Function at 0x10047839
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x100b5350]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
cmp dword [ebx + 0x94], 2
mov edi, dword [ebx]
mov dword [ebp - 0x10c], edi
je 0x100479b3
push esi
xor esi, esi
cmp dword [ebx + 0x3c8], esi
jne 0x100479ab
cmp dword [ebx + 0x438], esi
jne 0x100479ab
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x108], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x100478be
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.10052f6d
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
jmp 0x1004790b
mov eax, 0x80
push eax
mov dword [ebp - 0x108], eax
lea eax, [ebp - 0x84]
push esi
push eax
call fcn.10073290
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x10047911
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebx
call fcn.10052f6d
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
jmp 0x100479a1
lea eax, [ebx + 0x138]
push eax
lea esi, [ebx + 0x10a]
lea eax, [ebp - 0x104]
push esi
push eax
call fcn.10047db0
add esp, 0xc
test eax, eax
jne 0x10047952
call fcn.100762f9
mov esi, eax
call fcn.100762f9
push dword [esi]
mov edi, eax
push ebx
call fcn.10052f6d
push eax
push dword [edi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
jmp 0x1004799b
push 0xb
pop ecx
lea edi, [ebx + 0x60]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x16c]
push eax
lea eax, [ebx + 0x13c]
push eax
lea eax, [ebp - 0x84]
push eax
movsw word es:[edi], word [esi]
call fcn.10047db0
add esp, 0xc
test eax, eax
jne 0x100479ab
call fcn.100762f9
mov esi, eax
call fcn.100762f9
push dword [esi]
mov edi, eax
push ebx
call fcn.10052f6d
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push dword [ebp - 0x10c]
call fcn.10046801
add esp, 0x18
jmp 0x100479b2
push ebx
call fcn.10047532
pop ecx
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.100704e7
leave
ret
Function at 0x100480de
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x100b5350]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
xor ebx, ebx
cmp dword [esi + 0x574], ebx
push 4
setne al
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 0x10048130
push dword [ebp + 0xc]
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.100468bd
add esp, 0xc
jmp 0x1004819f
push dword [esi + 0x578]
mov dword [ebp - 0x10], 1
call fcn.100501c8
imul eax, eax, 0x3e8
push dword [esi + 0x57c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.100501c8
imul eax, eax, 0x3e8
pop ecx
pop ecx
push ebx
push ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
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 0x1004819f
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.100468bd
add esp, 0x10
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.100704e7
leave
ret
Function at 0x1005232f
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_GetModuleHandleA]
mov dword [ebp - 4], eax
test eax, eax
je 0x10052444
push ebx
push edi
push 0x100996d8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [ebp + 8]
mov ebx, eax
push 0x100996e8
push edi
mov dword [ebp - 8], ebx
call fcn.10076c00
pop ecx
pop ecx
test eax, eax
je 0x10052385
test ebx, ebx
je 0x1005237c
push 8
jmp 0x100523a0
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x100523a4
test ebx, ebx
je 0x100523ab
push str.AddDllDirectory
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x100523ab
push 0x800
push esi
push edi
call ebx
mov esi, eax
jmp 0x10052440
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
je 0x10052440
mov ecx, edi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100523c5
sub ecx, ebx
lea eax, [ecx + 1]
add eax, edx
push eax
call dword [section..data]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x10052438
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10052438
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100523f4
sub ecx, edx
push 0x5c
pop eax
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10052409
sub ecx, edx
add ecx, ebx
sub ecx, edi
mov al, byte [edi]
mov byte [ecx + edi], al
inc edi
test al, al
jne 0x10052416
mov eax, dword [ebp - 8]
test eax, eax
je 0x1005242f
push 8
push esi
push ebx
call eax
jmp 0x10052436
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
push ebx
call dword [0x100b5004]
pop ecx
pop edi
mov eax, esi
pop ebx
pop esi
leave
ret
Function at 0x100525d6
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
push edi
xor edi, edi
and dword [eax], edi
and dword [ebp - 0xc], 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 0x10052740
push esi
mov esi, dword [ebp - 8]
mov dword [ebp - 0x10], esi
test esi, esi
je 0x1005272c
push ebx
cmp dword [esi + 4], 2
jne 0x100526cb
cmp dword [esi + 0x18], 0
je 0x100526cb
cmp dword [esi + 0x10], 0
jbe 0x100526cb
cmp dword [esi + 0x10], 0x10
jb 0x100526cb
push 0x20
call dword [section..data]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x10052720
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 [section..data]
pop ecx
mov dword [ebx + 0x18], eax
test eax, eax
je 0x10052714
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 0x100526b3
push dword [esi + 0x14]
call dword [0x100b500c]
pop ecx
mov dword [ebx + 0x14], eax
test eax, eax
je 0x100526fd
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
test edi, edi
cmove edi, ebx
mov dword [ebp - 4], edi
test eax, eax
je 0x100526c8
mov dword [eax + 0x1c], ebx
mov dword [ebp - 0xc], ebx
mov esi, dword [esi + 0x1c]
mov dword [ebp - 0x10], esi
test esi, esi
jne 0x10052618
mov esi, dword [ebp - 0x14]
cmp dword [ebp - 8], 0
pop ebx
je 0x100526ec
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x10052725
push dword [ebp - 4]
call fcn.100525a1
pop ecx
xor edi, edi
jmp 0x10052738
push 8
pop esi
push dword [ebx + 0x18]
call dword [0x100b5004]
push ebx
call dword [0x100b5004]
pop ecx
pop ecx
jmp 0x100526dc
push 8
pop esi
push ebx
call dword [0x100b5004]
jmp 0x10052711
push 8
pop esi
jmp 0x100526dc
mov edi, dword [ebp - 4]
test edi, edi
jne 0x10052738
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
leave
ret

Function at 0x100537e7
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.10072a3b
add esp, 0x18
test eax, eax
je 0x10053807
cmp eax, 0xffffffff
jne 0x10053809
xor eax, eax
pop ebp
ret
Function at 0x100539ac
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
push 0xf0000040
push 1
xor edi, edi
push edi
push edi
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x100539d2
push 2
pop eax
jmp 0x100539fa
push esi
push dword [ebp + 8]
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x100539eb
push 2
pop esi
jmp 0x100539ed
mov esi, edi
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
pop esi
pop edi
leave
ret

Function at 0x10056407
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x100b5350]
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 0x10056442
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.10046801
add esp, 0xc
jmp 0x1005646a
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x1005645d
shr eax, 8
test al, al
jne 0x1005645d
xor eax, eax
jmp 0x1005646d
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.10046801
pop ecx
pop ecx
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.100704e7
leave
ret

Function at 0x10056b7f
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
mov edi, dword [esi]
push 0
mov byte [ebp + 0xa], al
push 3
lea eax, [ebp + 8]
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 0x10056bc7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10046801
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push dword [esi]
call fcn.10056533
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x10056cd5
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
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 + 0x164]
jne 0x10056e21
push edi
lea eax, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], eax
cmp eax, edi
jae 0x10056d0a
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x10056d15
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x10056d20
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
movzx eax, ax
mov dword [ebp + 0xc], eax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [ebp + 0xc]
movzx edx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x10056d51
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x10056d5b
mov byte [eax], ch
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x10056d65
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x10056d6f
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x10056d7a
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x10056d85
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
mov dword [ebx + 0x1eb4], eax
lea esi, [ebx + 0x1cb0]
sub eax, esi
sub eax, 2
push eax
lea eax, [ebx + 0x1cb2]
push eax
mov dword [edi], esi
mov edi, dword [ebp - 4]
push 0x3e
push edi
call fcn.1005661c
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 0x10056ddd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10046801
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push esi
call fcn.10056bdf
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 0x10056e20
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10046801
add esp, 0xc
pop edi
pop ebx
leave
ret
Function at 0x10056f37
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90c
mov eax, dword [0x100b5350]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x7f
lea eax, [ebp - 0x103]
push 0
push eax
mov dword [ebp - 0x908], ebx
mov byte [ebp - 0x104], 0
call fcn.10073290
push 0x7f
lea eax, [ebp - 0x83]
push 0
push eax
mov byte [ebp - 0x84], 0
call fcn.10073290
mov edi, dword [ebx]
mov dword [ebp - 0x90c], edi
mov ebx, dword [edi + 0x164]
mov eax, dword [ebx + 0x1eb4]
sub eax, dword [ebx + 0x1eb0]
add eax, 2
push eax
lea eax, [ebx + 0x1cb0]
push eax
push 0x3c
push edi
call fcn.1005661c
mov eax, dword [ebx + 0x1eb0]
add esp, 0x28
movzx ecx, byte [eax]
inc eax
mov dword [ebx + 0x1eb0], eax
cmp ecx, 0x18
je 0x100570de
cmp ecx, 0x23
je 0x100570ba
cmp ecx, 0x27
jne 0x1005716f
push 0
push ecx
push 0xfa
push 0xff
push str._c_c_c_c
lea eax, [ebp - 0x904]
push 0x800
push eax
call fcn.100511fb
mov ebx, dword [ebx + 0x1cac]
add esp, 0x1c
push 4
pop esi
test ebx, ebx
je 0x1005708d
mov ecx, dword [ebx]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10057017
sub ecx, edx
lea edi, [esi + 1]
add edi, ecx
cmp edi, 0x7fa
jae 0x10057080
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x104]
push eax
push str._127_____127s
push dword [ebx]
call fcn.10074000
add esp, 0x10
test eax, eax
je 0x10057080
lea eax, [ebp - 0x84]
push eax
push 1
lea eax, [ebp - 0x104]
push eax
push 0
mov eax, 0x800
sub eax, esi
push str._c_s_c_s
push eax
lea eax, [ebp - 0x904]
add eax, esi
push eax
call fcn.100511fb
add esp, 0x1c
mov esi, edi
mov ebx, dword [ebx + 4]
test ebx, ebx
jne 0x10057012
mov edi, dword [ebp - 0x90c]
push 0xf0
push 0xff
mov eax, 0x800
sub eax, esi
push str._c_c
push eax
lea eax, [ebp - 0x904]
add eax, esi
push eax
call fcn.100511fb
add esp, 0x14
add esi, 2
jmp 0x10057124
add ebx, 0x1c28
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100570c5
push 0xf0
mov eax, 0xff
push eax
push ebx
push 0
push 0x23
jmp 0x10057100
add ebx, 0x1c08
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100570e9
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 esi, [ecx + 6]
call fcn.100511fb
add esp, 0x28
push 0
push esi
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 0x10057159
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.10046801
add esp, 0xc
lea eax, [esi - 2]
push eax
lea eax, [ebp - 0x902]
push eax
push 0x3e
push edi
call fcn.1005661c
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100704e7
leave
ret
Function at 0x10057c65
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x100b5350]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [eax + 0x6b8]
push edi
mov edi, dword [eax]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 0x80
lea eax, [ebp - 0x84]
push eax
mov eax, dword [esi + 0x154]
push 0
add eax, 4
push eax
lea ebx, [esi + 0x15c]
push dword [ebx]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x10057cf8
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.10073400
mov eax, dword [ebp - 0x88]
add esp, 0xc
mov dword [esi + 0x148], eax
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x10057d28
push str.Received_too_short_packet
push edi
call fcn.10046801
pop ecx
pop ecx
mov dword [esi + 0xc], 7
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100704e7
leave
ret
push ebx
call fcn.10057902
movzx eax, ax
mov dword [esi + 0xc], eax
pop ecx
sub eax, 3
je 0x10057d9b
dec eax
je 0x10057e0d
dec eax
je 0x10057d79
dec eax
je 0x10057d5c
push str.Internal_error:_Unexpected_packet
push 0x100a752c
push edi
call fcn.10046801
jmp 0x10057e0a
lea eax, [edx - 2]
push eax
mov eax, dword [ebx]
add eax, 2
push eax
push esi
call fcn.10057a73
add esp, 0xc
test eax, eax
je 0x10057e0d
jmp 0x10057d19
push ebx
call fcn.100578eb
movzx eax, ax
mov dword [esi + 8], eax
mov eax, dword [ebx]
add eax, 4
push eax
push 0x100969a0
push edi
call fcn.100468bd
add esp, 0x10
jmp 0x10057e0d
cmp edx, 4
jle 0x10057e0d
push ebx
call fcn.100578eb
pop ecx
movzx ecx, word [esi + 0x40]
inc ecx
cmp cx, ax
jne 0x10057e0d
lea eax, [edx - 4]
push eax
mov eax, dword [ebx]
add eax, 4
push eax
push 1
push dword [ebp - 0x8c]
call fcn.10046710
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x10057de2
push 5
push esi
call fcn.100584dc
pop ecx
pop ecx
mov eax, ebx
jmp 0x10057d19
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [edi + 0x90], eax
adc dword [edi + 0x94], edx
push dword [edi + 0x94]
push dword [edi + 0x90]
push edi
call fcn.1004f39a
add esp, 0xc
push dword [ebp - 0x8c]
call fcn.1004f746
pop ecx
test eax, eax
je 0x10057d17
push 5
push esi
call fcn.100584dc
pop ecx
pop ecx
push 0x2a
pop eax
jmp 0x10057d19
Function at 0x10057e36
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 3
mov eax, dword [edi + 0x10]
pop esi
mov ebx, dword [eax]
mov eax, dword [ebp + 0xc]
sub eax, esi
je 0x10057f72
dec eax
dec eax
je 0x10057f30
dec eax
je 0x10057edc
dec eax
je 0x10057e7a
push str.tftp_rx:_internal_error
push 0x100a752c
push ebx
call fcn.10046801
add esp, 0xc
push 0x47
jmp 0x1005800f
movzx eax, word [edi + 0x40]
inc dword [edi + 0x18]
push dword [edi + 0x18]
inc eax
and eax, 0xffff
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.100468bd
mov eax, dword [edi + 0x18]
add esp, 0x10
cmp eax, dword [edi + 0x20]
jle 0x10057eaf
mov dword [edi + 8], 0xffffff9d
mov dword [edi], esi
jmp 0x10058048
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
push 0
push 4
push dword [edi + 0x160]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x10058048
jmp 0x10057fef
xor eax, eax
and dword [edi + 0x18], eax
lea esi, [edi + 0x160]
push 4
push esi
mov word [edi + 0x40], ax
call fcn.10057934
movzx eax, word [edi + 0x40]
push eax
push esi
call fcn.10057918
add esp, 0x10
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
push 0
push 4
push dword [esi]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x10057fef
mov dword [edi], 1
jmp 0x1005802c
lea esi, [edi + 0x160]
push 5
push esi
call fcn.10057934
movzx eax, word [edi + 0x40]
push eax
push esi
call fcn.10057918
add esp, 0x10
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
push 0
push 4
push dword [esi]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
push 3
pop eax
mov dword [edi], eax
jmp 0x10058048
lea eax, [edi + 0x15c]
push eax
call fcn.100578eb
pop ecx
movzx ecx, word [edi + 0x40]
movzx esi, ax
lea eax, [ecx + 1]
and eax, 0xffff
cmp eax, esi
jne 0x10057f98
and dword [edi + 0x18], 0
jmp 0x10057faf
cmp ecx, esi
jne 0x10058038
push esi
push str.Received_last_DATA_packet_block__d_again._n
push ebx
call fcn.100468bd
add esp, 0xc
mov word [edi + 0x40], si
lea esi, [edi + 0x160]
push 4
push esi
call fcn.10057934
movzx eax, word [edi + 0x40]
push eax
push esi
call fcn.10057918
add esp, 0x10
push dword [edi + 0x148]
lea eax, [edi + 0xc8]
push eax
push 0
push 4
push dword [esi]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jns 0x10058012
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [edi + 0x10]
call fcn.10052f6d
push eax
push 0x100a752c
push ebx
call fcn.10046801
add esp, 0x14
push 0x37
pop eax
jmp 0x1005804a
mov eax, dword [edi + 0x154]
xor ecx, ecx
add eax, 4
inc ecx
cmp dword [edi + 0x14c], eax
push 3
pop eax
cmovl ecx, eax
mov dword [edi], ecx
lea eax, [edi + 0x38]
push eax
call fcn.10062a7a
pop ecx
jmp 0x10058048
push eax
push esi
push str.Received_unexpected_DATA_packet_block__d__expecting_block__d_n
push ebx
call fcn.100468bd
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret