Function at 0x490ce7
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x40
mov eax, dword [0x5c9040]
xor eax, esp
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x44]
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 0x18], edx
or dword [eax], 2
push esi
push edi
lea ebx, [ebp + 0x88]
mov byte [esp + 0x17], 0
mov edi, dword [ebx + 0x8c]
xor esi, esi
mov dword [esp + 0x24], esi
test edi, edi
je 0x490d79
mov eax, dword [ebp + 0x4ac]
shr eax, 5
cmp edi, eax
jge 0x490fea
cmp byte [ebx + 0xbd], 0
jne 0x490fea
cmp byte [ebx + 0xb8], 0
jne 0x490fea
mov ecx, dword [ebx + 0x18]
mov eax, edi
sub ecx, dword [ebx + 0x20]
mov esi, dword [ebx + 0x1c]
sbb esi, dword [ebx + 0x24]
cdq
add ecx, eax
adc esi, edx
cmp ecx, dword [ebp + 0xc88]
jne 0x490d73
cmp esi, dword [ebp + 0xc8c]
je 0x490fea
mov esi, edi
mov dword [esp + 0x24], edi
mov ecx, ebp
call fcn.00490220
test eax, eax
jne 0x4911d5
test esi, esi
je 0x490da7
mov eax, dword [ebx + 0x90]
mov ecx, dword [ebp + 0x8c0]
cmp eax, ecx
je 0x490da7
push esi
push eax
push ecx
call fcn.0051c650
add esp, 0xc
cmp byte [ebx + 0xb8], 0
mov edx, dword [ebp + 0x8c0]
mov dword [ebx + 0x90], edx
jne 0x490e6f
cmp dword [ebx + 0x68], 2
mov ecx, dword [ebx + 0x94]
jne 0x490e11
cmp dword [ecx + 0x30], 2
jne 0x490e11
and dword [ebx + 0x54], 0xfffffffd
lea eax, [esp + 0x28]
push eax
mov dword [ebx + 0x68], 1
call fcn.0048ccd6
mov esi, eax
lea edi, [ebx + 0x58]
mov eax, dword [esp + 0x58]
pop ecx
mov ecx, ebp
movsd dword es:[edi], dword [esi]
and dword [eax], 0xfffffffd
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x678]
cdq
push edx
push eax
xor edx, edx
call fcn.0047f868
pop ecx
pop ecx
jmp 0x4911d3
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x200]
test dword [eax + 0x44], 0x40003
je 0x490e2d
cmp dword [ecx + 0x30], 1
sete al
jmp 0x490e31
mov al, byte [esp + 0x17]
mov byte [esp + 0x17], al
mov ecx, ebp
lea eax, [edx + esi]
mov dword [ebx + 0x90], eax
lea eax, [esp + 0x1c]
mov edx, dword [ebp + 0x4ac]
push eax
sub edx, esi
call fcn.00490298
sub dword [ebx + 0x90], esi
pop ecx
test eax, eax
jne 0x4911d5
mov edi, dword [esp + 0x1c]
mov al, byte [esp + 0x17]
add edi, esi
jne 0x490e7f
jmp 0x490e75
mov al, byte [esp + 0x17]
xor edi, edi
test byte [ebx + 0x54], 0x20
jne 0x4911d3
test edi, edi
jg 0x490e99
mov edx, ebx
mov ecx, ebp
call fcn.00490ccc
test eax, eax
je 0x4911d3
jmp 0x4911d5
mov dword [ebx + 0x8c], edi
test al, al
jne 0x490fc4
lea ecx, [ebp + 0x6b3]
mov dword [esp + 0x1c], ecx
cmp byte [ecx], al
je 0x490fc4
mov eax, dword [ebp + 0x938]
mov dword [esp + 0x18], ecx
test eax, eax
jne 0x490f00
mov eax, dword [ebp + 0x4ac]
add eax, eax
push eax
call dword [0x5c9b04]
mov dword [ebp + 0x938], eax
pop ecx
test eax, eax
jne 0x490ef6
push str.Failed_to_alloc_scratch_buffer
push ebp
call fcn.0048c1c7
pop ecx
pop ecx
push 0x1b
pop eax
jmp 0x4911d5
lea ecx, [ebp + 0x6b3]
mov dword [esp + 0x18], ecx
test esi, esi
je 0x490f1c
push esi
push dword [ebx + 0x90]
push eax
call fcn.0051c650
mov eax, dword [esp + 0x24]
add esp, 0xc
mov dword [esp + 0x1c], eax
mov edx, esi
mov ecx, esi
cmp esi, edi
jge 0x490fac
mov esi, dword [esp + 0x1c]
mov eax, dword [ebx + 0x90]
lea ebx, [ebp + 0x88]
mov al, byte [edx + eax]
mov byte [esp + 0x17], al
cmp byte [esp + 0x17], 0xa
mov eax, dword [ebp + 0x938]
jne 0x490f95
mov byte [eax + ecx], 0xd
inc ecx
mov eax, dword [ebp + 0x938]
mov byte [ecx + eax], 0xa
cmp byte [esi], 0
jne 0x490fa2
mov ebx, dword [ebp + 0xc8c]
mov eax, dword [ebp + 0xc88]
and eax, ebx
mov dword [esp + 0x18], ebx
lea ebx, [ebp + 0x88]
cmp eax, 0xffffffff
je 0x490fa2
add dword [ebp + 0xc88], 1
adc dword [esp + 0x18], 0
mov eax, dword [esp + 0x18]
mov dword [ebp + 0xc8c], eax
jmp 0x490fa2
mov bl, byte [esp + 0x17]
mov byte [eax + ecx], bl
lea ebx, [ebp + 0x88]
inc edx
inc ecx
cmp edx, edi
jl 0x490f2c
mov esi, dword [esp + 0x24]
cmp ecx, edi
je 0x490fc4
mov eax, dword [ebp + 0x938]
mov edi, ecx
mov dword [ebx + 0x90], eax
mov dword [ebx + 0x8c], ecx
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x200]
test dword [eax + 0x44], 0x30000
je 0x490fea
push esi
mov edx, edi
mov ecx, ebp
call fcn.004a13c6
pop ecx
test eax, eax
jne 0x4911d5
lea eax, [esp + 0x1c]
mov ecx, ebp
push eax
mov eax, dword [esp + 0x24]
push dword [ebx + 0x8c]
push dword [ebx + 0x90]
mov edx, dword [eax + 0x21c]
call fcn.004826e5
add esp, 0xc
test eax, eax
jne 0x4911d5
lea eax, [esp + 0x38]
push eax
call fcn.0048ccd6
mov esi, eax
lea edi, [esp + 0x2c]
sub esp, 0xc
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, esp
lea esi, [ebx + 0xa0]
sub esp, 0x10
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, eax
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.0048cd67
xor ecx, ecx
add esp, 0x20
cmp edx, ecx
jl 0x4910ac
jg 0x49105c
cmp eax, 0x3e8
jbe 0x4910ac
mov eax, dword [esp + 0x20]
push ecx
push ecx
mov esi, dword [eax + 0x21c]
lea eax, [esp + 0x20]
push eax
push 4
lea eax, [esp + 0x34]
push eax
push ecx
push ecx
push 0x4004747b
push esi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x49109e
push 4
lea eax, [esp + 0x28]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
lea esi, [esp + 0x28]
lea edi, [ebx + 0xa0]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x20]
mov eax, ecx
mov edx, dword [ebx + 0x24]
or eax, edx
mov edi, dword [esp + 0x1c]
mov eax, edi
mov dword [esp + 0x18], edx
cdq
mov esi, eax
mov dword [esp + 0x24], ecx
mov eax, edx
je 0x491114
mov dword [esp + 0x20], eax
cmp dword [esp + 0x18], eax
jg 0x4910db
jl 0x4910e5
cmp ecx, esi
jb 0x4910e5
mov ecx, esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], eax
push ecx
push dword [ebx + 0x90]
mov ecx, ebp
push 2
pop edx
call fcn.0048c137
mov eax, dword [esp + 0x2c]
sub dword [ebx + 0x20], eax
pop ecx
pop ecx
mov ecx, dword [esp + 0x18]
sbb dword [ebx + 0x24], ecx
sub esi, eax
mov eax, dword [esp + 0x20]
sbb eax, ecx
mov dword [esp + 0x20], eax
jmp 0x491118
mov dword [esp + 0x20], edx
mov ecx, esi
or ecx, eax
je 0x491152
mov eax, dword [ebx + 0x90]
mov ecx, ebp
sub eax, esi
push esi
add eax, edi
push eax
push 4
pop edx
call fcn.0048c137
add dword [ebx + 0x18], esi
mov eax, dword [esp + 0x28]
adc dword [ebx + 0x1c], eax
mov eax, dword [ebx + 0x18]
pop ecx
pop ecx
mov ecx, dword [ebx + 0x1c]
mov dword [ebp + 0x718], eax
mov dword [ebp + 0x71c], ecx
cmp byte [ebx + 0xbd], 0
je 0x491164
cmp byte [ebx + 0xbf], 0
je 0x49118e
mov eax, dword [ebx + 0x18]
cmp eax, dword [ebp + 0xc88]
jne 0x49118e
mov eax, dword [ebx + 0x1c]
cmp eax, dword [ebp + 0xc8c]
jne 0x49118e
push str.We_are_completely_uploaded_and_fine
push ebp
mov byte [ebx + 0xb8], 1
call fcn.0048c275
pop ecx
pop ecx
mov eax, dword [ebx + 0x8c]
cmp eax, edi
je 0x4911a8
sub eax, edi
add dword [ebx + 0x90], edi
mov dword [ebx + 0x8c], eax
jmp 0x4911d3
mov ecx, ebp
call fcn.00490220
test eax, eax
jne 0x4911d5
mov eax, dword [ebp + 0x8c0]
and dword [ebx + 0x8c], 0
cmp byte [ebx + 0xb8], 0
mov dword [ebx + 0x90], eax
jne 0x490e83
xor eax, eax
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0051b034
add esp, 0x40
ret