joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46ce70
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + eax]
mov ebx, 0x1505
cmp esi, edi
jae 0x46ce9e
movzx eax, byte [esi]
push eax
call fcn.0046e900
mov edx, ebx
shl edx, 5
movsx ecx, al
add ebx, edx
inc esi
add esp, 4
xor ebx, ecx
cmp esi, edi
jb 0x46ce81
pop edi
pop esi
movzx eax, bl
pop ebx
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x46f153
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
pop ebp
ret
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
xor eax, eax
pop ebp
ret

Function at 0x46f1d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp dword [esi + 0x610], edi
je 0x46f219
push 1
push esi
call fcn.00473730
mov eax, dword [esi + 0x5a4]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [esi + 0x610]
push edx
push eax
push esi
call ecx
push 0
push esi
mov edi, eax
call fcn.00473730
add esp, 0x24
mov eax, edi
pop edi
pop esi
pop ebp
ret
mov eax, dword [ebp + 0xc]
test eax, eax
js 0x46f256
cmp eax, 2
jg 0x46f256
mov edx, dword [esi + 0x5a0]
push edx
push 1
lea eax, [eax + eax*2 + 0x4d70d8]
push 2
push eax
call fcn.004ac81e
mov ecx, dword [esi + 0x5a0]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
push ecx
push 1
push edx
push eax
call fcn.004ac81e
add esp, 0x20
mov eax, edi
pop edi
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [ebx + 0x2c8]
mov ecx, dword [ebx + eax*4 + 0x1b8]
push esi
lea esi, [eax + 0x1e]
shl esi, 4
add esi, ebx
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [edx + 0x40], 3
mov dword [ebp - 4], ecx
je 0x46f86e
cmp dword [ebx + eax*4 + 0x1d0], 0x46f4d0
jne 0x46f86e
cmp dword [esi], 0
je 0x46f804
test edi, edi
je 0x46f86e
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
call fcn.00471100
add esp, 0x14
cmp eax, 0xffffffff
je 0x46f86e
test al, 1
je 0x46f86e
cmp dword [esi], 0
jne 0x46f84b
mov eax, dword [ebx]
mov eax, dword [eax + 0x8f4]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x4f7cd8]
mov edi, dword [esi + 4]
xor ecx, ecx
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], ecx
mov dword [esi + 0xc], ecx
cmp eax, ecx
je 0x46f86b
mov ecx, dword [esi]
add ecx, dword [esi + 8]
mov edx, dword [ebp - 4]
push 0
push edi
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x46f86e
add dword [esi + 8], eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 4], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x46f880
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x4f7f44]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + eax*4 + 0x1b8]
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x88], ecx
call fcn.0046f7c0
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x88]
push 0
push edx
push edi
push eax
call dword [sym.imp.WS2_32.dll_send]
mov edi, eax
mov dword [esi], 0
cmp edi, 0xffffffff
jne 0x46f93a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x88], eax
cmp eax, 0x2733
jne 0x46f901
pop edi
mov dword [esi], 0x51
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
push 0x80
lea ecx, [ebp - 0x84]
push ecx
push eax
call fcn.0049b060
mov edx, dword [ebx]
push eax
push str.Send_failure:__s
push edx
call fcn.0046f330
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x88]
mov dword [eax + 0xcbc], ecx
add esp, 0x18
mov dword [esi], 0x37
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a79cb
mov esp, ebp
pop ebp
ret

Function at 0x46f9d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push eax
call fcn.0046f9b0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
call fcn.004b991c
add esp, 0x10
pop ebp
ret
Function at 0x4719b0
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2d0], 2
jne 0x4719c5
pop ebp
jmp fcn.00471950
mov eax, 1
pop ebp
ret

