joyce8/EMBER2024-capa huggingface dataset:
Function at 0x471a04
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x52e030]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
xor esi, esi
cmp dword [ebx + 0x44], esi
je 0x471afd
cmp byte [ebx + 0x49], 0
je 0x471afd
mov eax, dword [ebx]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
jne 0x471a40
xor al, al
jmp 0x471aff
push esi
push 8
mov dword [ebp - 0x10], esi
pop eax
lea esi, [ebp - 0x20]
mov dword [ebp - 0xc], 0xf
mov byte [ebp - 0x20], 0
call fcn.00429ad2
push edi
mov eax, dword [ebp - 0x20]
push 0x10
pop edi
cmp dword [ebp - 0xc], edi
jae 0x471aa0
lea eax, [ebp - 0x20]
mov ecx, eax
add eax, dword [ebp - 0x10]
lea edx, [ebp - 0x24]
push edx
push eax
push ecx
mov ecx, dword [ebx + 0x44]
lea eax, [ebx + 0x4c]
push eax
call dword [sym.imp.MSVCP100.dll_public:_int___thiscall_std::codecvt_char__char__int_::unshift_int___char___char___char___const]
sub eax, 0
je 0x471aa5
dec eax
je 0x471aa9
dec eax
dec eax
je 0x471af9
xor bl, bl
push 1
xor edi, edi
lea esi, [ebp - 0x20]
call fcn.00402dc7
mov al, bl
pop edi
jmp 0x471aff
mov ecx, dword [ebp - 0x20]
jmp 0x471a6b
mov byte [ebx + 0x49], 0
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0xc], edi
jae 0x471ab4
lea eax, [ebp - 0x20]
mov esi, dword [ebp - 0x24]
sub esi, eax
je 0x471ada
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0xc], edi
jae 0x471ac6
lea eax, [ebp - 0x20]
push dword [ebx + 0x54]
push esi
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x471a8d
cmp byte [ebx + 0x49], 0
je 0x471af9
test esi, esi
jne 0x471a5b
push esi
push 8
pop edi
lea esi, [ebp - 0x20]
call fcn.00407009
jmp 0x471a5b
mov bl, 1
jmp 0x471a8f
mov al, 1
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00475360
leave
ret

Function at 0x475295
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x5353bc], 0
push esi
push edi
jne 0x475206
call fcn.00475160
test eax, eax
je 0x47524b
mov eax, dword [0x5353bc]
cmp eax, 1
jne 0x475227
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x47524b
jmp 0x47528d
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedPopEntrySList]
push eax
call edi
test eax, eax
jne 0x47528d
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x47524f
xor eax, eax
jmp 0x47528d
mov eax, dword [esi]
push dword [0x5353bc]
call edi
mov edi, eax
test edi, edi
je 0x475271
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x47528d
lea edi, [esi + 0xff0]
push esi
push dword [0x5353bc]
call dword [sym.imp.KERNEL32.dll_InterlockedPushEntrySList]
add esi, 0x10
cmp esi, edi
jb 0x475277
mov eax, esi
pop edi
pop esi
ret
jmp 0x4751f2

Function at 0x475360
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x52e030]
jne 0x47536a
repz ret
jmp fcn.00475bec
Function at 0x4aa1f0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x52e030]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4aa240
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x4aa23a
shr eax, 8
cmp al, 2
jne 0x4aa23a
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, 2
call fcn.00475360
mov esp, ebp
pop ebp
ret

