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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x4dbfb4]
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 + 0x420]
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x108], ecx
call fcn.0046b460
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x108]
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 0x46b5da
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x108], eax
cmp eax, 0x2733
jne 0x46b5a1
pop edi
mov dword [esi], 0x51
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
push pe_nt_image_headers32
lea ecx, [ebp - 0x104]
push ecx
push eax
call fcn.00492ff0
mov edx, dword [ebx]
push eax
push str.Send_failure:__s
push edx
call fcn.0046af40
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x108]
mov dword [eax + 0xe4c], 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.004a1682
mov esp, ebp
pop ebp
ret

Function at 0x46d4e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.004ae63c

Function at 0x46d6a0
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4dbfb4]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, dword [sym.imp.WS2_32.dll_inet_pton]
lea eax, [ebp - 0x18]
push eax
push esi
push 2
call edi
test eax, eax
jne 0x46d6e0
lea ecx, [ebp - 0x14]
push ecx
push esi
push 0x17
call edi
test eax, eax
jne 0x46d6e0
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, 1
pop edi
call fcn.004a1682
mov esp, ebp
pop ebp
ret

Function at 0x46d860
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 0x46d890
movzx eax, byte [esi]
push eax
call fcn.00471be0
mov edx, ebx
shl edx, 5
movsx ecx, al
add edx, ebx
xor ecx, edx
inc esi
add esp, 4
mov ebx, ecx
cmp esi, edi
jb 0x46d871
pop edi
pop esi
movzx eax, bl
pop ebx
ret
Function at 0x46f5e0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
xor eax, eax
cmp dword [esi + 0xbe8], eax
push 4
lea ecx, [ebp - 4]
push ecx
setne al
push 8
push 0xffff
push edi
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x46f61f
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.0046ae20
add esp, 0xc
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0xb00]
push edx
mov dword [ebp - 0x14], 1
call fcn.0046d4d0
imul eax, eax, 0x3e8
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0xb04]
push eax
call fcn.0046d4d0
imul eax, eax, 0x3e8
add esp, 8
push 0
push 0
lea ecx, [ebp - 8]
push ecx
push 0
push 0
push 0xc
lea edx, [ebp - 0x14]
push edx
push 0x98000004
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x46f691
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.0046ae20
add esp, 0x10
mov esp, ebp
pop ebp
ret
Function at 0x46fe60
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x4dbfb4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x2f8], 3
jne 0x470077
cmp dword [ebx + 0x514], 0
push esi
push edi
jne 0x47006c
cmp dword [ebx + 0x57c], 0
jne 0x47006c
mov edi, dword [ebx]
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x208]
push eax
lea ecx, [ebp - 0x204]
push ecx
push esi
mov dword [ebp - 0x210], edi
mov dword [ebp - 0x208], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x46ff09
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push pe_nt_image_headers32
lea edx, [ebp - 0x104]
mov esi, eax
push edx
push esi
call fcn.00492ff0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.0046af40
add esp, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
push 0x80
lea eax, [ebp - 0x184]
push 0
push eax
mov dword [ebp - 0x20c], 0x80
call fcn.0049e6e0
add esp, 0xc
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x184]
push edx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x46ff7d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push pe_nt_image_headers32
lea eax, [ebp - 0x104]
push eax
push esi
call fcn.00492ff0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.0046af40
add esp, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x208]
lea ecx, [ebx + 0x3a0]
push ecx
lea esi, [ebx + 0x372]
push esi
push edx
lea eax, [ebp - 0x204]
push eax
call fcn.0046fdc0
add esp, 0x10
test eax, eax
jne 0x46ffea
call fcn.004a16d3
mov esi, eax
call fcn.004a16d3
mov edx, dword [esi]
push pe_nt_image_headers32
lea ecx, [ebp - 0x104]
push ecx
push edx
mov ebx, eax
call fcn.00492ff0
push eax
mov eax, dword [ebx]
push eax
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push edi
call fcn.0046af40
add esp, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20c]
lea edi, [ebx + 0x2c4]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebx + 0x3d4]
push ecx
lea edx, [ebx + 0x3a4]
push edx
push eax
lea ecx, [ebp - 0x184]
push ecx
movsw word es:[edi], word [esi]
call fcn.0046fdc0
add esp, 0x10
test eax, eax
jne 0x47006c
call fcn.004a16d3
mov esi, eax
call fcn.004a16d3
push pe_nt_image_headers32
lea edx, [ebp - 0x104]
mov edi, eax
mov eax, dword [esi]
push edx
push eax
call fcn.00492ff0
mov ecx, dword [edi]
mov edx, dword [ebp - 0x210]
push eax
push ecx
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.0046af40
add esp, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
push ebx
call fcn.0046fd40
add esp, 4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004a1682
mov esp, ebp
pop ebp
ret
Function at 0x4701c0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x4dbfb4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [eax]
push 4
lea eax, [ebp - 0x108]
push eax
push 1
push 6
push ecx
mov dword [ebp - 0x108], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x470222
push pe_nt_image_headers32
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00492ff0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0046ae20
add esp, 0x18
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004a1682
mov esp, ebp
pop ebp
ret

