Function at 0x4194d0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Print debug messages
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
mov eax, dword [0x5e6044]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
xor bl, bl
push edi
mov dword [ebp - 0x330], eax
mov dword [ebp - 0x338], ecx
mov dword [ebp - 0x32c], 0
cmp bl, 1
jne 0x419515
push eax
call fcn.00412c10
add esp, 4
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x419780
mov ebx, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea ecx, [ebp - 0x328]
push ecx
push 0x8004667e
push eax
mov dword [ebp - 0x328], 1
call ebx
test eax, eax
jne 0x419751
push 0x100
push eax
lea eax, [ebp - 0x104]
mov dword [ebp - 0x334], 1
push eax
call fcn.0054f5e0
add esp, 0xc
mov dword [ebp - 0x108], 0x64
lea eax, [ebp - 0x334]
mov dword [ebp - 0x10c], 0x7d0
mov dword [ebp - 0x110], 1
push 4
push eax
push 8
push 0xffff
push dword [esi]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x41970b
push eax
push eax
lea eax, [ebp - 0x33c]
push eax
push 0xc
lea eax, [ebp - 0x11c]
push eax
push 0xc
lea eax, [ebp - 0x110]
push eax
push 0x98000004
push dword [esi]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
je 0x41975c
push 0x10
push dword [ebp - 0x330]
push dword [esi]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4196db
push dword [ebp - 0x338]
mov eax, dword [esi]
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x320], eax
lea eax, [ebp - 0x220]
push 0
push eax
lea eax, [ebp - 0x324]
mov dword [ebp - 0x220], 1
push eax
push 0
mov dword [ebp - 0x324], 1
call dword [sym.imp.WS2_32.dll_select]
mov edi, eax
test edi, edi
jg 0x4196a9
push dword [esi]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x32c]
inc eax
mov dword [esi], 0xffffffff
mov dword [ebp - 0x32c], eax
cmp eax, 3
jge 0x419678
push 0x1f4
mov bl, 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x330]
jmp 0x419507
test edi, edi
jne 0x419690
lea eax, [edi - 3]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054d0e6
mov esp, ebp
pop ebp
ret
cmp edi, 0xffffffff
jne 0x4196db
lea eax, [edi - 3]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054d0e6
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x220]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
lea eax, [ebp - 0x324]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054d0e6
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x328]
mov dword [ebp - 0x328], 0
push eax
push 0x8004667e
push dword [esi]
call ebx
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054d0e6
mov esp, ebp
pop ebp
ret
push eax
lea eax, [ebp - 0x104]
push str.setsockopt____d_n
push eax
call fcn.00419470
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [esi]
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov dword [esi], 0xffffffff
mov eax, 0xfffffffe
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054d0e6
mov esp, ebp
pop ebp
ret
push str._nioctlsocket
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [esi]
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov dword [esi], 0xffffffff
mov eax, 0xfffffffe
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054d0e6
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054d0e6
mov esp, ebp
pop ebp
ret