Function at 0x4b6900
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 0x4b6933
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 0x4b6a80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4b6aa2
mov edx, dword [esi + 0xf4]
push edx
mov edx, dword [ebp + 8]
push ebx
push edx
push eax
push esi
call ecx
add esp, 0x14
pop ebp
ret
test eax, eax
js 0x4b6adb
cmp eax, 2
jg 0x4b6adb
mov ecx, dword [esi + 0xf0]
push edi
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
push ecx
push 1
lea edx, [eax + eax*2 + 0x4f3838]
push 2
push edx
call edi
mov eax, dword [esi + 0xf0]
mov ecx, dword [ebp + 8]
push eax
push 1
push ebx
push ecx
call edi
add esp, 0x20
pop edi
xor eax, eax
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + eax*4 + 0x130]
push edi
push 0
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [ebp + 0x18]
mov edi, eax
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x4b6e2c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 8], eax
cmp eax, 0x2733
jne 0x4b6e01
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
pop ebp
ret
push eax
push esi
call fcn.004b9360
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.004b6c40
mov ecx, dword [esi]
mov edx, dword [ebp + 8]
mov dword [ecx + 0x858c], edx
add esp, 0x14
mov dword [ebx], 0x37
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x4b7080
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
xor eax, eax
cmp dword [edi + 0x408], eax
push 4
lea ecx, [ebp - 4]
push ecx
setne al
push 8
push 0xffff
push esi
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4b70b9
push esi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push edi
call fcn.004b6bc0
add esp, 0xc
mov esp, ebp
pop ebp
ret
Function at 0x4b7730
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x52e030]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x1a4], 0
mov ebx, dword [esi]
push edi
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x110], ebx
jne 0x4b78c7
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x10c]
push eax
lea ecx, [ebp - 0x104]
push ecx
push edi
mov dword [ebp - 0x10c], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4b77ba
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004b9360
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.004b6c40
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x10c]
push edx
lea eax, [ebp - 0x84]
push eax
push edi
mov dword [ebp - 0x10c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b780d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push edi
push esi
call fcn.004b9360
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.004b6c40
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
lea ebx, [esi + 0xcc]
lea edi, [esi + 0x9e]
lea esi, [ebp - 0x104]
call fcn.004b76f0
test eax, eax
jne 0x4b7864
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x108]
mov esi, eax
push esi
push ecx
call fcn.004b9360
mov edx, dword [ebp - 0x110]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.004b6c40
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x108]
lea ebx, [eax + 0x100]
lea edi, [eax + 0xd0]
lea esi, [ebp - 0x84]
call fcn.004b76f0
test eax, eax
jne 0x4b78c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x108]
push esi
push eax
call fcn.004b9360
mov ecx, dword [ebp - 0x110]
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ecx
call fcn.004b6c40
add esp, 0x18
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x108]
push esi
call fcn.004b7690
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00475360
mov esp, ebp
pop ebp
ret