Function at 0x470240
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x4de160]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x470291
push 3
push 2
push eax
push 6
call fcn.00463140
add esp, 0x10
test eax, eax
je 0x470285
mov dword [0x4de160], 2
mov esp, ebp
pop ebp
ret
mov dword [0x4de160], 1
jmp 0x470296
cmp eax, 2
je 0x4702d7
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 0x4702bf
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 8]
jg 0x4702d6
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 0x4702e0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x468], 0
je 0x4702f3
xor eax, eax
pop ebp
ret
mov eax, dword [eax + 0x420]
cmp eax, 0xffffffff
je 0x4702ef
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
neg eax
sbb eax, eax
neg eax
pop ebp
ret
Function at 0x472290
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp + 8]
mov dword [eax], 0
mov eax, dword [ebp + 0xc]
push edx
push eax
push ecx
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 8], eax
test eax, eax
jne 0x472439
push edi
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x47241b
push ebx
push esi
lea esp, [esp]
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x4722ed
lea ebx, [eax + 0xe]
jmp 0x4722f9
cmp eax, 0x17
jne 0x472398
lea ebx, [eax + 5]
cmp dword [edi + 0x18], 0
je 0x472398
mov eax, dword [edi + 0x10]
test eax, eax
jbe 0x472398
cmp eax, ebx
jb 0x472398
push 0x20
call dword [0x4db924]
mov esi, eax
xor eax, eax
add esp, 4
cmp esi, eax
je 0x4723a5
mov edx, dword [edi]
mov dword [esi], edx
mov ecx, dword [edi + 4]
mov dword [esi + 4], ecx
mov edx, dword [edi + 8]
mov dword [esi + 8], edx
mov ecx, dword [edi + 0xc]
push ebx
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x1c], eax
call dword [0x4db924]
add esp, 4
mov dword [esi + 0x18], eax
test eax, eax
je 0x4723ae
mov edx, dword [edi + 0x18]
push ebx
push edx
push eax
call fcn.0049f840
mov eax, dword [edi + 0x14]
add esp, 0xc
test eax, eax
je 0x472382
push eax
call dword [0x4db930]
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je 0x4723c1
cmp dword [ebp - 4], 0
jne 0x47238b
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x472395
mov dword [eax + 0x1c], esi
mov dword [ebp - 0xc], esi
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x4722e0
jmp 0x4723dc
mov dword [ebp - 8], 8
jmp 0x4723dc
push esi
mov dword [ebp - 8], 8
call dword [0x4db928]
add esp, 4
jmp 0x4723dc
mov eax, dword [esi + 0x18]
push eax
mov dword [ebp - 8], 8
call dword [0x4db928]
push esi
call dword [0x4db928]
add esp, 8
mov eax, dword [ebp - 0x10]
pop esi
pop ebx
test eax, eax
je 0x4723ec
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 8], 0
je 0x472415
mov ecx, dword [ebp - 4]
push ecx
call fcn.00472250
mov eax, dword [ebp + 0x14]
mov dword [ebp - 4], 0
mov edx, dword [ebp - 4]
add esp, 4
mov dword [eax], edx
mov eax, dword [ebp - 8]
pop edi
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 4], 0
jne 0x47242d
push 0x2af9
mov dword [ebp - 8], 0x2af9
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 4]
mov dword [eax], edx
mov eax, dword [ebp - 8]
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x472690
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4dbfb4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.WS2_32.dll_inet_pton]
lea eax, [ebp - 0x18]
push eax
push esi
push 2
call edi
test eax, eax
jle 0x4726db
mov ecx, dword [ebp + 0xc]
push ecx
push esi
lea edx, [ebp - 0x18]
push edx
push 2
call fcn.004725b0
add esp, 0x10
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x14]
push eax
push esi
push 0x17
call edi
test eax, eax
jle 0x47270b
mov ecx, dword [ebp + 0xc]
push ecx
push esi
lea edx, [ebp - 0x14]
push edx
push 0x17
call fcn.004725b0
add esp, 0x10
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.004a1682
mov esp, ebp
pop ebp
ret
Function at 0x473db0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push 0
push 0
push eax
push ecx
push 0
push 0
call fcn.0049fc66
add esp, 0x18
test eax, eax
je 0x473dd4
cmp eax, 0xffffffff
jne 0x473dd6
xor eax, eax
pop ebp
ret

