Function at 0x40a230
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x828
mov eax, dword [0x43e008]
xor eax, esp
mov dword [esp + 0x824], eax
push ebx
mov ebx, dword [esp + 0x83c]
lea eax, [esp + 0x20]
push ebp
push esi
push edi
xor edi, edi
mov dword [esp + 0x24], edx
push 0x401
mov esi, ecx
mov dword [esp + 0x24], ebx
push edi
push eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x1c], edi
call sub.VCRUNTIME140.dll_memset
push 0x401
lea eax, [esp + 0x440]
push edi
push eax
call sub.VCRUNTIME140.dll_memset
push 0x400
push esi
lea eax, [esp + 0x4c]
push 0x401
lea ebp, [esp + 0x454]
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
push esi
mov dword [esp + 0x18], ebx
mov dword [ebx], 0
mov byte [ebp], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x40a474
cmp word [ebx + 8], 2
jne 0x40a377
cmp word [ebx + 0xa], 4
jne 0x40a377
mov edi, dword [ebx + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x40a373
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 0x40a411
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 0x40a407
mov dword [eax + 4], ebp
mov ecx, 2
mov word [eax], cx
add edi, 4
mov cx, word [esp + 0x840]
mov word [eax + 2], cx
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x14]
mov dword [esi + 8], ecx
mov ecx, dword [esp + 0x83c]
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 0x40a2f2
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 ebx, dword [esp + 0x30]
xor esi, esi
add esp, 0x10
cmp dword [ebx], esi
jne 0x40a425
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a3a0
sub ecx, edx
je case.0x40a484.11003
mov esi, dword [esp + 0x1c]
mov eax, ebp
mov ecx, esi
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x40a3d7
test dl, dl
je 0x40a3d3
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x40a3d7
add ecx, 2
add eax, 2
test dl, dl
jne 0x40a3b7
xor eax, eax
jmp 0x40a3dc
sbb eax, eax
or eax, 1
test eax, eax
je case.0x40a484.11003
inc edi
mov dword [esp + 0x10], edi
cmp edi, 0x10
je case.0x40a484.11003
mov eax, esi
mov dword [esp + 0x1c], ebp
mov esi, dword [esp + 0x28]
mov ebp, eax
mov dword [esp + 0x18], ebp
jmp 0x40a2b0
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
mov dword [eax], 0
jmp 0x40a49e
cmp dword [esp + 0x844], esi
je 0x40a49e
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a433
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 0x40a45d
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 + 0x20]
mov eax, dword [ecx]
mov dword [eax + 0x14], edi
mov eax, dword [ecx]
cmp dword [eax + 0x14], esi
jne 0x40a49e
mov esi, 8
jmp 0x40a49e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
add eax, 0xffffd507
cmp eax, 3
ja case.0x40a484.11001
jmp dword [eax*4 + 0x40a4bc]
mov esi, 0x2afa
jmp 0x40a49e
mov esi, 0x2afb
jmp 0x40a49e
mov esi, 0x2af9
mov ecx, dword [esp + 0x834]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004145b4
add esp, 0x828
ret 0x10