Function at 0x1022c1b0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x28
push ebx
push ebp
mov ebp, dword [esp + 0x3c]
push esi
mov esi, dword [esp + 0x38]
push edi
or dword [ebp], 2
xor edi, edi
mov byte [esp + 0x13], 0
mov ebx, dword [esi + 0x114]
test ebx, ebx
je 0x1022c234
mov eax, dword [esi + 0x494]
shr eax, 5
cmp ebx, eax
jge 0x1022c228
cmp byte [esi + 0x144], 0
jne 0x1022c228
cmp byte [esi + 0x13f], 0
jne 0x1022c228
mov ecx, dword [esi + 0xa0]
mov eax, ebx
sub ecx, dword [esi + 0xa8]
mov ebp, dword [esi + 0xa4]
sbb ebp, dword [esi + 0xac]
cdq
add ecx, eax
adc ebp, edx
cmp ecx, dword [esi + 0xc10]
jne 0x1022c222
cmp ebp, dword [esi + 0xc14]
je 0x1022c224
mov edi, ebx
mov ebp, dword [esp + 0x44]
test ebx, ebx
je 0x1022c234
test edi, edi
je 0x1022c443
cmp dword [esi + 0x870], 0
jne 0x1022c25a
push dword [esi + 0x494]
call dword [section..data]
add esp, 4
mov dword [esi + 0x870], eax
test eax, eax
je 0x1022c39f
test edi, edi
je 0x1022c27c
mov eax, dword [esi + 0x870]
cmp dword [esi + 0x118], eax
je 0x1022c27c
push edi
push dword [esi + 0x118]
push eax
call fcn.102534f0
add esp, 0xc
cmp byte [esi + 0x13f], 0
mov edx, dword [esi + 0x870]
mov dword [esi + 0x118], edx
jne 0x1022c662
cmp dword [esi + 0xf0], 2
mov ecx, dword [esi + 0x11c]
jne 0x1022c2f1
cmp dword [ecx + 0x30], 2
jne 0x1022c2f1
and dword [esi + 0xdc], 0xfffffffd
lea eax, [esp + 0x18]
push eax
mov dword [esi + 0xf0], 1
call fcn.1021a1e0
push 0
movups xmm0, xmmword [eax]
movups xmmword [esi + 0xe0], xmm0
and dword [ebp], 0xfffffffd
mov eax, dword [esi + 0x630]
cdq
push edx
push eax
push esi
call fcn.10214b30
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 0x1c4]
test dword [eax + 0x44], 0x40003
je 0x1022c30d
cmp dword [ecx + 0x30], 1
sete bl
jmp 0x1022c311
mov bl, byte [esp + 0x13]
lea eax, [edx + edi]
mov dword [esi + 0x118], eax
lea eax, [esp + 0x3c]
push eax
mov eax, dword [esi + 0x494]
sub eax, edi
push eax
push esi
call fcn.1022ab60
sub dword [esi + 0x118], edi
add esp, 0xc
test eax, eax
jne 0x1022c67d
mov ebp, dword [esp + 0x3c]
add ebp, edi
je 0x1022c662
test ebp, ebp
jle 0x1022c66b
mov dword [esi + 0x114], ebp
test bl, bl
jne 0x1022c443
cmp byte [esi + 0x662], bl
je 0x1022c443
cmp dword [esi + 0x8e8], eax
jne 0x1022c3ac
mov eax, dword [esi + 0x494]
add eax, eax
push eax
call dword [section..data]
add esp, 4
mov dword [esi + 0x8e8], eax
test eax, eax
jne 0x1022c3ac
push str.Failed_to_alloc_scratch_buffer
push esi
call fcn.10226020
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
test edi, edi
je 0x1022c3c5
push edi
push dword [esi + 0x118]
push dword [esi + 0x8e8]
call fcn.10253e60
add esp, 0xc
mov ecx, edi
cmp edi, ebp
jge 0x1022c42d
nop dword [eax + eax]
mov eax, dword [esi + 0x118]
mov dl, byte [edi + eax]
mov eax, dword [esi + 0x8e8]
cmp dl, 0xa
jne 0x1022c424
mov byte [ecx + eax], 0xd
inc ecx
mov eax, dword [esi + 0x8e8]
mov byte [ecx + eax], dl
cmp byte [esi + 0x662], 0
jne 0x1022c427
mov edx, dword [esi + 0xc10]
mov eax, edx
mov ebx, dword [esi + 0xc14]
and eax, ebx
cmp eax, 0xffffffff
je 0x1022c427
add edx, 1
mov dword [esi + 0xc10], edx
adc ebx, 0
mov dword [esi + 0xc14], ebx
jmp 0x1022c427
mov byte [ecx + eax], dl
inc edi
inc ecx
cmp edi, ebp
jl 0x1022c3d0
cmp ecx, ebp
je 0x1022c443
mov eax, dword [esi + 0x8e8]
mov dword [esi + 0x118], eax
mov dword [esi + 0x114], ecx
mov ebx, dword [esp + 0x40]
lea eax, [esp + 0x44]
push eax
push dword [esi + 0x114]
push dword [esi + 0x118]
push dword [ebx + 0x1e4]
push esi
call fcn.102267f0
add esp, 0x14
test eax, eax
jne 0x1022c67d
lea eax, [esp + 0x28]
push eax
call fcn.1021a1e0
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movups xmm0, xmmword [eax]
movups xmmword [esp + 0x38], xmm0
movups xmm0, xmmword [esi + 0x128]
movups xmmword [ecx], xmm0
mov ecx, esp
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call fcn.1021a280
add esp, 0x20
test edx, edx
jl 0x1022c4fe
jg 0x1022c4b0
cmp eax, 0x3e8
jbe 0x1022c4fe
mov edi, dword [ebx + 0x1e4]
lea eax, [esp + 0x14]
push 0
push 0
push eax
push 4
lea eax, [esp + 0x4c]
push eax
push 0
push 0
push 0x4004747b
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x1022c4f2
push 4
lea eax, [esp + 0x40]
push eax
push 0x1001
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
movups xmm0, xmmword [esp + 0x18]
movups xmmword [esi + 0x128], xmm0
mov ebp, dword [esi + 0xa8]
mov eax, ebp
mov ebx, dword [esi + 0xac]
or eax, ebx
mov dword [esp + 0x3c], ebx
je 0x1022c560
mov eax, dword [esp + 0x44]
cdq
cmp ebx, edx
jg 0x1022c523
jl 0x1022c52b
cmp ebp, eax
jb 0x1022c52b
mov ebp, eax
mov dword [esp + 0x3c], edx
mov ebx, edx
push ebp
push dword [esi + 0x118]
push 2
push esi
call fcn.10225f90
mov edi, dword [esp + 0x54]
add esp, 0x10
sub dword [esi + 0xa8], ebp
mov eax, edi
cdq
sbb dword [esi + 0xac], ebx
mov ebx, eax
sub ebx, ebp
mov eax, edx
sbb eax, dword [esp + 0x3c]
mov dword [esp + 0x3c], eax
jmp 0x1022c56f
mov edi, dword [esp + 0x44]
mov eax, edi
cdq
mov ebx, eax
mov dword [esp + 0x3c], edx
mov eax, edx
mov ecx, ebx
or ecx, eax
je 0x1022c5b2
mov eax, dword [esi + 0x118]
sub eax, ebx
push ebx
add eax, edi
push eax
push 4
push esi
call fcn.10225f90
add dword [esi + 0xa0], ebx
mov eax, dword [esp + 0x4c]
adc dword [esi + 0xa4], eax
push dword [esi + 0xa4]
push dword [esi + 0xa0]
push esi
call fcn.102350e0
mov edi, dword [esp + 0x60]
add esp, 0x1c
cmp byte [esi + 0x144], 0
je 0x1022c5c4
cmp byte [esi + 0x146], 0
je 0x1022c5f9
mov eax, dword [esi + 0xa0]
cmp eax, dword [esi + 0xc10]
jne 0x1022c5f9
mov eax, dword [esi + 0xa4]
cmp eax, dword [esi + 0xc14]
jne 0x1022c5f9
push str.We_are_completely_uploaded_and_fine
push esi
mov byte [esi + 0x13f], 1
call fcn.102260f0
mov edi, dword [esp + 0x4c]
add esp, 8
mov eax, dword [esi + 0x114]
cmp eax, edi
je 0x1022c61b
add dword [esi + 0x118], edi
sub eax, edi
mov dword [esi + 0x114], eax
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
cmp dword [esi + 0x870], 0
jne 0x1022c641
push dword [esi + 0x494]
call dword [section..data]
add esp, 4
mov dword [esi + 0x870], eax
test eax, eax
je 0x1022c39f
cmp byte [esi + 0x13f], 0
mov eax, dword [esi + 0x870]
mov dword [esi + 0x118], eax
mov dword [esi + 0x114], 0
je 0x1022c67b
jmp 0x1022c66b
test byte [esi + 0xdc], 0x20
jne 0x1022c67b
and dword [esi + 0xdc], 0xfffffffd
push esi
call fcn.10225930
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret