Function at 0x403841
Capabilities:
Resolve dns

Disassembly:
push rbp
mov rbp, rsp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov qword [rbp + 0x10], rcx
mov eax, edx
mov word [rbp + 0x18], ax
mov ebx, 0
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
cmp qword [rbp + 0x10], 0
je 0x40387e
mov ecx, 0x1e0
call fcn.0040371e
mov rbx, rax
test rbx, rbx
jne 0x40388f
lea rcx, [0x00409667]
call fcn.004035db
lea rdx, str._UNKNOWN_
mov rax, rbx
mov rcx, rax
call sub.msvcrt.dll_strcpy
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.WSOCK32.dll_inet_addr]
call rax
mov dword [rbp - 0x30], eax
mov eax, dword [rbp - 0x30]
cmp eax, 0xffffffff
jne 0x403a98
cmp word [rbp + 0x18], 0
je 0x4038d4
mov rdx, qword [rbp + 0x10]
lea rcx, [0x00409680]
call fcn.004035db
mov rcx, qword [rbp + 0x10]
mov rax, qword [sym.imp.WSOCK32.dll_gethostbyname]
call rax
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
jne 0x403908
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov r8d, eax
mov rdx, qword [rbp + 0x10]
lea rcx, [0x004096a0]
call fcn.004035db
mov rax, qword [rbp - 0x28]
mov rax, qword [rax]
mov rdx, rax
mov rax, rbx
mov r8d, 0x100
mov rcx, rax
call sub.msvcrt.dll_strncpy
mov esi, 0
jmp 0x4039a9
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 0x18]
movsxd rdx, esi
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
lea rdx, [rbx + 0x1c0]
movsxd rcx, esi
shl rcx, 2
lea rcx, [rdx + rcx]
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
lea rax, [rbx + 0x100]
mov rdi, rax
movsxd rdx, esi
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
lea rax, [rdi + rax]
mov r8d, 0x18
mov rdx, rcx
mov rcx, rax
call sub.msvcrt.dll_strncpy
add esi, 1
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 0x18]
movsxd rdx, esi
shl rdx, 3
add rax, rdx
mov rax, qword [rax]
test rax, rax
je 0x4039cc
cmp esi, 7
jle 0x40392a
movzx eax, word [0x0040b0da]
test ax, ax
jne 0x4039e0
mov rax, rbx
jmp 0x403bb7
mov esi, 0
jmp 0x403a78
lea rax, [rbx + 0x1c0]
movsxd rdx, esi
shl rdx, 2
add rax, rdx
mov r8d, 2
mov edx, 4
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_gethostbyaddr]
call rax
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
je 0x403a29
mov rax, qword [rbp - 0x28]
mov rax, qword [rax]
test rax, rax
jne 0x403a66
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov ecx, eax
lea rax, [rbx + 0x100]
mov rdi, rax
movsxd rdx, esi
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 3
lea rax, [rdi + rax]
mov r8d, ecx
mov rdx, rax
lea rcx, [0x004096d0]
call fcn.004034eb
jmp 0x403a75
mov rax, qword [rbp - 0x28]
mov rdx, rax
mov rcx, rbx
call fcn.004037e0
add esi, 1
movsxd rax, esi
add rax, 0x70
mov eax, dword [rbx + rax*4]
test eax, eax
je 0x403bb4
cmp esi, 7
jle 0x4039ea
jmp 0x403bb4
lea rax, [rbx + 0x1c0]
lea rdx, [rbp - 0x30]
mov r8d, 4
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov eax, dword [rbp - 0x30]
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 + 0x18], 0
je 0x403ae6
mov rax, rbx
jmp 0x403bb7
movzx eax, word [0x0040b0da]
test ax, ax
jne 0x403afa
mov rax, rbx
jmp 0x403bb7
lea rax, [rbp - 0x30]
mov r8d, 2
mov edx, 4
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_gethostbyaddr]
call rax
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
jne 0x403b3e
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov r8d, eax
mov rdx, qword [rbp + 0x10]
lea rcx, [0x00409708]
call fcn.004034eb
jmp 0x403bb4
mov rax, qword [rbp - 0x28]
mov rax, qword [rax]
mov rdx, rax
mov rax, rbx
mov r8d, 0xfe
mov rcx, 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 - 0x28], rax
cmp qword [rbp - 0x28], 0
je 0x403b83
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
test rax, rax
jne 0x403ba5
mov rax, qword [sym.imp.WSOCK32.dll_WSAGetLastError]
call rax
mov edx, eax
mov rax, rbx
mov r8d, edx
mov rdx, rax
lea rcx, [0x00409738]
call fcn.004034eb
jmp 0x403bb4
mov rax, qword [rbp - 0x28]
mov rdx, rax
mov rcx, rbx
call fcn.004037e0
mov rax, rbx
add rsp, 0x38
pop rbx
pop rsi
pop rdi
leave
ret