Function at 0x4d1a20
Capabilities:
Connect socket

Disassembly:
sub esp, 0x150
mov eax, dword [esp + 0x15c]
push ebx
mov ebx, dword [esp + 0x158]
add eax, 0x6b
push ebp
lea eax, [ebx + eax*4]
mov byte [esp + 0xa], 0
push edi
mov ebp, dword [ebx]
mov dword [esp + 0x14], eax
mov dword [eax], 0xffffffff
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x16c]
push ebx
call fcn.004d1000
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4d1a7a
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x150
ret
push esi
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0xb4]
push eax
push dword [esp + 0x34]
lea eax, [esp + 0x3c]
push eax
call fcn.004d0620
add esp, 0x10
test al, al
jne 0x4d1ae7
mov esi, dword [sym.imp.MSVCRT.dll__errno]
call esi
mov edi, eax
call esi
mov esi, eax
lea eax, [esp + 0xe0]
push pe_nt_image_headers32
push eax
push dword [edi]
call fcn.004e41a0
push eax
push dword [esi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.004ca090
push dword [esp + 0x38]
push ebx
call fcn.004d06c0
add esp, 0x24
xor eax, eax
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x150
ret
push dword [esp + 0x14]
lea eax, [esp + 0xb4]
push eax
push str.__Trying__s:_ld..._n
push ebp
call fcn.004ca150
mov eax, dword [esp + 0x30]
add esp, 0x10
cmp eax, 2
je 0x4d1b0f
cmp eax, 0x17
jne 0x4d1b1d
cmp dword [esp + 0x24], 1
jne 0x4d1b1d
mov eax, 1
jmp 0x4d1b1f
xor eax, eax
mov esi, dword [esp + 0x1c]
test eax, eax
setne al
mov byte [esp + 0x13], al
test al, al
je 0x4d1b43
cmp byte [ebp + 0xa96], 0
je 0x4d1b43
push esi
push ebx
call fcn.004d1e00
add esp, 8
push esi
call fcn.004d0f60
add esp, 4
cmp byte [esp + 0x13], 0
je 0x4d1b66
cmp byte [ebp + 0xa9f], 0
je 0x4d1b66
push esi
push ebp
call fcn.004d1d30
add esp, 8
cmp dword [ebp + 0x5e8], 0
je 0x4d1ba5
push 1
push ebp
call fcn.004cb200
mov eax, dword [ebp + 0x5e8]
push 0
push esi
push dword [ebp + 0x5ec]
call eax
push 0
push ebp
mov dword [esp + 0x30], eax
call fcn.004cb200
mov eax, dword [esp + 0x30]
add esp, 0x1c
cmp eax, 2
jne 0x4d1bf3
mov byte [esp + 0x12], 1
mov eax, dword [esp + 0x20]
cmp eax, 2
je 0x4d1bb3
cmp eax, 0x17
jne 0x4d1c11
lea eax, [esp + 0x30]
push eax
call fcn.004e9230
push eax
push dword [esp + 0x28]
push esi
push ebx
call fcn.004d13e0
mov edi, eax
add esp, 0x14
test edi, edi
je 0x4d1c11
push esi
push ebx
call fcn.004d06c0
add esp, 8
cmp edi, 1
jne 0x4d1d0c
pop esi
lea eax, [edi + 6]
pop edi
pop ebp
pop ebx
add esp, 0x150
ret
test eax, eax
je 0x4d1ba5
push esi
push ebx
call fcn.004d06c0
add esp, 8
mov eax, 0x2a
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x150
ret
push 1
push esi
call fcn.004e8040
add esp, 8
call fcn.004da3d0
cmp dword [ebx + 0x2b0], 1
mov dword [ebx + 0x2a8], eax
mov dword [ebx + 0x2ac], edx
jle 0x4d1c4d
push 3
push dword [ebx + 0x2bc]
push dword [ebx + 0x2b8]
push ebp
call fcn.004ca9c0
add esp, 0x10
cmp byte [esp + 0x12], 0
jne 0x4d1d19
cmp dword [ebx + 0x90], 4
je 0x4d1d19
cmp byte [ebx + 0x2a1], 0
jne 0x4d1c9e
push dword [esp + 0x2c]
lea eax, [esp + 0x34]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4d1c9e
test edi, edi
jne 0x4d1d0c
mov eax, dword [esp + 0x18]
mov dword [eax], esi
mov eax, edi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x150
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp edi, 0xb
je 0x4d1d04
cmp edi, 0x2732
jle 0x4d1cbb
cmp edi, 0x2734
jle 0x4d1d04
push pe_nt_image_headers32
lea eax, [esp + 0xe4]
push eax
push edi
call fcn.004e41a0
push eax
lea eax, [esp + 0xc0]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push ebp
call fcn.004ca150
push esi
push ebx
mov dword [ebp + 0xc54], edi
call fcn.004d06c0
add esp, 0x24
mov edi, 7
mov eax, edi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x150
ret
mov eax, dword [esp + 0x18]
xor edi, edi
mov dword [eax], esi
pop esi
mov eax, edi
pop edi
pop ebp
pop ebx
add esp, 0x150
ret
mov eax, dword [esp + 0x18]
mov dword [eax], esi
xor eax, eax
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x150
ret