Function at 0x40c98f
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5968ea
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x60f490]
xor eax, esp
mov dword [esp + 0x178], eax
push ebx
push esi
push edi
mov eax, dword [0x60f490]
xor eax, esp
push eax
lea eax, [esp + 0x190]
mov dword fs:[0], eax
mov dword [esp + 0x14], edx
mov ebx, ecx
mov dword [esp + 0x18], ebx
and dword [esp + 0x20], 0
lea ecx, [esp + 0xcc]
call fcn.00407859
xor edx, edx
lea edi, [esp + 0xa4]
mov dword [esp + 0x198], edx
xor eax, eax
stosd dword es:[edi], eax
mov esi, edx
mov dword [esp + 0x104], edx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa8], edx
mov dword [esp + 0xac], edx
mov ecx, dword [esp + 0x14]
mov edi, dword [ebp + 8]
mov byte [esp + 0x198], 1
cmp ecx, 0xffffffff
jne 0x40ca46
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0xa4]
push eax
mov ecx, edi
call fcn.0042b865
pop ecx
jmp 0x40ca95
mov dword [esp + 0x98], edx
mov dword [esp + 0x9c], edx
mov dword [esp + 0xa0], edx
test edi, edi
jle 0x40caa0
mov esi, edi
mov ebx, ecx
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x98]
push eax
mov ecx, ebx
call fcn.0042b6fc
pop ecx
test al, al
je 0x40ca8e
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0xa8]
call fcn.0042c54c
dec esi
jne 0x40ca63
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0xa4]
mov eax, dword [esp + 0xa8]
sub eax, esi
mov dword [esp + 0x14], 0xc
cdq
idiv dword [esp + 0x14]
test eax, eax
jne 0x40cb20
mov edx, 0x7df098
mov dword [esp + 0x104], 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0xcc], al
call fcn.004299ee
add eax, 8
lea ecx, [esp + 0xd0]
push eax
call fcn.00407134
lea ecx, [esp + 0x3c]
call fcn.0040bbd4
lea eax, [esp + 0xcc]
mov ecx, ebx
push eax
call fcn.0040cfee
test esi, esi
je 0x40cb0d
push esi
call fcn.004317a8
pop ecx
lea ecx, [esp + 0xcc]
call fcn.0040540b
mov eax, ebx
jmp 0x40cf38
cmp ecx, 0xffffffff
je 0x40cc25
cmp edi, 1
jne 0x40cc25
mov edx, dword [esi + 4]
lea ecx, [esp + 0xb4]
call fcn.00421e34
xor eax, eax
lea edi, [esp + 0x98]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
sub esp, 0x18
mov byte [esp + 0x1b0], 3
lea eax, [esp + 0xcc]
mov ecx, esp
lea edi, [esp + 0xb0]
push eax
call fcn.00403e41
mov ecx, edi
call fcn.0040fbe1
mov eax, dword [esp + 0xb4]
add esp, 0x18
sub eax, dword [esp + 0x98]
sar eax, 2
test eax, eax
je 0x40cc01
mov edi, 0x5e1685
mov dword [esp + 0x104], 1
push edi
mov byte [esp + 0xd0], 0
call fcn.004035bd
pop ecx
push eax
push edi
lea ecx, [esp + 0xd8]
call fcn.0040428c
lea eax, [esp + 0xcc]
mov ecx, ebx
push eax
call fcn.0040cfee
lea ecx, [esp + 0x98]
call fcn.00405f76
push 0
push 1
lea ecx, [esp + 0xbc]
call fcn.00404102
jmp 0x40cb06
lea ecx, [esp + 0x98]
call fcn.00405f76
push 0
push 1
lea ecx, [esp + 0xbc]
mov byte [esp + 0x1a0], 1
call fcn.00404102
mov ebx, esi
cmp esi, dword [esp + 0xa8]
je 0x40cf0c
mov esi, ebx
lea edi, [esp + 0xb4]
push 0
push 1
push 2
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x40cf61
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0xb0]
push 4
push eax
push 0x1002
push 0xffff
push edi
mov dword [esp + 0xc4], 0x40000
call esi
push 4
lea eax, [esp + 0xb4]
push eax
push 0x1001
push 0xffff
push edi
call esi
mov edx, dword [esp + 0xb8]
lea ecx, [esp + 0x114]
call fcn.00421e34
push 0x1c8
mov byte [esp + 0x19c], 5
call fcn.00431772
mov esi, eax
pop ecx
mov dword [esp + 0x1c], esi
mov byte [esp + 0x198], 6
test esi, esi
je 0x40cce8
push 0x1c8
push 0
push esi
call fcn.0055d9e0
pop ecx
pop ecx
mov ecx, esi
call fcn.0040efa9
mov esi, eax
jmp 0x40ccea
xor esi, esi
mov byte [esp + 0x198], 5
xor ecx, ecx
mov eax, dword [0x610718]
mov dword [esi + 4], 0x40d882
mov dword [esi + 8], 0x40d91f
mov dword [esi + 0xc], fcn.00404a8e
mov dword [esi + 0x10], fcn.0040d936
mov dword [esi + 0x14], 0x40daed
mov dword [esi + 0x30], edi
mov byte [esi + 0x4e], 1
mov dword [esi + 0x58], eax
mov eax, dword [0x610714]
mov dword [esi + 0x5c], eax
mov eax, dword [0x61f2bc]
cmp eax, 0x64
mov dword [esp + 0x1c], esi
cmovge eax, ecx
lea ecx, [esp + 0x24]
inc eax
mov dword [0x61f2bc], eax
mov dword [esi + 0x11c], eax
call fcn.00417455
push eax
lea ecx, [esi + 0x18]
call fcn.00407134
push 0
push 1
lea ecx, [esp + 0x2c]
call fcn.00404102
mov eax, dword [esp + 0xb4]
lea ecx, [esi + 0x124]
mov byte [esi + 0x120], 0
mov dword [esi + 0x140], eax
lea eax, [esp + 0x114]
cmp ecx, eax
je 0x40cd97
push 0xffffffffffffffff
push 0
push eax
call fcn.0040406e
mov eax, dword [esp + 0xbc]
mov dword [esi + 0x144], eax
call fcn.004172e1
mov dword [esi + 0x148], eax
mov byte [esi + 0x150], 1
call fcn.0042f1ba
mov dword [esi + 0x64], eax
mov edx, 0xd3d
mov ecx, dword [esi + 0x140]
mov eax, 0x12c
cmp ecx, 0xb4
cmove eax, edx
cmp ecx, 0x1f4
jl 0x40cded
cmp ecx, 0x257
mov edx, 0x1b58
cmovle eax, edx
mov edx, 0x604282
mov word [esi + 0x13c], ax
lea ecx, [esp + 0x12c]
call fcn.004299ee
mov byte [esp + 0x198], 7
lea ecx, [esp + 0x24]
mov edx, dword [esi + 0x11c]
call fcn.00404a8f
mov esi, eax
mov edi, 0x5e4460
mov byte [esp + 0x198], 8
push edi
call fcn.004035bd
pop ecx
push eax
push 0
push edi
lea ecx, [esp + 0x140]
call fcn.0040e370
push 0xffffffffffffffff
push 0
push esi
push 3
push eax
lea ecx, [esp + 0x148]
call fcn.00407366
lea ecx, [esp + 0x134]
cmp ecx, eax
je 0x40ce6b
push 0xffffffffffffffff
push 0
push eax
call fcn.0040406e
push 0
push 1
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1a0], 7
call fcn.00404102
lea ecx, [esp + 0x12c]
call fcn.00429b06
lea eax, [esp + 0x1c]
push eax
push ecx
lea ecx, [esp + 0xa0]
call fcn.0040eb9b
lea ecx, [esp + 0x98]
mov byte [esp + 0x198], 9
call fcn.00405015
mov byte [esp + 0x198], 7
cmp dword [esp + 0x9c], 0
mov byte [esp + 0xcc], 1
jne 0x40cf5c
lea ecx, [esp + 0x12c]
call fcn.0040bbd4
push 0
push 1
lea ecx, [esp + 0x11c]
mov byte [esp + 0x1a0], 1
call fcn.00404102
add ebx, dword [esp + 0x14]
cmp ebx, dword [esp + 0xa8]
jne 0x40cc34
mov esi, dword [esp + 0xa4]
mov edi, dword [esp + 0x18]
lea eax, [esp + 0xcc]
push eax
mov ecx, edi
call fcn.0040cfee
test esi, esi
je 0x40cf2a
push esi
call fcn.004317a8
pop ecx
lea ecx, [esp + 0xcc]
call fcn.0040540b
mov eax, edi
mov ecx, dword [esp + 0x190]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x178]
xor ecx, esp
call fcn.00559612
mov esp, ebp
pop ebp
ret
call fcn.0055a120
xor ebx, ebx
mov byte [esp + 0xcc], bl
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [esp + 0xb4]
call fcn.00404a8f
push eax
mov edx, str.create_socket_error:
mov byte [esp + 0x19c], 4
lea ecx, [esp + 0x28]
call fcn.00404bfe
pop ecx
push eax
lea ecx, [esp + 0xd4]
call fcn.00407134
push ebx
push 1
lea ecx, [esp + 0x2c]
call fcn.00404102
push ebx
push 1
lea ecx, [esp + 0xbc]
mov byte [esp + 0x1a0], 1
call fcn.00404102
mov edi, dword [esp + 0x18]
lea eax, [esp + 0xcc]
push eax
mov ecx, edi
call fcn.0040cfee
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x40cf2a
push eax
jmp 0x40cf24