Function at 0x473fc0
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x473fd7
mov eax, dword [eax]
mov ecx, dword [eax + 0x78]
mov eax, dword [ecx + 0xf0]
pop ebp
ret
push esi
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x473ff5
xor esi, esi
xor eax, eax
test esi, esi
setg al
pop esi
pop ebp
ret
push eax
push 0
mov esi, 1
call fcn.00470320
add esp, 8
xor eax, eax
test esi, esi
setg al
pop esi
pop ebp
ret
Function at 0x47b900
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 0x4bffb0
push ecx
call fcn.0046ae20
add esp, 0xc
mov eax, esi
mov dword [esi], 1
call fcn.0047a910
test eax, eax
jne 0x47b934
mov ecx, esi
pop ebp
jmp fcn.0047ad40
pop ebp
ret
Function at 0x47be60
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x4dbfb4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
mov esi, dword [ebx + 0x670]
mov edi, dword [ebx]
lea eax, [ebp - 0x8c]
push eax
mov dword [ebp - 0x8c], 0x80
mov edx, dword [esi + 0x154]
mov eax, dword [esi + 0x15c]
lea ecx, [ebp - 0x84]
push ecx
mov ecx, dword [esi + 0x14]
push 0
add edx, 4
push edx
push eax
push ecx
mov dword [ebp - 0x88], ebx
mov dword [ebp - 0x90], edi
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x47bef9
mov edx, dword [ebp - 0x8c]
push edx
lea eax, [ebp - 0x84]
push eax
lea ecx, [esi + 0xc8]
push ecx
call fcn.0049f840
mov edx, dword [ebp - 0x8c]
add esp, 0xc
mov dword [esi + 0x148], edx
mov eax, dword [esi + 0x14c]
cmp eax, 4
jge 0x47bf2c
push str.Received_too_short_packet
push edi
call fcn.0046af40
add esp, 8
mov dword [esi + 0xc], 7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x15c]
movzx cx, byte [edx]
movzx edx, byte [edx + 1]
shl cx, 8
movzx ecx, cx
or ecx, edx
mov dword [esi + 0xc], ecx
add ecx, 0xfffffffd
cmp ecx, 3
ja case.default.0x47bf52
jmp dword [ecx*4 + 0x47c0cc]
cmp eax, 4
jle case.0x47bf52.4
mov ecx, dword [esi + 0x15c]
movzx dx, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl dx, 8
movzx edx, dx
or edx, ecx
movzx ecx, word [esi + 0x40]
inc ecx
and ecx, 0xffff
cmp ecx, edx
jne case.0x47bf52.4
mov edx, dword [esi + 0x15c]
add eax, 0xfffffffc
push eax
add edx, 4
push edx
push 1
push ebx
call fcn.0046b420
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x47bfc7
mov ecx, 5
mov eax, esi
call fcn.0047bdd0
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [edi + 0x98], eax
mov ecx, dword [edi + 0x98]
adc dword [edi + 0x9c], edx
mov eax, dword [edi + 0x9c]
push eax
push ecx
push edi
call fcn.0048cc90
add esp, 0xc
mov ebx, dword [ebp - 0x88]
push ebx
call fcn.0048d680
add esp, 4
test eax, eax
je 0x47bf19
mov ecx, 5
mov eax, esi
call fcn.0047bdd0
pop edi
pop esi
mov eax, 0x2a
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
mov edi, dword [esi + 0x15c]
lea ebx, [eax - 4]
mov eax, dword [esi + 0x15c]
movzx dx, byte [eax + 2]
shl dx, 8
movzx ecx, dx
movzx edx, byte [eax + 3]
push ebx
add edi, 4
or ecx, edx
push 0
push edi
mov dword [esi + 8], ecx
call fcn.004a2f60
add esp, 0xc
test eax, eax
je 0x47bff4
sub eax, edi
cmp eax, ebx
jae 0x47bff4
mov eax, dword [ebp - 0x90]
push edi
push str.TFTP_error:__s_n
push eax
call fcn.0046ae20
jmp 0x47bff1
mov ecx, dword [esi + 0x15c]
add eax, 0xfffffffe
push eax
add ecx, 2
push ecx
push esi
call fcn.0047ab00
add esp, 0xc
test eax, eax
je case.0x47bf52.4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a1682
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x4c139c
push edi
call fcn.0046af40
add esp, 0xc
jmp case.0x47bf52.4
Function at 0x47da60
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x4dbfb4]
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 0x47daa8
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.0046af40
add esp, 0xc
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x47dacf
shr eax, 8
test al, al
jne 0x47dacf
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.0046af40
mov ecx, dword [ebp - 4]
xor ecx, ebp
add esp, 8
mov eax, 2
call fcn.004a1682
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [edi + 0x420]
push ebx
push esi
mov esi, dword [edi]
push 0
push 3
lea ecx, [ebp - 4]
mov ebx, eax
mov al, byte [ebp + 8]
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
jge 0x47dca5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.0046af40
add esp, 0xc
mov esi, dword [ebp + 8]
mov ecx, dword [edi]
mov eax, ebx
mov ebx, str.SENT
call fcn.0047db60
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x47ea20
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 + 0x14c]
mov dword [ebp - 4], eax
jne 0x47eb73
push ebx
push esi
lea ebx, [edi + 0x1cb0]
lea esi, [edi + 0x1eb0]
mov dword [esi], ebx
cmp ebx, esi
jae 0x47ea56
mov byte [ebx], 0xff
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x47ea61
mov byte [eax], 0xfa
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x47ea6c
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 0x47ea9e
mov dl, byte [ebp + 0xc]
mov byte [eax], dl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x47eaab
mov dl, byte [ebp + 0xd]
mov byte [eax], dl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x47eab5
mov byte [eax], cl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x47eabf
mov byte [eax], ch
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x47eaca
mov byte [eax], 0xff
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x47ead5
mov byte [eax], 0xf0
inc dword [esi]
mov eax, dword [esi]
mov ecx, eax
sub ecx, ebx
sub ecx, 2
push ecx
mov dword [edi + 0x1eb4], eax
mov dword [esi], ebx
mov esi, dword [ebp - 4]
lea eax, [edi + 0x1cb2]
push 0x3e
call fcn.0047dec0
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 + 0x420]
push edx
call esi
test eax, eax
jge 0x47eb2d
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.0046af40
add esp, 0xc
lea ecx, [edi + 0x1cb3]
push ecx
mov eax, 4
call fcn.0047e7c0
mov edx, dword [ebx + 0x420]
add esp, 4
push 0
push 2
add edi, 0x1cb7
push edi
push edx
call esi
pop esi
pop ebx
test eax, eax
jge 0x47eb73
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.0046af40
add esp, 0xc
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x47f6a0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x4dbfb4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
mov eax, dword [esi + 0x424]
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 0x47f713
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.00470320
add esp, 8
cmp ebx, 0xffffffff
jne 0x47f74c
push str.Error_accept__ing_server_connect
push edi
call fcn.0046af40
add esp, 8
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
mov esp, ebp
pop ebp
ret
push str.Connection_accepted_from_server_n
push edi
call fcn.0046ae20
push 1
push ebx
mov dword [esi + 0x540], 0
mov dword [esi + 0x424], ebx
call fcn.00490f40
add esp, 0x10
mov dword [esi + 0x744], 1
cmp dword [edi + 0x628], 0
je 0x47f7cb
push 1
push edi
call fcn.00468be0
mov ecx, dword [edi + 0x62c]
mov edx, dword [edi + 0x628]
push 1
push ebx
push ecx
call edx
push 0
push edi
mov ebx, eax
call fcn.00468be0
add esp, 0x1c
test ebx, ebx
je 0x47f7cb
call fcn.0047f600
pop edi
pop esi
mov eax, 0x2a
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a1682
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.004a1682
mov esp, ebp
pop ebp
ret
Function at 0x483140
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 0x483178
push str.Couldnt_set_desired_mode
push edi
call fcn.0046af40
add esp, 8
pop edi
lea eax, [esi + 0x11]
pop esi
pop ebx
pop ebp
ret
cmp ecx, 0xc8
je 0x48318f
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push edi
call fcn.0046ae20
add esp, 0xc
mov eax, dword [ebp + 8]
cmp eax, 0x13
jne 0x4831a7
push ebx
call fcn.004830c0
add esp, 4
pop edi
mov esi, eax
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x14
jne 0x4831b8
call fcn.00480400
pop edi
mov esi, eax
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x15
jne 0x4831d1
push 0xd
push 1
push ebx
call fcn.004823a0
add esp, 0xc
pop edi
mov esi, eax
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x16
jne 0x4831e5
push 0xe
push 1
push ebx
call fcn.004823a0
add esp, 0xc
mov esi, eax
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret