Function at 0x47daa0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x128
push ebx
mov ebx, ecx
mov dword [esp + 0x14], ebx
call fcn.0048a3f0
test al, al
jne 0x47dac2
xor eax, eax
pop ebx
add esp, 0x128
ret 8
push ebp
mov ebp, dword [esp + 0x138]
push esi
push edi
lea esi, [ebp*4]
mov dword [esp + 0x18], 0
push esi
call fcn.0047e2df
mov ecx, esi
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [ebx + 4], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor edi, edi
mov dword [ebx], ebp
test ebp, ebp
mov dword [esp + 0x14], edi
jle 0x47ddbc
mov esi, dword [esp + 0x13c]
push 4
push str.TCP:
mov eax, dword [esi + edi*4]
push eax
call fcn.00480570
add esp, 0xc
test eax, eax
jne 0x47dda4
mov esi, dword [esi + edi*4]
push 0x499a50
add esi, 4
push esi
call fcn.00480680
add esp, 8
test eax, eax
je 0x47dda4
inc eax
push eax
call fcn.00480158
push 0x100
lea ecx, [esp + 0x40]
push esi
push ecx
mov dword [esp + 0x2c], eax
call fcn.00480470
lea edx, [esp + 0x48]
push 0x499a50
push edx
call fcn.00480680
add esp, 0x18
test eax, eax
je 0x47db7d
mov byte [eax], 0
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
je 0x47dda4
push 0x800
call fcn.0047e2df
mov esi, eax
add esp, 4
lea ebp, [esi + 4]
mov dword [esi], 4
mov byte [ebp], 5
inc ebp
test esi, esi
je 0x47dbb9
inc dword [esi]
mov word [ebp], 2
add ebp, 2
test esi, esi
je 0x47dbc9
add dword [esi], 2
mov word [ebp], 0x66
add ebp, 2
test esi, esi
je 0x47dbd9
add dword [esi], 2
mov dword [ebp], 0x400000a
add ebp, 4
test esi, esi
je 0x47dbea
add dword [esi], 4
mov word [ebp], 0
add ebp, 2
test esi, esi
je 0x47dbfa
add dword [esi], 2
mov edi, str._CoolPool
or ecx, 0xffffffff
xor eax, eax
push 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0
push ecx
push str._CoolPool
push 1
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
mov word [ebp], bx
add ebp, 2
test esi, esi
je 0x47dc2c
add dword [esi], 2
mov edi, str._CoolPool
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ebp
push ecx
push str._CoolPool
push 1
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test esi, esi
je 0x47dc59
mov ecx, dword [esi]
lea eax, [ebx + ebx]
add ecx, eax
mov dword [esi], ecx
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov edx, dword [esp + 0x1c]
mov edi, eax
push edx
mov word [esp + 0x2c], 2
call dword [sym.imp.WSOCK32.dll_htons]
mov word [esp + 0x2a], ax
xor eax, eax
mov dword [esp + 0x30], eax
cmp edi, 0xffffffff
mov dword [esp + 0x34], eax
je 0x47dc92
mov dword [esp + 0x2c], edi
jmp 0x47dcb0
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x47dda4
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
mov ebp, dword [esp + 0x24]
lea edx, [esp + 0x28]
push 0x10
push edx
push ebp
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x47dcd1
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
jmp 0x47dda4
mov eax, dword [esi]
push 0
push eax
push esi
push ebp
call dword [sym.imp.WSOCK32.dll_send]
cmp eax, 0xffffffff
jne 0x47dcee
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
jmp 0x47dda4
push 2
lea ecx, [esp + 0x14]
push 4
push ecx
push ebp
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 4
je 0x47dd0e
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
jmp 0x47dda4
mov edx, dword [esp + 0x10]
push edx
call fcn.0047e2df
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
add esp, 4
xor esi, esi
mov ecx, dword [ebx + 4]
mov dword [ecx + edi*4], eax
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x47dd63
mov edx, dword [ebx + 4]
sub eax, esi
push 0
push eax
mov eax, dword [edx + edi*4]
add eax, esi
push eax
push ebp
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
je 0x47dd59
add esi, eax
mov eax, dword [esp + 0x10]
cmp esi, eax
jl 0x47dd33
jmp 0x47dd63
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov eax, dword [esp + 0x10]
cmp esi, eax
je 0x47dd6f
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
jmp 0x47dda4
mov ecx, dword [ebx + 4]
mov edi, dword [ecx + edi*4]
cmp dword [edi], eax
jne 0x47dda4
cmp byte [edi + 4], 5
jne 0x47dda4
cmp word [edi + 5], 2
jne 0x47dda4
cmp word [edi + 7], 3
jne 0x47dda4
cmp word [edi + 9], 0
jl 0x47dda4
mov eax, dword [esp + 0x18]
xor edx, edx
mov dx, word [edi + 0x10]
add eax, edx
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x140]
inc edi
cmp edi, eax
mov dword [esp + 0x14], edi
jl 0x47db0b
call fcn.0048a440
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret 8