Function at 0x58d720
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov byte [ebp + 0xb], 0
mov eax, dword [esi + 0xa0]
or eax, dword [esi + 0xa4]
jne 0x58d7ae
mov eax, dword [esi + 0xa8]
or eax, dword [esi + 0xac]
jne 0x58d7ae
lea eax, [ebp - 0x14]
push eax
call fcn.00575cf0
add esp, 4
lea edi, [esi + 0xb20]
movups xmm1, xmmword [eax]
mov eax, dword [esi + 0xc34]
test al, 2
jne 0x58d7ae
or eax, 2
mov dword [esi + 0xc34], eax
test edi, edi
je 0x58d7ae
movups xmm0, xmmword [esi + 0xb40]
sub esp, 0x10
mov eax, esp
sub esp, 0x10
movups xmmword [eax], xmm0
mov eax, esp
movups xmmword [eax], xmm1
call fcn.0057b0b0
add esp, 0x20
test edx, edx
jg 0x58d7a9
jl 0x58d7a2
cmp eax, 1
jae 0x58d7a9
mov eax, 1
xor edx, edx
add dword [edi], eax
adc dword [edi + 4], edx
mov edi, dword [ebp + 0x10]
or dword [edi], 2
cmp dword [esi + 0x14c], 0
jne 0x58d986
mov eax, dword [esi + 0xc60]
test eax, eax
jne 0x58d7e8
push dword [esi + 0x8e8]
call dword [0x7f1528]
add esp, 4
mov dword [esi + 0xc60], eax
test eax, eax
je 0x58d8ee
test byte [esi + 0x590], 4
mov dword [esi + 0x150], eax
jne 0x58db12
cmp dword [esi + 0x120], 2
mov ecx, dword [esi + 0x154]
jne 0x58d857
cmp dword [ecx + 0x1a0], 2
jne 0x58d857
and dword [esi + 0x140], 0xfffffffd
lea eax, [ebp - 0x14]
push eax
mov dword [esi + 0x120], 1
call fcn.00575cf0
push 0
movups xmm0, xmmword [eax]
movups xmmword [esi + 0x110], xmm0
and dword [edi], 0xfffffffd
mov eax, dword [esi + 0xa5c]
cdq
push edx
push eax
push esi
call fcn.0056f010
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 0x2a8]
test dword [eax + 0x40], 0x40003
je 0x58d874
cmp dword [ecx + 0x1a0], 1
sete byte [ebp + 0xb]
lea eax, [ebp + 0x10]
push eax
push dword [esi + 0x8e8]
push edi
call fcn.0056f480
add esp, 0xc
test eax, eax
jne 0x58dbbb
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x58db15
jle 0x58db22
mov dword [esi + 0x14c], ebx
cmp byte [ebp + 0xb], al
jne 0x58d986
test byte [esi + 0xa8c], 0x40
je 0x58d986
cmp dword [esi + 0xca8], eax
jne 0x58d8fa
mov eax, dword [esi + 0x8e8]
add eax, eax
push eax
call dword [0x7f1528]
add esp, 4
mov dword [esi + 0xca8], eax
test eax, eax
jne 0x58d8fa
push str.Failed_to_alloc_scratch_buffer_
push esi
call fcn.0056f390
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ecx, ecx
xor edx, edx
test ebx, ebx
jle 0x58d970
nop dword [eax]
nop word [eax + eax]
mov eax, dword [esi + 0x150]
mov bl, byte [edx + eax]
mov eax, dword [esi + 0xca8]
cmp bl, 0xa
jne 0x58d964
mov byte [eax + ecx], 0xd
inc ecx
mov eax, dword [esi + 0xca8]
mov byte [ecx + eax], bl
test byte [esi + 0xa8c], 0x40
jne 0x58d967
mov edi, dword [esi + 0xf20]
mov eax, edi
mov ebx, dword [esi + 0xf24]
and eax, ebx
cmp eax, 0xffffffff
je 0x58d967
add edi, 1
mov dword [esi + 0xf20], edi
adc ebx, 0
mov dword [esi + 0xf24], ebx
jmp 0x58d967
mov byte [eax + ecx], bl
mov ebx, dword [ebp + 0x10]
inc edx
inc ecx
cmp edx, ebx
jl 0x58d910
cmp ecx, ebx
je 0x58d986
mov eax, dword [esi + 0xca8]
mov dword [esi + 0x150], eax
mov dword [esi + 0x14c], ecx
mov ebx, dword [ebp + 0xc]
xor ecx, ecx
mov dword [ebp + 8], 0
mov eax, dword [ebx + 0x2d0]
cmp eax, dword [ebx + 0x1ac]
lea eax, [ebp + 8]
push eax
push dword [esi + 0x14c]
sete cl
push dword [esi + 0x150]
push ecx
mov eax, dword [ebx + ecx*4 + 0x1c4]
push ebx
call eax
mov edi, eax
add esp, 0x14
test edi, edi
jns 0x58d9db
mov eax, dword [ebp + 8]
test eax, eax
je 0x58db4d
cmp eax, 0x51
jne 0x58dbbb
xor edi, edi
mov eax, dword [ebx + 0x2d0]
lea ecx, [ebp - 4]
push 0
push 0
push ecx
push 4
lea ecx, [ebp + 8]
mov dword [ebp + 0x10], eax
push ecx
push 0
push 0
push 0x4004747b
push eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x58da1f
push 4
lea eax, [ebp + 8]
push eax
push 0x1001
push 0xffff
push dword [ebp + 0x10]
call dword [sym.imp.WS2_32.dll_setsockopt]
test dword [esi + 0xa8c], 0x4000000
je 0x58da86
cmp dword [esi + 0x608], 0
mov ecx, dword [esi + 0x150]
je 0x58da86
mov eax, dword [esi + 0x88]
test eax, eax
jne 0x58da4e
mov eax, dword [esi + 0x84]
test eax, eax
je 0x58da55
mov byte [eax + 0x108], 1
push dword [esi + 0x59c]
mov eax, dword [esi + 0x608]
push edi
push ecx
push 4
push esi
call eax
mov eax, dword [esi + 0x88]
add esp, 0x14
test eax, eax
jne 0x58da7f
mov eax, dword [esi + 0x84]
test eax, eax
je 0x58da86
mov byte [eax + 0x108], 0
add dword [esi + 0xa8], edi
mov eax, dword [esi + 0xa8]
adc dword [esi + 0xac], 0
mov ecx, dword [esi + 0xac]
mov dword [esi + 0xad0], eax
mov dword [esi + 0xad4], ecx
mov ecx, dword [esi + 0x590]
test cl, 0x40
je 0x58dabe
test ecx, 0x100
je 0x58daf1
mov eax, dword [esi + 0xa8]
cmp eax, dword [esi + 0xf20]
jne 0x58daf1
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xf24]
jne 0x58daf1
or ecx, 4
push str.We_are_completely_uploaded_and_fine_n
push esi
mov dword [esi + 0x590], ecx
call fcn.005738f0
add esp, 8
mov eax, dword [esi + 0x14c]
cmp eax, edi
je 0x58db59
add dword [esi + 0x150], edi
sub eax, edi
mov dword [esi + 0x14c], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
test byte [esi + 0x140], 0x20
jne 0x58dbb9
and dword [esi + 0x140], 0xfffffffd
test dword [edi + 0x284], 0x10000
je 0x58dbb9
push edi
call fcn.00578540
add esp, 4
test eax, eax
je 0x58dbb9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x37
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc60]
test eax, eax
jne 0x58db80
push dword [esi + 0x8e8]
call dword [0x7f1528]
add esp, 4
mov dword [esi + 0xc60], eax
test eax, eax
je 0x58d8ee
test byte [esi + 0x590], 4
mov dword [esi + 0x150], eax
mov dword [esi + 0x14c], 0
je 0x58dbb9
and dword [esi + 0x140], 0xfffffffd
test dword [ebx + 0x284], 0x10000
je 0x58dbb9
push ebx
call fcn.00578540
add esp, 4
test eax, eax
jne 0x58dbbb
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret