Function at 0x49f530
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 + 0x98]
or eax, dword [esi + 0x9c]
jne 0x49f567
mov eax, dword [esi + 0xa0]
or eax, dword [esi + 0xa4]
jne 0x49f567
push 7
push esi
call fcn.0049fe60
add esp, 8
mov edi, dword [ebp + 0x10]
or dword [edi], 2
cmp dword [esi + 0x144], 0
jne 0x49f736
mov eax, dword [esi + 0xca0]
test eax, eax
jne 0x49f5a1
push dword [esi + 0x900]
call dword [0x599144]
add esp, 4
mov dword [esi + 0xca0], eax
test eax, eax
je 0x49f6a6
cmp byte [esi + 0x58a], 0
mov dword [esi + 0x148], eax
jne 0x49f846
cmp dword [esi + 0x118], 2
mov ecx, dword [esi + 0x14c]
jne 0x49f610
cmp dword [ecx + 0x1a0], 2
jne 0x49f610
and dword [esi + 0x138], 0xfffffffd
lea eax, [ebp - 0x14]
push eax
mov dword [esi + 0x118], 1
call fcn.00497370
push 0
movups xmm0, xmmword [eax]
movups xmmword [esi + 0x108], xmm0
and dword [edi], 0xfffffffd
mov eax, dword [esi + 0xa70]
cdq
push edx
push eax
push esi
call fcn.00482d80
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 + 0x2e8]
test dword [eax + 0x40], 0x40003
je 0x49f62d
cmp dword [ecx + 0x1a0], 1
sete byte [ebp + 0xb]
lea eax, [ebp + 0x10]
push eax
push dword [esi + 0x900]
push edi
call fcn.0049dd10
add esp, 0xc
test eax, eax
jne 0x49f8d9
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x49f849
jle 0x49f856
mov dword [esi + 0x144], ebx
cmp byte [ebp + 0xb], al
jne 0x49f736
cmp byte [esi + 0xaa6], al
je 0x49f736
cmp dword [esi + 0xce8], eax
jne 0x49f6b2
mov eax, dword [esi + 0x900]
add eax, eax
push eax
call dword [0x599144]
add esp, 4
mov dword [esi + 0xce8], eax
test eax, eax
jne 0x49f6b2
push str.Failed_to_alloc_scratch_buffer_
push esi
call fcn.00491510
add esp, 8
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
xor ecx, ecx
xor edx, edx
test ebx, ebx
jle 0x49f720
nop word [eax + eax]
mov eax, dword [esi + 0x148]
mov bl, byte [edx + eax]
mov eax, dword [esi + 0xce8]
cmp bl, 0xa
jne 0x49f714
mov byte [eax + ecx], 0xd
inc ecx
mov eax, dword [esi + 0xce8]
mov byte [ecx + eax], bl
cmp byte [esi + 0xaa6], 0
jne 0x49f717
mov edi, dword [esi + 0xf90]
mov eax, edi
mov ebx, dword [esi + 0xf94]
and eax, ebx
cmp eax, 0xffffffff
je 0x49f717
add edi, 1
mov dword [esi + 0xf90], edi
adc ebx, 0
mov dword [esi + 0xf94], ebx
jmp 0x49f717
mov byte [eax + ecx], bl
mov ebx, dword [ebp + 0x10]
inc edx
inc ecx
cmp edx, ebx
jl 0x49f6c0
cmp ecx, ebx
je 0x49f736
mov eax, dword [esi + 0xce8]
mov dword [esi + 0x148], eax
mov dword [esi + 0x144], ecx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 4]
push eax
push dword [esi + 0x144]
push dword [esi + 0x148]
push dword [ebx + 0x310]
push ebx
call fcn.00491ac0
add esp, 0x14
test eax, eax
jne 0x49f8d9
mov edi, dword [ebx + 0x310]
push eax
push eax
lea eax, [ebp + 0x10]
push eax
push 4
lea eax, [ebp + 8]
push eax
push 0
push 0
push 0x4004747b
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x49f79d
push 4
lea eax, [ebp + 8]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [esi + 0xab9], 0
je 0x49f7ba
push dword [ebp - 4]
push dword [esi + 0x148]
push 4
push esi
call fcn.00491490
add esp, 0x10
mov eax, dword [ebp - 4]
cdq
add dword [esi + 0xa0], eax
adc dword [esi + 0xa4], edx
push dword [esi + 0xa4]
push dword [esi + 0xa0]
push esi
call fcn.0049fc50
add esp, 0xc
cmp byte [esi + 0x58e], 0
je 0x49f7f1
cmp byte [esi + 0x590], 0
je 0x49f822
mov eax, dword [esi + 0xa0]
cmp eax, dword [esi + 0xf90]
jne 0x49f822
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xf94]
jne 0x49f822
push str.We_are_completely_uploaded_and_fine_n
push esi
mov byte [esi + 0x58a], 1
call fcn.004915f0
add esp, 8
mov eax, dword [esi + 0x144]
mov ecx, dword [ebp - 4]
cmp eax, ecx
je 0x49f87a
add dword [esi + 0x148], ecx
sub eax, ecx
pop edi
mov dword [esi + 0x144], eax
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
test byte [esi + 0x138], 0x20
jne 0x49f8d7
and dword [esi + 0x138], 0xfffffffd
cmp byte [edi + 0x2b5], 0
je 0x49f8d7
push edi
call fcn.0049e5e0
add esp, 4
test eax, eax
je 0x49f8d7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xca0]
test eax, eax
jne 0x49f8a1
push dword [esi + 0x900]
call dword [0x599144]
add esp, 4
mov dword [esi + 0xca0], eax
test eax, eax
je 0x49f6a6
cmp byte [esi + 0x58a], 0
mov dword [esi + 0x148], eax
mov dword [esi + 0x144], 0
je 0x49f8d7
and dword [esi + 0x138], 0xfffffffd
cmp byte [ebx + 0x2b5], 0
je 0x49f8d7
push ebx
call fcn.0049e5e0
add esp, 4
test eax, eax
jne 0x49f8d9
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret