Function at 0x408c4b
Capabilities:
Initialize winsock library
Resolve dns
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x70
push esi
xor esi, esi
push edi
push esi
push esi
push 1
push esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x28], esi
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapSetInformation]
push esi
call dword [sym.imp.api_ms_win_core_localization_l1_2_0.dll_SetThreadUILanguage]
mov edi, dword [ebp + 0xc]
push 2
pop eax
cmp dword [ebp + 8], eax
jne 0x408ceb
mov edx, dword [edi + 4]
cmp byte [edx], 0x3f
jne 0x408c97
movzx eax, byte [edx + 1]
test al, al
je 0x408da5
mov ecx, esi
movzx eax, byte [edx + ecx]
mov edi, 0x40341c
cmp al, byte [edi + ecx]
jne 0x408cb2
inc ecx
cmp ecx, 3
jne 0x408c99
jmp 0x408da5
mov ecx, esi
movzx eax, byte [edx + ecx]
mov edi, 0x403420
cmp al, byte [edi + ecx]
jne 0x408ccd
inc ecx
cmp ecx, 3
jne 0x408cb4
jmp 0x408da5
mov ecx, esi
movzx eax, byte [edx + ecx]
mov edi, 0x403424
cmp al, byte [edi + ecx]
mov edi, dword [ebp + 0xc]
jne 0x408ceb
inc ecx
cmp ecx, 6
jne 0x408ccf
jmp 0x408da5
push 0x412040
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, 0xffffffff
jne 0x408d3c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
push esi
mov dword [esp + 0x34], eax
lea eax, [esp + 0x1c]
push eax
push esi
push 0x26
push esi
push 0x900
call dword [sym.imp.api_ms_win_core_localization_l1_2_0.dll_FormatMessageA]
test eax, eax
je 0x408d3c
push dword [esp + 0x2c]
push dword [esp + 0x18]
call dword [sym.imp.MSWSOCK.dll_s_perror]
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
call fcn.0040a67b
cmp eax, 0xffffffff
jne 0x408d5b
push 0x27
push 2
pop eax
push eax
call fcn.0040b547
pop ecx
xor edi, edi
pop ecx
inc edi
jmp 0x4091dc
push 0x10
xor ecx, ecx
pop edx
inc ecx
call fcn.0040b5bf
mov dword [0x411bf0], eax
test eax, eax
jne 0x408d77
push 0xe
pop edi
jmp 0x4091dc
call fcn.0040a0b9
jmp 0x408d90
mov ecx, dword [edi]
cmp byte [ecx], 0x2d
jne 0x408d9e
inc ecx
cmp byte [ecx], 0
je 0x408d9e
call fcn.0040982a
mov eax, dword [ebp + 8]
add edi, 4
sub eax, 1
mov dword [ebp + 8], eax
jne 0x408d7e
push 2
pop edx
cmp eax, edx
jle 0x408daa
call fcn.00409229
test eax, eax
je 0x408db9
mov ecx, dword [edi]
cmp byte [ecx], 0x2d
je 0x408db9
mov dword [esp + 0x30], ecx
cmp eax, edx
jne 0x408f31
mov edx, dword [edi + 4]
lea ecx, [esp + 0x38]
sub esp, 0xc
call fcn.0040bf00
test eax, eax
je 0x408dfd
mov eax, dword [0x40e3d0]
test eax, eax
je 0x408eab
push 0x10
pop ecx
lea esi, [esp + 0x38]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov dword [0x40e3cc], 1
xor esi, esi
jmp 0x408ea6
lea eax, [esp + 0xc]
push eax
push esi
push esi
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x408e7d
mov eax, dword [esp + 0xc]
test eax, eax
je 0x408e7d
mov edi, esi
test eax, eax
je 0x408e67
cmp dword [eax + 0x18], esi
je 0x408e5a
cmp edi, dword [0x40e3cc]
jb 0x408e44
push 0x40
call dword [sym.imp.msvcrt.dll_malloc]
mov dword [edi*4 + 0x40e3d0], eax
pop ecx
test eax, eax
je 0x408d6f
mov edx, dword [esp + 0xc]
sub esp, 0xc
mov ecx, dword [edi*4 + 0x40e3d0]
mov edx, dword [edx + 0x18]
call fcn.0040c0ec
mov eax, dword [esp + 0xc]
inc edi
mov eax, dword [eax + 0x1c]
cmp edi, 0xa
jb 0x408e1b
push dword [esp + 0xc]
mov dword [0x40e3cc], edi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov dword [esp + 0xc], esi
jmp 0x408ea6
push dword [edi + 4]
push 0x28
push 2
pop edi
push edi
call fcn.0040b547
add esp, 0xc
push edi
call fcn.0040cd89
pop ecx
push eax
push 0xa
call dword [sym.imp.msvcrt.dll_fputc]
pop ecx
pop ecx
mov dword [0x40e3cc], esi
mov eax, dword [0x40e3d0]
cmp dword [0x40e3cc], 0
je 0x408f31
push dword [0x411bf0]
mov edx, eax
mov dword [0x411bf8], eax
mov ecx, eax
call fcn.0040754a
test eax, eax
je 0x409164
push 0xc
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov ecx, dword [0x411bf0]
mov dword [ecx], eax
test eax, eax
je 0x408d6f
push 0x40342c
push 0xc
push eax
call dword [sym.imp.msvcrt.dll_strcpy_s]
add esp, 0xc
xor ecx, ecx
inc ecx
call fcn.0040c1d2
mov ecx, dword [0x411bf0]
mov dword [ecx + 8], eax
test eax, eax
je 0x408d6f
mov edx, dword [0x411bf8]
push ecx
mov dword [eax], 1
mov dword [eax + 4], esi
push ecx
mov ecx, dword [ecx + 8]
call fcn.0040c2ad
jmp 0x409164
push esi
push esi
push 0x1030
mov dword [esp + 0x38], esi
call dword [sym.imp.DNSAPI.dll_DnsQueryConfigAllocEx]
mov edx, eax
mov dword [esp + 0x14], edx
test edx, edx
je 0x4090ea
mov eax, dword [0x40e3cc]
mov edi, esi
mov ecx, esi
mov dword [0x40e3cc], edi
cmp dword [edx + 4], 0
push 0x17
mov dword [esp + 0x38], eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x14], esi
pop eax
jbe 0x408fa9
lea ecx, [edx + 0x28]
cmp word [ecx - 8], ax
jne 0x408fa2
call fcn.00408c14
test eax, eax
je 0x408fa2
mov eax, dword [esp + 0x10]
add ecx, 0x40
inc eax
cmp eax, dword [edx + 4]
push 0x17
mov dword [esp + 0x14], eax
pop eax
jb 0x408f7b
mov ecx, esi
jmp 0x408fa9
xor ecx, ecx
inc ecx
mov dword [esp + 0x28], ecx
cmp dword [edx + 4], 0
mov dword [esp + 0x24], esi
jbe 0x4090d7
lea eax, [edx + 0x20]
mov dword [esp + 0x20], 0x3500
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x408fe6
push 0x17
pop ecx
cmp word [eax], cx
jne 0x408fe6
lea ecx, [eax + 8]
call fcn.00408c14
test eax, eax
mov eax, dword [esp + 0x10]
jne 0x4090a5
cmp dword [esp + 0x1c], 0
jne 0x40901c
push dword [0x411bf0]
mov edx, eax
mov dword [0x411bf8], eax
mov ecx, eax
call fcn.0040754a
mov edi, dword [0x40e3cc]
neg eax
mov edx, dword [esp + 0x14]
sbb eax, eax
mov dword [esp + 0x1c], 1
inc eax
mov dword [esp + 0x2c], eax
cmp edi, 0xa
jae 0x4090d7
cmp edi, dword [esp + 0x34]
jb 0x40904a
push 0x40
call dword [sym.imp.msvcrt.dll_malloc]
mov dword [edi*4 + 0x40e3d0], eax
mov edi, dword [0x40e3cc]
pop ecx
cmp dword [edi*4 + 0x40e3d0], esi
je 0x4090c3
mov eax, dword [esp + 0x10]
mov esi, eax
mov edi, dword [edi*4 + 0x40e3d0]
push 0x10
pop ecx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [0x40e3cc]
push 2
pop edx
mov ecx, dword [edi*4 + 0x40e3d0]
cmp word [ecx], dx
mov edx, dword [esp + 0x20]
jne 0x40907f
mov word [ecx + 2], dx
mov edi, dword [0x40e3cc]
mov ecx, dword [edi*4 + 0x40e3d0]
push 0x17
pop esi
cmp word [ecx], si
jne 0x409098
mov word [ecx + 2], dx
mov edi, dword [0x40e3cc]
mov edx, dword [esp + 0x14]
inc edi
mov dword [0x40e3cc], edi
xor esi, esi
mov ecx, dword [esp + 0x24]
add eax, 0x40
inc ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], ecx
cmp ecx, dword [edx + 4]
jae 0x4090d7
mov ecx, dword [esp + 0x28]
jmp 0x408fc6
push 0x1030
push dword [esp + 0x18]
call dword [sym.imp.DNSAPI.dll_DnsFreeConfigStructure]
jmp 0x408d6f
push 0x1030
push edx
call dword [sym.imp.DNSAPI.dll_DnsFreeConfigStructure]
cmp dword [esp + 0x2c], 0
jne 0x409164
mov eax, dword [0x40e3d0]
push 0xc
mov dword [0x411bf8], eax
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov ecx, dword [0x411bf0]
mov dword [ecx], eax
test eax, eax
je 0x408d6f
push 0x40342c
push 0xc
push eax
call dword [sym.imp.msvcrt.dll_strcpy_s]
add esp, 0xc
xor ecx, ecx
inc ecx
call fcn.0040c1d2
mov ecx, dword [0x411bf0]
mov dword [ecx + 8], eax
test eax, eax
je 0x408d6f
mov edx, dword [0x411bf8]
push ecx
mov dword [eax], 1
mov dword [eax + 4], esi
push ecx
mov ecx, dword [ecx + 8]
call fcn.0040c2ad
cmp dword [esp + 0x14], 0
jne 0x409164
push 0x2a
push 2
pop eax
push eax
call fcn.0040b547
pop ecx
pop ecx
mov eax, dword [0x411bf0]
cmp dword [eax], 0
je 0x408d6f
push dword [eax]
push 0x100
push 0x4121e0
call dword [sym.imp.msvcrt.dll_strcpy_s]
mov eax, dword [esp + 0x3c]
add esp, 0xc
test eax, eax
je 0x40919a
xor edx, edx
mov ecx, eax
call fcn.0040954c
jmp 0x4091d8
push dword [0x411bf0]
push 1
call fcn.0040cd89
pop ecx
push 0x2b
pop edx
mov ecx, eax
call fcn.0040b5ff
mov edi, 0x403434
push edi
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
push 1
call fcn.0040cd89
pop ecx
push eax
call dword [sym.imp.msvcrt.dll_fflush]
pop ecx
call fcn.00404250
test eax, eax
jne 0x4091b7
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4091eb
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov eax, dword [0x411bf0]
test eax, eax
je 0x4091fb
mov ecx, eax
call fcn.0040768b
mov eax, dword [0x40e3cc]
test eax, eax
je 0x409221
mov ecx, dword [esi*4 + 0x40e3d0]
test ecx, ecx
je 0x40921c
push ecx
call dword [sym.imp.msvcrt.dll_free]
mov eax, dword [0x40e3cc]
pop ecx
inc esi
cmp esi, eax
jb 0x409204
push edi
call dword [sym.imp.msvcrt.dll_exit]
int3