Function at 0x1004ee30
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 0x1004ee9b
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x1cc], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x1c8], eax
cmp eax, 0x80
jbe 0x1004eec0
mov dword [ebp - 0x1c8], 0x80
mov eax, 0x80
push eax
push dword [edx + 0x18]
lea eax, [ebp - 0x1c4]
push eax
call fcn.1008dd90
add esp, 0xc
cmp dword [ebx + 0x1b8], 0
je 0x1004ef10
push 1
push ebx
call fcn.1003dc00
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.1003dc00
add esp, 0x1c
jmp 0x1004ef30
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 0x1004ef4b
pop edi
pop esi
mov eax, 7
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c543
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x58], 5
jne 0x1004ef5c
push 1
push esi
call fcn.10079dc0
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.1004d4e0
add esp, 0x10
test al, al
jne 0x1004efd9
call fcn.10091ad9
mov esi, dword [eax]
call fcn.10091ad9
mov edi, eax
lea eax, [ebp - 0x134]
push 0x100
push eax
push esi
call fcn.10079af0
push eax
push dword [edi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.1004cb70
push dword [ebp - 0x1dc]
mov eax, dword [ebp - 0x1e0]
push eax
push ebx
call fcn.1004d590
add esp, 0x28
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c543
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1d4]
cmp eax, 2
je 0x1004efe9
cmp eax, 0x17
jne 0x1004f02e
cmp dword [ebp - 0x1d0], 1
jne 0x1004f02e
cmp byte [ebx + 0x6fe], 0
mov byte [ebp - 0x1d5], 1
je 0x1004f035
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 0x1004f035
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 0x1004f084
push 3
push 2
push eax
push eax
push 6
call fcn.1007a150
add esp, 0x14
test al, al
je 0x1004f078
mov dword [0x100ddeec], 2
jmp 0x1004f0d4
mov dword [0x100ddeec], 1
jmp 0x1004f089
cmp eax, 2
je 0x1004f0d4
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 0x1004f0ba
mov eax, dword [ebp - 0x1dc]
cmp eax, dword [ebp - 0x1e8]
jg 0x1004f0d4
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 0x1004f17e
cmp byte [ebx + 0x706], 0
je 0x1004f17e
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 0x1004f17e
push dword [ebx + 0x6a4]
mov dword [ebp - 0x140], 1
call fcn.1004f440
push dword [ebx + 0x6a8]
imul eax, eax, 0x3e8
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0x13c], eax
call fcn.1004f440
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 0x1004f1c2
push 1
push ebx
call fcn.1003dc00
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.1003dc00
mov eax, dword [ebp - 0x1e4]
add esp, 0x1c
cmp eax, 2
jne 0x1004f224
mov byte [ebp - 0x1d6], 1
mov eax, dword [ebp - 0x1d4]
cmp eax, 2
je 0x1004f1d2
cmp eax, 0x17
jne 0x1004f24f
lea eax, [ebp - 0x1c4]
push eax
call fcn.10079d20
push eax
push dword [ebp - 0x1d4]
push esi
push ebx
call fcn.1004e7c0
mov edi, eax
add esp, 0x14
test edi, edi
je 0x1004f24f
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d590
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.1008c543
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x1004f1c2
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d590
add esp, 0xc
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1008c543
mov esp, ebp
pop ebp
ret
push 1
push esi
call fcn.10079dc0
lea eax, [ebp - 0x144]
push eax
call fcn.100522f0
add esp, 0xc
movups xmm0, xmmword [eax]
mov eax, dword [ebp - 0x1e0]
cmp dword [eax + 0x284], 1
movups xmmword [eax + 0x288], xmm0
jle 0x1004f2b6
push 3
push dword [eax + 0x29c]
push dword [eax + 0x298]
push ebx
call fcn.1003d6b0
mov eax, dword [ebp - 0x1e0]
push 4
push dword [eax + 0x2a4]
push dword [eax + 0x2a0]
push ebx
call fcn.1003d6b0
mov eax, dword [ebp - 0x1e0]
add esp, 0x20
cmp byte [ebp - 0x1d6], 0
jne 0x1004f374
cmp dword [eax + 0x58], 4
je 0x1004f374
cmp byte [eax + 0x279], 0
jne 0x1004f30e
push dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1004f30e
test edi, edi
jne 0x1004f361
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.1008c543
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
sub ecx, 0xb
je 0x1004f357
sub ecx, 0x2728
je 0x1004f357
sub ecx, 1
je 0x1004f357
mov dword [ebx + 0x948], eax
mov eax, dword [ebp - 0x1e0]
push esi
push eax
push ebx
call fcn.1004d590
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.1008c543
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.1008c543
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.1008c543
mov esp, ebp
pop ebp
ret