Function at 0x406600
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x820
push ebx
push ebp
push esi
push edi
xor edi, edi
mov dword [esp + 0x20], edx
push 0x401
lea eax, [esp + 0x2c]
mov dword [esp + 0x14], edi
mov ebx, ecx
push edi
push eax
mov dword [esp + 0x30], ebx
call sub.VCRUNTIME140.dll_memset
push 0x401
lea eax, [esp + 0x43c]
push edi
push eax
call sub.VCRUNTIME140.dll_memset
push 0x400
push ebx
lea eax, [esp + 0x48]
push 0x401
lea ebp, [esp + 0x450]
mov dword [esp + 0x40], eax
push eax
mov dword [esp + 0x40], ebp
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
add esp, 0x28
nop word [eax + eax]
mov ecx, dword [esp + 0x840]
push ebx
mov dword [esp + 0x18], ecx
mov byte [ebp], 0
mov dword [ecx], 0
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x406863
cmp word [ebx + 8], 2
jne 0x406745
cmp word [ebx + 0xa], 4
jne 0x406745
mov edi, dword [ebx + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x406741
nop dword [eax]
mov ebp, dword [eax]
push 0x20
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov esi, eax
add esp, 8
test esi, esi
je 0x4067e2
push 0x10
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
test eax, eax
je 0x4067d8
mov dword [eax + 4], ebp
mov ecx, 2
mov word [eax], cx
add edi, 4
mov cx, word [esp + 0x838]
mov word [eax + 2], cx
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x14]
mov dword [esi + 8], ecx
mov ecx, dword [esp + 0x834]
mov dword [esi + 4], 2
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], 0x10
mov dword [eax], esi
lea eax, [esi + 0x1c]
mov dword [esp + 0x14], eax
mov eax, dword [edi]
test eax, eax
jne 0x4066c0
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
push 0x400
push dword [ebx]
push 0x401
push ebp
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
mov eax, dword [esp + 0x850]
xor esi, esi
add esp, 0x10
cmp dword [eax], esi
jne 0x406800
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406771
sub ecx, edx
je case.0x406873.11003
mov ebx, dword [esp + 0x1c]
mov eax, ebp
mov ecx, ebx
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x4067a8
test dl, dl
je 0x4067a4
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x4067a8
add ecx, 2
add eax, 2
test dl, dl
jne 0x406788
xor eax, eax
jmp 0x4067ad
sbb eax, eax
or eax, 1
test eax, eax
je case.0x406873.11003
inc edi
mov dword [esp + 0x10], edi
cmp edi, 0x10
je case.0x406873.11003
mov eax, ebx
mov dword [esp + 0x1c], ebp
mov ebx, dword [esp + 0x24]
mov ebp, eax
mov dword [esp + 0x18], ebp
jmp 0x406670
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [esp + 0x14]
mov esi, 8
pop edi
mov dword [eax], 0
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x820
ret 0x10
cmp dword [esp + 0x83c], esi
je 0x4068a7
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406812
sub ecx, edx
lea ebx, [ecx + 1]
push ebx
push 1
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov edi, eax
add esp, 8
test edi, edi
je 0x40683c
push ebp
push ebx
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
add esp, 0xc
mov ecx, dword [esp + 0x840]
mov eax, dword [ecx]
mov dword [eax + 0x14], edi
mov eax, dword [ecx]
cmp dword [eax + 0x14], esi
jne 0x4068a7
mov esi, 8
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x820
ret 0x10
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
add eax, 0xffffd507
cmp eax, 3
ja case.0x406873.11001
jmp dword [eax*4 + 0x4068b8]
mov esi, 0x2afa
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x820
ret 0x10
mov esi, 0x2afb
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x820
ret 0x10
mov esi, 0x2af9
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x820
ret 0x10