Function at 0x4aa770
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 0x4aa7ab
mov eax, dword [esi + 0xa0]
or eax, dword [esi + 0xa4]
jne 0x4aa7ab
push 7
lea eax, [ebp - 0x18]
push esi
push eax
call fcn.0049d180
add esp, 0xc
mov edi, dword [ebp + 0x10]
or dword [edi], 2
cmp dword [esi + 0x134], 0
jne 0x4aa986
cmp dword [esi + 0x8e8], 0
jne 0x4aa7e4
push dword [esi + 0x4dc]
call dword [0x5a8090]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
je 0x4aa8f1
cmp byte [esi + 0x146], 0
mov eax, dword [esi + 0x8e8]
mov dword [esi + 0x138], eax
jne 0x4aaa54
cmp dword [esi + 0x110], 2
mov ecx, dword [esi + 0x13c]
jne 0x4aa85b
cmp dword [ecx + 0x1a0], 2
jne 0x4aa85b
and dword [esi + 0xfc], 0xfffffffd
lea eax, [ebp - 0x18]
push eax
mov dword [esi + 0x110], 1
call fcn.004a5370
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.0048f8e0
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 0x4aa878
cmp dword [ecx + 0x1a0], 1
sete byte [ebp - 1]
lea eax, [ebp + 0x10]
push eax
push dword [esi + 0x4dc]
push esi
call fcn.004a8f00
add esp, 0xc
test eax, eax
jne 0x4aabac
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x4aaa54
jle 0x4aaa61
mov dword [esi + 0x134], ebx
cmp byte [ebp - 1], al
jne 0x4aa986
cmp byte [esi + 0x6de], al
je 0x4aa986
cmp dword [esi + 0x94c], eax
jne 0x4aa8fd
mov eax, dword [esi + 0x4dc]
add eax, eax
push eax
call dword [0x5a8090]
add esp, 4
mov dword [esi + 0x94c], eax
test eax, eax
jne 0x4aa8fd
push str.Failed_to_alloc_scratch_buffer_
push esi
call fcn.00495050
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 0x4aa970
jmp 0x4aa910
mov eax, dword [esi + 0x138]
mov bl, byte [edx + eax]
mov eax, dword [esi + 0x94c]
cmp bl, 0xa
jne 0x4aa964
mov byte [ecx + eax], 0xd
inc ecx
mov eax, dword [esi + 0x94c]
mov byte [ecx + eax], bl
cmp byte [esi + 0x6de], 0
jne 0x4aa967
mov edi, dword [esi + 0xc30]
mov eax, edi
mov ebx, dword [esi + 0xc34]
and eax, ebx
cmp eax, 0xffffffff
je 0x4aa967
add edi, 1
mov dword [esi + 0xc30], edi
adc ebx, 0
mov dword [esi + 0xc34], ebx
jmp 0x4aa967
mov byte [ecx + eax], bl
mov ebx, dword [ebp + 0x10]
inc edx
inc ecx
cmp edx, ebx
jl 0x4aa910
cmp ecx, ebx
je 0x4aa986
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.00495510
add esp, 0x14
test eax, eax
jne 0x4aabac
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 0x4aa9ed
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 0x4aaa90
mov eax, dword [ebp + 8]
cdq
cmp edi, edx
jg 0x4aaa17
jl 0x4aaa21
cmp ebx, eax
jb 0x4aaa21
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.00494fc0
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 0x4aaa9d
test byte [esi + 0xfc], 0x20
jne 0x4aabaa
mov eax, dword [esi + 0xc]
and dword [esi + 0xfc], 0xfffffffd
cmp byte [eax + 0x262], 0
je 0x4aabaa
push esi
call fcn.004a98f0
add esp, 4
test eax, eax
je 0x4aabaa
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 0x4aaade
mov eax, dword [esi + 0x138]
sub eax, ebx
push ebx
add eax, edi
push eax
push 4
push esi
call fcn.00494fc0
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.0049d060
mov edi, dword [ebp + 8]
add esp, 0x1c
cmp byte [esi + 0x14a], 0
je 0x4aaaf0
cmp byte [esi + 0x14c], 0
je 0x4aab24
mov eax, dword [esi + 0xa0]
cmp eax, dword [esi + 0xc30]
jne 0x4aab24
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xc34]
jne 0x4aab24
push str.We_are_completely_uploaded_and_fine_n
push esi
mov byte [esi + 0x146], 1
call fcn.00495170
mov edi, dword [ebp + 8]
add esp, 8
mov eax, dword [esi + 0x134]
cmp eax, edi
je 0x4aab45
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 0x4aab6b
push dword [esi + 0x4dc]
call dword [0x5a8090]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
je 0x4aa8f1
cmp byte [esi + 0x146], 0
mov eax, dword [esi + 0x8e8]
mov dword [esi + 0x138], eax
mov dword [esi + 0x134], 0
je 0x4aabaa
mov eax, dword [esi + 0xc]
and dword [esi + 0xfc], 0xfffffffd
cmp byte [eax + 0x262], 0
je 0x4aabaa
push esi
call fcn.004a98f0
add esp, 4
test eax, eax
jne 0x4aabac
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret