Function at 0x596830
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x83e264]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x20c]
cmp eax, dword [esi + 4]
jne 0x596aa5
mov eax, dword [edi + 0x208]
cmp eax, dword [esi]
jne 0x596aa5
push ebx
call fcn.004db1d0
mov ebx, eax
test ebx, ebx
je 0x5968b7
mov ecx, dword [ebx]
push 0x402
push ebx
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 5
jl 0x5968b7
movzx eax, word [esi + 0x10]
mov ecx, dword [ebx]
push eax
movzx eax, word [esi + 0xc]
push eax
movzx eax, word [esi + 0xe]
push eax
movzx eax, byte [esi + 0x12]
push eax
push dword [edi + 0x21c]
mov eax, dword [ecx]
push edi
push str.id_p_handle_p:_setting_socket_options_to:_keep_alive__d__keep_idle__d__keep_alive_interval__d__max_failed_probe_count__d
push 0x402
push 5
push ebx
call eax
add esp, 0x28
movups xmm0, xmmword [esi]
movups xmmword [edi + 0x208], xmm0
mov eax, dword [esi + 0x10]
mov dword [edi + 0x218], eax
cmp dword [edi + 0x20c], 2
je 0x596a92
cmp dword [edi + 0x208], 0
jne 0x596a92
cmp byte [edi + 0x21a], 0
mov ecx, dword [sym.imp.WS2_32.dll_setsockopt]
je 0x596a29
cmp word [edi + 0x214], 0
je 0x5969be
movzx eax, word [edi + 0x216]
test ax, ax
je 0x5969be
push 0
push 0x3e8
cdq
push 1
push edx
push eax
call fcn.004dd790
push 0
mov esi, eax
movzx eax, word [edi + 0x214]
push 0x3e8
cdq
push 1
push edx
push eax
call fcn.004dd790
add esp, 0x28
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x10], 1
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], 0
push 0
push 0
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push dword [edi + 0x21c]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x596a23
call fcn.004db1d0
mov ebx, eax
test ebx, ebx
je 0x596a23
mov ecx, dword [ebx]
push 0x402
push ebx
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 3
jl 0x596a23
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [ebx]
call eax
push eax
push dword [edi + 0x21c]
push edi
push str.id_p_handle_p:_WSAIoctl___call_for_setting_keep_alive_values_failed_with_WSAError__d
jmp 0x596a14
push 4
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push eax
push 8
push 0xffff
push dword [edi + 0x21c]
call ecx
test eax, eax
je 0x596a23
call fcn.004db1d0
mov ebx, eax
test ebx, ebx
je 0x596a23
mov ecx, dword [ebx]
push 0x402
push ebx
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 3
jl 0x596a23
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [ebx]
call eax
push eax
push dword [edi + 0x21c]
push edi
push str.id_p_handle_p:_setsockopt___call_for_enabling_keep_alive_failed_with_WSAError__d
mov eax, dword [esi]
push 0x402
push 3
push ebx
call eax
add esp, 0x1c
mov ecx, dword [sym.imp.WS2_32.dll_setsockopt]
movzx eax, word [edi + 0x218]
test ax, ax
je 0x596a92
push 4
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 0x10
push 6
push dword [edi + 0x21c]
call ecx
test eax, eax
je 0x596a92
call fcn.004db1d0
mov ebx, eax
test ebx, ebx
je 0x596a92
mov ecx, dword [ebx]
push 0x402
push ebx
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 3
jl 0x596a92
mov esi, dword [ebx]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [edi + 0x21c]
mov eax, dword [esi]
push edi
push str.id_p_handle_p:_setsockopt___call_for_setting_keep_alive_probe_count_value_failed_with_WSAError__d._This_likely_isnt_a_problem._Its_more_likely_youre_on_an_old_version_of_windows._This_feature_was_added_in_Windows_10_1703
push 0x402
push 3
push ebx
call eax
add esp, 0x1c
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051deb6
mov esp, ebp
pop ebp
ret
push 0x41d
call fcn.004d86d0
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
or eax, 0xffffffff
pop edi
pop esi
call fcn.0051deb6
mov esp, ebp
pop ebp
ret