Function at 0x4049a0
Capabilities:
Create thread
Create udp socket
Print debug messages
Reference 114dns dns server
Reference google public dns server
Set socket configuration

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c05f5
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x501040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x58], edi
cmp byte [edi + 4], 0
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x54], eax
je 0x4049f6
mov al, 1
jmp 0x404f79
lea eax, [edi + 8]
xorps xmm0, xmm0
push eax
lea ecx, [ebp - 0x48]
movlpd qword [ebp - 0x48], xmm0
call fcn.00406ca0
mov dword [ebp - 4], 0
cmp byte [edi + 4], 0
je 0x404a20
mov byte [ebp - 0x49], 1
jmp 0x404f33
mov esi, dword [sym.imp.WS2_32.dll_socket]
lea eax, [edi + 0xa8]
push 0x11
push 2
push 2
mov byte [ebp - 0x49], 0
mov dword [ebp - 0x5c], eax
call esi
push 0x11
push 2
push 2
mov dword [edi + 0xa8], eax
call esi
mov ecx, dword [edi + 0xa8]
lea esi, [edi + 0xac]
mov dword [ebp - 0x50], esi
mov dword [esi], eax
cmp ecx, 0xffffffff
je 0x404f04
cmp eax, 0xffffffff
je 0x404f04
mov esi, dword [sym.imp.WS2_32.dll_WSAIoctl]
lea eax, [ebp - 0x30]
push 0
push 0
push eax
push 0
push 0
push 4
lea eax, [ebp - 0x18]
mov dword [ebp - 0x30], 0
push eax
push 0x9800000c
push ecx
mov dword [ebp - 0x18], 0
call esi
push 0
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 0
push 0
push 4
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push eax
push 0x9800000c
push dword [edi + 0xac]
call esi
push dword [ebp - 0x54]
lea ecx, [edi + 0x258]
call fcn.00404fd0
mov esi, dword [edi + 0x2d4]
mov edi, dword [edi + 0xa8]
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], esi
push eax
push 0x1f
push 0
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x404f01
mov eax, dword [ebp - 0x50]
mov esi, dword [ebp - 0x58]
push 0
mov edi, dword [eax]
mov esi, dword [esi + 0x2d4]
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], esi
push eax
push 0x1f
push 0
push edi
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
call edi
test eax, eax
jne 0x404f01
mov esi, dword [ebp - 0x5c]
push 4
mov byte [ebp - 0x49], al
mov byte [ebp - 0x4a], al
lea eax, [ebp - 0x40]
push eax
push 0x1006
push 0xffff
push dword [esi]
mov dword [ebp - 0x40], 0x1f4
call edi
cmp eax, 0xffffffff
jne 0x404bd3
lea eax, [ebp - 0x40]
mov edx, esi
push eax
push 0x42
push str._WINTUN__2__DNS__DnsResolver__A_____setsockopt_sock_timems__n
lea ecx, [ebp - 0x2c]
call fcn.004087b0
add esp, 0xc
cmp dword [eax + 0x14], 0xf
jbe 0x404b82
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xf
jbe 0x404bbd
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x404bb3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404f99
push ecx
push edx
call fcn.00472d8e
add esp, 8
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
mov byte [ebp - 0x49], 1
mov edi, dword [ebp - 0x50]
lea eax, [ebp - 0x40]
push 4
push eax
push 0x1006
push 0xffff
push dword [edi]
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x404c64
lea eax, [ebp - 0x40]
mov edx, edi
push eax
push 0x42
push str._WINTUN__2__DNS__DnsResolver__AAAA__setsockopt_sock_timems__n
lea ecx, [ebp - 0x2c]
call fcn.004087b0
add esp, 0xc
cmp dword [eax + 0x14], 0xf
jbe 0x404c13
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xf
jbe 0x404c4e
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x404c44
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404f9e
push ecx
push edx
call fcn.00472d8e
add esp, 8
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
mov byte [ebp - 0x4a], 1
mov esi, dword [ebp - 0x58]
xorps xmm0, xmm0
mov ax, word [ebx + 0xc]
mov ecx, 2
movups xmmword [ebp - 0x24], xmm0
movups xmmword [esi + 0x238], xmm0
mov word [esi + 0x23a], ax
mov eax, dword [ebx + 8]
mov dword [esi + 0x23c], eax
mov al, byte [ebx + 0x14]
mov word [esi + 0x238], cx
mov byte [esi + 6], al
movups xmmword [esi + 0x2e4], xmm0
mov word [esi + 0x2e4], cx
movups xmmword [ebp - 0x24], xmm0
test al, al
je 0x404cb8
push str.114.114.114.114
jmp 0x404cbd
push str.8.8.8.8
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x35
mov dword [esi + 0x2e8], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 0x2e6], ax
mov eax, dword [esi + 0x2dc]
test eax, eax
je 0x404d46
cmp eax, 0xffffffff
je 0x404d46
cmp eax, dword [esi + 0x2e8]
je 0x404d46
mov eax, 2
xorps xmm0, xmm0
mov word [ebp - 0x24], ax
mov eax, dword [ebp - 0x54]
push 0x35
movlpd qword [ebp - 0x1c], xmm0
mov eax, dword [eax + 0x84]
mov dword [ebp - 0x20], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x22], ax
lea ecx, [esi + 0x2f4]
mov eax, dword [esi + 0x2f8]
cmp eax, dword [esi + 0x2fc]
je 0x404d3c
movups xmm0, xmmword [ebp - 0x24]
movups xmmword [eax], xmm0
add dword [esi + 0x2f8], 0x10
jmp 0x404d46
lea edx, [ebp - 0x24]
push edx
push eax
call fcn.0040aab0
mov ecx, dword [esi + 0x2e0]
test ecx, ecx
je 0x404dc9
cmp ecx, 0xffffffff
je 0x404dc9
cmp ecx, dword [esi + 0x2e8]
je 0x404dc9
mov eax, dword [esi + 0x2f8]
lea edi, [esi + 0x2f4]
mov edx, dword [edi]
sub eax, edx
test eax, 0xfffffff0
je 0x404d79
cmp ecx, dword [edx + 4]
je 0x404dc3
mov eax, 2
xorps xmm0, xmm0
mov word [ebp - 0x24], ax
mov eax, dword [ebp - 0x54]
push 0x35
movlpd qword [ebp - 0x1c], xmm0
mov eax, dword [eax + 0x88]
mov dword [ebp - 0x20], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x22], ax
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
je 0x404db7
movups xmm0, xmmword [ebp - 0x24]
movups xmmword [eax], xmm0
add dword [edi + 4], 0x10
jmp 0x404dc3
lea ecx, [ebp - 0x24]
push ecx
push eax
mov ecx, edi
call fcn.0040aab0
lea edi, [esi + 0xac]
mov al, byte [ebp - 0x49]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x37], al
mov eax, dword [esi + 0xa8]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x3c]
push eax
mov byte [esi + 5], 1
mov dword [ebp - 0x3c], 0x405480
mov byte [ebp - 0x38], 1
mov dword [ebp - 0x30], esi
call fcn.00408850
cmp dword [esi + 0x9c], 0
mov edx, eax
jne 0x404fa3
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [edx], 0
mov dword [edx + 4], 0
cmp dword [ebp - 0x18], 0
mov dword [esi + 0x98], eax
mov dword [esi + 0x9c], ecx
jne 0x404fa3
mov al, byte [ebp - 0x4a]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x37], al
mov eax, dword [edi]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x3c], 0x405480
mov byte [ebp - 0x38], 0
mov dword [ebp - 0x30], esi
call fcn.00408850
cmp dword [esi + 0xa4], 0
mov edx, eax
jne 0x404fa3
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [edx], 0
mov dword [edx + 4], 0
cmp dword [ebp - 0x18], 0
mov dword [esi + 0xa0], eax
mov dword [esi + 0xa4], ecx
jne 0x404fa3
push 8
call fcn.00472d9c
add esp, 4
mov dword [ebp - 0x18], eax
mov dword [eax], 0x405340
mov dword [eax + 4], esi
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
push ecx
push 0
push eax
push 0x40ba90
push 0
push 0
call fcn.004a0b8c
mov ecx, eax
add esp, 0x18
mov dword [ebp - 0x34], ecx
test ecx, ecx
je 0x404fa8
mov byte [ebp - 4], 0
cmp dword [esi + 0x94], 0
mov dword [ebp - 0x18], 0
jne 0x404fa3
mov eax, dword [ebp - 0x30]
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
mov dword [esi + 0x90], ecx
mov dword [esi + 0x94], eax
mov byte [esi + 4], 1
mov byte [ebp - 0x49], 1
jmp 0x404f33
mov esi, dword [ebp - 0x50]
mov edi, dword [ebp - 0x5c]
mov ecx, dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x404f23
push eax
call ecx
mov ecx, dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x404f33
push eax
call ecx
mov dword [esi], 0
mov dword [ebp - 4], 3
cmp byte [ebp - 0x44], 0
je 0x404f76
mov esi, dword [ebp - 0x48]
push esi
call fcn.004747a4
add esp, 4
test eax, eax
jne 0x404fb6
mov eax, dword [esi + 0x2c]
cmp eax, 0x7fffffff
je 0x404fbd
push esi
mov byte [esi + 0x84], 0
call fcn.004747b5
add esp, 4
lea ecx, [esi + 0x58]
push ecx
call fcn.00473d73
add esp, 4
mov al, byte [ebp - 0x49]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
call fcn.004a091e
call fcn.004a091e
call fcn.004a0c3d
push 6
mov dword [ebp - 0x30], 0
call fcn.004740f8
push 5
call fcn.004740f8
dec eax
push 6
mov dword [esi + 0x2c], eax
call fcn.004740f8
int3