Function at 0x4723e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push 0x4e9090
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
test esi, esi
jne 0x4723ff
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.LoadLibraryExW
push esi
call edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push 0x4d7388
push eax
call fcn.004ae141
add esp, 8
test eax, eax
je 0x472453
mov eax, dword [ebp - 4]
test eax, eax
je 0x472440
mov ecx, dword [ebp + 8]
push 8
push 0
push ecx
call eax
pop edi
pop esi
mov ebx, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
pop edi
pop esi
mov ebx, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 4], ebx
je 0x47247b
push str.AddDllDirectory
push esi
call edi
test eax, eax
je 0x47247b
mov eax, dword [ebp + 8]
push 0x800
push 0
push eax
call dword [ebp - 4]
pop edi
pop esi
mov ebx, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, eax
test edi, edi
je 0x472552
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x472495
sub eax, edx
sar eax, 1
add eax, edi
lea ecx, [eax + eax + 2]
push ecx
call dword [0x4f7cd8]
mov esi, eax
add esp, 4
test esi, esi
je 0x472548
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x472548
mov eax, esi
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4724d0
sub eax, edx
sar eax, 1
mov ecx, 0x4cf6f4
lea edx, [esi + eax*2]
sub edx, ecx
lea esp, [esp]
movzx eax, word [ecx]
mov word [edx + ecx], ax
add ecx, 2
test ax, ax
jne 0x4724f0
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x472504
mov ecx, dword [ebp + 8]
sub eax, edx
sar eax, 1
lea edx, [esi + eax*2]
sub edx, ecx
jmp 0x472520
movzx eax, word [ecx]
mov word [edx + ecx], ax
add ecx, 2
test ax, ax
jne 0x472520
mov eax, dword [ebp - 4]
test eax, eax
je 0x47253f
push 8
push 0
push esi
call eax
jmp 0x472546
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
push esi
call dword [0x4f7cdc]
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x472560
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x4f7f44]
xor eax, ebp
mov dword [ebp - 4], eax
test byte [ebp + 8], 2
je 0x4725b9
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4725a6
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x4725a0
shr eax, 8
cmp al, 2
je 0x4725b9
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
call fcn.0049be00
test eax, eax
jne 0x472632
push str.iphlpapi.dll
call fcn.004723e0
add esp, 4
mov dword [0x4fcb84], eax
test eax, eax
je 0x4725ed
push str.if_nametoindex
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4725ed
mov dword [0x4fcb88], eax
push 3
push 2
push 0
push 6
call fcn.00472260
add esp, 0x10
test eax, eax
je 0x472626
push 0x4fe4d0
mov dword [0x4fe4d8], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
mov dword [0x4fe4d8], 0
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret

Function at 0x475f40
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4f7f44]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [esi + 0xaa0]
push 4
lea ecx, [ebp - 0x14]
push ecx
push 8
shr eax, 0xc
push 0xffff
and eax, 1
push edi
mov dword [ebp - 0x14], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x475f94
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.0046f260
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0xa60]
push edx
mov dword [ebp - 0x10], 1
call fcn.0046f9c0
imul eax, eax, 0x3e8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0xa64]
push eax
call fcn.0046f9c0
imul eax, eax, 0x3e8
add esp, 8
push 0
push 0
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push 0xc
lea edx, [ebp - 0x10]
push edx
push 0x98000004
push edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x476006
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.0046f260
add esp, 0x10
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
Function at 0x476810
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x4f7f44]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x90], 2
mov dword [ebp - 0x18c], esi
je 0x476a2d
mov eax, dword [esi + 0x2a4]
push ebx
push edi
test al, 2
jne 0x476a22
test eax, 0x8000000
jne 0x476a22
mov edi, dword [esi]
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x188]
push eax
lea ecx, [ebp - 0x184]
push ecx
push ebx
mov dword [ebp - 0x190], edi
mov dword [ebp - 0x188], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4768be
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x80
lea edx, [ebp - 0x84]
mov esi, eax
push edx
push esi
call fcn.0049b060
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.0046f330
add esp, 0x1c
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
push 0x80
lea eax, [ebp - 0x104]
push 0
push eax
mov dword [ebp - 0x188], 0x80
call fcn.004a8b80
add esp, 0xc
lea ecx, [ebp - 0x188]
push ecx
lea edx, [ebp - 0x104]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x476932
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push 0x80
lea eax, [ebp - 0x84]
push eax
push esi
call fcn.0049b060
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.0046f330
add esp, 0x1c
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
lea edi, [esi + 0x10a]
lea ebx, [esi + 0x138]
lea esi, [ebp - 0x184]
mov dword [ebp - 0x194], edi
call fcn.00476790
test eax, eax
jne 0x47699e
call fcn.004ad431
mov esi, eax
call fcn.004ad431
mov edx, dword [esi]
push 0x80
lea ecx, [ebp - 0x84]
push ecx
push edx
mov edi, eax
call fcn.0049b060
mov ecx, dword [ebp - 0x190]
push eax
mov eax, dword [edi]
push eax
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ecx
call fcn.0046f330
add esp, 0x1c
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18c]
mov esi, dword [ebp - 0x194]
lea edi, [eax + 0x5c]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [eax + 0x16c]
lea edi, [eax + 0x13c]
lea esi, [ebp - 0x104]
call fcn.00476790
test eax, eax
jne 0x476a1c
call fcn.004ad431
mov esi, eax
call fcn.004ad431
push 0x80
lea edx, [ebp - 0x84]
mov edi, eax
mov eax, dword [esi]
push edx
push eax
call fcn.0049b060
mov ecx, dword [edi]
mov edx, dword [ebp - 0x190]
push eax
push ecx
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.0046f330
add esp, 0x1c
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x18c]
push esi
call fcn.00476710
add esp, 4
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
Function at 0x476a40
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [0x4f7f44]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [eax]
push 4
lea eax, [ebp - 0x88]
push eax
push 1
push 6
push ecx
mov dword [ebp - 0x88], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x476ab1
push 0x80
lea edx, [ebp - 0x84]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0049b060
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0046f260
add esp, 0x18
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.0046f260
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop esi
call fcn.004a79cb
mov esp, ebp
pop ebp
ret

