Function at 0x597c90
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x248
push 0
push esi
call fcn.00520480
mov ebx, dword [ebp + 0xc]
push 0x144
push 1
push ebx
call fcn.004d8260
mov edi, eax
add esp, 0x18
test edi, edi
je 0x597ed9
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
lea eax, [eax + ecx*2]
lea eax, [eax + eax*4]
lea eax, [eax*8 + 0x841838]
mov dword [edi], eax
test eax, eax
je 0x597ebb
cmp dword [eax + 0x20], 0
je 0x597ebb
push 0x60
push 1
push ebx
call fcn.004d8260
add esp, 0xc
mov dword [edi + 4], eax
test eax, eax
jne 0x597d21
push edi
push ebx
call fcn.004d84f0
add esp, 8
mov dword [esi + 0x244], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [eax], ebx
lea ecx, [edi + 0x130]
mov eax, dword [edi + 4]
mov dword [eax + 4], esi
mov eax, dword [edi + 4]
mov byte [eax + 0x58], 0
lea eax, [ecx + 8]
mov dword [ecx], eax
mov dword [ecx + 4], 0
mov dword [ecx + 0xc], ecx
mov ecx, dword [ebp + 0x10]
mov dword [eax], 0
mov dword [esi], ebx
mov dword [esi + 0x21c], 0xffffffff
mov dword [esi + 0x22c], 1
mov dword [esi + 0x244], edi
movups xmm0, xmmword [ecx]
movups xmmword [esi + 0x208], xmm0
mov eax, dword [ecx + 0x10]
mov dword [esi + 0x218], eax
mov eax, dword [ecx + 4]
cmp eax, 2
je 0x597eb2
cmp byte [ebp + 0x14], 0
je 0x597eb2
mov ecx, dword [ecx]
sub ecx, 0
je 0x597da4
sub ecx, 1
mov ecx, 2
je 0x597da9
mov ecx, 1
sub eax, 0
je 0x597dc6
sub eax, 1
je 0x597dbf
sub eax, 1
jne 0x597dc6
mov eax, 1
jmp 0x597dcb
mov eax, 0x17
jmp 0x597dcb
mov eax, 2
push 0
push ecx
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 4], eax
call fcn.004db1d0
mov dword [ebp - 8], eax
test eax, eax
je 0x597e1f
mov ecx, dword [eax]
push 0x402
push eax
mov ecx, dword [ecx + 4]
call ecx
add esp, 8
cmp eax, 5
jl 0x597e1f
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 8]
push dword [ecx]
mov eax, dword [edx]
push dword [ecx + 4]
mov ecx, dword [ebp - 4]
push ecx
mov eax, dword [eax]
push esi
push str.id_p_handle_p:_initializing_with_domain__d_and_type__d
push 0x402
push 5
push edx
call eax
add esp, 0x20
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], 1
cmp eax, 0xffffffff
je 0x597e76
lea ecx, [ebp - 0xc]
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x597e76
push dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
push esi
mov dword [esi + 0x21c], ecx
mov dword [esi + 0x220], eax
call fcn.00596830
add esp, 8
test eax, eax
je 0x597eb2
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x21c], 0xffffffff
jmp 0x597e8b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00596e30
push eax
call fcn.004d86d0
add esp, 8
push dword [edi + 4]
push ebx
call fcn.004d84f0
push edi
push ebx
call fcn.004d84f0
add esp, 0x10
mov dword [esi + 0x244], 0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push ebx
call fcn.004d84f0
push 0x41d
mov dword [esi + 0x244], 0
call fcn.004d86d0
add esp, 0xc
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret