Function at 0x4ade80
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 0x4adebb
mov eax, dword [esi + 0xa0]
or eax, dword [esi + 0xa4]
jne 0x4adebb
push 7
lea eax, [ebp - 0x18]
push esi
push eax
call fcn.004a0890
add esp, 0xc
mov edi, dword [ebp + 0x10]
or dword [edi], 2
cmp dword [esi + 0x134], 0
jne 0x4ae096
cmp dword [esi + 0x8e8], 0
jne 0x4adef4
push dword [esi + 0x4dc]
call dword [0x5ac090]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
je 0x4ae001
cmp byte [esi + 0x146], 0
mov eax, dword [esi + 0x8e8]
mov dword [esi + 0x138], eax
jne 0x4ae164
cmp dword [esi + 0x110], 2
mov ecx, dword [esi + 0x13c]
jne 0x4adf6b
cmp dword [ecx + 0x1a0], 2
jne 0x4adf6b
and dword [esi + 0xfc], 0xfffffffd
lea eax, [ebp - 0x18]
push eax
mov dword [esi + 0x110], 1
call fcn.004a8a80
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.00492fe0
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 0x4adf88
cmp dword [ecx + 0x1a0], 1
sete byte [ebp - 1]
lea eax, [ebp + 0x10]
push eax
push dword [esi + 0x4dc]
push esi
call fcn.004ac610
add esp, 0xc
test eax, eax
jne 0x4ae2bc
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x4ae164
jle 0x4ae171
mov dword [esi + 0x134], ebx
cmp byte [ebp - 1], al
jne 0x4ae096
cmp byte [esi + 0x6de], al
je 0x4ae096
cmp dword [esi + 0x94c], eax
jne 0x4ae00d
mov eax, dword [esi + 0x4dc]
add eax, eax
push eax
call dword [0x5ac090]
add esp, 4
mov dword [esi + 0x94c], eax
test eax, eax
jne 0x4ae00d
push str.Failed_to_alloc_scratch_buffer_
push esi
call fcn.00498770
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 0x4ae080
jmp 0x4ae020
mov eax, dword [esi + 0x138]
mov bl, byte [edx + eax]
mov eax, dword [esi + 0x94c]
cmp bl, 0xa
jne 0x4ae074
mov byte [ecx + eax], 0xd
inc ecx
mov eax, dword [esi + 0x94c]
mov byte [ecx + eax], bl
cmp byte [esi + 0x6de], 0
jne 0x4ae077
mov edi, dword [esi + 0xc30]
mov eax, edi
mov ebx, dword [esi + 0xc34]
and eax, ebx
cmp eax, 0xffffffff
je 0x4ae077
add edi, 1
mov dword [esi + 0xc30], edi
adc ebx, 0
mov dword [esi + 0xc34], ebx
jmp 0x4ae077
mov byte [ecx + eax], bl
mov ebx, dword [ebp + 0x10]
inc edx
inc ecx
cmp edx, ebx
jl 0x4ae020
cmp ecx, ebx
je 0x4ae096
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.00498c30
add esp, 0x14
test eax, eax
jne 0x4ae2bc
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 0x4ae0fd
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 0x4ae1a0
mov eax, dword [ebp + 8]
cdq
cmp edi, edx
jg 0x4ae127
jl 0x4ae131
cmp ebx, eax
jb 0x4ae131
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.004986e0
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 0x4ae1ad
test byte [esi + 0xfc], 0x20
jne 0x4ae2ba
mov eax, dword [esi + 0xc]
and dword [esi + 0xfc], 0xfffffffd
cmp byte [eax + 0x262], 0
je 0x4ae2ba
push esi
call fcn.004ad000
add esp, 4
test eax, eax
je 0x4ae2ba
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 0x4ae1ee
mov eax, dword [esi + 0x138]
sub eax, ebx
push ebx
add eax, edi
push eax
push 4
push esi
call fcn.004986e0
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.004a0770
mov edi, dword [ebp + 8]
add esp, 0x1c
cmp byte [esi + 0x14a], 0
je 0x4ae200
cmp byte [esi + 0x14c], 0
je 0x4ae234
mov eax, dword [esi + 0xa0]
cmp eax, dword [esi + 0xc30]
jne 0x4ae234
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xc34]
jne 0x4ae234
push str.We_are_completely_uploaded_and_fine_n
push esi
mov byte [esi + 0x146], 1
call fcn.00498890
mov edi, dword [ebp + 8]
add esp, 8
mov eax, dword [esi + 0x134]
cmp eax, edi
je 0x4ae255
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 0x4ae27b
push dword [esi + 0x4dc]
call dword [0x5ac090]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
je 0x4ae001
cmp byte [esi + 0x146], 0
mov eax, dword [esi + 0x8e8]
mov dword [esi + 0x138], eax
mov dword [esi + 0x134], 0
je 0x4ae2ba
mov eax, dword [esi + 0xc]
and dword [esi + 0xfc], 0xfffffffd
cmp byte [eax + 0x262], 0
je 0x4ae2ba
push esi
call fcn.004ad000
add esp, 4
test eax, eax
jne 0x4ae2bc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret