Function at 0x4021ed
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x16c
push ebx
lea eax, [ebp - 0x84]
push esi
lea ecx, [ebp - 8]
push edi
mov esi, dword [ebp + 8]
push eax
push ecx
mov ecx, esi
call fcn.0040560a
test eax, eax
jne 0x402219
xor eax, eax
jmp 0x402457
push 0
mov eax, dword [ebp - 8]
movzx ecx, word [eax]
push 1
push ecx
call sub.WSOCK32.dll_socket
push dword [ebp - 0x84]
push dword [ebp - 8]
push eax
mov ebx, eax
call sub.WSOCK32.dll_connect
test eax, eax
je 0x4022d7
push ebx
call sub.WSOCK32.dll_closesocket
mov ebx, dword [esi + 4]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
lea edx, [ebp - 0xe8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ecx
mov eax, 5
mov dword [esi + 4], edx
push 3
lea ecx, [ebp - 0x18]
push ecx
mov byte [ebp - 0x18], al
mov ecx, esi
mov byte [ebp - 0x17], al
mov dword [esi + 8], 0x64
mov dword [esi + 0xc], 0
mov byte [ebp - 0x16], 0
lea edi, [ebp - 0x7b]
call fcn.004056b0
xor eax, eax
push 7
mov byte [ebp - 0x7c], 1
stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x7c]
mov ecx, esi
push eax
call fcn.004056b0
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
push ecx
mov ecx, esi
mov dword [esi + 4], ebx
mov dword [esi + 8], eax
mov dword [esi + 0xc], edx
lea eax, [ebp - 0xe8]
push eax
call fcn.004056b0
push dword [ebp - 8]
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
xor eax, eax
jmp 0x402457
push dword [ebp - 8]
call dword [sym.imp.MSVCRT20.dll_free]
add esp, 4
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x80], 0x10
push ecx
lea eax, [ebp - 0xf8]
push eax
push ebx
call sub.WSOCK32.dll_getsockname
test eax, eax
jne 0x4023ce
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [ebp - 0x7c], eax
lea eax, [ebp - 0x16c]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0xc], edx
mov dword [esi + 4], eax
xor eax, eax
push 3
lea ecx, [ebp - 0xe8]
mov dword [esi + 0xc], eax
mov dword [esi + 8], 0x64
mov byte [ebp - 0xe8], 5
push ecx
mov byte [ebp - 0xe7], al
mov ecx, esi
mov byte [ebp - 0xe6], al
call fcn.004056b0
movzx ecx, word [ebp - 0xf8]
cmp ecx, 2
je 0x402375
lea edi, [ebp - 0x107]
xor eax, eax
mov byte [ebp - 0x108], 1
stosd dword es:[edi], eax
stosw word es:[edi], ax
push 7
lea eax, [ebp - 0x108]
jmp 0x4023a8
cmp word [ebp - 0xf8], 2
jne 0x4023b0
push 1
lea eax, [ebp - 4]
push eax
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.004056b0
push 4
lea eax, [ebp - 0xf4]
push eax
mov ecx, esi
call fcn.004056b0
push 2
lea eax, [ebp - 0xf6]
push eax
mov ecx, esi
call fcn.004056b0
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x18]
mov edi, dword [ebp - 0xc]
push ecx
mov dword [esi + 4], eax
lea eax, [ebp - 0x16c]
mov dword [esi + 8], edx
mov dword [esi + 0xc], edi
jmp 0x40242d
mov edi, dword [esi + 4]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
lea edx, [ebp - 0x7c]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ecx
push 3
mov dword [esi + 4], edx
mov dword [esi + 8], 0x64
lea eax, [ebp - 0x18]
mov ecx, esi
mov dword [esi + 0xc], 0
mov byte [ebp - 0x18], 5
mov byte [ebp - 0x17], 0
mov byte [ebp - 0x16], 0
push eax
call fcn.004056b0
push 1
push 0
push esi
call fcn.004014c1
add esp, 0xc
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
push ecx
mov dword [esi + 4], edi
mov dword [esi + 8], eax
mov dword [esi + 0xc], edx
lea eax, [ebp - 0x7c]
push eax
mov ecx, esi
call fcn.004056b0
push 0
push 1
push 0
push esi
call fcn.0040320d
add esp, 0x10
mov ecx, esi
push ebx
call fcn.00405859
push ebx
call sub.WSOCK32.dll_closesocket
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret