Function at 0x1004ee50
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ec
mov eax, dword [0x100dcdc0]
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 0x1004eebb
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x1cc], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x1c8], eax
cmp eax, 0x80
jbe 0x1004eee0
mov dword [ebp - 0x1c8], 0x80
mov eax, 0x80
push eax
push dword [edx + 0x18]
lea eax, [ebp - 0x1c4]
push eax
call fcn.1008ddb0
add esp, 0xc
cmp dword [ebx + 0x1b8], 0
je 0x1004ef30
push 1
push ebx
call fcn.1003dc30
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.1003dc30
add esp, 0x1c
jmp 0x1004ef50
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 0x1004ef6b
pop edi
pop esi
mov eax, 7
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c563
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x58], 5
jne 0x1004ef7c
push 1
push esi
call fcn.10079df0
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.1004d500
add esp, 0x10
test al, al
jne 0x1004eff9
call fcn.10091af9
mov esi, dword [eax]
call fcn.10091af9
mov edi, eax
lea eax, [ebp - 0x134]
push 0x100
push eax
push esi
call fcn.10079b20
push eax
push dword [edi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.1004cb90
push dword [ebp - 0x1dc]
mov eax, dword [ebp - 0x1e0]
push eax
push ebx
call fcn.1004d5b0
add esp, 0x28
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c563
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1d4]
cmp eax, 2
je 0x1004f009
cmp eax, 0x17
jne 0x1004f04e
cmp dword [ebp - 0x1d0], 1
jne 0x1004f04e
cmp byte [ebx + 0x6fe], 0
mov byte [ebp - 0x1d5], 1
je 0x1004f055
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 0x1004f055
mov byte [ebp - 0x1d5], 0
mov eax, dword [0x100ddeec]
mov dword [ebp - 0x1e8], 0x4020
mov dword [ebp - 0x1dc], edi
mov dword [ebp - 0x1e4], 4
test eax, eax
jne 0x1004f0a4
push 3
push 2
push eax
push eax
push 6
call fcn.1007a180
add esp, 0x14
test al, al
je 0x1004f098
mov dword [0x100ddeec], 2
jmp 0x1004f0f4
mov dword [0x100ddeec], 1
jmp 0x1004f0a9
cmp eax, 2
je 0x1004f0f4
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 0x1004f0da
mov eax, dword [ebp - 0x1dc]
cmp eax, dword [ebp - 0x1e8]
jg 0x1004f0f4
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 0x1004f19e
cmp byte [ebx + 0x706], 0
je 0x1004f19e
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 0x1004f19e
push dword [ebx + 0x6a4]
mov dword [ebp - 0x140], 1
call fcn.1004f460
push dword [ebx + 0x6a8]
imul eax, eax, 0x3e8
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0x13c], eax
call fcn.1004f460
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 0x1004f1e2
push 1
push ebx
call fcn.1003dc30
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.1003dc30
mov eax, dword [ebp - 0x1e4]
add esp, 0x1c
cmp eax, 2
jne 0x1004f244
mov byte [ebp - 0x1d6], 1
mov eax, dword [ebp - 0x1d4]
cmp eax, 2
je 0x1004f1f2
cmp eax, 0x17
jne 0x1004f26f
lea eax, [ebp - 0x1c4]
push eax
call fcn.10079d50
push eax
push dword [ebp - 0x1d4]
push esi
push ebx
call fcn.1004e7e0
mov edi, eax
add esp, 0x14
test edi, edi
je 0x1004f26f
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d5b0
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.1008c563
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x1004f1e2
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d5b0
add esp, 0xc
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c563
mov esp, ebp
pop ebp
ret
push 1
push esi
call fcn.10079df0
lea eax, [ebp - 0x144]
push eax
call fcn.10052310
add esp, 0xc
movups xmm0, xmmword [eax]
mov eax, dword [ebp - 0x1e0]
cmp dword [eax + 0x284], 1
movups xmmword [eax + 0x288], xmm0
jle 0x1004f2d6
push 3
push dword [eax + 0x29c]
push dword [eax + 0x298]
push ebx
call fcn.1003d6e0
mov eax, dword [ebp - 0x1e0]
push 4
push dword [eax + 0x2a4]
push dword [eax + 0x2a0]
push ebx
call fcn.1003d6e0
mov eax, dword [ebp - 0x1e0]
add esp, 0x20
cmp byte [ebp - 0x1d6], 0
jne 0x1004f394
cmp dword [eax + 0x58], 4
je 0x1004f394
cmp byte [eax + 0x279], 0
jne 0x1004f32e
push dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1004f32e
test edi, edi
jne 0x1004f381
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.1008c563
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
sub ecx, 0xb
je 0x1004f377
sub ecx, 0x2728
je 0x1004f377
sub ecx, 1
je 0x1004f377
mov dword [ebx + 0x948], eax
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d5b0
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.1008c563
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.1008c563
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.1008c563
mov esp, ebp
pop ebp
ret