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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
mov eax, dword [0x40d018]
xor eax, ebp
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x138], ecx
mov eax, dword [ebp - 0x138]
mov dword [eax + 0x10], 0
mov ecx, dword [ebp - 0x138]
cmp dword [ecx + 0xc], 0
jae 0x404bcc
xor eax, eax
jmp 0x404dd0
xor edx, edx
mov dword [ebp - 0x12c], edx
mov dword [ebp - 0x128], edx
mov dword [ebp - 0x124], edx
mov dword [ebp - 0x120], edx
mov eax, 2
mov word [ebp - 0x12c], ax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x128], eax
cmp dword [ebp - 0x128], 0xffffffff
jne 0x404c55
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0
je 0x404c4e
mov eax, dword [ebp - 0x130]
mov ecx, dword [eax + 0xc]
cmp dword [ecx], 0
jne 0x404c39
xor eax, eax
jmp 0x404dd0
mov edx, dword [ebp - 0x130]
mov eax, dword [edx + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [ebp - 0x128], edx
jmp 0x404c55
xor eax, eax
jmp 0x404dd0
movzx eax, word [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12a], ax
mov dword [ebp - 4], 1
lea ecx, [ebp - 4]
push ecx
push 0x8004667e
mov edx, dword [ebp - 0x138]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x404c92
xor eax, eax
jmp 0x404dd0
mov dword [ebp - 0x118], 1
mov ecx, dword [ebp - 0x138]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x114], edx
xor eax, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x138]
mov edx, dword [ecx + 0x14]
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0x138]
mov dword [eax + 0x18], 0
push 0x10
lea ecx, [ebp - 0x12c]
push ecx
mov edx, dword [ebp - 0x138]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x404d66
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x404d42
lea ecx, [ebp - 0xc]
push ecx
push 0
lea edx, [ebp - 0x118]
push edx
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x134], eax
cmp dword [ebp - 0x134], 1
jne 0x404d33
mov eax, dword [ebp - 0x138]
mov dword [eax + 0x18], 1
jmp 0x404d40
mov ecx, dword [ebp - 0x138]
mov dword [ecx + 0x10], 1
jmp 0x404d64
push 2
mov edx, dword [ebp - 0x138]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
mov ecx, dword [ebp - 0x138]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x404d73
mov eax, dword [ebp - 0x138]
mov dword [eax + 0x18], 1
mov dword [ebp - 4], 0
lea ecx, [ebp - 4]
push ecx
push 0x8004667e
mov edx, dword [ebp - 0x138]
mov eax, dword [edx + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x404dbd
push 2
mov ecx, dword [ebp - 0x138]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_shutdown]
mov eax, dword [ebp - 0x138]
mov ecx, dword [eax + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x404dd0
mov edx, dword [ebp - 0x138]
mov byte [edx + 8], 0
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x18]
mov ecx, dword [ebp - 0x11c]
xor ecx, ebp
call fcn.00405de0
mov esp, ebp
pop ebp
ret 8