Function at 0x419b70
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x1a0
push ebx
push esi
push edi
push ebp
push 0x4316f4
call fcn.0040cf50
add esp, 4
call sub.WSOCK32.dll_WSAIsBlocking
test eax, eax
je 0x419b95
call sub.WSOCK32.dll_WSACancelBlockingCall
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov ebx, eax
jne 0x419c0f
lea eax, [esp + 0xb0]
push 0x100
push eax
mov ecx, dword [0x438580]
push 0x36f8
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.0041a600
lea ecx, [esp + 0xb8]
lea edx, [esp + 0x20]
add esp, 8
push eax
push ecx
push str.___s____s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x28]
add esp, 0x10
push ecx
call fcn.0040cf20
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a0
ret
mov eax, 0x438570
xor esi, esi
mov ecx, dword [esp + 0x1b8]
mov dword [eax], esi
push ecx
mov dword [eax + 4], esi
mov dword [eax + 8], esi
mov dword [eax + 0xc], esi
mov word [0x438570], 2
call sub.WSOCK32.dll_htons
mov word [0x438572], ax
mov eax, dword [esp + 0x1b4]
push eax
call sub.WSOCK32.dll_inet_addr
mov dword [0x438574], eax
cmp eax, 0xffffffff
jne 0x419eb8
mov eax, dword [esp + 0x1b4]
push eax
call sub.WSOCK32.dll_gethostbyname
mov dword [esp + 0x10], eax
cmp eax, esi
je 0x419e58
mov ebp, dword [eax + 0xc]
mov dword [esp + 0x14], esi
test ebp, ebp
je 0x419d8b
mov esi, dword [ebp]
test esi, esi
je 0x419d8b
mov eax, dword [esp + 0x10]
mov edi, 0x438574
movsx eax, word [eax + 0xa]
mov ecx, eax
push 0x100
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xb4]
mov edx, dword [0x438580]
push ecx
push 0x36c4
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
mov cx, word [0x438572]
push ecx
call sub.WSOCK32.dll_ntohs
movzx ecx, ax
push ecx
mov edx, dword [0x438574]
push edx
call sub.WSOCK32.dll_inet_ntoa
lea ecx, [esp + 0xb4]
push eax
lea edx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x28]
add esp, 0x10
push ecx
call fcn.0040cf20
add esp, 4
push 0x10
push 0x438570
push ebx
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x419d83
lea eax, [esp + 0xb0]
push 0x100
push eax
mov ecx, dword [0x438580]
push 0x36c2
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.0041a600
mov ecx, dword [esp + 0x1bc]
lea edx, [esp + 0xb8]
add esp, 8
push eax
push ecx
lea eax, [esp + 0x20]
push edx
push str.___s__s____s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x2c]
add esp, 0x14
push ecx
call fcn.0040cf20
add esp, 4
add ebp, 4
jne 0x419c80
jmp 0x419d8b
mov dword [esp + 0x14], 1
cmp dword [esp + 0x14], 0
jne 0x419da8
push ebx
call sub.WSOCK32.dll_closesocket
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a0
ret
mov eax, dword [0x438570]
mov ebp, dword [0x438574]
mov esi, dword [0x438578]
mov dword [0x437830], eax
mov eax, dword [0x43857c]
mov dword [0x437834], ebp
mov dword [0x437838], esi
mov ecx, 0x438570
mov dword [0x43783c], eax
mov edx, 0x437830
push 0x14
call sub.WSOCK32.dll_htons
mov word [0x437832], ax
push 0x100
lea eax, [esp + 0xb4]
mov ecx, dword [0x438580]
push eax
push 0x36c1
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
mov cx, word [0x438572]
push ecx
call sub.WSOCK32.dll_ntohs
movzx ecx, ax
push ecx
mov edx, dword [0x438574]
push edx
call sub.WSOCK32.dll_inet_ntoa
lea ecx, [esp + 0xb4]
push eax
lea edx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x28]
add esp, 0x10
push ecx
call fcn.0040cf20
add esp, 4
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a0
ret
lea eax, [esp + 0xb0]
push 0x100
push eax
mov ecx, dword [0x438580]
push 0x37b3
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
mov ecx, dword [esp + 0x1b4]
lea edx, [esp + 0xb0]
lea eax, [esp + 0x18]
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x24]
add esp, 0xc
push ecx
call fcn.0040cf20
add esp, 4
push ebx
call sub.WSOCK32.dll_closesocket
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a0
ret
mov eax, dword [0x438570]
mov ebp, dword [0x438574]
mov esi, dword [0x438578]
mov dword [0x437830], eax
mov eax, dword [0x43857c]
mov dword [0x437834], ebp
mov dword [0x437838], esi
mov ecx, 0x438570
mov dword [0x43783c], eax
mov edx, 0x437830
push 0x14
call sub.WSOCK32.dll_htons
mov word [0x437832], ax
push 0x100
lea eax, [esp + 0xb4]
mov ecx, dword [0x438580]
push eax
push 0x36c4
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
mov cx, word [0x438572]
push ecx
call sub.WSOCK32.dll_ntohs
movzx ecx, ax
push ecx
mov edx, dword [0x438574]
push edx
call sub.WSOCK32.dll_inet_ntoa
lea ecx, [esp + 0xb4]
push eax
lea edx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x28]
add esp, 0x10
push ecx
call fcn.0040cf20
add esp, 4
push 0x10
push 0x438570
push ebx
call sub.WSOCK32.dll_connect
push 0x100
cmp eax, 0xffffffff
lea eax, [esp + 0xb4]
push eax
jne 0x419fe3
push 0x36c2
mov ecx, dword [0x438580]
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.0041a600
mov ecx, dword [esp + 0x1bc]
lea edx, [esp + 0xb8]
add esp, 8
push eax
push ecx
lea eax, [esp + 0x20]
push edx
push str.___s__s____s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x2c]
add esp, 0x14
push ecx
call fcn.0040cf20
add esp, 4
push ebx
call sub.WSOCK32.dll_closesocket
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a0
ret
push 0x36c1
mov ecx, dword [0x438580]
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
mov cx, word [0x438572]
push ecx
call sub.WSOCK32.dll_ntohs
movzx ecx, ax
push ecx
mov edx, dword [0x438574]
push edx
call sub.WSOCK32.dll_inet_ntoa
lea ecx, [esp + 0xb4]
push eax
lea edx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x28]
add esp, 0x10
push ecx
call fcn.0040cf20
add esp, 4
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a0
ret