Function at 0x5b3cc0
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 0x5b3d42
mov eax, dword [esi + 0x494]
shr eax, 5
cmp ebx, eax
jge 0x5b3f47
cmp byte [esi + 0x144], 0
jne 0x5b3f47
cmp byte [esi + 0x13f], 0
jne 0x5b3f47
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 0x5b3d40
cmp edi, dword [esi + 0xc2c]
je 0x5b3f47
mov edi, ebx
mov eax, dword [esi + 0x870]
test eax, eax
jne 0x5b3d69
push dword [esi + 0x494]
call dword [0x8e2608]
add esp, 4
mov dword [esi + 0x870], eax
test eax, eax
je 0x5b3ea8
mov ecx, eax
test edi, edi
je 0x5b3d8a
mov edx, dword [esi + 0x118]
cmp edx, eax
je 0x5b3d8a
push edi
push edx
push eax
call fcn.006f45d0
mov ecx, dword [esi + 0x870]
add esp, 0xc
cmp byte [esi + 0x13f], 0
mov dword [esi + 0x118], ecx
jne 0x5b414a
cmp dword [esi + 0xf0], 2
mov edx, dword [esi + 0x11c]
jne 0x5b3df9
cmp dword [edx + 0x30], 2
jne 0x5b3df9
and dword [esi + 0xdc], 0xfffffffd
lea eax, [ebp - 0x14]
push eax
mov dword [esi + 0xf0], 1
call fcn.0059e630
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.005993a0
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 0x5b3e14
cmp dword [edx + 0x30], 1
sete bl
jmp 0x5b3e17
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.005b2790
sub dword [esi + 0x118], edi
add esp, 0xc
test eax, eax
jne 0x5b4165
mov eax, dword [ebp + 0x10]
add eax, edi
mov dword [ebp + 0x10], eax
je 0x5b414a
test eax, eax
jle 0x5b4153
mov dword [esi + 0x114], eax
test bl, bl
jne 0x5b3f47
cmp byte [esi + 0x662], bl
je 0x5b3f47
mov eax, dword [esi + 0x8e8]
test eax, eax
jne 0x5b3eb4
mov eax, dword [esi + 0x494]
add eax, eax
push eax
call dword [0x8e2608]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
jne 0x5b3eb4
push str.Failed_to_alloc_scratch_buffer
push esi
call fcn.005aa770
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x5b3ec8
push edi
push dword [esi + 0x118]
push eax
call fcn.006f45d0
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov ecx, edi
cmp edi, eax
jge 0x5b3f31
mov eax, dword [esi + 0x118]
mov dl, byte [edi + eax]
mov eax, dword [esi + 0x8e8]
cmp dl, 0xa
jne 0x5b3f25
mov byte [eax + ecx], 0xd
inc ecx
mov eax, dword [esi + 0x8e8]
mov byte [ecx + eax], dl
cmp byte [esi + 0x662], 0
jne 0x5b3f28
mov edx, dword [esi + 0xc28]
mov eax, edx
mov ebx, dword [esi + 0xc2c]
and eax, ebx
cmp eax, 0xffffffff
je 0x5b3f28
add edx, 1
mov dword [esi + 0xc28], edx
adc ebx, 0
mov dword [esi + 0xc2c], ebx
jmp 0x5b3f28
mov byte [eax + ecx], dl
mov eax, dword [ebp + 0x10]
inc edi
inc ecx
cmp edi, eax
jl 0x5b3ed1
cmp ecx, eax
je 0x5b3f47
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.005aaec0
add esp, 0x14
test eax, eax
jne 0x5b4165
lea eax, [ebp - 0x24]
push eax
call fcn.0059e630
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.0059e6e0
add esp, 0x20
test edx, edx
jl 0x5b3ffc
jg 0x5b3fb2
cmp eax, 0x3e8
jbe 0x5b3ffc
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 0x5b3ff1
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 0x5b4051
mov eax, dword [ebp - 4]
cdq
cmp edi, edx
jg 0x5b401f
jl 0x5b4026
cmp ebx, eax
jb 0x5b4026
mov ebx, eax
mov dword [ebp + 0x10], edx
mov edi, edx
push ebx
push dword [esi + 0x118]
push 2
push esi
call fcn.005aa6d0
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 0x5b4057
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 0x5b40a1
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.005aa6d0
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.005b9b90
mov edi, dword [ebp - 4]
add esp, 0x1c
cmp byte [esi + 0x144], 0
je 0x5b40b3
cmp byte [esi + 0x146], 0
je 0x5b40e7
mov eax, dword [esi + 0xa0]
cmp eax, dword [esi + 0xc28]
jne 0x5b40e7
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xc2c]
jne 0x5b40e7
push str.We_are_completely_uploaded_and_fine
push esi
mov byte [esi + 0x13f], 1
call fcn.005aa810
mov edi, dword [ebp - 4]
add esp, 8
mov eax, dword [esi + 0x114]
cmp eax, edi
je 0x5b4108
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 0x5b412f
push dword [esi + 0x494]
call dword [0x8e2608]
add esp, 4
mov dword [esi + 0x870], eax
test eax, eax
je 0x5b3ea8
cmp byte [esi + 0x13f], 0
mov dword [esi + 0x118], eax
mov dword [esi + 0x114], 0
je 0x5b4163
jmp 0x5b4153
test byte [esi + 0xdc], 0x20
jne 0x5b4163
and dword [esi + 0xdc], 0xfffffffd
push esi
call fcn.005aa110
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret