Function at 0x4047b0
Capabilities:
Set socket configuration

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a3330
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x4cf084]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x35], dl
mov dword [ebp - 0x40], ecx
mov edi, dword [ebx + 0x14]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x30], 0
call fcn.00472b40
push 0x1c
call fcn.00477147
add esp, 4
mov esi, eax
cmp byte [ebp - 0x35], 0
mov dword [ebp - 0x18], esi
je 0x40487b
mov byte [ebp - 4], 1
lea edx, [ebx + 0x18]
cmp dword [ebx + 0x2c], 0x10
lea ecx, [ebp - 0x5c]
cmovae edx, dword [ebx + 0x18]
call fcn.0041b980
push 0
push eax
mov ecx, esi
call fcn.0041a800
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
push dword [ebp - 0x40]
mov dword [ebp - 0x20], esi
push esi
call fcn.0040eaf0
push esi
lea eax, [ebp - 0x20]
push esi
push eax
call fcn.00412b40
add esp, 0xc
lea eax, [edi + 8]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x24], eax
push ecx
mov ecx, eax
call fcn.0040c790
mov byte [ebp - 4], 2
jmp 0x4048d3
mov byte [ebp - 4], 3
lea edx, [ebx + 0x18]
cmp dword [ebx + 0x2c], 0x10
lea ecx, [ebp - 0x5c]
cmovae edx, dword [ebx + 0x18]
call fcn.0041b980
push dword [ebp - 0x40]
mov ecx, esi
push eax
call fcn.0041a800
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
push dword [ebp - 0x40]
mov dword [ebp - 0x20], esi
push esi
call fcn.0040eaf0
push esi
lea eax, [ebp - 0x20]
push esi
push eax
call fcn.00412b40
add esp, 0xc
lea eax, [edi + 8]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x24], eax
push ecx
mov ecx, eax
call fcn.0040c790
mov byte [ebp - 4], 4
mov esi, dword [ebp - 0x1c]
or edi, 0xffffffff
test esi, esi
je 0x404907
mov ecx, edi
lea eax, [esi + 4]
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x404907
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov edx, edi
lea eax, [esi + 8]
lock xadd dword [eax], edx
cmp edx, 1
jne 0x404907
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x24]
cmp dword [eax], 0
jne 0x40494d
mov eax, dword [0x4cfa10]
cmp eax, 0x4cfa10
je 0x404943
test byte [eax + 0x1c], 2
je 0x404943
cmp byte [eax + 0x19], 1
jb 0x404943
push dword [eax + 0x14]
mov edx, 0x4bba90
mov ecx, 0x33
push dword [eax + 0x10]
call fcn.00401940
add esp, 8
mov esi, 0xfffffffe
jmp 0x404dc2
push 0x44
call fcn.00477147
mov esi, eax
add esp, 4
mov dword [ebp - 0x18], esi
push 0x44
push 0
push esi
call fcn.0047a210
mov dword [esi + 8], 0
xorps xmm0, xmm0
mov dword [esi + 0xc], 0
add esp, 0xc
mov dword [esi + 0x1c], 2
mov byte [esi + 0x20], 0
movups xmmword [esi + 0x24], xmm0
movq qword [esi + 0x34], xmm0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x24], 2
mov dword [esi + 0x28], 0
mov byte [ebp - 4], 6
mov ecx, dword [0x5398a4]
call fcn.0040ef70
push esi
mov dword [esi + 0x40], eax
lea ecx, [eax + 0x14]
call fcn.00419470
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
push dword [ebp - 0x40]
mov dword [ebp - 0x28], esi
push esi
call fcn.0040eb90
push esi
lea eax, [ebp - 0x28]
push esi
push eax
call fcn.00412b40
mov edx, dword [ebp - 0x3c]
xor esi, esi
mov eax, dword [ebp - 0x28]
add esp, 0xc
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x24], esi
mov dword [edx], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], eax
mov dword [edx + 4], ecx
mov byte [ebp - 4], 7
test eax, eax
je 0x404a32
mov esi, eax
mov ecx, edi
lea eax, [esi + 4]
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x404a2f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [esi + 8]
mov edx, edi
lock xadd dword [eax], edx
cmp edx, 1
jne 0x404a2f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov esi, dword [ebp - 0x24]
mov byte [ebp - 4], 8
test esi, esi
je 0x404a62
lea eax, [esi + 4]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x404a62
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [esi + 8]
lock xadd dword [eax], edi
cmp edi, 1
jne 0x404a62
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov esi, dword [ebp - 0x3c]
mov byte [ebp - 4], 0
mov ecx, dword [esi]
test ecx, ecx
jne 0x404ab5
mov eax, dword [0x4cfa10]
cmp eax, 0x4cfa10
je 0x404943
test byte [eax + 0x1c], 2
je 0x404943
cmp byte [eax + 0x19], 1
jb 0x404943
push dword [eax + 0x14]
mov edx, 0x4bba90
mov ecx, 0x34
push dword [eax + 0x10]
call fcn.00401940
add esp, 8
mov esi, 0xfffffffe
jmp 0x404dc2
mov eax, dword [esi + 8]
mov edx, 0x17
cmp word [eax], 2
mov eax, 2
cmove edx, eax
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x18], edx
call fcn.0040c3c0
cmp byte [ebx + 8], 0
je 0x404aed
mov ecx, dword [esi]
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x18], 1
call fcn.0040ccb0
mov edi, dword [ebx + 0xc]
test edi, edi
je 0x404c1f
call fcn.00472b40
mov eax, dword [esi]
mov dword [ebp - 0x24], edi
mov edi, dword [eax]
cmp edi, 0xffffffff
jne 0x404b1b
call fcn.00472b40
mov ecx, 0x2719
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
jmp 0x404b65
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x24]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.00472b40
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1c], esi
mov ecx, eax
mov dword [ebp - 0x20], ecx
test edi, edi
jne 0x404b62
call fcn.00472b40
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
mov esi, dword [ebp - 0x3c]
xor edx, edx
mov eax, fcn.00412b40
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x404ba6
mov eax, dword [0x4cfa10]
cmp eax, 0x4cfa10
je 0x404ba6
test byte [eax + 0x1c], 2
je 0x404ba6
cmp byte [eax + 0x19], 2
jb 0x404ba6
push ecx
push dword [eax + 0x14]
mov edx, 0x4bba90
mov ecx, 0x35
push dword [eax + 0x10]
call fcn.00401960
add esp, 0xc
mov ecx, dword [esi]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 4
push eax
mov dl, byte [ecx + 4]
lea eax, [ebp - 0x24]
mov ecx, dword [ecx]
push eax
push 0x1001
push 0xffff
call fcn.00419530
mov eax, dword [ebp - 0x20]
add esp, 0x14
test eax, eax
sete cl
test eax, eax
jne 0x404be8
cmp dword [ebp - 0x18], 4
jne 0x404e12
test cl, cl
je 0x404c1f
mov eax, dword [0x4cfa10]
cmp eax, 0x4cfa10
je 0x404c1f
test byte [eax + 0x1c], 2
je 0x404c1f
cmp byte [eax + 0x19], 5
jb 0x404c1f
push dword [ebp - 0x24]
mov edx, 0x4bba90
mov ecx, 0x36
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00401960
add esp, 0xc
mov edi, dword [ebx + 0x10]
test edi, edi
je 0x404d4c
call fcn.00472b40
mov eax, dword [esi]
mov dword [ebp - 0x24], edi
mov edi, dword [eax]
cmp edi, 0xffffffff
jne 0x404c4d
call fcn.00472b40
mov ecx, 0x2719
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
jmp 0x404c97
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x24]
push eax
push 0x1002
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.00472b40
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1c], esi
mov ecx, eax
mov dword [ebp - 0x20], ecx
test edi, edi
jne 0x404c94
call fcn.00472b40
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
mov esi, dword [ebp - 0x3c]
xor edx, edx
mov eax, fcn.00412b40
test ecx, ecx
cmove eax, edx
test eax, eax
je 0x404cd8
mov eax, dword [0x4cfa10]
cmp eax, 0x4cfa10
je 0x404cd8
test byte [eax + 0x1c], 2
je 0x404cd8
cmp byte [eax + 0x19], 2
jb 0x404cd8
push ecx
push dword [eax + 0x14]
mov edx, 0x4bba90
mov ecx, 0x37
push dword [eax + 0x10]
call fcn.00401960
add esp, 0xc
mov ecx, dword [esi]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 4
push eax
mov dl, byte [ecx + 4]
lea eax, [ebp - 0x24]
mov ecx, dword [ecx]
push eax
push 0x1002
push 0xffff
call fcn.00419530
mov eax, dword [ebp - 0x20]
add esp, 0x14
test eax, eax
jne 0x404d4c
cmp dword [ebp - 0x18], 4
jne 0x404e2b
test eax, eax
jne 0x404d4c
mov eax, dword [0x4cfa10]
cmp eax, 0x4cfa10
je 0x404d4c
test byte [eax + 0x1c], 2
je 0x404d4c
cmp byte [eax + 0x19], 5
jb 0x404d4c
push dword [ebp - 0x24]
mov edx, 0x4bba90
mov ecx, 0x38
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00401960
add esp, 0xc
mov edx, dword [esi + 8]
lea eax, [ebp - 0x30]
mov ecx, dword [esi]
mov esi, 0x1c
push eax
mov eax, 0x10
cmp word [edx], 2
mov ecx, dword [ecx]
cmovne eax, esi
push eax
call fcn.00419e10
mov esi, dword [ebp - 0x30]
add esp, 8
test esi, esi
je 0x404dc0
mov edx, dword [0x4cfa10]
cmp edx, 0x4cfa10
je 0x404db9
test byte [edx + 0x1c], 2
je 0x404db9
cmp byte [edx + 0x19], 1
jb 0x404db9
cmp dword [ebx + 0x2c], 0x10
lea ecx, [ebx + 0x18]
mov eax, dword [ebp - 0x40]
cmovae ecx, dword [ebx + 0x18]
movzx eax, ax
push eax
push ecx
push esi
push dword [edx + 0x14]
mov ecx, 0x39
push dword [edx + 0x10]
call fcn.00401cb0
add esp, 0x14
mov esi, 0xfffffff6
jmp 0x404dc2
xor esi, esi
mov edx, dword [ebx + 0x2c]
cmp edx, 0x10
jb 0x404df2
mov ecx, dword [ebx + 0x18]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404de8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404e44
push edx
push ecx
call fcn.00477177
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00477136
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push str.integer_socket_option_resize
lea ecx, [ebp - 0x34]
call fcn.00411ea0
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 9
call fcn.00411440
push str.integer_socket_option_resize
lea ecx, [ebp - 0x34]
call fcn.00411ea0
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0xa
call fcn.00411440
call fcn.00482289
int3