Function at 0x180024c30
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x50
mov rax, qword [0x1800990e0]
xor rax, rsp
mov qword [rsp + 0x48], rax
cmp dword [0x18009caf4], 5
mov rdi, rdx
movzx esi, cx
jl 0x180024c69
lea rcx, str.InitWebServer:_configuring_listening_port
call fcn.1800169b0
lea rdx, str.AccessKey
lea rcx, [0x18007e04c]
xor r8d, r8d
call fcn.18001abe0
test eax, eax
je 0x180024d26
lea rdx, str.AllowBasicAuth
lea rcx, [0x18007e064]
mov r8d, 1
call fcn.18001abe0
lea r8, [0x18009fd50]
lea rdx, str.AccessKeySet
lea rcx, [0x18007e104]
mov r9d, 0x100
mov dword [0x1800990b0], eax
call fcn.18001ab50
lea r8, [0x18009fe50]
lea rdx, str.AccessKeySetSnare1
lea rcx, [0x18007e164]
mov r9d, 0x100
call fcn.18001ab50
lea r8, [0x18009ff50]
lea rdx, str.AccessKeySetSnare2
lea rcx, [0x18007e17c]
mov r9d, 0x100
call fcn.18001ab50
lea r8, [0x1800a0050]
lea rdx, str.AccessKeySetSnare3
lea rcx, str.Remote
mov r9d, 0x100
call fcn.18001ab50
xor ebx, ebx
mov dword [0x1800a0164], ebx
test rdi, rdi
je 0x180024d91
or rax, 0xffffffffffffffff
inc rax
cmp byte [rdi + rax], bl
jne 0x180024d37
test rax, rax
je 0x180024d91
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x180024d66
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov ecx, dword [rcx]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov r8, rax
jmp 0x180024d69
mov r8, rdi
movsxd rax, dword [0x1800a0164]
or r9, 0xffffffffffffffff
lea edx, [r9 + 0x12]
imul rcx, rax, 0x11
lea rax, [0x1800a0150]
add rcx, rax
call fcn.18002a5b4
inc dword [0x1800a0164]
mov edi, 2
movzx ecx, si
mov dword [rsp + 0x3c], ebx
mov word [rsp + 0x38], di
call qword [sym.imp.WS2_32.dll_htons]
lea edx, [rdi - 1]
xor r8d, r8d
mov ecx, edi
mov word [rsp + 0x3a], ax
call qword [sym.imp.WS2_32.dll_socket]
mov qword [0x1800990a0], rax
cmp rax, 0xffffffffffffffff
jne 0x180024de5
cmp dword [0x18009caf4], 5
jl 0x180024ddd
lea rcx, str.bind___failed:_INVALID_SOCKET
call fcn.1800169b0
or eax, 0xffffffff
jmp 0x180024f07
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0xffffff7f
mov rcx, rax
mov byte [rsp + 0x30], bl
mov dword [rsp + 0x20], 1
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x180024e23
cmp dword [0x18009caf4], 5
jl 0x180024e23
lea rcx, str.setsockopt_DONTLINGER__failed:_SOCKET_ERROR
call fcn.1800169b0
mov rcx, qword [0x1800990a0]
lea rdx, [rsp + 0x38]
mov r8d, 0x10
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x180024eaf
cmp dword [0x18009caf4], 5
jl 0x180024e55
lea rcx, str.bind___failed:_SOCKET_ERROR
call fcn.1800169b0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x1800990a0]
lea rdx, [rsp + 0x38]
mov r8d, 0x10
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x180024eaf
nop dword [rax]
cmp ebx, 4
je 0x180024ee4
mov ecx, 0x3e8
inc ebx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [0x1800990a0]
lea rdx, [rsp + 0x38]
mov r8d, 0x10
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x180024e80
mov rcx, qword [0x1800990a0]
mov edx, 5
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x180024f02
cmp dword [0x18009caf4], 5
jl 0x180024ddd
lea rcx, str.listen___failed:_SOCKET_ERROR
call fcn.1800169b0
or eax, 0xffffffff
jmp 0x180024f07
cmp dword [0x18009caf4], 5
jl 0x180024ddd
lea rcx, str.bind___failed__unable_to_initialise_web_server
call fcn.1800169b0
or eax, 0xffffffff
jmp 0x180024f07
mov eax, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1800292b0
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret