Function at 0x478310
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4964fb
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x4d8b40]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
movzx eax, byte [esi + 0x74]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00450eb0
mov edi, eax
push str.UDP:_open_socket_for_host:
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov dword [ebp - 4], 0
lea ebx, [esi + 0x30]
call fcn.004151a0
add esp, 0x10
mov ecx, ebx
cmp dword [ebx + 0x14], 0xf
jbe 0x478377
mov ecx, dword [ebx]
push dword [ebx + 0x10]
push ecx
push eax
call fcn.00415af0
lea ecx, [esi + 0x48]
push str.__port:
push eax
mov dword [ebp - 0xa4], ecx
call fcn.004151a0
add esp, 0x14
lea ecx, [esi + 0x48]
cmp dword [esi + 0x5c], 0xf
mov edx, eax
jbe 0x4783a6
mov ecx, dword [esi + 0x48]
push dword [esi + 0x58]
push ecx
push edx
call fcn.00415af0
push str.__filter:
push eax
call fcn.004151a0
add esp, 0x14
mov ecx, edi
cmp dword [edi + 0x14], 0xf
jbe 0x4783c8
mov ecx, dword [edi]
push dword [edi + 0x10]
push ecx
push eax
call fcn.00415af0
mov ecx, dword [ebp - 0x14]
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
cmp ecx, 0xf
jbe 0x478412
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x478408
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x478408
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0048599f
add esp, 8
cmp byte [esi + 0x74], 0
je 0x4784a6
lea eax, [ebp - 0x28]
push eax
lea ecx, [esi + 0x68]
call fcn.0046b350
mov edi, eax
push str.__allowed:_
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov dword [ebp - 4], 1
call fcn.004151a0
add esp, 8
mov ecx, edi
cmp dword [edi + 0x14], 0xf
jbe 0x47844e
mov ecx, dword [edi]
push 0x49a298
push dword [edi + 0x10]
push ecx
push eax
call fcn.00415af0
add esp, 0xc
push eax
call fcn.004151a0
mov ecx, dword [ebp - 0x14]
add esp, 8
mov dword [ebp - 4], 0xffffffff
cmp ecx, 0xf
jbe 0x4784a6
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x47849c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x47849c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0048599f
add esp, 8
movzx eax, byte [esi + 0x79]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00450eb0
mov edi, eax
push str.__JSON:
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov dword [ebp - 4], 2
call fcn.004151a0
add esp, 0x10
mov ecx, edi
cmp dword [edi + 0x14], 0xf
jbe 0x4784da
mov ecx, dword [edi]
push dword [edi + 0x10]
push ecx
push eax
call fcn.00415af0
mov ecx, dword [ebp - 0x14]
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
cmp ecx, 0xf
jbe 0x478524
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x47851a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x47851a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0048599f
add esp, 8
cmp byte [esi + 0x78], 0
je 0x47853d
push str.__broadcast:_true
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004151a0
add esp, 8
mov eax, dword [esi + 0x60]
test eax, eax
jle 0x478560
push eax
push str.__reset:
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004151a0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
cmp dword [esi + 0x8c], 0
je 0x47859b
push str.__uuid:
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004151a0
add esp, 8
lea ecx, [esi + 0x7c]
cmp dword [esi + 0x90], 0xf
jbe 0x47858b
mov ecx, dword [esi + 0x7c]
push dword [esi + 0x8c]
push ecx
push eax
call fcn.00415af0
add esp, 0xc
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push 0x4161d0
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
cmp dword [esi + 0x28], 0xffffffff
jne 0x47870d
cmp dword [esi + 0x5c], 0xf
lea ecx, [esi + 0x48]
xorps xmm0, xmm0
mov dword [ebp - 0xd4], 0
movlpd qword [ebp - 0xc4], xmm0
movlpd qword [ebp - 0xbc], xmm0
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xcc], 2
mov dword [ebp - 0xc8], 0x11
jbe 0x4785fd
mov ecx, dword [esi + 0x48]
cmp dword [ebx + 0x14], 0xf
mov eax, ebx
jbe 0x478607
mov eax, dword [ebx]
lea edi, [esi + 0x2c]
push edi
lea edx, [ebp - 0xd4]
push edx
push ecx
push eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x47868c
mov ecx, dword [edi]
test ecx, ecx
je 0x47868c
push dword [ecx + 0xc]
push dword [ecx + 8]
push dword [ecx + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x28], eax
cmp eax, 0xffffffff
je 0x478728
lea ecx, [ebp - 0xa8]
mov dword [ebp - 0xa8], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [esi + 0x60], 0
jle 0x478670
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
add esp, 4
mov dword [esi + 0x64], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00485bfe
mov esp, ebp
pop ebp
ret
push eax
call fcn.00479cc0
add esp, 4
lea ecx, [ebp - 0x28]
push eax
call fcn.00416490
push ebx
lea eax, [ebp - 0x70]
mov dword [ebp - 4], 3
push str.UDP_network_address_and_or_port_not_valid:
push eax
call fcn.004155a0
push str._port
push eax
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 4
push eax
call fcn.004154c0
lea ecx, [esi + 0x48]
mov byte [ebp - 4], 5
push ecx
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00415460
push str._code:
push eax
lea eax, [ebp - 0x88]
mov byte [ebp - 4], 6
push eax
call fcn.004154c0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 7
push ecx
push eax
lea eax, [ebp - 0xa0]
push eax
call fcn.00415460
add esp, 0x3c
mov byte [ebp - 4], 8
jmp 0x478769
push str.UDP:_internal_error__socket_already_defined.
lea ecx, [ebp - 0x1c]
call fcn.00418e60
push 0x4a7970
lea eax, [ebp - 0x1c]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push ebx
lea eax, [ebp - 0x40]
push str.cannot_create_socket_for_UDP
push eax
call fcn.004155a0
push str._port
push eax
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 9
push eax
call fcn.004154c0
mov ecx, dword [ebp - 0xa4]
push ecx
push eax
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 0xa
push eax
call fcn.00415460
add esp, 0x24
mov byte [ebp - 4], 0xb
push eax
lea ecx, [ebp - 0xb4]
call fcn.00418e10
push 0x4a7970
lea eax, [ebp - 0xb4]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3