Function at 0x403760
Capabilities:
Resolve dns

Disassembly:
push rbp
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x20], rcx
mov eax, edx
mov word [rbp + 0x28], ax
mov ebx, 0
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
cmp qword [rbp + 0x20], 0
je 0x40379c
mov ecx, 0x1e0
call fcn.00403637
mov rbx, rax
test rbx, rbx
jne 0x4037ad
lea rcx, str.problems_while_pooping_the_host
call fcn.004034e7
mov rax, rbx
lea rdx, str._UNKNOWN_
mov rcx, rax
call sub.msvcrt.dll_strcpy
mov rcx, qword [rbp + 0x20]
mov rax, qword [sym.imp.WSOCK32.dll_inet_addr]
call rax
mov dword [rbp - 0x10], eax
mov eax, dword [rbp - 0x10]
cmp eax, 0xffffffff
jne 0x4039a3
cmp word [rbp + 0x28], 0
je 0x4037f2
mov rdx, qword [rbp + 0x20]
lea rcx, str._s_is_not_a_valid_ip
call fcn.004034e7
mov rcx, qword [rbp + 0x20]
mov rax, qword [sym.imp.WSOCK32.dll_gethostbyname]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x403826
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov r8d, eax
mov rdx, qword [rbp + 0x20]
lea rcx, str.The_lookup_for__s_has_failed_with_n.__d
call fcn.004034e7
mov rax, qword [rbp - 8]
mov rax, qword [rax]
mov rcx, rbx
mov r8d, 0x100
mov rdx, rax
call sub.msvcrt.dll_strncpy
mov esi, 0
jmp 0x4038bc
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x18]
movsxd rdx, esi
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
movsxd rdx, esi
add rdx, 0x70
shl rdx, 2
lea rcx, [rbx + rdx]
mov r8d, 4
mov rdx, rax
call sub.msvcrt.dll_memcpy
movsxd rax, esi
add rax, 0x70
mov eax, dword [rbx + rax*4]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_inet_ntoa]
call rax
mov rcx, rax
movsxd rdx, esi
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
add rax, 0x100
add rax, rbx
mov r8d, 0x18
mov rdx, rcx
mov rcx, rax
call sub.msvcrt.dll_strncpy
add esi, 1
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x18]
movsxd rdx, esi
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
test rax, rax
je 0x4038df
cmp esi, 7
jle 0x403845
movzx eax, word [0x0040d0ca]
test ax, ax
jne 0x4038f3
mov rax, rbx
jmp 0x403abf
mov esi, 0
jmp 0x403983
movsxd rax, esi
add rax, 0x70
shl rax, 2
add rax, rbx
mov r8d, 2
mov edx, 4
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_gethostbyaddr]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x403939
mov rax, qword [rbp - 8]
mov rax, qword [rax]
test rax, rax
jne 0x403971
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov ecx, eax
movsxd rdx, esi
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
add rax, 0x100
add rax, rbx
mov r8d, ecx
mov rdx, rax
lea rcx, str.The_reverse_lookup_for__s_has_failed_with_n.__d
call fcn.004033f9
jmp 0x403980
mov rax, qword [rbp - 8]
mov rdx, rax
mov rcx, rbx
call fcn.004036fb
add esi, 1
movsxd rax, esi
add rax, 0x70
mov eax, dword [rbx + rax*4]
test eax, eax
je 0x403abc
cmp esi, 7
jle 0x4038fd
jmp 0x403abc
lea rax, [rbx + 0x1c0]
lea rdx, [rbp - 0x10]
mov r8d, 4
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov eax, dword [rbp - 0x10]
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_inet_ntoa]
call rax
mov rdx, rax
lea rax, [rbx + 0x100]
mov r8d, 0xc0
mov rcx, rax
call sub.msvcrt.dll_strncpy
cmp word [rbp + 0x28], 0
je 0x4039f1
mov rax, rbx
jmp 0x403abf
movzx eax, word [0x0040d0ca]
test ax, ax
jne 0x403a05
mov rax, rbx
jmp 0x403abf
lea rax, [rbp - 0x10]
mov r8d, 2
mov edx, 4
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_gethostbyaddr]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x403a49
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov r8d, eax
mov rdx, qword [rbp + 0x20]
lea rcx, str.The_reverse_lookup_for__s_has_failed_with_n.__d
call fcn.004033f9
jmp 0x403abc
mov rax, qword [rbp - 8]
mov rax, qword [rax]
mov rcx, rbx
mov r8d, 0xfe
mov rdx, rax
call sub.msvcrt.dll_strncpy
mov rax, rbx
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_gethostbyname]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x403a8b
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
test rax, rax
jne 0x403aad
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rax, rbx
mov r8d, edx
mov rdx, rax
lea rcx, str.The_lookup_for__s_has_failed_with_n.__d
call fcn.004033f9
jmp 0x403abc
mov rax, qword [rbp - 8]
mov rdx, rax
mov rcx, rbx
call fcn.004036fb
mov rax, rbx
add rsp, 0x30
pop rbx
pop rsi
pop rbp
ret