Function at 0x4b5510
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 0x4b554b
mov eax, dword [esi + 0xa0]
or eax, dword [esi + 0xa4]
jne 0x4b554b
push 7
lea eax, [ebp - 0x18]
push esi
push eax
call fcn.004a7f20
add esp, 0xc
mov edi, dword [ebp + 0x10]
or dword [edi], 2
cmp dword [esi + 0x134], 0
jne 0x4b5726
cmp dword [esi + 0x8e8], 0
jne 0x4b5584
push dword [esi + 0x4dc]
call dword [0x5b7090]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
je 0x4b5691
cmp byte [esi + 0x146], 0
mov eax, dword [esi + 0x8e8]
mov dword [esi + 0x138], eax
jne 0x4b57f4
cmp dword [esi + 0x110], 2
mov ecx, dword [esi + 0x13c]
jne 0x4b55fb
cmp dword [ecx + 0x1a0], 2
jne 0x4b55fb
and dword [esi + 0xfc], 0xfffffffd
lea eax, [ebp - 0x18]
push eax
mov dword [esi + 0x110], 1
call fcn.004b0110
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.0049a680
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 0x4b5618
cmp dword [ecx + 0x1a0], 1
sete byte [ebp - 1]
lea eax, [ebp + 0x10]
push eax
push dword [esi + 0x4dc]
push esi
call fcn.004b3ca0
add esp, 0xc
test eax, eax
jne 0x4b594c
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x4b57f4
jle 0x4b5801
mov dword [esi + 0x134], ebx
cmp byte [ebp - 1], al
jne 0x4b5726
cmp byte [esi + 0x6de], al
je 0x4b5726
cmp dword [esi + 0x94c], eax
jne 0x4b569d
mov eax, dword [esi + 0x4dc]
add eax, eax
push eax
call dword [0x5b7090]
add esp, 4
mov dword [esi + 0x94c], eax
test eax, eax
jne 0x4b569d
push str.Failed_to_alloc_scratch_buffer_
push esi
call fcn.0049fe00
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 0x4b5710
jmp 0x4b56b0
mov eax, dword [esi + 0x138]
mov bl, byte [edx + eax]
mov eax, dword [esi + 0x94c]
cmp bl, 0xa
jne 0x4b5704
mov byte [ecx + eax], 0xd
inc ecx
mov eax, dword [esi + 0x94c]
mov byte [ecx + eax], bl
cmp byte [esi + 0x6de], 0
jne 0x4b5707
mov edi, dword [esi + 0xc30]
mov eax, edi
mov ebx, dword [esi + 0xc34]
and eax, ebx
cmp eax, 0xffffffff
je 0x4b5707
add edi, 1
mov dword [esi + 0xc30], edi
adc ebx, 0
mov dword [esi + 0xc34], ebx
jmp 0x4b5707
mov byte [ecx + eax], bl
mov ebx, dword [ebp + 0x10]
inc edx
inc ecx
cmp edx, ebx
jl 0x4b56b0
cmp ecx, ebx
je 0x4b5726
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.004a02c0
add esp, 0x14
test eax, eax
jne 0x4b594c
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 0x4b578d
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 0x4b5830
mov eax, dword [ebp + 8]
cdq
cmp edi, edx
jg 0x4b57b7
jl 0x4b57c1
cmp ebx, eax
jb 0x4b57c1
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.0049fd70
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 0x4b583d
test byte [esi + 0xfc], 0x20
jne 0x4b594a
mov eax, dword [esi + 0xc]
and dword [esi + 0xfc], 0xfffffffd
cmp byte [eax + 0x262], 0
je 0x4b594a
push esi
call fcn.004b4690
add esp, 4
test eax, eax
je 0x4b594a
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 0x4b587e
mov eax, dword [esi + 0x138]
sub eax, ebx
push ebx
add eax, edi
push eax
push 4
push esi
call fcn.0049fd70
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.004a7e00
mov edi, dword [ebp + 8]
add esp, 0x1c
cmp byte [esi + 0x14a], 0
je 0x4b5890
cmp byte [esi + 0x14c], 0
je 0x4b58c4
mov eax, dword [esi + 0xa0]
cmp eax, dword [esi + 0xc30]
jne 0x4b58c4
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xc34]
jne 0x4b58c4
push str.We_are_completely_uploaded_and_fine_n
push esi
mov byte [esi + 0x146], 1
call fcn.0049ff20
mov edi, dword [ebp + 8]
add esp, 8
mov eax, dword [esi + 0x134]
cmp eax, edi
je 0x4b58e5
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 0x4b590b
push dword [esi + 0x4dc]
call dword [0x5b7090]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
je 0x4b5691
cmp byte [esi + 0x146], 0
mov eax, dword [esi + 0x8e8]
mov dword [esi + 0x138], eax
mov dword [esi + 0x134], 0
je 0x4b594a
mov eax, dword [esi + 0xc]
and dword [esi + 0xfc], 0xfffffffd
cmp byte [eax + 0x262], 0
je 0x4b594a
push esi
call fcn.004b4690
add esp, 4
test eax, eax
jne 0x4b594c
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret