Function at 0x10047900
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
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x10047949
push 0
push 1
push 0x10066f2c
push 0xffffffffffffffff
lea eax, [ebp - 0xc]
push eax
call fcn.10054610
jmp 0x10047b17
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov word [ebp - 0x20], 2
movzx eax, word [ebp + 0xc]
push eax
call sub.WS2_32.dll_htons
mov word [ebp - 0x1e], ax
push dword [ebp + 8]
call fcn.100477c0
mov dword [ebp - 0x1c], eax
push 0x10
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x10]
call sub.WS2_32.dll_connect
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jge 0x100479b4
push 0
push 1
push 0x10066f2c
push 0xffffffffffffffff
lea eax, [ebp - 0xc]
push eax
call fcn.10054610
jmp 0x10047b17
push 0xffffffffffffffff
push dword [ebp + 0x10]
call fcn.10058f30
test eax, eax
jne 0x100479d5
push 0
push 2
push 0x10067c48
push 0xffffffffffffffff
push dword [ebp + 0x10]
call fcn.100545d0
push 0xffffffffffffffff
push dword [ebp + 0x10]
call fcn.10058f30
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x24], 0
mov eax, dword [ebp + 0x10]
mov ebx, dword [eax]
mov dword [ebp - 0x30], ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x30]
push dword [ebp - 0x10]
call sub.WS2_32.dll_send
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x10047a34
push dword [ebp - 0x10]
call sub.WS2_32.dll_closesocket
push 0
push 1
push 0x10066f2c
push 0xffffffffffffffff
lea eax, [ebp - 0xc]
push eax
call fcn.10054610
jmp 0x10047b17
cmp dword [ebp - 0x2c], 0
jne 0x10047a3e
jmp 0x10047a5e
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], eax
jge 0x10047a54
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
sub dword [ebp - 0x28], eax
jmp 0x10047a5c
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x30], eax
jmp 0x10047a5e
jmp 0x100479f8
push 0
push 0xffffffffffffffff
push 0
push 0x1003
call fcn.10055a20
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x3c]
push eax
call fcn.10054610
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
push 0
push 0x1000
push dword [ebp - 0x3c]
push dword [ebp - 0x10]
call sub.WS2_32.dll_recv
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
test eax, eax
sete al
shr eax, 1
sbb eax, eax
mov ebx, dword [ebp - 0x40]
cmp ebx, 0xffffffff
sete bl
shr ebx, 1
sbb ebx, ebx
or eax, ebx
je 0x10047acc
jmp 0x10047aea
push 0
push 0xffffffffffffffff
push dword [ebp - 0x40]
lea ebx, [ebp - 0x3c]
push ebx
call fcn.10058e10
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x4c]
push eax
call fcn.10054a10
jmp 0x10047a96
push dword [ebp - 0x10]
call sub.WS2_32.dll_closesocket
push 0
push 0xffffffffffffffff
lea eax, [ebp - 0x4c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0xc]
push eax
call fcn.100545d0
lea eax, [ebp - 0x4c]
push eax
call fcn.10055990
lea eax, [ebp - 0x3c]
push eax
call fcn.10055990
lea eax, [ebp - 0xc]
push eax
call fcn.10059150
pop ebx
mov esp, ebp
pop ebp
ret 0xc