Function at 0x40ec4b
Capabilities:
Connect socket
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
push 0xa64
mov eax, 0x44f25b
call fcn.00439dcc
mov esi, ecx
mov edi, dword [esi + 0xa4]
mov dword [ebp - 0x84c], esi
cmp edi, 0xffffffff
jne 0x40edc2
mov eax, dword [esi + 0xb0]
mov ecx, dword [esi + 0xac]
test eax, eax
je 0x40f06d
test ecx, ecx
jle 0x40f06d
mov eax, dword [esi + 0x58]
sub eax, dword [esi + 0x54]
test eax, 0xffffffe0
je 0x40ecc5
mov eax, dword [esi + 0x70]
sub eax, dword [esi + 0x6c]
test eax, 0xfffffffc
je 0x40f06d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0x90]
add ecx, dword [esi + 0x84]
cmp eax, ecx
jb 0x40f06d
push 0
lea ecx, [ebp - 0x840]
mov dword [ebp - 0x828], 0xf
call fcn.004082dd
and dword [ebp - 4], 0
lea ebx, [ebp - 0x840]
call fcn.0040e933
test eax, eax
jge 0x40ecf8
push 0
push 1
jmp 0x40edae
cmp dword [ebp - 0x828], 0x10
mov eax, dword [ebp - 0x83c]
jae 0x40ed0d
lea eax, [ebp - 0x83c]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
test edi, edi
je 0x40ecef
push 6
xor ebx, ebx
inc ebx
push ebx
push 2
call dword [sym.imp.WS2_32.dll_socket]
lea ecx, [ebp - 0x844]
push ecx
push 0x8004667e
push eax
mov dword [esi + 0xa4], eax
mov dword [ebp - 0x844], ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 2
pop eax
push dword [ebp - 0x824]
mov word [ebp - 0x820], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x81e], ax
mov eax, dword [edi + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x81c], eax
push 0x10
lea eax, [ebp - 0x820]
push eax
push dword [esi + 0xa4]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40ed9f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2736
jne 0x40ed9f
call fcn.0040f0e0
jmp 0x40edab
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x9c], eax
push 0
push ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x840]
call fcn.0040799a
jmp 0x40f06d
xor ebx, ebx
push 0x7ff
lea eax, [ebp - 0x80f]
push ebx
push eax
mov byte [ebp - 0x810], bl
call fcn.00439ec0
xor eax, eax
inc eax
add esp, 0xc
mov dword [ebp - 0xa70], eax
mov dword [ebp - 0x968], eax
lea eax, [ebp - 0x85c]
push eax
push ebx
lea eax, [ebp - 0x968]
push eax
lea eax, [ebp - 0xa70]
push eax
push ebx
mov dword [ebp - 0xa6c], edi
mov dword [ebp - 0x964], edi
mov dword [ebp - 0x85c], ebx
mov dword [ebp - 0x858], ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x40ee3e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2736
je 0x40f06d
jmp 0x40f068
cmp eax, ebx
jle 0x40f052
mov eax, dword [esi + 0x78]
mov dword [esi + 0x7c], eax
cmp dword [ebp - 0xa70], ebx
jbe 0x40eff4
push ebx
push 0x800
lea eax, [ebp - 0x810]
push eax
push dword [esi + 0xa4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, ebx
jg 0x40ee7f
call fcn.0040f0e0
jmp 0x40eff4
lea edi, [esi + 0xb4]
lea ecx, [ebp - 0x810]
mov ebx, eax
push ecx
mov eax, edi
mov dword [ebp - 0x848], edi
call fcn.0040e72d
mov eax, dword [edi + 4]
mov edi, dword [edi + 8]
jmp 0x40efea
cmp eax, 5
jl 0x40eff2
movzx eax, word [edi]
xor ebx, ebx
inc ebx
cmp byte [edi + 2], bl
jne 0x40ef02
sub eax, 3
push eax
lea eax, [edi + 5]
push eax
lea eax, [ebp - 0x844]
push eax
lea eax, [ebp - 0x80b]
push eax
mov dword [ebp - 0x844], 0x800
call fcn.00414040
mov eax, dword [ebp - 0x844]
add eax, 3
mov word [ebp - 0x810], ax
mov byte [ebp - 0x80e], bl
mov ax, word [edi + 3]
mov word [ebp - 0x80d], ax
jmp 0x40ef15
inc eax
inc eax
push eax
lea eax, [ebp - 0x810]
push edi
push eax
call fcn.00439150
add esp, 0xc
mov eax, dword [0xffc158]
test eax, eax
jne 0x40ef72
push 0x40f374
call fcn.00437bb5
pop ecx
push 0x48
call fcn.00416aab
mov esi, eax
pop ecx
mov dword [ebp - 0x854], esi
mov dword [ebp - 4], ebx
test esi, esi
je 0x40ef67
lea eax, [ebp - 0x84d]
push eax
push esi
call fcn.0040fee4
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.004388b6
pop ecx
call fcn.0040f99d
mov eax, esi
jmp 0x40ef69
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [0xffc158], eax
lea ecx, [ebp - 0x80d]
push ecx
lea ecx, [ebp - 0x818]
mov esi, eax
push ecx
mov ebx, eax
mov dword [ebp - 0x854], esi
call fcn.0040ff6b
cmp dword [ebp - 0x818], 0
mov ebx, dword [esi + 0x1c]
mov esi, dword [esi + 8]
je 0x40efa6
cmp dword [ebp - 0x818], esi
je 0x40efab
call fcn.0043674b
cmp dword [ebp - 0x814], ebx
je 0x40efce
lea esi, [ebp - 0x818]
call fcn.00410304
lea ecx, [ebp - 0x810]
push ecx
mov ecx, dword [ebp - 0x854]
call dword [eax + 4]
movzx edi, word [edi]
mov esi, dword [ebp - 0x848]
inc edi
inc edi
call fcn.0040e6ff
mov eax, dword [esi + 4]
mov edi, dword [esi + 8]
mov esi, dword [ebp - 0x84c]
test edi, edi
jne 0x40eea6
xor ebx, ebx
cmp dword [ebp - 0x968], ebx
jbe 0x40f044
lea eax, [esi + 0xa8]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x848], eax
mov eax, dword [eax + 8]
cmp eax, ebx
je 0x40f044
cmp ecx, ebx
jle 0x40f044
push ebx
push ecx
push eax
push dword [esi + 0xa4]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40f031
call fcn.0040f0e0
jmp 0x40f044
mov esi, dword [ebp - 0x848]
mov edi, eax
call fcn.0040e6ff
mov esi, dword [ebp - 0x84c]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x9c], eax
jmp 0x40f06d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0xa0]
add ecx, dword [esi + 0x9c]
cmp eax, ecx
jbe 0x40f06d
call fcn.0040f0e0
call fcn.00439e4f
ret