Function at 0x404f40
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 0x5b8c95
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x624040]
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 0x404f96
mov al, 1
jmp 0x405519
lea eax, [edi + 8]
xorps xmm0, xmm0
push eax
lea ecx, [ebp - 0x48]
movlpd qword [ebp - 0x48], xmm0
call fcn.00407320
mov dword [ebp - 4], 0
cmp byte [edi + 4], 0
je 0x404fc0
mov byte [ebp - 0x49], 1
jmp 0x4054d3
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 0x4054a4
cmp eax, 0xffffffff
je 0x4054a4
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.00405570
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 0x4054a1
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 0x4054a1
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 0x405173
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.00409020
add esp, 0xc
cmp dword [eax + 0x14], 0xf
jbe 0x405122
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xf
jbe 0x40515d
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x405153
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405539
push ecx
push edx
call fcn.0048335e
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 0x405204
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.00409020
add esp, 0xc
cmp dword [eax + 0x14], 0xf
jbe 0x4051b3
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xf
jbe 0x4051ee
mov edx, dword [ebp - 0x2c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4051e4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40553e
push ecx
push edx
call fcn.0048335e
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 0x405258
push str.114.114.114.114
jmp 0x40525d
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 0x4052e6
cmp eax, 0xffffffff
je 0x4052e6
cmp eax, dword [esi + 0x2e8]
je 0x4052e6
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 0x4052dc
movups xmm0, xmmword [ebp - 0x24]
movups xmmword [eax], xmm0
add dword [esi + 0x2f8], 0x10
jmp 0x4052e6
lea edx, [ebp - 0x24]
push edx
push eax
call fcn.0040b3e0
mov ecx, dword [esi + 0x2e0]
test ecx, ecx
je 0x405369
cmp ecx, 0xffffffff
je 0x405369
cmp ecx, dword [esi + 0x2e8]
je 0x405369
mov eax, dword [esi + 0x2f8]
lea edi, [esi + 0x2f4]
mov edx, dword [edi]
sub eax, edx
test eax, 0xfffffff0
je 0x405319
cmp ecx, dword [edx + 4]
je 0x405363
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 0x405357
movups xmm0, xmmword [ebp - 0x24]
movups xmmword [eax], xmm0
add dword [edi + 4], 0x10
jmp 0x405363
lea ecx, [ebp - 0x24]
push ecx
push eax
mov ecx, edi
call fcn.0040b3e0
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], 0x405a20
mov byte [ebp - 0x38], 1
mov dword [ebp - 0x30], esi
call fcn.004090c0
cmp dword [esi + 0x9c], 0
mov edx, eax
jne 0x405543
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 0x405543
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], 0x405a20
mov byte [ebp - 0x38], 0
mov dword [ebp - 0x30], esi
call fcn.004090c0
cmp dword [esi + 0xa4], 0
mov edx, eax
jne 0x405543
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 0x405543
push 8
call fcn.0048336c
add esp, 4
mov dword [ebp - 0x18], eax
mov dword [eax], 0x4058e0
mov dword [eax + 4], esi
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
push ecx
push 0
push eax
push 0x40c400
push 0
push 0
call fcn.00595613
mov ecx, eax
add esp, 0x18
mov dword [ebp - 0x34], ecx
test ecx, ecx
je 0x405548
mov byte [ebp - 4], 0
cmp dword [esi + 0x94], 0
mov dword [ebp - 0x18], 0
jne 0x405543
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 0x4054d3
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 0x4054c3
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 0x4054d3
push eax
call ecx
mov dword [esi], 0
mov dword [ebp - 4], 3
cmp byte [ebp - 0x44], 0
je 0x405516
mov esi, dword [ebp - 0x48]
push esi
call fcn.00485479
add esp, 4
test eax, eax
jne 0x405556
mov eax, dword [esi + 0x2c]
cmp eax, 0x7fffffff
je 0x40555d
push esi
mov byte [esi + 0x84], 0
call fcn.0048548a
add esp, 4
lea ecx, [esi + 0x58]
push ecx
call fcn.004844c3
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.004830fa
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
call fcn.0059539e
call fcn.0059539e
call fcn.005956c4
push 6
mov dword [ebp - 0x30], 0
call fcn.00484dcd
push 5
call fcn.00484dcd
dec eax
push 6
mov dword [esi + 0x2c], eax
call fcn.00484dcd
int3