Function at 0x4a03f0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov byte [ebp - 1], 0
mov eax, dword [esi + 0x90]
or eax, dword [esi + 0x94]
jne 0x4a042b
mov eax, dword [esi + 0x98]
or eax, dword [esi + 0x9c]
jne 0x4a042b
push 7
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.004a0ca0
add esp, 0xc
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 8], ebx
or dword [eax], 2
mov edi, dword [esi + 0x11c]
test edi, edi
je 0x4a04a3
mov eax, dword [esi + 0x4b4]
shr eax, 5
cmp edi, eax
jge 0x4a0497
cmp byte [esi + 0x149], bl
jne 0x4a0497
cmp byte [esi + 0x144], bl
jne 0x4a0497
mov ecx, dword [esi + 0x98]
sub ecx, dword [esi + 0xb0]
mov eax, dword [esi + 0x9c]
sbb eax, dword [esi + 0xb4]
mov dword [ebp - 0xc], eax
mov eax, edi
cdq
add ecx, eax
mov eax, dword [ebp - 0xc]
adc eax, edx
cmp ecx, dword [esi + 0xc78]
jne 0x4a0492
cmp eax, dword [esi + 0xc7c]
je 0x4a0497
mov ebx, edi
mov dword [ebp - 8], edi
test edi, edi
je 0x4a04a3
test ebx, ebx
je 0x4a06e4
cmp dword [esi + 0x8b8], 0
jne 0x4a04c9
push dword [esi + 0x4b4]
call dword [0x57a348]
add esp, 4
mov dword [esi + 0x8b8], eax
test eax, eax
je 0x4a0610
test ebx, ebx
je 0x4a04eb
mov eax, dword [esi + 0x8b8]
cmp dword [esi + 0x120], eax
je 0x4a04eb
push ebx
push dword [esi + 0x120]
push eax
call fcn.004fad80
add esp, 0xc
cmp byte [esi + 0x144], 0
mov edx, dword [esi + 0x8b8]
mov dword [esi + 0x120], edx
jne 0x4a08f6
cmp dword [esi + 0xf8], 2
mov ecx, dword [esi + 0x124]
jne 0x4a0563
cmp dword [ecx + 0x1a8], 2
jne 0x4a0563
and dword [esi + 0xe4], 0xfffffffd
lea eax, [ebp - 0x1c]
push eax
mov dword [esi + 0xf8], 1
call fcn.00486ff0
push 0
movups xmm0, xmmword [eax]
mov eax, dword [ebp + 0x10]
movups xmmword [esi + 0xe8], xmm0
and dword [eax], 0xfffffffd
mov eax, dword [esi + 0x684]
cdq
push edx
push eax
push esi
call fcn.004812a0
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 + 0x1e0]
test dword [eax + 0x44], 0x40003
je 0x4a0580
cmp dword [ecx + 0x1a8], 1
sete byte [ebp - 1]
lea eax, [edx + ebx]
mov dword [esi + 0x120], eax
lea eax, [ebp + 0x10]
push eax
mov eax, dword [esi + 0x4b4]
sub eax, ebx
push eax
push esi
call fcn.0049e910
sub dword [esi + 0x120], ebx
add esp, 0xc
test eax, eax
jne 0x4a0911
mov edx, dword [ebp + 0x10]
add edx, ebx
mov dword [ebp + 0x10], edx
je 0x4a08f6
test edx, edx
jle 0x4a08ff
mov dword [esi + 0x11c], edx
cmp byte [ebp - 1], al
jne 0x4a06bf
cmp byte [esi + 0x6b7], al
je 0x4a06bf
cmp dword [esi + 0x924], eax
jne 0x4a061c
mov eax, dword [esi + 0x4b4]
add eax, eax
push eax
call dword [0x57a348]
add esp, 4
mov dword [esi + 0x924], eax
test eax, eax
jne 0x4a061c
push str.Failed_to_alloc_scratch_buffer
push esi
call fcn.004929d0
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x4a0635
push ebx
push dword [esi + 0x120]
push dword [esi + 0x924]
call fcn.004fc8a0
add esp, 0xc
mov edx, ebx
mov ecx, ebx
cmp ebx, dword [ebp + 0x10]
jge 0x4a06a4
nop
mov eax, dword [esi + 0x120]
mov bl, byte [edx + eax]
mov eax, dword [esi + 0x924]
cmp bl, 0xa
jne 0x4a0694
mov byte [ecx + eax], 0xd
inc ecx
mov eax, dword [esi + 0x924]
mov byte [ecx + eax], bl
cmp byte [esi + 0x6b7], 0
jne 0x4a0697
mov edi, dword [esi + 0xc78]
mov eax, edi
mov ebx, dword [esi + 0xc7c]
and eax, ebx
cmp eax, 0xffffffff
je 0x4a0697
add edi, 1
mov dword [esi + 0xc78], edi
adc ebx, 0
mov dword [esi + 0xc7c], ebx
jmp 0x4a0697
mov byte [ecx + eax], bl
inc edx
inc ecx
cmp edx, dword [ebp + 0x10]
jl 0x4a0640
mov ebx, dword [ebp - 8]
mov edi, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
cmp ecx, edx
je 0x4a06bf
mov eax, dword [esi + 0x924]
mov edx, ecx
mov dword [esi + 0x120], eax
mov dword [esi + 0x11c], ecx
mov eax, dword [edi + 0x1e0]
test dword [eax + 0x44], 0x30000
je 0x4a06e7
push ebx
push edx
push esi
call fcn.004b4e30
add esp, 0xc
test eax, eax
je 0x4a06e7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
lea eax, [ebp + 8]
push eax
push dword [esi + 0x11c]
push dword [esi + 0x120]
push dword [edi + 0x1fc]
push esi
call fcn.00492b90
add esp, 0x14
test eax, eax
jne 0x4a0911
lea eax, [ebp - 0x2c]
push eax
call fcn.00486ff0
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x1c], xmm0
movups xmm0, xmmword [esi + 0x130]
movups xmmword [ecx], xmm0
mov ecx, esp
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call fcn.00487090
add esp, 0x20
test edx, edx
jl 0x4a0797
jg 0x4a074d
cmp eax, 0x3e8
jbe 0x4a0797
mov edi, dword [edi + 0x1fc]
lea eax, [ebp - 0xc]
push 0
push 0
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 0x4a078c
push 4
lea eax, [ebp + 0x10]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
movups xmm0, xmmword [ebp - 0x1c]
movups xmmword [esi + 0x130], xmm0
mov ebx, dword [esi + 0xb0]
mov eax, ebx
mov edi, dword [esi + 0xb4]
or eax, edi
mov dword [ebp + 0x10], ebx
mov dword [ebp - 8], edi
je 0x4a07fa
mov eax, dword [ebp + 8]
cdq
cmp edi, edx
jg 0x4a07bd
jl 0x4a07c7
cmp ebx, eax
jb 0x4a07c7
mov ebx, eax
mov dword [ebp + 0x10], eax
mov edi, edx
mov dword [ebp - 8], edx
push ebx
push dword [esi + 0x120]
push 2
push esi
call fcn.00492940
add esp, 0x10
sub dword [esi + 0xb0], ebx
sbb dword [esi + 0xb4], 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 0x4a0807
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 0x4a0848
mov eax, dword [esi + 0x120]
sub eax, ebx
push ebx
add eax, edi
push eax
push 4
push esi
call fcn.00492940
add dword [esi + 0x98], ebx
mov eax, dword [ebp + 0x10]
adc dword [esi + 0x9c], eax
push dword [esi + 0x9c]
push dword [esi + 0x98]
push esi
call fcn.004a0b60
mov edi, dword [ebp + 8]
add esp, 0x1c
cmp byte [esi + 0x149], 0
je 0x4a085a
cmp byte [esi + 0x14b], 0
je 0x4a088e
mov eax, dword [esi + 0x98]
cmp eax, dword [esi + 0xc78]
jne 0x4a088e
mov eax, dword [esi + 0x9c]
cmp eax, dword [esi + 0xc7c]
jne 0x4a088e
push str.We_are_completely_uploaded_and_fine
push esi
mov byte [esi + 0x144], 1
call fcn.00492a90
mov edi, dword [ebp + 8]
add esp, 8
mov eax, dword [esi + 0x11c]
cmp eax, edi
je 0x4a08af
add dword [esi + 0x120], edi
sub eax, edi
mov dword [esi + 0x11c], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x8b8], 0
jne 0x4a08d5
push dword [esi + 0x4b4]
call dword [0x57a348]
add esp, 4
mov dword [esi + 0x8b8], eax
test eax, eax
je 0x4a0610
cmp byte [esi + 0x144], 0
mov eax, dword [esi + 0x8b8]
mov dword [esi + 0x120], eax
mov dword [esi + 0x11c], 0
je 0x4a090f
jmp 0x4a08ff
test byte [esi + 0xe4], 0x20
jne 0x4a090f
and dword [esi + 0xe4], 0xfffffffd
push esi
call fcn.004923a0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret