Function at 0x1004ebf0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ec
mov eax, dword [0x100dbe80]
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 0x1004ec5b
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x1cc], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x1c8], eax
cmp eax, 0x80
jbe 0x1004ec80
mov dword [ebp - 0x1c8], 0x80
mov eax, 0x80
push eax
push dword [edx + 0x18]
lea eax, [ebp - 0x1c4]
push eax
call fcn.1008db40
add esp, 0xc
cmp dword [ebx + 0x1b8], 0
je 0x1004ecd0
push 1
push ebx
call fcn.1003d9c0
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.1003d9c0
add esp, 0x1c
jmp 0x1004ecf0
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 0x1004ed0b
pop edi
pop esi
mov eax, 7
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c2f5
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x58], 5
jne 0x1004ed1c
push 1
push esi
call fcn.10079b70
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.1004d2a0
add esp, 0x10
test al, al
jne 0x1004ed99
call fcn.10091889
mov esi, dword [eax]
call fcn.10091889
mov edi, eax
lea eax, [ebp - 0x134]
push 0x100
push eax
push esi
call fcn.100798a0
push eax
push dword [edi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.1004c930
push dword [ebp - 0x1dc]
mov eax, dword [ebp - 0x1e0]
push eax
push ebx
call fcn.1004d350
add esp, 0x28
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c2f5
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1d4]
cmp eax, 2
je 0x1004eda9
cmp eax, 0x17
jne 0x1004edee
cmp dword [ebp - 0x1d0], 1
jne 0x1004edee
cmp byte [ebx + 0x6fe], 0
mov byte [ebp - 0x1d5], 1
je 0x1004edf5
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 0x1004edf5
mov byte [ebp - 0x1d5], 0
mov eax, dword [0x100dcfac]
mov dword [ebp - 0x1e8], 0x4020
mov dword [ebp - 0x1dc], edi
mov dword [ebp - 0x1e4], 4
test eax, eax
jne 0x1004ee44
push 3
push 2
push eax
push eax
push 6
call fcn.10079f10
add esp, 0x14
test al, al
je 0x1004ee38
mov dword [0x100dcfac], 2
jmp 0x1004ee94
mov dword [0x100dcfac], 1
jmp 0x1004ee49
cmp eax, 2
je 0x1004ee94
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 0x1004ee7a
mov eax, dword [ebp - 0x1dc]
cmp eax, dword [ebp - 0x1e8]
jg 0x1004ee94
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 0x1004ef3e
cmp byte [ebx + 0x706], 0
je 0x1004ef3e
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 0x1004ef3e
push dword [ebx + 0x6a4]
mov dword [ebp - 0x140], 1
call fcn.1004f200
push dword [ebx + 0x6a8]
imul eax, eax, 0x3e8
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0x13c], eax
call fcn.1004f200
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 0x1004ef82
push 1
push ebx
call fcn.1003d9c0
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.1003d9c0
mov eax, dword [ebp - 0x1e4]
add esp, 0x1c
cmp eax, 2
jne 0x1004efe4
mov byte [ebp - 0x1d6], 1
mov eax, dword [ebp - 0x1d4]
cmp eax, 2
je 0x1004ef92
cmp eax, 0x17
jne 0x1004f00f
lea eax, [ebp - 0x1c4]
push eax
call fcn.10079ad0
push eax
push dword [ebp - 0x1d4]
push esi
push ebx
call fcn.1004e580
mov edi, eax
add esp, 0x14
test edi, edi
je 0x1004f00f
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d350
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.1008c2f5
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x1004ef82
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d350
add esp, 0xc
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c2f5
mov esp, ebp
pop ebp
ret
push 1
push esi
call fcn.10079b70
lea eax, [ebp - 0x144]
push eax
call fcn.100520b0
add esp, 0xc
movups xmm0, xmmword [eax]
mov eax, dword [ebp - 0x1e0]
cmp dword [eax + 0x284], 1
movups xmmword [eax + 0x288], xmm0
jle 0x1004f076
push 3
push dword [eax + 0x29c]
push dword [eax + 0x298]
push ebx
call fcn.1003d470
mov eax, dword [ebp - 0x1e0]
push 4
push dword [eax + 0x2a4]
push dword [eax + 0x2a0]
push ebx
call fcn.1003d470
mov eax, dword [ebp - 0x1e0]
add esp, 0x20
cmp byte [ebp - 0x1d6], 0
jne 0x1004f134
cmp dword [eax + 0x58], 4
je 0x1004f134
cmp byte [eax + 0x279], 0
jne 0x1004f0ce
push dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1004f0ce
test edi, edi
jne 0x1004f121
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.1008c2f5
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
sub ecx, 0xb
je 0x1004f117
sub ecx, 0x2728
je 0x1004f117
sub ecx, 1
je 0x1004f117
mov dword [ebx + 0x948], eax
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d350
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.1008c2f5
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.1008c2f5
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.1008c2f5
mov esp, ebp
pop ebp
ret