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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x586ca9
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x5fb490]
xor eax, esp
mov dword [esp + 0x178], eax
push ebx
push esi
push edi
mov eax, dword [0x5fb490]
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.00407602
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 0x40b761
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0xa4]
push eax
mov ecx, edi
call fcn.0041e1f8
pop ecx
jmp 0x40b7b0
mov dword [esp + 0x98], edx
mov dword [esp + 0x9c], edx
mov dword [esp + 0xa0], edx
test edi, edi
jle 0x40b7bb
mov esi, edi
mov ebx, ecx
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x98]
push eax
mov ecx, ebx
call fcn.0041dff7
pop ecx
test al, al
je 0x40b7a9
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0xa8]
call fcn.0041ee90
dec esi
jne 0x40b77e
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 0x40b83b
mov edx, 0x7df098
mov dword [esp + 0x104], 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0xcc], al
call fcn.0041cc31
add eax, 8
lea ecx, [esp + 0xd0]
push eax
call fcn.00407035
lea ecx, [esp + 0x3c]
call fcn.0040aa30
lea eax, [esp + 0xcc]
mov ecx, ebx
push eax
call fcn.0040bd09
test esi, esi
je 0x40b828
push esi
call fcn.00423289
pop ecx
lea ecx, [esp + 0xcc]
call fcn.004052db
mov eax, ebx
jmp 0x40bc53
cmp ecx, 0xffffffff
je 0x40b940
cmp edi, 1
jne 0x40b940
mov edx, dword [esi + 4]
lea ecx, [esp + 0xb4]
call fcn.004174f9
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.00403d4e
mov ecx, edi
call fcn.0040e300
mov eax, dword [esp + 0xb4]
add esp, 0x18
sub eax, dword [esp + 0x98]
sar eax, 2
test eax, eax
je 0x40b91c
mov edi, 0x5d057d
mov dword [esp + 0x104], 1
push edi
mov byte [esp + 0xd0], 0
call fcn.004034ca
pop ecx
push eax
push edi
lea ecx, [esp + 0xd8]
call fcn.00404199
lea eax, [esp + 0xcc]
mov ecx, ebx
push eax
call fcn.0040bd09
lea ecx, [esp + 0x98]
call fcn.00405e41
push 0
push 1
lea ecx, [esp + 0xbc]
call fcn.0040400f
jmp 0x40b821
lea ecx, [esp + 0x98]
call fcn.00405e41
push 0
push 1
lea ecx, [esp + 0xbc]
mov byte [esp + 0x1a0], 1
call fcn.0040400f
mov ebx, esi
cmp esi, dword [esp + 0xa8]
je 0x40bc27
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 0x40bc7c
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.004174f9
push 0x1c8
mov byte [esp + 0x19c], 5
call fcn.0042325c
mov esi, eax
pop ecx
mov dword [esp + 0x1c], esi
mov byte [esp + 0x198], 6
test esi, esi
je 0x40ba03
push 0x1c8
push 0
push esi
call fcn.0054f350
pop ecx
pop ecx
mov ecx, esi
call fcn.0040d702
mov esi, eax
jmp 0x40ba05
xor esi, esi
mov byte [esp + 0x198], 5
xor ecx, ecx
mov eax, dword [0x5fc708]
mov dword [esi + 4], 0x40c58f
mov dword [esi + 8], 0x40c62c
mov dword [esi + 0xc], fcn.0040495d
mov dword [esi + 0x10], fcn.0040c643
mov dword [esi + 0x14], 0x40c7fa
mov dword [esi + 0x30], edi
mov byte [esi + 0x4e], 1
mov dword [esi + 0x58], eax
mov eax, dword [0x5fc704]
mov dword [esi + 0x5c], eax
mov eax, dword [0x60b134]
cmp eax, 0x64
mov dword [esp + 0x1c], esi
cmovge eax, ecx
lea ecx, [esp + 0x24]
inc eax
mov dword [0x60b134], eax
mov dword [esi + 0x11c], eax
call fcn.00411821
push eax
lea ecx, [esi + 0x18]
call fcn.00407035
push 0
push 1
lea ecx, [esp + 0x2c]
call fcn.0040400f
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 0x40bab2
push 0xffffffffffffffff
push 0
push eax
call fcn.00403f7b
mov eax, dword [esp + 0xbc]
mov dword [esi + 0x144], eax
call fcn.004116ad
mov dword [esi + 0x148], eax
mov byte [esi + 0x150], 1
call fcn.0042175d
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 0x40bb08
cmp ecx, 0x257
mov edx, 0x1b58
cmovle eax, edx
mov edx, 0x604282
mov word [esi + 0x13c], ax
lea ecx, [esp + 0x12c]
call fcn.0041cc31
mov byte [esp + 0x198], 7
lea ecx, [esp + 0x24]
mov edx, dword [esi + 0x11c]
call fcn.0040495e
mov esi, eax
mov edi, 0x5d31d8
mov byte [esp + 0x198], 8
push edi
call fcn.004034ca
pop ecx
push eax
push 0
push edi
lea ecx, [esp + 0x140]
call fcn.0040cff4
push 0xffffffffffffffff
push 0
push esi
push 3
push eax
lea ecx, [esp + 0x148]
call fcn.0040710f
lea ecx, [esp + 0x134]
cmp ecx, eax
je 0x40bb86
push 0xffffffffffffffff
push 0
push eax
call fcn.00403f7b
push 0
push 1
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1a0], 7
call fcn.0040400f
lea ecx, [esp + 0x12c]
call fcn.0041cd49
lea eax, [esp + 0x1c]
push eax
push ecx
lea ecx, [esp + 0xa0]
call fcn.0040d671
lea ecx, [esp + 0x98]
mov byte [esp + 0x198], 9
call fcn.00404ee4
mov byte [esp + 0x198], 7
cmp dword [esp + 0x9c], 0
mov byte [esp + 0xcc], 1
jne 0x40bc77
lea ecx, [esp + 0x12c]
call fcn.0040aa30
push 0
push 1
lea ecx, [esp + 0x11c]
mov byte [esp + 0x1a0], 1
call fcn.0040400f
add ebx, dword [esp + 0x14]
cmp ebx, dword [esp + 0xa8]
jne 0x40b94f
mov esi, dword [esp + 0xa4]
mov edi, dword [esp + 0x18]
lea eax, [esp + 0xcc]
push eax
mov ecx, edi
call fcn.0040bd09
test esi, esi
je 0x40bc45
push esi
call fcn.00423289
pop ecx
lea ecx, [esp + 0xcc]
call fcn.004052db
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.0054b0f5
mov esp, ebp
pop ebp
ret
call fcn.0054bc00
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.0040495e
push eax
mov edx, str.create_socket_error:
mov byte [esp + 0x19c], 4
lea ecx, [esp + 0x28]
call fcn.00404acd
pop ecx
push eax
lea ecx, [esp + 0xd4]
call fcn.00407035
push ebx
push 1
lea ecx, [esp + 0x2c]
call fcn.0040400f
push ebx
push 1
lea ecx, [esp + 0xbc]
mov byte [esp + 0x1a0], 1
call fcn.0040400f
mov edi, dword [esp + 0x18]
lea eax, [esp + 0xcc]
push eax
mov ecx, edi
call fcn.0040bd09
mov eax, dword [esp + 0xa4]
test eax, eax
je 0x40bc45
push eax
jmp 0x40bc3f