Function at 0x41c240
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x4c9230]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x22c], ecx
mov byte [ebp - 0x218], 0
push 0x1ff
push 0
lea eax, [ebp - 0x217]
push eax
call fcn.00469c10
add esp, 0xc
mov dword [ebp - 0x21c], 0
mov ecx, dword [ebp - 0x22c]
cmp dword [ecx + 0x204], 0
je 0x41c297
or eax, 0xffffffff
jmp 0x41c50f
push 0x10
push 0
lea edx, [ebp - 0x14]
push edx
call fcn.00469c10
add esp, 0xc
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov ecx, dword [ebp - 0x22c]
mov dword [ecx + 0x204], eax
mov edx, dword [ebp - 0x22c]
cmp dword [edx + 0x204], 0xffffffff
jne 0x41c30d
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.socket___falut___d
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, dword [ebp - 0x22c]
call fcn.0041c950
push 0
push 0x10
lea ecx, [ebp - 0x218]
push ecx
call fcn.0042758e
or eax, 0xffffffff
jmp 0x41c50f
mov dword [ebp - 0x21c], 1
lea edx, [ebp - 0x21c]
push edx
push 0x8004667e
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax + 0x204]
push ecx
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
mov edx, dword [ebp - 0x22c]
cmp dword [edx + 0x20c], 0
je 0x41c3ca
mov eax, dword [ebp - 0x22c]
cmp dword [eax + 0x210], 0
je 0x41c3ca
push 0x10
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ecx + 0x210]
push edx
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax + 0x20c]
push ecx
mov edx, dword [ebp - 0x22c]
mov eax, dword [edx + 0x204]
push eax
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
test eax, eax
jle 0x41c3ca
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.bind___falut___d
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, dword [ebp - 0x22c]
call fcn.0041c950
push 0
push 0x10
lea edx, [ebp - 0x218]
push edx
call fcn.0042758e
or eax, 0xffffffff
jmp 0x41c50f
mov eax, 2
mov word [ebp - 0x14], ax
mov ecx, dword [ebp - 0x22c]
movzx edx, word [ecx + 0x19a]
push edx
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x12], ax
mov eax, dword [ebp - 0x22c]
add eax, 0x19c
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 0x10], eax
push 0x10
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x22c]
mov eax, dword [edx + 0x204]
push eax
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
je 0x41c475
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0x220], eax
cmp dword [ebp - 0x220], 0x2733
je 0x41c475
mov ecx, dword [ebp - 0x220]
push ecx
push str.connect___falut___d
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, dword [ebp - 0x22c]
call fcn.0041c950
push 0
push 0x10
lea eax, [ebp - 0x218]
push eax
call fcn.0042758e
or eax, 0xffffffff
jmp 0x41c50f
mov ecx, dword [ebp - 0x22c]
movzx edx, byte [ecx + 0x434]
test edx, edx
jne 0x41c50d
mov dword [ebp - 0x224], 1
push 4
lea eax, [ebp - 0x224]
push eax
push 1
push 6
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ecx + 0x204]
push edx
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x41c50d
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0x2733
je 0x41c4fd
mov eax, dword [ebp - 0x228]
push eax
push str.setsockopt___falut___d
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push 0x10
lea edx, [ebp - 0x218]
push edx
call fcn.0042758e
mov ecx, dword [ebp - 0x22c]
call fcn.0041c950
or eax, 0xffffffff
jmp 0x41c50f
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046a109
mov esp, ebp
pop ebp
ret