Function at 0x47b950
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1014
call fcn.0054f750
mov eax, dword [0x62aabc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea edi, [esi + 0x554]
test esi, esi
je 0x47b97e
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi + 0x4a8]
mov eax, ecx
mov dword [esi + 0x51c], 1
mov edx, dword [ecx + 0x7c98]
test edx, edx
je 0x47b9ab
cmp dword [ecx], 1
jne 0x47b9ab
push esi
call edx
mov eax, dword [esi + 0x4a8]
add esp, 4
mov ecx, dword [esi + 0x4b4]
mov dword [esi + 0x78], 0
cmp ecx, 0xffffffff
je 0x47bb78
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x100c], 0
push eax
push 0x8004667e
push ecx
mov ebx, 0xfffffffe
mov dword [ebp - 0x1014], 4
mov dword [ebp - 0x1010], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 1
push dword [esi + 0x4b4]
call dword [sym.imp.WS2_32.dll_shutdown]
nop word [eax + eax]
movsd xmm0, qword [0x619e70]
lea eax, [ebp - 0x1004]
sub esp, 8
movsd qword [esp], xmm0
push 0x1000
push eax
push esi
push 0
call fcn.00482be0
add esp, 0x18
test eax, eax
jg 0x47ba10
mov eax, dword [esi + 0x4ac]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x47ba84
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ebx, eax
add esp, 4
test ebx, ebx
js 0x47ba84
mov eax, 1
lea ecx, [ebx + 0x3e7]
mov word [ebp - 0x1008], ax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov word [ebp - 0x1006], ax
jmp 0x47ba95
xor eax, eax
mov dword [ebp - 0x1008], eax
cmp ebx, 0xffffffff
jl 0x47bb58
lea eax, [ebp - 0x1014]
push eax
lea eax, [ebp - 0x100c]
push eax
push 0x1007
push 0xffff
push dword [esi + 0x4b4]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
je 0x47baec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
push eax
push str.close_socket_gracefully
push str._s:_getsockopt_SOL_SOCKET_SO_ERROR__failed:__s
push 0x4605
push str.close_socket_gracefully
push 0
push esi
call fcn.00417540
add esp, 0x20
jmp 0x47bb58
cmp dword [ebp - 0x100c], 0x2746
je 0x47bb58
push 4
lea eax, [ebp - 0x1008]
push eax
push 0x80
push 0xffff
push dword [esi + 0x4b4]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x47bb58
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
push eax
movzx eax, word [ebp - 0x1006]
push eax
movzx eax, word [ebp - 0x1008]
push eax
push str.close_socket_gracefully
push str._s:_setsockopt_SOL_SOCKET_SO_LINGER__i__i___failed:__s
push 0x461c
push str.close_socket_gracefully
push 0
push esi
call fcn.00417540
add esp, 0x28
push dword [esi + 0x4b4]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esi + 0x4a8]
mov ebx, edi
mov dword [esi + 0x4b4], 0xffffffff
jmp 0x47bb7e
lea ebx, [esi + 0x554]
mov edx, dword [eax + 0x7c9c]
mov ecx, edi
test edx, edx
je 0x47bb99
cmp dword [eax], 1
mov ecx, ebx
jne 0x47bb99
push esi
call edx
add esp, 4
mov ecx, edi
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054f742
mov esp, ebp
pop ebp
ret