Function at 0x4b78f0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x314]
push 4
lea ecx, [ebp - 4]
push ecx
push 1
push 6
push edx
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4b7936
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004b9360
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004b6bc0
add esp, 0x14
pop esi
mov esp, ebp
pop ebp
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.004b6bc0
add esp, 8
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4b79b0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x550]
cmp eax, 0xffffffff
je 0x4b7a0b
mov ecx, dword [ecx + 0x544]
mov edx, dword [ecx]
cmp dword [edx + eax*4], 0
lea eax, [edx + eax*4]
je 0x4b7a0b
mov ecx, dword [ebp + 0xc]
mov eax, dword [eax]
test ecx, ecx
je 0x4b79dd
mov dword [ecx], eax
cmp dword [eax + 0x150], 0
push esi
mov esi, dword [eax + 0x130]
jne 0x4b7a00
push 2
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x4b7a06
or eax, 0xffffffff
pop esi
pop ebp
ret
mov eax, esi
pop esi
pop ebp
ret
or eax, 0xffffffff
pop ebp
ret
Function at 0x4b8360
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push ebx
xor ebx, ebx
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp + 8]
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
push edx
push eax
push ecx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x4b84f6
push edi
mov edi, dword [ebp - 0x10]
cmp edi, ebx
je 0x4b84d8
push esi
cmp dword [edi + 4], 2
jne 0x4b845c
cmp dword [edi + 0x18], ebx
je 0x4b845c
mov eax, dword [edi + 0x10]
cmp eax, ebx
jbe 0x4b845c
cmp eax, 0x10
jb 0x4b845c
push 0x20
call dword [0x52fd88]
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4b8469
mov edx, dword [edi]
mov dword [esi], edx
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov ecx, dword [edi + 8]
mov dword [esi + 8], ecx
mov edx, dword [edi + 0xc]
push 0x10
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], 0x10
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x1c], ebx
call dword [0x52fd88]
add esp, 4
mov dword [esi + 0x18], eax
cmp eax, ebx
je 0x4b8472
mov ecx, dword [edi + 0x18]
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
mov eax, dword [edi + 0x14]
cmp eax, ebx
je 0x4b8447
push eax
call dword [0x52fd94]
add esp, 4
mov dword [esi + 0x14], eax
cmp eax, ebx
je 0x4b8485
cmp dword [ebp - 4], ebx
jne 0x4b844f
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0xc]
cmp eax, ebx
je 0x4b8459
mov dword [eax + 0x1c], esi
mov dword [ebp - 0xc], esi
mov edi, dword [edi + 0x1c]
cmp edi, ebx
jne 0x4b83a2
jmp 0x4b84a0
mov dword [ebp - 8], 8
jmp 0x4b84a0
push esi
mov dword [ebp - 8], 8
call dword [0x52fd8c]
add esp, 4
jmp 0x4b84a0
mov edx, dword [esi + 0x18]
push edx
mov dword [ebp - 8], 8
call dword [0x52fd8c]
push esi
call dword [0x52fd8c]
add esp, 8
mov eax, dword [ebp - 0x10]
pop esi
cmp eax, ebx
je 0x4b84af
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 8], ebx
je 0x4b84d3
mov eax, dword [ebp - 4]
push eax
call fcn.004b8310
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
add esp, 4
mov ecx, ebx
pop edi
mov dword [ebp - 4], ebx
mov dword [edx], ecx
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 4], ebx
jne 0x4b84ea
push 0x2af9
mov dword [ebp - 8], 0x2af9
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
mov dword [edx], ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4b8820
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 dword [sym.imp.MSVCR100.dll__beginthreadex]
add esp, 0x18
test eax, eax
je 0x4b8845
cmp eax, 0xffffffff
jne 0x4b8847
xor eax, eax
pop ebp
ret
Function at 0x4c17e0
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 0x4f3780
push ecx
call fcn.004b6bc0
add esp, 0xc
mov eax, esi
mov dword [esi], 1
call fcn.004c0970
test eax, eax
jne 0x4c1814
mov eax, esi
pop ebp
jmp fcn.004c0df0
pop ebp
ret
Function at 0x4c1c10
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x52e030]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax]
push esi
mov esi, dword [eax + 0x3d0]
push edi
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 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
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x4c1ca4
mov edx, dword [ebp - 0x88]
push edx
lea eax, [ebp - 0x84]
push eax
lea ecx, [esi + 0xc8]
push ecx
call sub.MSVCR100.dll_memcpy
mov edx, dword [ebp - 0x88]
add esp, 0xc
mov dword [esi + 0x148], edx
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x4c1cd7
push str.Received_too_short_packet
push ebx
call fcn.004b6c40
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.00475360
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x15c]
call fcn.004c0b10
movzx eax, ax
mov dword [esi + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x4c1cf4
jmp dword [eax*4 + 0x4c1e24]
cmp edx, 4
jle case.0x4c1cf4.4
lea eax, [esi + 0x15c]
call fcn.004c0b20
movzx ecx, word [esi + 0x40]
inc ecx
cmp cx, ax
jne case.0x4c1cf4.4
mov eax, dword [ebp - 0x8c]
add edx, 0xfffffffc
push edx
mov edx, dword [esi + 0x15c]
add edx, 4
push edx
push 1
push eax
call fcn.004b6f10
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4c1d61
mov ecx, 5
mov eax, esi
call fcn.004c1b90
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [ebx + 0x38], eax
adc dword [ebx + 0x3c], edx
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ebx + 0x38]
push ecx
push edx
push ebx
call fcn.004cf620
jmp 0x4c1de5
lea eax, [esi + 0x15c]
call fcn.004c0b20
mov ecx, dword [esi + 0x15c]
add ecx, 4
push ecx
movzx eax, ax
push 0x4f3780
push ebx
mov dword [esi + 8], eax
call fcn.004b6bc0
jmp 0x4c1de5
add edx, 0xfffffffe
push edx
mov edx, dword [esi + 0x15c]
add edx, 2
push edx
push esi
call fcn.004c0bb0
add esp, 0xc
test eax, eax
je case.0x4c1cf4.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x508454
push ebx
call fcn.004b6c40
add esp, 0xc
mov eax, dword [ebp - 0x8c]
push eax
call fcn.004cf6e0
add esp, 4
test eax, eax
je 0x4c1cc4
mov ecx, 5
mov eax, esi
call fcn.004c1b90
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 0x2a
pop ebx
call fcn.00475360
mov esp, ebp
pop ebp
ret
Function at 0x4c3a00
Capabilities:
Initialize winsock library

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

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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [edi + 0x130]
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
jns 0x4c3c45
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004b6c40
add esp, 0xc
mov esi, dword [ebp + 8]
mov ecx, dword [edi]
mov eax, ebx
mov ebx, str.SENT
call fcn.004c3b00
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c4980
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 ebx
mov ebx, dword [eax + 0x8684]
mov dword [ebp - 4], eax
jne 0x4c4acf
push esi
push edi
lea edi, [ebx + 0x1cb0]
lea esi, [ebx + 0x1eb0]
mov dword [esi], edi
cmp edi, esi
jae 0x4c49b6
mov byte [edi], 0xff
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4c49c1
mov byte [eax], 0xfa
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4c49cc
mov byte [eax], 0x1f
inc dword [esi]
movzx ecx, word [ebx + 0x1ca8]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
movzx edx, ax
movzx eax, word [ebx + 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 0x4c49fe
mov dl, byte [ebp + 0xc]
mov byte [eax], dl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4c4a0b
mov dl, byte [ebp + 0xd]
mov byte [eax], dl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4c4a15
mov byte [eax], cl
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4c4a1f
mov byte [eax], ch
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4c4a2a
mov byte [eax], 0xff
inc dword [esi]
mov eax, dword [esi]
cmp eax, esi
jae 0x4c4a35
mov byte [eax], 0xf0
inc dword [esi]
mov eax, dword [esi]
mov dword [ebx + 0x1eb4], eax
sub eax, edi
sub eax, 2
push eax
lea edx, [ebx + 0x1cb2]
push edx
mov dword [esi], edi
mov esi, dword [ebp - 4]
push 0x3e
call fcn.004c3f70
mov esi, dword [sym.imp.WS2_32.dll_send]
add esp, 0xc
push 0
push 3
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x130]
push eax
call esi
test eax, eax
jns 0x4c4a8c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 4]
push eax
push str.Sending_data_failed___d_
push ecx
call fcn.004b6c40
add esp, 0xc
lea edx, [ebx + 0x1cb3]
push 4
push edx
call fcn.004c4820
mov eax, dword [edi + 0x130]
add esp, 8
push 0
push 2
add ebx, 0x1cb7
push ebx
push eax
call esi
pop edi
pop esi
test eax, eax
jns 0x4c4acf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 4]
push eax
push str.Sending_data_failed___d_
push ecx
call fcn.004b6c40
add esp, 0xc
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c54f0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x52e030]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [esi]
push ebx
mov ebx, dword [esi + 0x134]
push edi
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x14]
push edx
push ebx
mov dword [ebp - 0x1c], eax
or edi, 0xffffffff
mov dword [ebp - 0x18], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4c5542
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
push ecx
push ebx
mov dword [ebp - 0x18], 0x10
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
push ebx
push esi
call fcn.004b7a10
add esp, 8
cmp edi, 0xffffffff
jne 0x4c5577
mov edx, dword [ebp - 0x1c]
push str.Error_accept__ing_server_connect
push edx
call fcn.004b6c40
add esp, 8
pop edi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x1c]
push str.Connection_accepted_from_server_n
push ebx
call fcn.004b6bc0
push 1
push edi
mov dword [esi + 0x134], edi
call fcn.004d2800
mov dword [esi + 0x13c], 1
mov eax, dword [ebx + 0x16c]
add esp, 0x10
test eax, eax
je 0x4c55e6
mov ecx, dword [ebx + 0x170]
push 1
push edi
push ecx
call eax
add esp, 0xc
test eax, eax
je 0x4c55e6
push edi
push esi
call fcn.004b7a10
add esp, 8
pop edi
mov dword [esi + 0x134], 0xffffffff
mov eax, 0x2a
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475360
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00475360
mov esp, ebp
pop ebp
ret
Function at 0x4c6790
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
push ebx
mov ebx, dword [edi]
shr eax, 0x1f
push esi
add eax, edx
xor esi, esi
cmp eax, 2
je 0x4c67c4
push str.Couldnt_set_desired_mode
push ebx
call fcn.004b6c40
add esp, 8
lea eax, [esi + 0x11]
pop esi
pop ebx
pop ebp
ret
cmp ecx, 0xc8
je 0x4c67db
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push ebx
call fcn.004b6bc0
add esp, 0xc
mov eax, dword [ebp + 8]
cmp eax, 0x13
jne 0x4c67f0
mov eax, edi
call fcn.004c6350
mov esi, eax
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x14
jne 0x4c6804
push edi
call fcn.004c63a0
add esp, 4
mov esi, eax
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x15
jne 0x4c6816
mov eax, edi
call fcn.004c64c0
mov esi, eax
pop esi
pop ebx
pop ebp
ret
cmp eax, 0x16
jne 0x4c6824
mov eax, edi
call fcn.004c64d0
mov esi, eax
mov eax, esi
pop esi
pop ebx
pop ebp
ret