Function at 0x4b15c0
Capabilities:
Connect socket
Get socket status
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x5274d0]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x38], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004b1bc0
add esp, 4
push 0
push 0x20
push 0
lea eax, [ebp - 0x58]
push eax
call fcn.00401ca0
add esp, 0x10
mov dword [ebp - 0x58], 4
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x54], 0
mov ecx, dword [ebp + 0x10]
push ecx
push 0x5218ec
lea edx, [ebp - 0x28]
push edx
call sub.MSVCR120.dll_sprintf
add esp, 0xc
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 0x58]
push edx
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4b167e
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.00489a60
add esp, 4
xor eax, eax
jmp 0x4b19cb
cmp dword [ebp + 0x14], 0
je 0x4b168e
mov edx, dword [ebp + 8]
mov dword [edx + 0xc], 1
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x2c], eax
jmp 0x4b169f
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x1c]
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x2c], 0
je 0x4b1963
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WSOCK32.dll_socket]
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 4], 0
jge 0x4b16e8
call fcn.004b1b20
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 8]
push edx
call fcn.004b1de0
add esp, 4
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WSOCK32.dll_connect]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jge 0x4b1733
cmp dword [ebp + 0x14], 0
jne 0x4b1733
call fcn.004b1b20
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x4b1696
cmp dword [ebp - 0x34], 0
jge 0x4b195c
cmp dword [ebp + 0x14], 0
je 0x4b195c
call fcn.004b1b20
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x60], 0
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x5c]
mov dword [edx + 8], eax
cmp dword [ebp - 0x5c], 0x2734
je 0x4b1775
cmp dword [ebp - 0x5c], 0x2733
jne 0x4b194d
mov dword [ebp - 0x170], 0
mov dword [ebp - 0x188], 0
jmp 0x4b179a
mov ecx, dword [ebp - 0x188]
add ecx, 1
mov dword [ebp - 0x188], ecx
mov edx, dword [ebp - 0x188]
cmp edx, dword [ebp - 0x170]
jae 0x4b17c1
mov eax, dword [ebp - 0x188]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + eax*4 - 0x16c]
cmp edx, dword [ecx + 4]
jne 0x4b17bf
jmp 0x4b17c1
jmp 0x4b178b
mov eax, dword [ebp - 0x188]
cmp eax, dword [ebp - 0x170]
jne 0x4b17fa
cmp dword [ebp - 0x170], 0x40
jae 0x4b17fa
mov ecx, dword [ebp - 0x188]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov dword [ebp + ecx*4 - 0x16c], eax
mov ecx, dword [ebp - 0x170]
add ecx, 1
mov dword [ebp - 0x170], ecx
xor edx, edx
jne 0x4b177f
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x180], eax
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x17c], edx
push 0
call fcn.004b19e0
add esp, 4
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x174], 0
mov eax, dword [ebp + 0x14]
cdq
mov ecx, 0xf4240
idiv ecx
mov dword [ebp - 0x184], eax
mov edx, 1
test edx, edx
je 0x4b1900
lea eax, [ebp - 0x180]
push eax
push 0
lea ecx, [ebp - 0x170]
push ecx
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
add eax, 1
push eax
call dword [sym.imp.WSOCK32.dll_select]
mov dword [ebp - 0x178], eax
cmp dword [ebp - 0x178], 0
jge 0x4b18f9
call fcn.004b1b20
cmp eax, 0x2714
jne 0x4b18ea
push 0
call fcn.004b19e0
add esp, 4
sub eax, dword [ebp - 0x68]
sbb edx, dword [ebp - 0x64]
mov dword [ebp - 0x174], eax
mov ecx, dword [ebp - 0x174]
cmp ecx, dword [ebp - 0x184]
jg 0x4b18dc
mov edx, dword [ebp - 0x184]
sub edx, dword [ebp - 0x174]
mov dword [ebp - 0x180], edx
mov dword [ebp - 0x17c], 0
jmp 0x4b184b
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0x274c
jmp 0x4b1900
call fcn.004b1b20
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x4b1900
jmp 0x4b1900
cmp dword [ebp - 0x178], 0
jl 0x4b194d
cmp dword [ebp - 0x178], 0
jne 0x4b191e
mov edx, dword [ebp + 8]
mov dword [edx + 8], 0x274c
jmp 0x4b194d
lea eax, [ebp - 0x170]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4b194d
mov dword [ebp - 0x60], 1
mov dword [ebp - 0x34], 0
mov eax, dword [ebp + 8]
mov dword [eax + 8], 0
cmp dword [ebp - 0x60], 0
jne 0x4b195a
jmp 0x4b1696
jmp 0x4b1963
jmp 0x4b1963
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x30]
mov dword [ecx + 0xc], edx
cmp dword [ebp - 0x34], 0
jge 0x4b1980
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
xor eax, eax
jmp 0x4b19cb
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x18]
push ecx
call fcn.004ddce0
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x4b19bc
call fcn.004b1b20
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
xor eax, eax
jmp 0x4b19cb
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov eax, 1
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00431a84
mov esp, ebp
pop ebp
ret