Function at 0x4d159c
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
xor eax, eax
push ebp
push 0x4d1828
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
xor edx, edx
push ebp
push 0x4d17f6
push dword fs:[edx]
mov dword fs:[edx], esp
lea ecx, [ebp - 0xc]
mov dl, byte [ebp + 0x14]
mov eax, esi
call fcn.004d1458
xor edx, edx
push ebp
push 0x4d17c8
push dword fs:[edx]
mov dword fs:[edx], esp
test eax, eax
je 0x4d164f
call fcn.004d1450
mov dword [ebx], eax
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x28], esi
mov byte [ebp - 0x24], 0xb
mov eax, dword [ebx]
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 0
mov eax, dword [ebx]
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x14], 0
lea edx, [ebp - 0x28]
mov ecx, 2
mov eax, 0x4d1844
call fcn.0040a424
mov edx, dword [ebp - 0x10]
mov eax, edi
call fcn.00404430
call fcn.00403e20
call fcn.00403e20
jmp 0x4d17fd
cmp dword [ebp - 0xc], 0
jne 0x4d1669
mov ecx, 0x72
mov edx, 0x4d187c
mov eax, 0x4d18b8
call fcn.00404338
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x18]
movzx eax, word [eax]
mov ecx, 6
mov edx, 1
call fcn.004d1584
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0xffffffff
jne 0x4d16ea
call fcn.004d1450
mov dword [ebx], eax
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x30]
mov eax, dword [ebx]
call fcn.0040d208
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x24], 0xb
mov eax, dword [ebx]
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 0
mov eax, dword [ebx]
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x14], 0
lea edx, [ebp - 0x28]
mov ecx, 2
mov eax, 0x4d18d4
call fcn.0040a424
mov edx, dword [ebp - 0x2c]
mov eax, edi
call fcn.00404430
call fcn.00403e20
call fcn.00403e20
jmp 0x4d17fd
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dl, 1
call fcn.004d1530
mov ax, word [ebp - 4]
push eax
call sub.wsock32.dll_htons
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x18]
mov word [edx + 2], ax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x10]
push eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
push eax
call sub.wsock32.dll_connect
test eax, eax
jge 0x4d1793
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x4d1793
call fcn.004d1450
mov dword [ebx], eax
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x54], esi
mov byte [ebp - 0x50], 0xb
lea edx, [ebp - 0x58]
mov eax, dword [ebx]
call fcn.0040d208
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x4c], eax
mov byte [ebp - 0x48], 0xb
mov eax, dword [ebx]
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0
mov eax, dword [ebx]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0
lea edx, [ebp - 0x54]
mov ecx, 3
mov eax, 0x4d191c
call fcn.0040a424
mov edx, dword [ebp - 0x34]
mov eax, edi
call fcn.00404430
call fcn.00403e20
call fcn.00403e20
jmp 0x4d17fd
mov byte [ebp - 5], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d17cf
cmp dword [ebp - 0xc], 0
je 0x4d17c7
call fcn.004d1220
test al, al
jne 0x4d17bd
mov eax, dword [ebp - 0xc]
call fcn.004d12ec
jmp 0x4d17c7
mov eax, dword [ebp - 0xc]
push eax
call dword [0x59ba14]
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d182f
lea eax, [ebp - 0x58]
call fcn.004043dc
lea eax, [ebp - 0x34]
mov edx, 3
call fcn.00404400
lea eax, [ebp - 0x10]
call fcn.004043dc
ret