Function at 0x101d0520
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov byte [ebp - 1], 0
mov eax, dword [esi + 0x90]
or eax, dword [esi + 0x94]
jne 0x101d055b
mov eax, dword [esi + 0x98]
or eax, dword [esi + 0x9c]
jne 0x101d055b
push 7
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.101d1410
add esp, 0xc
mov eax, dword [ebp + 0x10]
xor edi, edi
mov dword [ebp - 8], edi
or dword [eax], 2
mov ebx, dword [esi + 0x12c]
test ebx, ebx
je 0x101d05d5
mov eax, dword [esi + 0x4c4]
shr eax, 5
cmp ebx, eax
jge 0x101d05c9
cmp byte [esi + 0x144], 0
jne 0x101d05c9
cmp byte [esi + 0x13f], 0
jne 0x101d05c9
mov ecx, dword [esi + 0x98]
sub ecx, dword [esi + 0xb0]
mov eax, dword [esi + 0x9c]
sbb eax, dword [esi + 0xb4]
mov dword [ebp - 0xc], eax
mov eax, ebx
cdq
add ecx, eax
mov eax, dword [ebp - 0xc]
adc eax, edx
cmp ecx, dword [esi + 0xc70]
jne 0x101d05c4
cmp eax, dword [esi + 0xc74]
je 0x101d05c9
mov edi, ebx
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x101d05d5
test edi, edi
je 0x101d0827
cmp dword [esi + 0x8d0], 0
jne 0x101d05fb
push dword [esi + 0x4c4]
call dword [0x1042b7b0]
add esp, 4
mov dword [esi + 0x8d0], eax
test eax, eax
je 0x101d0742
test edi, edi
je 0x101d061d
mov eax, dword [esi + 0x8d0]
cmp dword [esi + 0x130], eax
je 0x101d061d
push edi
push dword [esi + 0x130]
push eax
call fcn.101fd360
add esp, 0xc
cmp byte [esi + 0x13f], 0
mov edx, dword [esi + 0x8d0]
mov dword [esi + 0x130], edx
jne 0x101d09fb
cmp dword [esi + 0x108], 2
mov ecx, dword [esi + 0x134]
jne 0x101d0695
cmp dword [ecx + 0x1a0], 2
jne 0x101d0695
and dword [esi + 0xf4], 0xfffffffd
lea eax, [ebp - 0x1c]
push eax
mov dword [esi + 0x108], 1
call fcn.101c81b0
push 0
movups xmm0, xmmword [eax]
mov eax, dword [ebp + 0x10]
movups xmmword [esi + 0xf8], xmm0
and dword [eax], 0xfffffffd
mov eax, dword [esi + 0x69c]
cdq
push edx
push eax
push esi
call fcn.101b04d0
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 + 0x238]
test dword [eax + 0x44], 0x40003
je 0x101d06b2
cmp dword [ecx + 0x1a0], 1
sete byte [ebp - 1]
lea eax, [edx + edi]
mov dword [esi + 0x130], eax
lea eax, [ebp + 0x10]
push eax
mov eax, dword [esi + 0x4c4]
sub eax, edi
push eax
push esi
call fcn.101ceb60
sub dword [esi + 0x130], edi
add esp, 0xc
test eax, eax
jne 0x101d0a0d
mov ebx, dword [ebp + 0x10]
add ebx, edi
mov dword [ebp - 0xc], ebx
je 0x101d09fb
test ebx, ebx
jle 0x101d0a04
mov dword [esi + 0x12c], ebx
cmp byte [ebp - 1], al
jne 0x101d0802
cmp byte [esi + 0x6ce], al
je 0x101d0802
cmp dword [esi + 0x93c], eax
jne 0x101d074e
mov eax, dword [esi + 0x4c4]
add eax, eax
push eax
call dword [0x1042b7b0]
add esp, 4
mov dword [esi + 0x93c], eax
test eax, eax
jne 0x101d074e
push str.Failed_to_alloc_scratch_buffer
push esi
call fcn.101c0fa0
add esp, 8
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x101d0767
push edi
push dword [esi + 0x130]
push dword [esi + 0x93c]
call fcn.101fcde0
add esp, 0xc
mov edx, edi
mov ecx, edi
cmp edi, ebx
jge 0x101d07ea
mov edi, dword [ebp - 0xc]
nop dword [eax]
nop word [eax + eax]
mov eax, dword [esi + 0x130]
mov bl, byte [edx + eax]
mov eax, dword [esi + 0x93c]
cmp bl, 0xa
jne 0x101d07db
mov byte [ecx + eax], 0xd
inc ecx
mov eax, dword [esi + 0x93c]
mov byte [ecx + eax], bl
cmp byte [esi + 0x6ce], 0
jne 0x101d07de
mov eax, dword [esi + 0xc74]
mov ebx, dword [esi + 0xc70]
mov dword [ebp + 0x10], eax
mov eax, ebx
and eax, dword [ebp + 0x10]
cmp eax, 0xffffffff
je 0x101d07de
mov eax, dword [ebp + 0x10]
add ebx, 1
mov dword [esi + 0xc70], ebx
adc eax, 0
mov dword [esi + 0xc74], eax
jmp 0x101d07de
mov byte [ecx + eax], bl
inc edx
inc ecx
cmp edx, edi
jl 0x101d0780
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
cmp ecx, ebx
je 0x101d0802
mov eax, dword [esi + 0x93c]
mov ebx, ecx
mov dword [esi + 0x130], eax
mov dword [esi + 0x12c], ecx
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x238]
test dword [eax + 0x44], 0x30000
je 0x101d0827
push edi
push ebx
push esi
call fcn.101dcf40
add esp, 0xc
test eax, eax
jne 0x101d0a0d
mov ebx, dword [ebp + 0xc]
lea eax, [ebp + 8]
push eax
push dword [esi + 0x12c]
push dword [esi + 0x130]
push dword [ebx + 0x254]
push esi
call fcn.101c13e0
add esp, 0x14
test eax, eax
jne 0x101d0a0d
mov edi, dword [ebx + 0x254]
push eax
push eax
lea eax, [ebp - 0xc]
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 0x101d088e
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 + 0xb0]
mov eax, ebx
mov edi, dword [esi + 0xb4]
or eax, edi
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], edi
je 0x101d08f1
mov eax, dword [ebp + 8]
cdq
cmp edi, edx
jg 0x101d08b4
jl 0x101d08be
cmp ebx, eax
jb 0x101d08be
mov ebx, eax
mov dword [ebp + 0x10], eax
mov edi, edx
mov dword [ebp - 0xc], edx
push ebx
push dword [esi + 0x130]
push 2
push esi
call fcn.101c0f10
add esp, 0x10
sub dword [esi + 0xb0], ebx
sbb dword [esi + 0xb4], 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 - 0xc]
mov dword [ebp + 0x10], eax
jmp 0x101d08fe
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 0x101d093f
mov eax, dword [esi + 0x130]
sub eax, ebx
push ebx
add eax, edi
push eax
push 4
push esi
call fcn.101c0f10
add dword [esi + 0x98], ebx
mov eax, dword [ebp + 0x10]
adc dword [esi + 0x9c], eax
push dword [esi + 0x9c]
push dword [esi + 0x98]
push esi
call fcn.101d12d0
mov edi, dword [ebp + 8]
add esp, 0x1c
cmp byte [esi + 0x144], 0
je 0x101d0951
cmp byte [esi + 0x146], 0
je 0x101d0985
mov eax, dword [esi + 0x98]
cmp eax, dword [esi + 0xc70]
jne 0x101d0985
mov eax, dword [esi + 0x9c]
cmp eax, dword [esi + 0xc74]
jne 0x101d0985
push str.We_are_completely_uploaded_and_fine
push esi
mov byte [esi + 0x13f], 1
call fcn.101c1060
mov edi, dword [ebp + 8]
add esp, 8
mov eax, dword [esi + 0x12c]
cmp eax, edi
je 0x101d09a6
add dword [esi + 0x130], edi
sub eax, edi
pop edi
mov dword [esi + 0x12c], eax
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x8d0], 0
jne 0x101d09cc
push dword [esi + 0x4c4]
call dword [0x1042b7b0]
add esp, 4
mov dword [esi + 0x8d0], eax
test eax, eax
je 0x101d0742
cmp byte [esi + 0x13f], 0
mov eax, dword [esi + 0x8d0]
mov dword [esi + 0x130], eax
mov dword [esi + 0x12c], 0
je 0x101d0a0b
and dword [esi + 0xf4], 0xfffffffd
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test byte [esi + 0xf4], 0x20
jne 0x101d0a0b
and dword [esi + 0xf4], 0xfffffffd
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret