Function at 0x4e21b0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x10c
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x4e2221
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
push ecx
push 6
push 1
push 2
call sub.WSOCK32.DLL_socket
mov word [ebp - 0x28], 2
mov dword [ebx + 0x30], eax
mov dword [ebp - 0x10], 0x10
lea edi, [ebp - 0x28]
pop edx
cmp eax, 0xffffffff
jne 0x4e2230
push edi
push str.socket_failed
push 0
push 9
call fcn.0048db10
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
or eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebx + 0x28]
test esi, esi
je 0x4e22a7
lea esi, [ebp - 0x108]
push ecx
push str.PASV_r_n
push 0xc8
push esi
call sub.msvcrt.dll__snprintf_1
push 0
mov ecx, esi
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4e2252
test edx, 0x8080
jne 0x4e2278
shr edx, 0x10
add ecx, 2
add dl, dl
sbb ecx, 3
sub ecx, esi
push ecx
push esi
mov edx, dword [ebx + 0x2c]
push edx
call sub.WSOCK32.DLL_send
add esp, 0x10
test eax, eax
jns 0x4e232e
push esi
push str.send_failed
push 0
push 9
call fcn.0048db10
pop ecx
jmp 0x4e22dc
lea esi, [ebp - 0x10]
push edx
push esi
push edi
push eax
call sub.WSOCK32.DLL_getsockname
mov eax, dword [ebp - 0x10]
mov word [ebp - 0x26], 0
push eax
push edi
mov ecx, dword [ebx + 0x30]
push ecx
call sub.WSOCK32.DLL_bind
pop edx
test eax, eax
jns 0x4e22fa
push eax
push str.bind_failed
push 0
push 9
call fcn.0048db10
pop eax
mov edx, dword [ebx + 0x30]
push edx
call sub.WSOCK32.DLL_closesocket
mov dword [ebx + 0x30], 0xffffffff
or eax, 0xffffffff
add esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
push eax
push esi
push edi
mov eax, dword [ebx + 0x30]
push eax
call sub.WSOCK32.DLL_getsockname
push edi
push 1
mov esi, dword [ebx + 0x30]
push esi
call sub.WSOCK32.DLL_listen
pop edx
test eax, eax
pop ecx
jns 0x4e23f0
push eax
push str.listen_failed
push 0
push 9
call fcn.0048db10
pop eax
jmp 0x4e22dc
mov eax, ebx
call fcn.004e1bb0
cmp eax, 2
je 0x4e2361
cmp eax, 5
jne 0x4e2344
sub esp, 0xc
jmp 0x4e22dc
sub esp, 0xc
mov eax, dword [ebx + 0x30]
push eax
call sub.WSOCK32.DLL_closesocket
mov dword [ebx + 0x30], 0xffffffff
mov dword [ebx + 0x28], 0
add esp, 0xc
mov eax, dword [ebx + 0x448]
lea ecx, [ebx + 0x3c]
add ecx, eax
mov dl, byte [ecx]
lea eax, [edx - 0x30]
cmp al, 9
ja 0x4e23e0
lea eax, [ebp - 0x2c]
lea esi, [ebp - 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x3c]
push eax
push esi
push str._u__u__u__u__u__u
push ecx
call sub.msvcrt.dll_sscanf
add esp, 0x20
cmp eax, 6
je 0x4e2495
push eax
push str.Invalid_answer_to_PASV_n
push 0x7d0
push 9
call fcn.0048db10
mov eax, dword [ebx + 0x30]
add esp, 0x10
cmp eax, 0xffffffff
je 0x4e2221
sub esp, 0xc
push eax
call sub.WSOCK32.DLL_closesocket
or eax, 0xffffffff
add esp, 0xc
mov dword [ebx + 0x30], 0xffffffff
jmp 0x4e2219
test dl, dl
je 0x4e2375
inc ecx
mov dl, byte [ecx]
lea eax, [edx - 0x30]
cmp al, 9
ja 0x4e23e0
jmp 0x4e2375
sub esp, 0xc
xor eax, eax
mov al, byte [ebp - 0x25]
lea esi, [ebp - 0x108]
push eax
xor eax, eax
mov al, byte [ebp - 0x26]
push eax
xor eax, eax
mov al, byte [ebp - 0x21]
push eax
xor eax, eax
mov al, byte [ebp - 0x22]
push eax
xor eax, eax
mov al, byte [ebp - 0x23]
push eax
xor eax, eax
mov al, byte [ebp - 0x24]
push eax
push str.PORT__d__d__d__d__d__d_r_n
push 0xc8
push esi
call sub.msvcrt.dll__snprintf_1
add esp, 0x30
mov byte [ebp - 0x41], 0
mov ecx, esi
push 0
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4e2438
test edx, 0x8080
jne 0x4e245e
shr edx, 0x10
add ecx, 2
add dl, dl
sbb ecx, 3
sub ecx, esi
push ecx
push esi
mov edi, dword [ebx + 0x2c]
push edi
call sub.WSOCK32.DLL_send
test eax, eax
js 0x4e2295
sub esp, 0xc
push ebx
call fcn.004e1e90
add esp, 0x10
cmp eax, 2
jne 0x4e233f
mov eax, dword [ebx + 0x30]
jmp 0x4e2219
mov eax, dword [ebp - 0x40]
mov edx, 2
mov byte [ebp - 0x16], al
lea ecx, [ebp - 0x16]
mov eax, dword [esi + edx*4 - 4]
mov byte [edx + ecx - 1], al
inc edx
cmp edx, 7
jne 0x4e24a3
mov eax, dword [ebp - 0x16]
mov dword [ebp - 0x24], eax
mov ax, word [ebp - 0x12]
mov word [ebp - 0x26], ax
push eax
mov eax, dword [ebp - 0x10]
push eax
push edi
mov eax, dword [ebx + 0x30]
push eax
call sub.WSOCK32.DLL_connect
pop edi
test eax, eax
jns 0x4e248d
push esi
push str.Failed_to_create_a_data_connection
push 0
push 9
call fcn.0048db10
pop ecx
jmp 0x4e22dc