Function at 0x476ad0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x4fcba0]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x476b21
push 3
push 2
push eax
push 6
call fcn.00472260
add esp, 0x10
test eax, eax
je 0x476b15
mov dword [0x4fcba0], 2
mov esp, ebp
pop ebp
ret
mov dword [0x4fcba0], 1
jmp 0x476b26
cmp eax, 2
je 0x476b67
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 4]
push ecx
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x476b4f
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 8]
jg 0x476b66
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test byte [eax + 0x20c], 1
je 0x476c40
push eax
call fcn.0046c280
add esp, 4
test eax, eax
jne 0x476c60
xor eax, eax
pop ebp
ret
mov eax, dword [eax + 0x1b8]
cmp eax, 0xffffffff
je 0x476c3c
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x476c60
pop ebp
ret
mov eax, 1
pop ebp
ret
Function at 0x47f1b0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
push str.Connected_for_receive
push 0x4d6f30
push ecx
call fcn.0046f260
add esp, 0xc
mov eax, esi
mov dword [esi], 1
call fcn.0047e1c0
test eax, eax
jne 0x47f1e4
mov ecx, esi
pop ebp
jmp fcn.0047e660
pop ebp
ret
Function at 0x47f680
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x4f7f44]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax + 0x4c0]
push esi
mov esi, dword [eax]
push edi
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 0x80
mov edx, dword [ebx + 0x154]
mov eax, dword [ebx + 0x15c]
lea ecx, [ebp - 0x84]
push ecx
mov ecx, dword [ebx + 0x14]
push 0
add edx, 4
push edx
push eax
push ecx
mov dword [ebp - 0x94], esi
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [ebx + 0x148], 0
mov dword [ebx + 0x14c], eax
jne 0x47f71a
mov edx, dword [ebp - 0x88]
push edx
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebx + 0xc8]
push ecx
call fcn.004a9120
mov edx, dword [ebp - 0x88]
add esp, 0xc
mov dword [ebx + 0x148], edx
mov edx, dword [ebx + 0x14c]
cmp edx, 4
jge 0x47f74d
push str.Received_too_short_packet
push esi
call fcn.0046f330
add esp, 8
mov dword [ebx + 0xc], 7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
lea eax, [ebx + 0x15c]
call fcn.0047e370
movzx eax, ax
mov dword [ebx + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x47f76a
jmp dword [eax*4 + 0x47f8b8]
cmp edx, 4
jle case.0x47f76a.4
lea eax, [ebx + 0x15c]
call fcn.0047e380
movzx ecx, word [ebx + 0x40]
inc ecx
cmp cx, ax
jne case.0x47f76a.4
mov eax, dword [ebp - 0x8c]
add edx, 0xfffffffc
push edx
mov edx, dword [ebx + 0x15c]
add edx, 4
push edx
push 1
push eax
call fcn.0046f780
mov edi, eax
add esp, 0x10
test edi, edi
je 0x47f7d7
mov ecx, 5
mov eax, ebx
call fcn.0047f600
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x14c]
sub eax, 4
cdq
add dword [esi + 0xa8], eax
adc dword [esi + 0xac], edx
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xa8]
push ecx
push edx
push esi
call fcn.004925a0
jmp 0x47f87b
mov esi, dword [ebx + 0x15c]
lea eax, [ebx + 0x15c]
add esi, 4
add edx, 0xfffffffc
call fcn.0047e380
movzx eax, ax
mov edi, edx
mov dword [ebx + 8], eax
call fcn.0047e390
cmp eax, edi
jae case.0x47f76a.4
mov ecx, dword [ebp - 0x94]
push esi
push str.TFTP_error:__s_n
push ecx
call fcn.0046f260
jmp 0x47f87b
add edx, 0xfffffffe
push edx
mov edx, dword [ebx + 0x15c]
add edx, 2
push edx
push ebx
call fcn.0047e410
add esp, 0xc
test eax, eax
je case.0x47f76a.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x4d7f9c
push esi
call fcn.0046f330
add esp, 0xc
mov eax, dword [ebp - 0x8c]
push eax
call fcn.004927f0
add esp, 4
test eax, eax
je 0x47f73a
mov ecx, 5
mov eax, ebx
call fcn.0047f600
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 0x2a
pop ebx
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
Function at 0x481470
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x4f7f44]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4814b8
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.0046f330
add esp, 0xc
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x4814df
shr eax, 8
test al, al
jne 0x4814df
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.0046f330
mov ecx, dword [ebp - 4]
xor ecx, ebp
add esp, 8
mov eax, 2
call fcn.004a79cb
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [esi + 0x1b8]
mov al, byte [ebp + 8]
push edi
mov edi, dword [esi]
push 0
push 3
lea ecx, [ebp - 4]
push ecx
push edx
mov byte [ebp - 4], 0xff
mov byte [ebp - 3], al
mov byte [ebp - 2], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4816b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.0046f330
add esp, 0xc
mov edx, dword [ebp + 8]
mov ecx, dword [esi]
mov eax, ebx
mov edi, str.SENT
call fcn.00481570
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x4824a0
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]
mov eax, dword [eax]
push edi
mov edi, dword [eax + 0x15c]
mov dword [ebp - 4], eax
jne 0x4825f1
push ebx
push esi
lea ebx, [edi + 0x1cb0]
lea esi, [edi + 0x1eb0]
mov dword [esi], ebx
cmp ebx, esi
jae 0x4824d6
mov byte [ebx], 0xff
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4824e1
mov byte [eax], 0xfa
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4824ec
mov byte [eax], 0x1f
inc dword [esi]
movzx ecx, word [edi + 0x1ca8]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
movzx edx, ax
movzx eax, word [edi + 0x1caa]
push eax
mov dword [ebp + 0xc], edx
call dword [sym.imp.WS2_32.dll_htons]
movzx ecx, ax
mov eax, dword [esi]
cmp eax, esi
jae 0x48251e
mov dl, byte [ebp + 0xc]
mov byte [eax], dl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x48252b
mov dl, byte [ebp + 0xd]
mov byte [eax], dl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x482535
mov byte [eax], cl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x48253f
mov byte [eax], ch
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x48254a
mov byte [eax], 0xff
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x482555
mov byte [eax], 0xf0
inc dword [esi]
mov eax, dword [esi]
mov dword [edi + 0x1eb4], eax
sub eax, ebx
sub eax, 2
push eax
mov dword [esi], ebx
mov esi, dword [ebp - 4]
lea eax, [edi + 0x1cb2]
push 0x3e
call fcn.00481a00
mov esi, dword [sym.imp.WS2_32.dll_send]
add esp, 8
push 0
push 3
push ebx
mov ebx, dword [ebp + 8]
mov edx, dword [ebx + 0x1b8]
push edx
call esi
test eax, eax
jns 0x4825ab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [ebp - 4]
push str.Sending_data_failed___d_
push eax
call fcn.0046f330
add esp, 0xc
lea ecx, [edi + 0x1cb3]
push ecx
mov eax, 4
call fcn.00482300
mov edx, dword [ebx + 0x1b8]
add esp, 4
push 0
push 2
add edi, 0x1cb7
push edi
push edx
call esi
pop esi
pop ebx
test eax, eax
jns 0x4825f1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [ebp - 4]
push str.Sending_data_failed___d_
push eax
call fcn.0046f330
add esp, 0xc
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x483040
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x4f7f44]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
mov eax, dword [esi + 0x1bc]
mov edi, dword [esi]
lea ecx, [ebp - 0x88]
push ecx
lea edx, [ebp - 0x84]
push edx
push eax
mov dword [ebp - 0x8c], eax
or ebx, 0xffffffff
mov dword [ebp - 0x88], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4830b3
mov edx, dword [ebp - 0x8c]
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x84]
push ecx
push edx
mov dword [ebp - 0x88], 0x80
call dword [sym.imp.WS2_32.dll_accept]
mov ebx, eax
mov eax, dword [ebp - 0x8c]
push eax
push esi
call fcn.00476c70
add esp, 8
cmp ebx, 0xffffffff
jne 0x4830ec
push str.Error_accept__ing_server_connect
push edi
call fcn.0046f330
add esp, 8
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
push str.Connection_accepted_from_server_n
push edi
call fcn.0046f260
and dword [esi + 0x2a4], 0xfffff7ff
push 1
push ebx
mov dword [esi + 0x1bc], ebx
call fcn.0049d630
add esp, 0x10
mov dword [esi + 0x1cc], 1
cmp dword [edi + 0x618], 0
je 0x48316b
push 1
push edi
call fcn.00473730
mov ecx, dword [edi + 0x61c]
mov edx, dword [edi + 0x618]
push 1
push ebx
push ecx
call edx
push 0
push edi
mov ebx, eax
call fcn.00473730
add esp, 0x1c
test ebx, ebx
je 0x48316b
call fcn.00482f70
pop edi
pop esi
mov eax, 0x2a
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004a79cb
mov esp, ebp
pop ebp
ret
Function at 0x486a20
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
push esi
add eax, edx
xor esi, esi
push edi
mov edi, dword [ebx]
cmp eax, 2
je 0x486a58
push str.Couldnt_set_desired_mode
push edi
call fcn.0046f330
add esp, 8
pop edi
lea eax, [esi + 0x11]
pop esi
pop ebx
pop ebp
ret
cmp ecx, 0xc8
je 0x486a6f
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push edi
call fcn.0046f260
add esp, 0xc
mov eax, dword [ebp + 8]
cmp eax, 0x13
jne 0x486a87
push ebx
call fcn.004869b0
add esp, 4
pop edi
mov esi, eax
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x14
jne 0x486a98
call fcn.00483d70
pop edi
mov esi, eax
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x15
jne 0x486aab
mov eax, ebx
call fcn.00486a00
pop edi
mov esi, eax
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x16
jne 0x486ab9
mov eax, ebx
call fcn.00486a10
mov esi, eax
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret