Function at 0x4af280
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov byte [ebp - 1], 0
mov eax, dword [esi + 0x98]
or eax, dword [esi + 0x9c]
jne 0x4af2bb
mov eax, dword [esi + 0xa0]
or eax, dword [esi + 0xa4]
jne 0x4af2bb
push 7
lea eax, [ebp - 0x18]
push esi
push eax
call fcn.004a1c90
add esp, 0xc
mov edi, dword [ebp + 0x10]
or dword [edi], 2
cmp dword [esi + 0x134], 0
jne 0x4af496
cmp dword [esi + 0x8e8], 0
jne 0x4af2f4
push dword [esi + 0x4dc]
call dword [0x5ae090]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
je 0x4af401
cmp byte [esi + 0x146], 0
mov eax, dword [esi + 0x8e8]
mov dword [esi + 0x138], eax
jne 0x4af564
cmp dword [esi + 0x110], 2
mov ecx, dword [esi + 0x13c]
jne 0x4af36b
cmp dword [ecx + 0x1a0], 2
jne 0x4af36b
and dword [esi + 0xfc], 0xfffffffd
lea eax, [ebp - 0x18]
push eax
mov dword [esi + 0x110], 1
call fcn.004a9e80
push 0
movdqu xmm0, xmmword [eax]
movdqu xmmword [esi + 0x100], xmm0
and dword [edi], 0xfffffffd
mov eax, dword [esi + 0x6a8]
cdq
push edx
push eax
push esi
call fcn.004943c0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x298]
test dword [eax + 0x40], 0x40003
je 0x4af388
cmp dword [ecx + 0x1a0], 1
sete byte [ebp - 1]
lea eax, [ebp + 0x10]
push eax
push dword [esi + 0x4dc]
push esi
call fcn.004ada10
add esp, 0xc
test eax, eax
jne 0x4af6bc
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x4af564
jle 0x4af571
mov dword [esi + 0x134], ebx
cmp byte [ebp - 1], al
jne 0x4af496
cmp byte [esi + 0x6de], al
je 0x4af496
cmp dword [esi + 0x94c], eax
jne 0x4af40d
mov eax, dword [esi + 0x4dc]
add eax, eax
push eax
call dword [0x5ae090]
add esp, 4
mov dword [esi + 0x94c], eax
test eax, eax
jne 0x4af40d
push str.Failed_to_alloc_scratch_buffer_
push esi
call fcn.00499b70
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 0x4af480
jmp 0x4af420
mov eax, dword [esi + 0x138]
mov bl, byte [edx + eax]
mov eax, dword [esi + 0x94c]
cmp bl, 0xa
jne 0x4af474
mov byte [ecx + eax], 0xd
inc ecx
mov eax, dword [esi + 0x94c]
mov byte [ecx + eax], bl
cmp byte [esi + 0x6de], 0
jne 0x4af477
mov edi, dword [esi + 0xc30]
mov eax, edi
mov ebx, dword [esi + 0xc34]
and eax, ebx
cmp eax, 0xffffffff
je 0x4af477
add edi, 1
mov dword [esi + 0xc30], edi
adc ebx, 0
mov dword [esi + 0xc34], ebx
jmp 0x4af477
mov byte [ecx + eax], bl
mov ebx, dword [ebp + 0x10]
inc edx
inc ecx
cmp edx, ebx
jl 0x4af420
cmp ecx, ebx
je 0x4af496
mov eax, dword [esi + 0x94c]
mov dword [esi + 0x138], eax
mov dword [esi + 0x134], ecx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp + 8]
push eax
push dword [esi + 0x134]
push dword [esi + 0x138]
push dword [ebx + 0x2b4]
push esi
call fcn.0049a030
add esp, 0x14
test eax, eax
jne 0x4af6bc
mov edi, dword [ebx + 0x2b4]
push eax
push eax
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp + 0x10]
push eax
push 0
push 0
push 0x4004747b
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x4af4fd
push 4
lea eax, [ebp + 0x10]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ebx, dword [esi + 0xb8]
mov eax, ebx
mov edi, dword [esi + 0xbc]
or eax, edi
mov dword [ebp + 0x10], ebx
mov dword [ebp - 8], edi
je 0x4af5a0
mov eax, dword [ebp + 8]
cdq
cmp edi, edx
jg 0x4af527
jl 0x4af531
cmp ebx, eax
jb 0x4af531
mov ebx, eax
mov dword [ebp + 0x10], eax
mov edi, edx
mov dword [ebp - 8], edx
push ebx
push dword [esi + 0x138]
push 2
push esi
call fcn.00499ae0
add esp, 0x10
sub dword [esi + 0xb8], ebx
sbb dword [esi + 0xbc], edi
mov edi, dword [ebp + 8]
mov eax, edi
cdq
mov ebx, eax
mov eax, edx
sub ebx, dword [ebp + 0x10]
sbb eax, dword [ebp - 8]
mov dword [ebp + 0x10], eax
jmp 0x4af5ad
test byte [esi + 0xfc], 0x20
jne 0x4af6ba
mov eax, dword [esi + 0xc]
and dword [esi + 0xfc], 0xfffffffd
cmp byte [eax + 0x262], 0
je 0x4af6ba
push esi
call fcn.004ae400
add esp, 4
test eax, eax
je 0x4af6ba
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
mov eax, edi
cdq
mov ebx, eax
mov dword [ebp + 0x10], edx
mov eax, edx
mov ecx, ebx
or ecx, eax
je 0x4af5ee
mov eax, dword [esi + 0x138]
sub eax, ebx
push ebx
add eax, edi
push eax
push 4
push esi
call fcn.00499ae0
add dword [esi + 0xa0], ebx
mov eax, dword [ebp + 0x10]
adc dword [esi + 0xa4], eax
push dword [esi + 0xa4]
push dword [esi + 0xa0]
push esi
call fcn.004a1b70
mov edi, dword [ebp + 8]
add esp, 0x1c
cmp byte [esi + 0x14a], 0
je 0x4af600
cmp byte [esi + 0x14c], 0
je 0x4af634
mov eax, dword [esi + 0xa0]
cmp eax, dword [esi + 0xc30]
jne 0x4af634
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xc34]
jne 0x4af634
push str.We_are_completely_uploaded_and_fine_n
push esi
mov byte [esi + 0x146], 1
call fcn.00499c90
mov edi, dword [ebp + 8]
add esp, 8
mov eax, dword [esi + 0x134]
cmp eax, edi
je 0x4af655
add dword [esi + 0x138], edi
sub eax, edi
pop edi
mov dword [esi + 0x134], eax
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x8e8], 0
jne 0x4af67b
push dword [esi + 0x4dc]
call dword [0x5ae090]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
je 0x4af401
cmp byte [esi + 0x146], 0
mov eax, dword [esi + 0x8e8]
mov dword [esi + 0x138], eax
mov dword [esi + 0x134], 0
je 0x4af6ba
mov eax, dword [esi + 0xc]
and dword [esi + 0xfc], 0xfffffffd
cmp byte [eax + 0x262], 0
je 0x4af6ba
push esi
call fcn.004ae400
add esp, 4
test eax, eax
jne 0x4af6bc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret