Function at 0x1050e680
Capabilities:
Connect socket
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x1d0
mov eax, dword [0x10a78b80]
xor eax, esp
mov dword [esp + 0x1cc], eax
mov ecx, dword [esp + 0x1d8]
mov eax, dword [esp + 0x1d4]
push ebx
push esi
push edi
mov edi, dword [esp + 0x1e8]
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x10]
push edi
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], edi
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x1c], 0
push ecx
push eax
mov dword [esp + 0x28], 0
mov dword [esp + 0x20], 0
call fcn.1050e500
mov ebx, dword [esp + 0x20]
add esp, 0x14
test eax, eax
jne 0x1050e6fe
push 5
call fcn.1050eb40
add esp, 4
mov esi, eax
jmp 0x1050e9a9
lea eax, [esp + 0x48]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1050e723
push 1
call fcn.1050eb40
add esp, 4
mov esi, eax
jmp 0x1050e9a9
push ebp
test ebx, ebx
je 0x1050e75d
mov ecx, ebx
mov eax, str.unix
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1050e750
test dl, dl
je 0x1050e74c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1050e750
add eax, 2
add ecx, 2
test dl, dl
jne 0x1050e730
xor eax, eax
jmp 0x1050e755
sbb eax, eax
or eax, 1
test eax, eax
je 0x1050e996
mov esi, dword [esp + 0x18]
cmp byte [esi], 0
je 0x1050e996
mov ecx, esi
mov eax, str.unix
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1050e791
test dl, dl
je 0x1050e78d
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1050e791
add eax, 2
add ecx, 2
test dl, dl
jne 0x1050e771
xor eax, eax
jmp 0x1050e796
sbb eax, eax
or eax, 1
test eax, eax
je 0x1050e996
mov ebp, dword [esp + 0x14]
lea eax, [ebp + 0x1770]
movzx eax, ax
mov dword [esp + 0x20], eax
test ebx, ebx
je 0x1050e851
mov ecx, ebx
mov eax, 0x10a52774
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1050e7e0
test dl, dl
je 0x1050e7dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1050e7e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x1050e7c0
xor eax, eax
jmp 0x1050e7e5
sbb eax, eax
or eax, 1
test eax, eax
je 0x1050e851
mov ecx, ebx
mov eax, str.inet
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1050e810
test dl, dl
je 0x1050e80c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1050e810
add eax, 2
add ecx, 2
test dl, dl
jne 0x1050e7f0
xor eax, eax
jmp 0x1050e815
sbb eax, eax
or eax, 1
test eax, eax
je 0x1050e851
mov ecx, ebx
mov eax, str.inet6
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1050e840
test dl, dl
je 0x1050e83c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1050e840
add eax, 2
add ecx, 2
test dl, dl
jne 0x1050e820
xor eax, eax
jmp 0x1050e845
sbb eax, eax
or eax, 1
test eax, eax
je 0x1050e851
or esi, 0xffffffff
jmp 0x1050e908
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
or esi, 0xffffffff
test eax, eax
je 0x1050e908
mov edi, dword [eax + 0xc]
cmp dword [edi], 0
je 0x1050e904
mov ebp, dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 2
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
push dword [esp + 0x20]
mov word [esp + 0x40], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3e], ax
mov eax, dword [edi]
push 0
push 1
mov eax, dword [eax]
mov dword [esp + 0x48], eax
movzx eax, word [esp + 0x44]
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [esp + 0x1c], 1
test esi, esi
js 0x1050e8eb
push 4
lea eax, [esp + 0x20]
push eax
push 1
push 6
push esi
call ebx
push 4
lea eax, [esp + 0x20]
push eax
push 8
push 0xffff
push esi
call ebx
push 0x10
lea eax, [esp + 0x40]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x1050e8fc
push esi
call ebp
or esi, 0xffffffff
add edi, 4
cmp dword [edi], 0
lea ecx, [esi + 3]
jne 0x1050e880
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
cmp esi, 0xffffffff
je 0x1050e996
mov eax, dword [esp + 0x28]
test eax, eax
je 0x1050e92a
push eax
push esi
call fcn.1050eda0
add esp, 8
mov esi, eax
jmp 0x1050e9a8
push ebp
lea eax, [esp + 0x30]
push eax
push esi
call fcn.10510060
add esp, 0xc
test eax, eax
je 0x1050e961
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.1050eda0
push dword [esp + 0x38]
mov esi, eax
call fcn.1051f7a2
push dword [esp + 0x44]
call fcn.1051f7a2
add esp, 0x10
jmp 0x1050e96e
push 0
push esi
call fcn.1050eda0
add esp, 8
mov esi, eax
cmp dword [esi], 0
jne 0x1050e9a8
test edi, edi
je 0x1050e9a8
mov eax, dword [esi + 4]
movzx eax, byte [eax + 0x1c]
cmp dword [edi], eax
jl 0x1050e9a8
push esi
call fcn.1050f0d0
push 6
call fcn.1050eb40
add esp, 8
mov esi, eax
jmp 0x1050e9a8
push 1
call fcn.1050eb40
add esp, 4
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop ebp
push dword [esp + 0x14]
call fcn.1051f7a2
push ebx
call fcn.1051f7a2
mov ecx, dword [esp + 0x1e0]
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.105116c0
add esp, 0x1d0
ret