Function at 0x100826a0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x28
mov eax, dword [esi + 0x90]
or eax, dword [esi + 0x94]
push ebx
push ebp
push edi
mov dword [esp + 0x14], 0
jne 0x100826da
mov ecx, dword [esi + 0x98]
or ecx, dword [esi + 0x9c]
jne 0x100826da
push 7
lea edx, [esp + 0x28]
push esi
push edx
call fcn.10080b30
add esp, 0xc
mov edi, dword [esp + 0x3c]
or dword [edi], 2
mov ebp, dword [esi + 0x11c]
xor ebx, ebx
test ebp, ebp
mov dword [esp + 0x10], ebx
je 0x10082753
mov eax, dword [esi + 0x51c]
shr eax, 5
cmp ebp, eax
jge 0x10082747
cmp dword [esi + 0x160], ebx
jne 0x10082747
cmp dword [esi + 0x14c], ebx
jne 0x10082747
mov ecx, dword [esi + 0x98]
sub ecx, dword [esi + 0xb0]
mov edi, dword [esi + 0x9c]
sbb edi, dword [esi + 0xb4]
mov eax, ebp
cdq
add ecx, eax
adc edi, edx
cmp ecx, dword [esi + 0xdb0]
jne 0x1008273d
cmp edi, dword [esi + 0xdb4]
je 0x10082743
mov ebx, ebp
mov dword [esp + 0x10], ebp
mov edi, dword [esp + 0x3c]
test ebp, ebp
je 0x10082753
test ebx, ebx
je 0x100829cc
cmp dword [esi + 0x9c8], 0
jne 0x1008277a
mov ecx, dword [esi + 0x51c]
push ecx
call dword [section..data]
add esp, 4
test eax, eax
mov dword [esi + 0x9c8], eax
je 0x100828ef
test ebx, ebx
je 0x10082799
mov eax, dword [esi + 0x120]
mov ecx, dword [esi + 0x9c8]
cmp eax, ecx
je 0x10082799
push ebx
push eax
push ecx
call fcn.101b5d00
add esp, 0xc
cmp dword [esi + 0x14c], 0
mov ebp, dword [esi + 0x9c8]
mov dword [esi + 0x120], ebp
jne 0x10082886
mov eax, dword [esi + 0x124]
mov ecx, 2
cmp dword [esi + 0xf8], ecx
jne 0x1008282b
cmp dword [eax + 0x1a8], ecx
jne 0x1008282b
and dword [esi + 0xe4], 0xfffffffd
lea edx, [esp + 0x24]
push edx
mov dword [esi + 0xf8], 1
call fcn.10061710
mov ecx, dword [eax]
mov dword [esi + 0xe8], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0xec], edx
mov ecx, dword [eax + 8]
mov dword [esi + 0xf0], ecx
mov edx, dword [eax + 0xc]
mov dword [esi + 0xf4], edx
and dword [edi], 0xfffffffd
mov eax, dword [esi + 0x6e8]
cdq
push 0
push edx
push eax
push esi
call fcn.1005bbd0
add esp, 0x14
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x28
ret
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx + 0x254]
test dword [edx + 0x44], 0x40003
je 0x1008284e
xor ecx, ecx
cmp dword [eax + 0x1a8], 1
sete cl
mov dword [esp + 0x14], ecx
add ebp, ebx
mov dword [esi + 0x120], ebp
mov eax, dword [esi + 0x51c]
lea edx, [esp + 0x3c]
push edx
sub eax, ebx
push eax
push esi
call fcn.10081b70
sub dword [esi + 0x120], ebx
add esp, 0xc
test eax, eax
jne 0x10082c48
mov ecx, dword [esp + 0x3c]
lea ebp, [ecx + ebx]
test ebp, ebp
jne 0x10082898
test byte [esi + 0xe4], 0x20
jne 0x10082c46
jmp 0x10082c36
jle 0x10082c36
cmp dword [esp + 0x14], 0
mov dword [esi + 0x11c], ebp
jne 0x100829a6
cmp dword [esi + 0x72c], 0
je 0x100829a6
cmp dword [esi + 0xa34], 0
jne 0x100828fb
mov edx, dword [esi + 0x51c]
add edx, edx
push edx
call dword [section..data]
add esp, 4
test eax, eax
mov dword [esi + 0xa34], eax
jne 0x100828fb
push str.Failed_to_alloc_scratch_buffer
push esi
call fcn.1005aa90
add esp, 8
mov eax, 0x1b
pop edi
pop ebp
pop ebx
add esp, 0x28
ret
test ebx, ebx
je 0x10082916
mov eax, dword [esi + 0x120]
mov ecx, dword [esi + 0xa34]
push ebx
push eax
push ecx
call fcn.101b4f90
add esp, 0xc
cmp ebx, ebp
mov edi, ebx
mov eax, ebx
jge 0x1008298e
mov edi, edi
mov edx, dword [esi + 0x120]
mov cl, byte [edi + edx]
cmp cl, 0xa
jne 0x1008297b
mov ecx, dword [esi + 0xa34]
mov byte [eax + ecx], 0xd
mov edx, dword [esi + 0xa34]
add eax, 1
mov byte [eax + edx], 0xa
cmp dword [esi + 0x72c], 0
jne 0x10082984
mov ecx, dword [esi + 0xdb0]
mov edx, dword [esi + 0xdb4]
mov ebx, ecx
and ebx, edx
cmp ebx, 0xffffffff
mov ebx, dword [esp + 0x10]
je 0x10082984
add ecx, 1
adc edx, 0
mov dword [esi + 0xdb0], ecx
mov dword [esi + 0xdb4], edx
jmp 0x10082984
mov edx, dword [esi + 0xa34]
mov byte [eax + edx], cl
add edi, 1
add eax, 1
cmp edi, ebp
jl 0x10082920
cmp eax, ebp
je 0x100829a6
mov ecx, dword [esi + 0xa34]
mov ebp, eax
mov dword [esi + 0x120], ecx
mov dword [esi + 0x11c], eax
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0x254]
test dword [eax + 0x44], 0x30000
je 0x100829cc
push ebx
push ebp
push esi
call fcn.1006f2e0
add esp, 0xc
test eax, eax
jne 0x10082c48
mov edx, dword [esi + 0x11c]
mov eax, dword [esi + 0x120]
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [ecx + 0x274]
push eax
push edx
push esi
call fcn.1005f0d0
add esp, 0x14
test eax, eax
jne 0x10082c48
lea eax, [esp + 0x14]
push eax
call fcn.10061710
mov ecx, dword [eax + 0xc]
mov edx, dword [esi + 0x130]
mov edi, dword [eax]
mov ebp, dword [eax + 4]
mov ebx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x34], ecx
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esi + 0x134]
mov dword [ecx + 4], edx
mov edx, dword [esi + 0x138]
mov dword [ecx + 8], edx
mov edx, dword [esi + 0x13c]
mov dword [ecx + 0xc], edx
sub esp, 0x10
mov ecx, esp
mov edx, edi
mov dword [ecx], edx
mov edx, ebp
mov dword [ecx + 4], edx
mov edx, ebx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
call fcn.100617b0
add esp, 0x20
test edx, edx
jl 0x10082ad4
jg 0x10082a6a
cmp eax, 0x3e8
jbe 0x10082ad4
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 0x274]
push 0
push 0
lea edx, [esp + 0x18]
push edx
push 4
lea ecx, [esp + 0x4c]
push ecx
push 0
push 0
push 0x4004747b
push eax
mov dword [esp + 0x38], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x10082ab8
mov eax, dword [esp + 0x14]
push 4
lea edx, [esp + 0x40]
push edx
push 0x1001
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x130], edi
mov dword [esi + 0x134], ebp
mov dword [esi + 0x138], ebx
mov dword [esi + 0x13c], ecx
mov edi, dword [esi + 0xb0]
mov ecx, dword [esi + 0xb4]
mov edx, edi
or edx, ecx
je 0x10082b39
mov eax, dword [esp + 0xc]
cdq
cmp ecx, edx
jg 0x10082afd
jl 0x10082af5
cmp edi, eax
jae 0x10082afd
mov ebp, edi
mov dword [esp + 0x18], ecx
jmp 0x10082b03
mov ebp, eax
mov dword [esp + 0x18], edx
mov eax, dword [esi + 0x120]
push ebp
push eax
push 2
push esi
call fcn.1005a9f0
mov ecx, dword [esp + 0x28]
add esp, 0x10
sub dword [esi + 0xb0], ebp
sbb dword [esi + 0xb4], ecx
mov ecx, dword [esp + 0xc]
mov eax, ecx
cdq
mov edi, eax
mov ebx, edx
sub edi, ebp
sbb ebx, dword [esp + 0x18]
jmp 0x10082b44
mov ecx, dword [esp + 0xc]
mov eax, ecx
cdq
mov edi, eax
mov ebx, edx
mov edx, edi
or edx, ebx
je 0x10082b85
mov eax, dword [esi + 0x120]
sub eax, edi
push edi
add eax, ecx
push eax
push 4
push esi
call fcn.1005a9f0
add dword [esi + 0x98], edi
mov edx, dword [esi + 0x98]
adc dword [esi + 0x9c], ebx
mov ecx, dword [esi + 0x9c]
push ecx
push edx
push esi
call fcn.10080e20
mov ecx, dword [esp + 0x28]
add esp, 0x1c
cmp dword [esi + 0x160], 0
je 0x10082b97
cmp dword [esi + 0x168], 0
je 0x10082bcf
mov eax, dword [esi + 0x98]
cmp eax, dword [esi + 0xdb0]
jne 0x10082bcf
mov edx, dword [esi + 0x9c]
cmp edx, dword [esi + 0xdb4]
jne 0x10082bcf
push str.We_are_completely_uploaded_and_fine
push esi
mov dword [esi + 0x14c], 1
call fcn.1005abd0
mov ecx, dword [esp + 0x14]
add esp, 8
mov eax, dword [esi + 0x11c]
cmp eax, ecx
je 0x10082bf0
add dword [esi + 0x120], ecx
sub eax, ecx
mov dword [esi + 0x11c], eax
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x28
ret
cmp dword [esi + 0x9c8], 0
jne 0x10082c17
mov eax, dword [esi + 0x51c]
push eax
call dword [section..data]
add esp, 4
test eax, eax
mov dword [esi + 0x9c8], eax
je 0x100828ef
cmp dword [esi + 0x14c], 0
mov ecx, dword [esi + 0x9c8]
mov dword [esi + 0x120], ecx
mov dword [esi + 0x11c], 0
je 0x10082c46
and dword [esi + 0xe4], 0xfffffffd
push esi
call fcn.1005fd40
add esp, 4
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x28
ret