Function at 0x409610
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create thread
Create udp socket
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration
Terminate thread

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x5150
call fcn.0042eb80
mov eax, dword [0x442754]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x5144], eax
mov dword [ebp - 0x513c], ecx
mov edi, dword [sym.imp.WS2_32.dll_socket]
push 0
push 1
push 2
call edi
mov esi, eax
test esi, esi
js 0x4098c9
je 0x4098c9
push 0
push 1
push 2
call edi
mov edi, eax
test edi, edi
js 0x4098c9
je 0x4098c9
mov ebx, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea edx, [ebp - 0x5138]
push edx
push 0x8004667e
push esi
mov dword [ebp - 0x5138], 1
call ebx
lea eax, [ebp - 0x5138]
push eax
push 0x8004667e
push edi
call ebx
call fcn.0041e9fc
add eax, 0x20
push eax
call fcn.0041e9a0
mov ecx, dword [ebp - 0x5144]
add esp, 4
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x409719
xor eax, eax
mov dword [ebp - 0x501c], eax
mov dword [ebp - 0x5018], eax
mov dword [ebp - 0x5014], eax
mov dword [ebp - 0x5010], eax
mov eax, dword [ebp + 0xc]
mov edx, 2
push eax
mov word [ebp - 0x501c], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x501a], ax
mov ecx, dword [ebx + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push 0x10
lea ecx, [ebp - 0x501c]
push ecx
push esi
mov dword [ebp - 0x5018], eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x40972a
push esi
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
call esi
push edi
call esi
jmp 0x409639
push 0x5000
lea edx, [ebp - 0x500c]
push 0
push edx
call fcn.00421fd0
add esp, 0xc
lea ebx, [esi + 1]
push 0
push 0
push 0
lea eax, [ebp - 0x5134]
push eax
push ebx
mov dword [ebp - 0x5130], esi
mov dword [ebp - 0x5134], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x40977e
call fcn.0041e7cd
cmp dword [eax], 0x2714
je 0x409743
jmp 0x409639
lea ecx, [ebp - 0x5134]
push ecx
push esi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x40979a
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x409743
push 0
push 0x5000
lea edx, [ebp - 0x500c]
push edx
push esi
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x5140], eax
test eax, eax
jle 0x409639
call fcn.0041e9fc
add eax, 0x20
push eax
call fcn.0041e9a0
mov eax, dword [ebp - 0x513c]
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x409839
mov edx, dword [ebp + 0x10]
xor eax, eax
mov ecx, 2
mov dword [ebp - 0x502c], eax
push edx
mov dword [ebp - 0x5028], eax
mov dword [ebp - 0x5024], eax
mov dword [ebp - 0x5020], eax
mov word [ebp - 0x502c], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x502a], ax
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
push 0x10
lea eax, [ebp - 0x502c]
push eax
push edi
mov dword [ebp - 0x5028], edx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x40984a
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
push esi
call ebx
push edi
call ebx
jmp 0x4097bd
mov ecx, dword [ebp - 0x5140]
push 0
push ecx
lea edx, [ebp - 0x500c]
push edx
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4097bd
push 0x5000
lea eax, [ebp - 0x500c]
push 0
push eax
call fcn.00421fd0
add esp, 0xc
lea ecx, [ebp - 0x5150]
push ecx
push 0
lea edx, [ebp - 0x514c]
push edx
push 0x40c1b0
push 0
push 0
mov dword [ebp - 0x514c], esi
mov dword [ebp - 0x5148], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x4098bf
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x409639
push 0
push 0
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041ba21
mov esp, ebp
pop ebp
ret