Function at 0x10017f3
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x340
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x100d86c], edi
mov eax, 0x258
mov dword [ebp - 8], eax
jne 0x100181b
mov esi, 0xc00000be
jmp 0x1001ae1
mov ebx, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push eax
push edi
call ebx
mov esi, eax
cmp esi, edi
jne 0x1001835
mov eax, 0xc000009a
jmp 0x1001af1
push 0x20
push edi
call ebx
mov ebx, eax
cmp ebx, edi
jne 0x100184a
mov edi, 0xc000009a
jmp 0x1001ac7
push 8
xor eax, eax
cmp dword [ebp + 0x10], 2
pop ecx
mov edi, ebx
mov dword [ebp - 4], 0x80000005
rep stosd dword es:[edi], eax
jne 0x10018a5
push dword [ebp + 0xc]
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
je 0x1001882
test eax, eax
je 0x1001882
push eax
call sub.WSOCK32.dll_ntohl
mov dword [ebx], eax
mov byte [ebx + 0xe], 0x2a
jmp 0x1001938
push dword [ebp + 0xc]
push 0x2748
push 1
call fcn.010026d6
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, 0xc0000001
jmp 0x10019a9
lea edi, [ebx + 0xe]
mov eax, 0x20202020
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x100
stosd dword es:[edi], eax
lea eax, [ebp - 0x340]
push eax
push 0xffffffffffffffff
push dword [ebp + 0xc]
xor edi, edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x340]
push eax
lea eax, [ebp - 0x18]
push eax
mov word [ebp - 0x142], di
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea eax, [ebp - 0x140]
mov dword [ebp - 0xc], eax
push edi
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
mov word [ebp - 0xe], 0xff
call dword [sym.imp.ntdll.dll_RtlUpcaseUnicodeStringToOemString]
cmp eax, edi
mov dword [ebp - 4], eax
jl 0x1001910
mov dword [ebp - 4], 0x80000005
push 0x10
pop eax
cmp word [ebp - 0x10], ax
jae 0x100191c
mov eax, dword [ebp - 0x10]
movzx eax, ax
push eax
lea eax, [ebp - 0x140]
push eax
lea eax, [ebx + 0xe]
push eax
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
and byte [ebx + 0x1d], 0
and word [ebx + 0xc], 0
cmp dword [ebp - 4], 0x80000005
mov dword [ebx + 4], 1
mov word [ebx + 8], 0x12
mov word [ebx + 0xa], 0x11
jne 0x10019b5
mov edi, dword [ebp - 8]
push 0x20
push ebx
push 0x2100ae
push edi
push esi
push dword [ebp + 8]
call fcn.01001508
cmp eax, 0x80000005
mov dword [ebp - 4], eax
jne 0x10019b5
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [edi + edi]
cmp eax, 0xffff
mov dword [ebp - 8], eax
jae 0x100199b
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x1001959
push 0
push 0x10
call fcn.01002745
mov esi, 0xc000009a
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1001aef
cmp dword [ebp - 4], 0
jne 0x1001ad2
mov ax, word [esi + 0x3a]
test ax, ax
je 0x1001ad2
movzx eax, ax
push 0x2749
push 1
lea edi, [esi + 0x3c]
mov dword [ebp + 0xc], eax
call fcn.010026d6
mov eax, dword [ebp + 0xc]
test eax, eax
pop ecx
pop ecx
je 0x1001a7f
mov dword [ebp + 0xc], eax
movzx eax, byte [edi + 0x11]
push eax
call fcn.010013c7
push eax
movzx eax, byte [edi + 0xf]
push eax
lea eax, [ebp - 0x40]
push eax
push edi
call fcn.01001422
push eax
push 0x1001154
call fcn.01001374
xor eax, eax
mov al, byte [edi + 0x11]
add esp, 0x10
and eax, 0xf
sub eax, 0
je 0x1001a57
sub eax, 4
je 0x1001a50
dec eax
je 0x1001a49
dec eax
je 0x1001a42
dec eax
je 0x1001a3b
push 0x273b
jmp 0x1001a5c
push 0x2736
jmp 0x1001a5c
push 0x2737
jmp 0x1001a5c
push 0x273a
jmp 0x1001a5c
push 0x2739
jmp 0x1001a5c
push 0x2738
push 1
call fcn.010026d6
pop ecx
pop ecx
push 0x274a
push 1
add edi, 0x12
call fcn.010026d6
dec dword [ebp + 0xc]
pop ecx
pop ecx
jne 0x10019f1
movzx eax, byte [esi + 5]
push eax
movzx eax, byte [esi + 4]
push eax
movzx eax, byte [esi + 3]
push eax
movzx eax, byte [esi + 2]
push eax
movzx eax, byte [esi + 1]
push eax
movzx eax, byte [esi]
push eax
lea eax, [ebp - 0x2c]
push 0x1001170
push eax
call dword [sym.imp.msvcrt.dll_sprintf]
lea eax, [ebp - 0x2c]
push eax
push 0x2747
push 1
call fcn.010026d6
add esp, 0x2c
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, edi
jmp 0x1001af1
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call edi
push esi
call edi
mov esi, dword [ebp - 4]
push 0x2746
push 1
call fcn.010026d6
pop ecx
pop ecx
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0xc