Function at 0x10050cb0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0x4c
mov eax, dword [0x1008d040]
xor eax, esp
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x58]
mov edx, 2
push ebx
mov ebx, dword [esp + 0x54]
push ebp
mov ebp, dword [esp + 0x5c]
push esi
mov esi, ecx
neg esi
mov eax, dword [ebp + 4]
sbb esi, esi
add esi, 2
mov dword [esp + 0xc], esi
push edi
lea edi, [edx + 0x15]
sub eax, 2
je 0x10050d56
sub eax, 0x15
je 0x10050d06
pop edi
pop esi
pop ebp
lea eax, [edx + 7]
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.100574bd
add esp, 0x4c
ret
mov dword [esp + 0x18], 0x1c
xorps xmm0, xmm0
movlpd qword [esp + 0x24], xmm0
movlpd qword [esp + 0x2c], xmm0
mov dword [esp + 0x34], 0
mov word [esp + 0x20], di
test ecx, ecx
je 0x10050d34
movzx eax, word [ebp + 0x1a]
jmp 0x10050d38
movzx eax, word [ebp + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [ebp + 8]
mov word [esp + 0x22], ax
mov eax, dword [ebp + 0x5c]
movups xmmword [esp + 0x28], xmm0
mov dword [esp + 0x38], eax
jmp 0x10050d8d
mov dword [esp + 0x18], 0x10
xorps xmm0, xmm0
movlpd qword [esp + 0x28], xmm0
mov word [esp + 0x20], dx
test ecx, ecx
je 0x10050d76
movzx eax, word [ebp + 0x1a]
jmp 0x10050d7a
movzx eax, word [ebp + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x22], ax
mov eax, dword [ebp + 8]
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0xb4]
mov ecx, dword [ebp + 4]
test eax, eax
je 0x10050db1
mov eax, dword [eax]
test eax, eax
je 0x10050db1
push dword [ebx + 0xb8]
push 0
push esi
push ecx
call eax
add esp, 0x10
jmp 0x10050dbb
push 0
push esi
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x10050fb8
mov edi, dword [ebp + 0x74]
mov eax, dword [edi + 0xb4]
test eax, eax
je 0x10050ddc
cmp dword [eax], 0
jne 0x10050ec6
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [edi + 0x1c], 0
lea eax, [edi + 0x1c]
jle 0x10050e1b
push 4
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x10050f9b
cmp dword [edi + 0x20], 0
lea eax, [edi + 0x20]
jle 0x10050e41
push 4
push eax
push 0x1002
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x10050f9b
mov eax, dword [ebp + 4]
cmp eax, 2
jne 0x10050e73
cmp dword [edi + 0x68], 0
je 0x10050ea6
xorps xmm0, xmm0
movups xmmword [esp + 0x3c], xmm0
mov word [esp + 0x3c], ax
push dword [edi + 0x68]
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x40], eax
mov eax, 0x10
jmp 0x10050f86
cmp eax, 0x17
jne 0x10050ea6
cmp dword [ebp + 0x5c], 0
jne 0x10050ea6
lea eax, [edi + 0x6c]
mov edx, 0x1005dd50
mov dword [esp + 0x14], eax
mov ecx, eax
mov edi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x10050f55
add ecx, 4
add edx, 4
sub edi, 4
jae 0x10050e91
cmp dword [ebp + 4], 0x17
jne 0x10050ec6
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push 0x1b
push 0x29
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp dword [esp + 0x68], 0
je 0x10050eff
mov eax, dword [ebx + 0xb4]
mov dword [esp + 0x1c], 1
test eax, eax
je 0x10050ee4
cmp dword [eax], 0
jne 0x10050eff
push 4
lea eax, [esp + 0x20]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1005101d
mov eax, dword [ebx + 0xac]
mov edi, dword [esp + 0x10]
test eax, eax
je 0x10050f22
push dword [ebx + 0xb0]
push edi
push esi
call eax
add esp, 0xc
test eax, eax
js 0x1005101d
mov eax, dword [ebx + 0xb4]
test eax, eax
je 0x10050fd9
mov eax, dword [eax + 8]
test eax, eax
je 0x10050fd9
push dword [ebx + 0xb8]
lea ecx, [esp + 0x24]
push dword [esp + 0x1c]
push ecx
push esi
call eax
add esp, 0x10
jmp 0x10050fe9
xorps xmm0, xmm0
mov dword [esp + 0x54], 0
movups xmmword [esp + 0x3c], xmm0
mov eax, 0x17
movq qword [esp + 0x4c], xmm0
mov word [esp + 0x3c], ax
mov eax, dword [esp + 0x14]
movups xmm0, xmmword [eax]
mov eax, 0x1c
movups xmmword [esp + 0x44], xmm0
push eax
lea eax, [esp + 0x40]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x10050ea6
mov eax, dword [ebx + 0xb4]
test eax, eax
je 0x10050fd0
mov eax, dword [eax + 4]
test eax, eax
je 0x10050fd0
push dword [ebx + 0xb8]
push esi
call eax
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0xb
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.100574bd
add esp, 0x4c
ret
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x10050fb8
push dword [esp + 0x18]
lea eax, [esp + 0x24]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x10051002
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x10051002
cmp eax, 0x2733
jne 0x1005101d
mov eax, dword [ebx + 0xa4]
test eax, eax
je 0x10051026
push dword [ebx + 0xa8]
push edi
push esi
call eax
add esp, 0xc
test eax, eax
jns 0x10051026
push esi
push ebx
call fcn.10050c30
jmp 0x10050fb5
push 0x14
call dword [section..data]
mov edi, eax
add esp, 4
test edi, edi
jne 0x10051057
push esi
push ebx
call fcn.10050c30
add esp, 8
lea eax, [edi + 0xf]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.100574bd
add esp, 0x4c
ret
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
push 0
mov dword [edi + 4], esi
mov dword [edi], ebp
call fcn.10045150
mov ecx, dword [esp + 0x6c]
add esp, 4
mov dword [edi + 0x10], eax
mov dword [edi + 8], ecx
test eax, eax
jne 0x100510b2
push esi
push ebx
call fcn.10050c30
push edi
call dword [0x1008d008]
add esp, 0xc
mov eax, 0xf
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.100574bd
add esp, 0x4c
ret
mov eax, dword [ebp + 0x64]
push edi
push eax
test ecx, ecx
je 0x100510c2
call fcn.10045280
jmp 0x100510c7
call fcn.10045220
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x10051103
push esi
push ebx
call fcn.10050c30
push dword [edi + 0x10]
call fcn.10045170
push edi
call dword [0x1008d008]
add esp, 0x10
mov eax, 0xf
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.100574bd
add esp, 0x4c
ret
push eax
push esi
push dword [ebx + 0x98]
call fcn.10045c00
add esp, 0xc
test eax, eax
jne 0x10051151
push esi
push ebx
call fcn.10050c30
push dword [edi + 0x10]
call fcn.10045170
push dword [esp + 0x1c]
call fcn.10045310
push edi
call dword [0x1008d008]
add esp, 0x14
mov eax, 0xf
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.100574bd
add esp, 0x4c
ret
mov eax, dword [ebx + 0x9c]
test eax, eax
je 0x1005116b
push 0
push 1
push esi
push dword [ebx + 0xa0]
call eax
add esp, 0x10
cmp dword [esp + 0x68], 0
je 0x10051175
mov dword [ebp + 0x68], edi
mov ecx, dword [esp + 0x58]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100574bd
add esp, 0x4c
ret