Function at 0x1004ecb0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ec
mov eax, dword [0x100dcc00]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
add eax, 0x56
mov edx, dword [ebp + 0x10]
lea eax, [ecx + eax*4]
push ebx
mov ebx, dword [ebp + 8]
mov dword [eax], 0xffffffff
push esi
mov dword [ebp - 0x1ec], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x1d4], eax
xor eax, eax
push edi
mov edi, dword [ebx + 0xc]
mov dword [ebp - 0x1e0], ecx
mov byte [ebp - 0x1d6], 0
cmp dword [edi + 0x58], 3
setne al
inc eax
mov dword [ebp - 0x1d0], eax
mov eax, 0x11
cmp dword [edi + 0x58], 3
jne 0x1004ed1b
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x1cc], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x1c8], eax
cmp eax, 0x80
jbe 0x1004ed40
mov dword [ebp - 0x1c8], 0x80
mov eax, 0x80
push eax
push dword [edx + 0x18]
lea eax, [ebp - 0x1c4]
push eax
call fcn.1008dc20
add esp, 0xc
cmp dword [ebx + 0x1b8], 0
je 0x1004ed90
push 1
push ebx
call fcn.1003da70
lea eax, [ebp - 0x1d4]
push eax
mov eax, dword [ebx + 0x1b8]
push 0
push dword [ebx + 0x1bc]
call eax
mov esi, eax
push 0
push ebx
mov dword [ebp - 0x1dc], esi
call fcn.1003da70
add esp, 0x1c
jmp 0x1004edb0
push dword [ebp - 0x1cc]
push dword [ebp - 0x1d0]
push dword [ebp - 0x1d4]
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [ebp - 0x1dc], eax
cmp esi, 0xffffffff
jne 0x1004edcb
pop edi
pop esi
mov eax, 7
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x58], 5
jne 0x1004eddc
push 1
push esi
call fcn.10079c60
add esp, 8
lea eax, [ebp - 0x1e4]
xor edi, edi
push eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
push eax
call fcn.1004d360
add esp, 0x10
test al, al
jne 0x1004ee59
call fcn.10091969
mov esi, dword [eax]
call fcn.10091969
mov edi, eax
lea eax, [ebp - 0x134]
push 0x100
push eax
push esi
call fcn.10079990
push eax
push dword [edi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.1004c9f0
push dword [ebp - 0x1dc]
mov eax, dword [ebp - 0x1e0]
push eax
push ebx
call fcn.1004d410
add esp, 0x28
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1d4]
cmp eax, 2
je 0x1004ee69
cmp eax, 0x17
jne 0x1004eeae
cmp dword [ebp - 0x1d0], 1
jne 0x1004eeae
cmp byte [ebx + 0x6fe], 0
mov byte [ebp - 0x1d5], 1
je 0x1004eeb5
push 4
lea eax, [ebp - 0x1e8]
mov dword [ebp - 0x1e8], 1
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov al, byte [ebp - 0x1d5]
mov byte [ebp - 0x1d5], al
jmp 0x1004eeb5
mov byte [ebp - 0x1d5], 0
mov eax, dword [0x100ddd24]
mov dword [ebp - 0x1e8], 0x4020
mov dword [ebp - 0x1dc], edi
mov dword [ebp - 0x1e4], 4
test eax, eax
jne 0x1004ef04
push 3
push 2
push eax
push eax
push 6
call fcn.10079ff0
add esp, 0x14
test al, al
je 0x1004eef8
mov dword [0x100ddd24], 2
jmp 0x1004ef54
mov dword [0x100ddd24], 1
jmp 0x1004ef09
cmp eax, 2
je 0x1004ef54
lea eax, [ebp - 0x1e4]
push eax
lea eax, [ebp - 0x1dc]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1004ef3a
mov eax, dword [ebp - 0x1dc]
cmp eax, dword [ebp - 0x1e8]
jg 0x1004ef54
push 4
lea eax, [ebp - 0x1e8]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [ebp - 0x1d5], 0
je 0x1004effe
cmp byte [ebx + 0x706], 0
je 0x1004effe
push 4
lea eax, [ebp - 0x1dc]
mov dword [ebp - 0x1dc], 1
push eax
push 8
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x1004effe
push dword [ebx + 0x6a4]
mov dword [ebp - 0x140], 1
call fcn.1004f2c0
push dword [ebx + 0x6a8]
imul eax, eax, 0x3e8
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0x13c], eax
call fcn.1004f2c0
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0x138], eax
lea eax, [ebp - 0x1e4]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x140]
push eax
push 0x98000004
push esi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
cmp dword [ebx + 0x1b0], edi
je 0x1004f042
push 1
push ebx
call fcn.1003da70
mov eax, dword [ebx + 0x1b0]
push 0
push esi
push dword [ebx + 0x1b4]
call eax
push 0
push ebx
mov dword [ebp - 0x1e4], eax
call fcn.1003da70
mov eax, dword [ebp - 0x1e4]
add esp, 0x1c
cmp eax, 2
jne 0x1004f0a4
mov byte [ebp - 0x1d6], 1
mov eax, dword [ebp - 0x1d4]
cmp eax, 2
je 0x1004f052
cmp eax, 0x17
jne 0x1004f0cf
lea eax, [ebp - 0x1c4]
push eax
call fcn.10079bc0
push eax
push dword [ebp - 0x1d4]
push esi
push ebx
call fcn.1004e640
mov edi, eax
add esp, 0x14
test edi, edi
je 0x1004f0cf
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d410
add esp, 0xc
mov eax, 7
cmp edi, 1
cmove edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x1004f042
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d410
add esp, 0xc
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
push 1
push esi
call fcn.10079c60
lea eax, [ebp - 0x144]
push eax
call fcn.10052170
add esp, 0xc
movups xmm0, xmmword [eax]
mov eax, dword [ebp - 0x1e0]
cmp dword [eax + 0x284], 1
movups xmmword [eax + 0x288], xmm0
jle 0x1004f136
push 3
push dword [eax + 0x29c]
push dword [eax + 0x298]
push ebx
call fcn.1003d520
mov eax, dword [ebp - 0x1e0]
push 4
push dword [eax + 0x2a4]
push dword [eax + 0x2a0]
push ebx
call fcn.1003d520
mov eax, dword [ebp - 0x1e0]
add esp, 0x20
cmp byte [ebp - 0x1d6], 0
jne 0x1004f1f4
cmp dword [eax + 0x58], 4
je 0x1004f1f4
cmp byte [eax + 0x279], 0
jne 0x1004f18e
push dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1004f18e
test edi, edi
jne 0x1004f1e1
mov eax, dword [ebp - 0x1ec]
mov dword [eax], esi
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
sub ecx, 0xb
je 0x1004f1d7
sub ecx, 0x2728
je 0x1004f1d7
sub ecx, 1
je 0x1004f1d7
mov dword [ebx + 0x948], eax
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d410
add esp, 0xc
mov edi, 7
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1ec]
xor edi, edi
mov dword [eax], esi
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1ec]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
mov dword [eax], esi
xor eax, eax
pop esi
pop ebx
call fcn.1008c3d3
mov esp, ebp
pop ebp
ret