Function at 0x100232c0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x100236f0
mov eax, dword [ebx + 4]
push ebx
mov edi, dword [eax + 0x1b0]
mov dword [ebp - 8], 1
push dword [eax + 0x1b0]
mov dword [ebp + 8], edi
call fcn.1001fe40
add esp, 0xc
test eax, eax
jne 0x100236de
lea esi, [ebx + 8]
nop
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 0x1cc]
test ecx, ecx
je 0x100233a9
push dword [esi]
push ecx
push dword [eax + 0x224]
push 0xffffffffffffffff
push 0
push eax
call fcn.10031370
mov esi, eax
add esp, 0x18
cmp esi, 0xfffffffd
je 0x100236b9
cmp dword [edi + 0x34c], 0
lea ecx, [edi + 0x34c]
je 0x10023378
mov eax, dword [ecx]
mov edx, dword [ebx + 4]
test esi, esi
js 0x10023365
cmp eax, edx
jne 0x10023369
mov eax, dword [edx + 0x1f8]
mov dword [ecx], eax
mov eax, dword [ebx + 4]
mov dword [eax + 0x1f8], 0
jmp 0x100233a9
cmp eax, edx
je 0x10023397
cmp dword [eax + 0x1f8], 0
lea ecx, [eax + 0x1f8]
jne 0x10023341
test esi, esi
jns 0x10023397
mov ecx, dword [ebx + 4]
mov eax, dword [edi + 0x34c]
mov dword [ecx + 0x1f8], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebx + 4]
mov dword [ecx + 0x34c], eax
cmp esi, 0xfffffffe
je 0x10023620
cmp esi, 0xffffffff
je 0x100235ce
xor eax, eax
mov dword [ebp - 4], eax
cmp eax, 1
jge 0x100236de
push 0
push 1
push dword [ebx + 8]
lea esi, [ebx + 8]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x100236c3
mov ecx, dword [ebx + 4]
lea eax, [ebp - 8]
push 4
push eax
mov ecx, dword [ecx + 0x1a8]
and ecx, 0x800000
or ecx, 0
jne 0x1002340a
push 0xfffffffffffffffb
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x100236a3
lea eax, [ebx + 8]
mov dword [ebp - 0xc], eax
jmp 0x10023423
push 4
push 0xffff
push edi
mov dword [ebp - 0xc], esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x100236a3
push 0
push edi
push dword [ebx + 4]
call fcn.1001cfc0
mov eax, dword [ebx + 4]
push dword [esi]
push dword [eax + 0x1cc]
push dword [eax + 0x224]
push edi
push 0
push eax
call fcn.10031370
add esp, 0x24
mov dword [ebp - 0x10], eax
cmp eax, 0xfffffffd
je 0x100236b2
test eax, eax
js 0x100235af
push 0
push 0x10048e98
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.1001b560
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10023683
mov eax, dword [ebp - 0xc]
mov al, byte [eax]
mov byte [esi + 0x2f3], al
mov eax, dword [ebx + 4]
mov eax, dword [eax + 0x1a8]
and eax, 0x4000
or eax, 0
jne 0x100234af
or dword [esi + 0x2d4], 8
mov eax, dword [ebx + 4]
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0x224], ecx
mov dword [esi + 0x2b0], edi
mov eax, dword [ebx + 4]
push esi
mov eax, dword [eax + 0x1e4]
mov dword [esi + 8], eax
push dword [ebx + 4]
call fcn.1001c020
mov eax, dword [esi]
add esp, 8
or dword [esi + 0x2d0], 0x100
mov eax, dword [eax + 0x35c]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x100234ec
push esi
call eax
add esp, 4
push esi
push dword [ebp + 8]
call fcn.10029a10
add esp, 8
test eax, eax
jne 0x10023692
mov eax, dword [ebx + 4]
lea ecx, [esi + 0x1cc]
add eax, 0x1bc
push eax
push ecx
call fcn.100287d0
mov eax, dword [ebx + 4]
add esp, 8
cmp dword [eax + 0x244], 0
je 0x1002354b
push 4
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 1
push eax
push 0xf
push 6
push dword [esi + 0x2b0]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1002354b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push SysReAllocString
push dword [esi + 0x2b0]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
js 0x1002364a
mov edx, dword [ebx + 4]
mov ecx, 0x1004a83c
mov eax, dword [edx + 0x1cc]
test eax, eax
push dword [edx + 0x224]
mov edi, dword [edx + 0x1b0]
cmovne ecx, eax
push ecx
push dword [edx + 0x1c8]
add esi, 0xc8
push str.listen_s_s_d
push esi
lea eax, [edi + 0x228]
push eax
push edi
call fcn.1001d820
mov eax, dword [ebp - 4]
add esp, 0x1c
inc eax
jmp 0x100233ab
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebx + 4]
cmp dword [eax + 0x1cc], 0
je 0x100236b9
mov edi, dword [ebp + 8]
jmp 0x10023300
cmp dword [ebx], 0
je 0x100236b9
mov eax, dword [ebx + 4]
push dword [eax + 0x224]
push dword [eax + 0x1cc]
push dword [eax + 0x1c8]
push str._lws_vhost_init_server_af
push str._s:_VH__s:_iface__s_port__d_DOESNT_EXIST_n
push 1
call fcn.1001dbe0
mov eax, dword [ebx]
add esp, 0x18
mov eax, dword [eax + 0x90]
and eax, 0x40000000
or eax, 0
je 0x100236d2
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx], 0
je 0x100236b9
mov eax, dword [ebx + 4]
push dword [eax + 0x224]
push dword [eax + 0x1cc]
push dword [eax + 0x1c8]
push str._lws_vhost_init_server_af
push str._s:_VH__s:_iface__s_port__d_NOT_USABLE_n
jmp 0x100235f6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.listen_failed_with_error__d_n
push 1
call fcn.1001dbe0
lea eax, [esi + 0x1cc]
push eax
call fcn.100288b0
push esi
call fcn.10029b80
add esp, 0x14
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
push str.Out_of_mem_n
push 1
call fcn.1001dbe0
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
push str.reuseaddr_failed_n
push 1
call fcn.1001dbe0
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
push str.ERROR_opening_socket_n
push 1
call fcn.1001dbe0
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret