Function at 0x401130
Capabilities:
Initialize winsock library
Set socket configuration

Disassembly:
sub esp, 0x194
push ebx
push esi
lea eax, [esp + 0xc]
push eax
push 0x202
mov esi, ecx
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x40116c
xor ebx, ebx
push ebx
push str.error
push str.win_sock_error
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
xor eax, eax
pop ebx
add esp, 0x194
ret
mov ax, word [esp + 0xc]
cmp al, 2
jne 0x401454
cmp ah, al
jne 0x401454
push ebp
push edi
xor ebx, ebx
push ebx
mov ebp, 1
push ebp
push 2
call sub.WSOCK32.dll_socket
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1001
push 0xffff
mov edi, 0x80000
push eax
mov dword [esi], eax
mov dword [esp + 0x24], edi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x40134a
mov eax, dword [esi]
push 4
lea edx, [esp + 0x14]
push edx
push 0x1002
push 0xffff
push eax
mov dword [esp + 0x24], edi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x40134a
mov edx, dword [esi]
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push edx
mov dword [esp + 0x1c], ebp
call sub.WSOCK32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x40134a
mov ecx, dword [esi]
push 4
lea eax, [esp + 0x14]
push eax
push ebp
push 6
push ecx
mov dword [esp + 0x24], ebp
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
push ebx
je 0x40134b
push ebp
push 2
call sub.WSOCK32.dll_socket
push 4
lea edx, [esp + 0x14]
push edx
push 0x1001
push 0xffff
mov edi, 0x100000
push eax
mov dword [esi + 8], eax
mov dword [esp + 0x24], edi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x40134a
mov ecx, dword [esi + 8]
push 4
lea eax, [esp + 0x14]
push eax
push 0x1002
push 0xffff
push ecx
mov dword [esp + 0x24], edi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x40134a
mov eax, dword [esi + 8]
lea edx, [esp + 0x10]
push edx
push 0x8004667e
push eax
mov dword [esp + 0x1c], ebp
call sub.WSOCK32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x40134a
mov edx, dword [esi + 8]
push 4
lea ecx, [esp + 0x14]
push ecx
push ebp
push 6
push edx
mov dword [esp + 0x24], ebp
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
push ebx
je 0x40134b
push ebp
push 2
call sub.WSOCK32.dll_socket
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1001
push 0xffff
mov edi, 0x80000
push eax
mov dword [esi + 0x28], eax
mov dword [esp + 0x24], edi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x40134a
mov eax, dword [esi + 0x28]
push 4
lea edx, [esp + 0x14]
push edx
push 0x1002
push 0xffff
push eax
mov dword [esp + 0x24], edi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x40134a
mov edx, dword [esi + 0x28]
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push edx
mov dword [esp + 0x1c], ebp
call sub.WSOCK32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x40134a
mov ecx, dword [esi + 0x28]
push 4
lea eax, [esp + 0x14]
push eax
push ebp
push 6
push ecx
mov dword [esp + 0x24], ebp
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x401369
push ebx
push 0x40d19e
push str.sockopt_error
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop ebp
pop esi
xor eax, eax
pop ebx
add esp, 0x194
ret
xor ebp, ebp
lea edi, [esi + 0x48]
mov edi, edi
mov byte [edi - 4], bl
mov dword [edi], 0xffffffff
push 0x20000
mov dword [edi + 4], ebx
call fcn.00404d6e
add esp, 4
cmp eax, ebx
mov dword [edi + 0x2c], eax
je 0x40135c
push 0x10000
call fcn.00404d6e
add esp, 4
cmp eax, ebx
mov dword [edi + 0x30], eax
je 0x40135c
mov dword [edi + 0x34], ebx
mov dword [edi + 0x3c], ebx
inc ebp
add edi, 0x50
cmp ebp, 0x500
jl 0x401370
push 0x100000
call fcn.00404d6e
add esp, 4
cmp eax, ebx
mov dword [esi + 0xc], eax
je 0x40135c
push 0x800000
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
call fcn.00404d6e
add esp, 4
cmp eax, ebx
mov dword [esi + 0x18], eax
je 0x40135c
push 0x40000
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
call fcn.00404d6e
add esp, 4
cmp eax, ebx
mov dword [esi + 0x2c], eax
je 0x40135c
push 0x40000
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
call fcn.00404d6e
add esp, 4
cmp eax, ebx
mov dword [esi + 0x38], eax
je 0x40135c
push ebx
push 1
push 2
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
call sub.WSOCK32.dll_socket
pop edi
pop ebp
mov dword [esi + 0x119068], eax
mov dword [esi + 0x119080], 0xffffffff
pop esi
mov eax, 1
pop ebx
add esp, 0x194
ret
call sub.WSOCK32.dll_WSACleanup
pop esi
xor eax, eax
pop ebx
add esp, 0x194
ret