Function at 0x4a894c
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4028
call fcn.004bb490
push ebx
push esi
mov esi, ecx
push edi
cmp byte [esi], 0
jne 0x4a8984
push 0xc5
push 0x51f674
push 0x51f6b4
push 0x50a2a4
push 0x508530
call fcn.00401466
add esp, 0x14
mov ecx, esi
call fcn.004a8ee7
test al, al
jne 0x4a8c27
xor ebx, ebx
cmp dword [esi + 0x2028], ebx
je 0x4a89a7
cmp dword [esi + 0x1c], 0xffffffff
jne 0x4a8b62
cmp byte [esi + 0x202c], 0
je 0x4a89d6
lea eax, [esi + 0x2030]
lea ecx, [eax + 8]
mov dword [eax + 4], ebx
mov dword [eax], ebx
call fcn.004a8f2b
lea eax, [esi + 0x2238]
lea ecx, [eax + 8]
mov dword [eax + 4], ebx
mov dword [eax], ebx
call fcn.004a8f2b
cmp dword [esi + 0x1c], 0xffffffff
je 0x4a89fd
push 0xd3
push 0x51f674
push 0x51f63c
push 0x50a2a4
push 0x508530
call fcn.00401466
add esp, 0x14
push ebx
push 1
pop edi
push edi
push 2
call dword [sym.imp.ws2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x1c], eax
jne 0x4a8a19
push 0x51f624
jmp 0x4a8a49
lea ecx, [ebp - 4]
mov dword [esi + 0x1020], ebx
push 4
push ecx
mov ebx, 0xffff
push 8
mov dword [ebp - 4], edi
mov edi, dword [sym.imp.ws2_32.dll_setsockopt]
push ebx
push eax
call edi
test eax, eax
je 0x4a8a58
mov ecx, esi
call fcn.004a8d76
push 0x51e47c
call fcn.00401466
pop ecx
xor al, al
pop edi
pop esi
pop ebx
leave
ret 4
mov eax, dword [esi + 0x14]
test eax, eax
mov dword [ebp - 4], eax
je 0x4a8a8f
lea eax, [ebp - 4]
push 4
push eax
push 0x1001
push ebx
push dword [esi + 0x1c]
call edi
test eax, eax
je 0x4a8a8f
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push 0x51e454
call fcn.00401466
pop ecx
pop ecx
jmp 0x4a8bfa
mov eax, dword [esi + 0x18]
test eax, eax
mov dword [ebp - 4], eax
je 0x4a8abc
lea eax, [ebp - 4]
push 4
push eax
push 0x1002
push ebx
push dword [esi + 0x1c]
call edi
test eax, eax
je 0x4a8abc
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push 0x51e42c
jmp 0x4a8a83
push 1
lea eax, [ebp - 8]
pop edi
push eax
push 0x8004667e
push dword [esi + 0x1c]
mov dword [ebp - 8], edi
call dword [sym.imp.ws2_32.dll_ioctlsocket]
test eax, eax
je 0x4a8adf
push 0x51f608
jmp 0x4a8afd
push esi
call dword [sym.imp.ws2_32.dll_inet_addr]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4a8b0b
push esi
call dword [sym.imp.ws2_32.dll_gethostbyname]
test eax, eax
jne 0x4a8b04
push 0x51f5f4
call fcn.00401466
jmp 0x4a8a89
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov ebx, dword [eax]
push 0
lea eax, [ebp - 0x20]
push 0x10
push eax
call fcn.004bb4c0
mov ax, word [esi + 0x10]
add esp, 0xc
mov word [ebp - 0x20], 2
push eax
call dword [sym.imp.ws2_32.dll_htons]
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x20]
push 0x10
push eax
push dword [esi + 0x1c]
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ws2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4a8b58
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x4a8bfa
mov dword [esi + 0x2028], edi
xor ebx, ebx
jmp 0x4a8b65
push 1
pop edi
cmp dword [esi + 0x1c], 0xffffffff
je 0x4a8bfa
cmp dword [esi + 0x2028], edi
je 0x4a8b98
push 0x12c
push 0x51f674
push 0x51f5d8
push 0x50a2a4
push 0x508530
call fcn.00401466
add esp, 0x14
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x4024], eax
mov dword [ebp - 0x2020], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x4028], edi
push eax
lea eax, [ebp - 0x2024]
push eax
lea eax, [ebp - 0x4028]
push eax
push ebx
push 0x800
mov dword [ebp - 0x2024], edi
call dword [sym.imp.ws2_32.dll_select]
cmp eax, 0xffffffff
je 0x4a8bfa
cmp eax, ebx
jle 0x4a8a4f
lea eax, [ebp - 0x2024]
push eax
push dword [esi + 0x1c]
call sub.ws2_32.dll___WSAFDIsSet
test eax, eax
je 0x4a8c06
mov ecx, esi
call fcn.004a8d76
jmp 0x4a8a4f
lea eax, [ebp - 0x4028]
push eax
push dword [esi + 0x1c]
call sub.ws2_32.dll___WSAFDIsSet
test eax, eax
je 0x4a8a4f
mov dword [esi + 0x2028], 2
mov al, 1
jmp 0x4a8a51