Function at 0x5c0480
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
or dword [eax], 2
push edi
xor edi, edi
mov byte [ebp + 0xb], 0
mov ebx, dword [esi + 0x114]
test ebx, ebx
je 0x5c0502
mov eax, dword [esi + 0x494]
shr eax, 5
cmp ebx, eax
jge 0x5c0707
cmp byte [esi + 0x144], 0
jne 0x5c0707
cmp byte [esi + 0x13f], 0
jne 0x5c0707
mov ecx, dword [esi + 0xa0]
mov eax, ebx
sub ecx, dword [esi + 0xa8]
mov edi, dword [esi + 0xa4]
sbb edi, dword [esi + 0xac]
cdq
add ecx, eax
adc edi, edx
cmp ecx, dword [esi + 0xc28]
jne 0x5c0500
cmp edi, dword [esi + 0xc2c]
je 0x5c0707
mov edi, ebx
mov eax, dword [esi + 0x870]
test eax, eax
jne 0x5c0529
push dword [esi + 0x494]
call dword [0x8f1cac]
add esp, 4
mov dword [esi + 0x870], eax
test eax, eax
je 0x5c0668
mov ecx, eax
test edi, edi
je 0x5c054a
mov edx, dword [esi + 0x118]
cmp edx, eax
je 0x5c054a
push edi
push edx
push eax
call fcn.00700d60
mov ecx, dword [esi + 0x870]
add esp, 0xc
cmp byte [esi + 0x13f], 0
mov dword [esi + 0x118], ecx
jne 0x5c090a
cmp dword [esi + 0xf0], 2
mov edx, dword [esi + 0x11c]
jne 0x5c05b9
cmp dword [edx + 0x30], 2
jne 0x5c05b9
and dword [esi + 0xdc], 0xfffffffd
lea eax, [ebp - 0x14]
push eax
mov dword [esi + 0xf0], 1
call fcn.005aae10
push 0
movups xmm0, xmmword [eax]
mov eax, dword [ebp + 0x10]
movups xmmword [esi + 0xe0], xmm0
and dword [eax], 0xfffffffd
mov eax, dword [esi + 0x630]
cdq
push edx
push eax
push esi
call fcn.005a5b80
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 + 0x1c4]
test dword [eax + 0x44], 0x40003
je 0x5c05d4
cmp dword [edx + 0x30], 1
sete bl
jmp 0x5c05d7
mov bl, byte [ebp + 0xb]
lea eax, [ecx + edi]
mov dword [esi + 0x118], eax
lea eax, [ebp + 0x10]
push eax
mov eax, dword [esi + 0x494]
sub eax, edi
push eax
push esi
call fcn.005bef50
sub dword [esi + 0x118], edi
add esp, 0xc
test eax, eax
jne 0x5c0925
mov eax, dword [ebp + 0x10]
add eax, edi
mov dword [ebp + 0x10], eax
je 0x5c090a
test eax, eax
jle 0x5c0913
mov dword [esi + 0x114], eax
test bl, bl
jne 0x5c0707
cmp byte [esi + 0x662], bl
je 0x5c0707
mov eax, dword [esi + 0x8e8]
test eax, eax
jne 0x5c0674
mov eax, dword [esi + 0x494]
add eax, eax
push eax
call dword [0x8f1cac]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
jne 0x5c0674
push str.Failed_to_alloc_scratch_buffer
push esi
call fcn.005b6f30
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x5c0688
push edi
push dword [esi + 0x118]
push eax
call fcn.00700d60
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov ecx, edi
cmp edi, eax
jge 0x5c06f1
mov eax, dword [esi + 0x118]
mov dl, byte [edi + eax]
mov eax, dword [esi + 0x8e8]
cmp dl, 0xa
jne 0x5c06e5
mov byte [eax + ecx], 0xd
inc ecx
mov eax, dword [esi + 0x8e8]
mov byte [ecx + eax], dl
cmp byte [esi + 0x662], 0
jne 0x5c06e8
mov edx, dword [esi + 0xc28]
mov eax, edx
mov ebx, dword [esi + 0xc2c]
and eax, ebx
cmp eax, 0xffffffff
je 0x5c06e8
add edx, 1
mov dword [esi + 0xc28], edx
adc ebx, 0
mov dword [esi + 0xc2c], ebx
jmp 0x5c06e8
mov byte [eax + ecx], dl
mov eax, dword [ebp + 0x10]
inc edi
inc ecx
cmp edi, eax
jl 0x5c0691
cmp ecx, eax
je 0x5c0707
mov eax, dword [esi + 0x8e8]
mov dword [esi + 0x118], eax
mov dword [esi + 0x114], ecx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 4]
push eax
push dword [esi + 0x114]
push dword [esi + 0x118]
push dword [ebx + 0x1e4]
push esi
call fcn.005b7680
add esp, 0x14
test eax, eax
jne 0x5c0925
lea eax, [ebp - 0x24]
push eax
call fcn.005aae10
mov edx, eax
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
mov eax, esp
movups xmm0, xmmword [edx]
movups xmmword [ebp - 0x14], xmm0
movups xmm0, xmmword [esi + 0x128]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [edx]
movups xmmword [eax], xmm0
call fcn.005aaec0
add esp, 0x20
test edx, edx
jl 0x5c07bc
jg 0x5c0772
cmp eax, 0x3e8
jbe 0x5c07bc
mov edi, dword [ebx + 0x1e4]
lea eax, [ebp + 8]
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 0x5c07b1
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 - 0x14]
movups xmmword [esi + 0x128], xmm0
mov ebx, dword [esi + 0xa8]
mov eax, ebx
mov edi, dword [esi + 0xac]
or eax, edi
mov dword [ebp + 0x10], edi
je 0x5c0811
mov eax, dword [ebp - 4]
cdq
cmp edi, edx
jg 0x5c07df
jl 0x5c07e6
cmp ebx, eax
jb 0x5c07e6
mov ebx, eax
mov dword [ebp + 0x10], edx
mov edi, edx
push ebx
push dword [esi + 0x118]
push 2
push esi
call fcn.005b6e90
add esp, 0x10
sub dword [esi + 0xa8], ebx
sbb dword [esi + 0xac], edi
mov edi, dword [ebp - 4]
mov eax, edi
cdq
sub eax, ebx
sbb edx, dword [ebp + 0x10]
jmp 0x5c0817
mov edi, dword [ebp - 4]
mov eax, edi
cdq
mov ecx, eax
mov dword [ebp + 0x10], edx
or ecx, edx
mov dword [ebp + 8], eax
je 0x5c0861
mov ebx, dword [ebp + 8]
push eax
mov eax, dword [esi + 0x118]
sub eax, ebx
add eax, edi
push eax
push 4
push esi
call fcn.005b6e90
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.005c6350
mov edi, dword [ebp - 4]
add esp, 0x1c
cmp byte [esi + 0x144], 0
je 0x5c0873
cmp byte [esi + 0x146], 0
je 0x5c08a7
mov eax, dword [esi + 0xa0]
cmp eax, dword [esi + 0xc28]
jne 0x5c08a7
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xc2c]
jne 0x5c08a7
push str.We_are_completely_uploaded_and_fine
push esi
mov byte [esi + 0x13f], 1
call fcn.005b6fd0
mov edi, dword [ebp - 4]
add esp, 8
mov eax, dword [esi + 0x114]
cmp eax, edi
je 0x5c08c8
add dword [esi + 0x118], edi
sub eax, edi
mov dword [esi + 0x114], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x870]
test eax, eax
jne 0x5c08ef
push dword [esi + 0x494]
call dword [0x8f1cac]
add esp, 4
mov dword [esi + 0x870], eax
test eax, eax
je 0x5c0668
cmp byte [esi + 0x13f], 0
mov dword [esi + 0x118], eax
mov dword [esi + 0x114], 0
je 0x5c0923
jmp 0x5c0913
test byte [esi + 0xdc], 0x20
jne 0x5c0923
and dword [esi + 0xdc], 0xfffffffd
push esi
call fcn.005b68d0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret