Function at 0x407320
Capabilities:
Resolve dns

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x20], r9d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x430]
sub rsp, 0x530
xor eax, eax
mov r15d, r8d
mov r12, rdx
mov rdi, rcx
test rdx, rdx
je 0x407946
cmp byte [rcx + 0x449], al
jne 0x407946
lea r14, [rcx + 0x22c]
or r13, 0xffffffffffffffff
mov word [r14], ax
mov rax, qword [rcx + 8]
mov ecx, 2
cmp rax, r13
je 0x40739b
mov edx, ecx
mov rcx, qword [rdi + 8]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rdi + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rdi + 8], r13
xor eax, eax
xorps xmm0, xmm0
movups xmmword [rdi + 0x10], xmm0
mov qword [rdi + 0x20], rax
mov dword [rdi + 0x28], eax
mov rbx, qword [rdi + 0x450]
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
xor r8d, r8d
mov esi, 1
add rax, rbx
mov qword [rdi + 0x458], rax
cmp byte [rbp + 0x498], r8b
je 0x407520
lea rdx, [rbp + 0x120]
call fcn.00457804
xor r8d, r8d
test al, al
je 0x407513
cmp dword [rbp + 0x424], r8d
ja 0x407404
cmp dword [rbp + 0x428], 2
jae 0x407513
mov eax, dword [rbp + 0x120]
mov ebx, dword [rbp + 0x488]
cmp eax, 3
jne 0x40744a
mov r9d, r15d
mov dword [rsp + 0x20], ebx
mov r8, r12
lea rdx, [rbp + 0x120]
mov rcx, rdi
call fcn.00405dac
test al, al
je 0x407444
xor r8d, r8d
mov edx, esi
call fcn.004576f8
mov al, sil
jmp 0x407948
mov eax, dword [rbp + 0x120]
cmp eax, esi
jne 0x407471
mov r9d, r15d
mov dword [rsp + 0x20], ebx
mov r8, r12
lea rdx, [rbp + 0x120]
mov rcx, rdi
call fcn.0040633c
test al, al
jne 0x407432
mov eax, dword [rbp + 0x120]
cmp eax, 2
jne 0x407493
mov r9d, r15d
mov dword [rsp + 0x20], ebx
mov r8, r12
lea rdx, [rbp + 0x120]
mov rcx, rdi
call fcn.00406844
test al, al
jne 0x407432
mov r8d, esi
xor edx, edx
call fcn.004576f8
lea r9, [rbp + 0x124]
mov qword [rsp + 0x20], r14
lea r8, str._s_proxy_connect_failed___s___reconnect_directly
lea rdx, str.Socket
lea rcx, [0x004e0f30]
call fcn.004573dc
mov rax, qword [rdi + 8]
cmp rax, r13
je 0x4074e9
mov rcx, qword [rdi + 8]
mov edx, 2
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rdi + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rdi + 8], r13
xor eax, eax
xorps xmm0, xmm0
movups xmmword [rdi + 0x10], xmm0
mov qword [rdi + 0x20], rax
mov dword [rdi + 0x28], eax
mov rbx, qword [rdi + 0x450]
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
add rax, rbx
mov qword [rdi + 0x458], rax
xor r8d, r8d
cmp byte [rdi + 0x449], r8b
jne 0x407946
lea r14, [rdi + 0x2c]
mov edx, 0xff
lea rbx, [rdi + 0x22c]
mov rcx, r14
mov word [rbx], r8w
sub r12, r14
lea rax, [rdx + 0x7ffffeff]
test rax, rax
je 0x40755c
movzx eax, word [r12 + rcx]
test ax, ax
je 0x40755c
mov word [rcx], ax
add rcx, 2
sub rdx, rsi
jne 0x40753a
lea rax, [rcx - 2]
xor r12d, r12d
test rdx, rdx
mov edx, 0x100
cmovne rax, rcx
mov rcx, r14
mov word [rax], r12w
call fcn.0043771c
xor edx, edx
lea rcx, [rsp + 0x60]
mov r8d, 0x1c0
call fcn.00424830
test r14, r14
je 0x407907
cmp word [r14], r12w
je 0x407907
lea rcx, str.http:__
mov byte [rdi + 0x448], r12b
mov rdx, r14
lea r8d, [r12 + 7]
sub rdx, rcx
lea r9d, [r12 + 2]
movzx eax, word [rcx]
cmp word [rdx + rcx], ax
jne 0x4075fa
add rcx, r9
sub r8, rsi
jne 0x4075be
mov r8, r13
inc r8
cmp word [r14 + r8*2], r12w
jne 0x4075d2
lea r8, [r8*2 - 0xc]
lea rdx, [rdi + 0x3a]
mov rcx, r14
call fcn.00424180
mov eax, 0x50
jmp 0x4076cc
lea rcx, str.https:__
mov rdx, r14
sub rdx, rcx
mov r8d, 8
movzx eax, word [rcx]
cmp word [rdx + rcx], ax
jne 0x407639
add rcx, r9
sub r8, rsi
jne 0x40760d
mov r8, r13
inc r8
cmp word [r14 + r8*2], r12w
jne 0x407621
lea r8, [r8*2 - 0xe]
lea rdx, [rdi + 0x3c]
jmp 0x4076b8
lea rcx, [0x00490340]
mov rdx, r14
sub rdx, rcx
mov r8d, 5
movzx eax, word [rcx]
cmp word [rdx + rcx], ax
jne 0x40767b
add rcx, r9
sub r8, rsi
jne 0x40764c
mov r8, r13
inc r8
cmp word [r14 + r8*2], r12w
jne 0x407660
lea r8, [r8*2 - 8]
lea rdx, [rdi + 0x36]
jmp 0x4075e8
lea rcx, str.wss:__
mov rdx, r14
sub rdx, rcx
mov r8d, 6
movzx eax, word [rcx]
cmp word [rdx + rcx], ax
jne 0x4076d6
add rcx, r9
sub r8, rsi
jne 0x40768e
mov r8, r13
inc r8
cmp word [r14 + r8*2], r12w
jne 0x4076a2
lea r8, [r8*2 - 0xa]
lea rdx, [rdi + 0x38]
mov rcx, r14
call fcn.00424180
mov eax, 0x1bb
mov byte [rdi + 0x448], sil
test r15d, r15d
cmovne eax, r15d
mov r15d, eax
mov edx, 0x2f
mov rcx, r14
call fcn.00423e30
test rax, rax
je 0x4076ec
mov word [rax], r12w
cmp word [r14], 0x5b
jne 0x40773a
inc r13
cmp word [r14 + r13*2], r12w
jne 0x4076f3
lea r8, [r13*2]
mov rcx, r14
lea rdx, [rdi + 0x2e]
call fcn.00424180
lea rdx, [0x004860fc]
mov rcx, r14
call fcn.00423b70
test rax, rax
je 0x407907
mov word [rax], r12w
cmp word [rax + 2], 0x3a
jne 0x40775e
lea rcx, [rax + 4]
jmp 0x407756
lea rdx, [0x0048d7b8]
mov rcx, r14
call fcn.00423b70
test rax, rax
je 0x40775e
mov word [rax], r12w
lea rcx, [rax + 2]
call fcn.00436ec0
mov r15d, eax
test r15d, r15d
mov eax, 0x1bb
cmove r15d, eax
cmp byte [rdi + 0x448], r12b
jne 0x407788
cmp r15d, eax
je 0x407781
cmp r15d, 0x1d1
jne 0x407788
mov byte [rdi + 0x448], sil
xorps xmm0, xmm0
lea r9, [rbp + 0x478]
movups xmmword [rsp + 0x30], xmm0
xor r13d, r13d
mov dword [rsp + 0x38], esi
lea r8, [rsp + 0x30]
mov dword [rsp + 0x3c], 6
xor edx, edx
mov qword [rbp + 0x478], r13
mov rcx, r14
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
call qword [sym.imp.WS2_32.dll_GetAddrInfoW]
test eax, eax
jne 0x407864
mov rcx, qword [rbp + 0x478]
test rcx, rcx
je 0x407864
lea eax, [r13 + 0x17]
cmp dword [rcx + 4], eax
jne 0x407826
mov rdx, qword [rcx + 0x20]
mov rax, qword [rdx + 8]
cmp rax, qword [0x004bb168]
jne 0x407806
mov rax, qword [rdx + 0x10]
cmp rax, qword [0x004bb170]
je 0x40785e
movups xmm0, xmmword [rdx + 8]
movzx ecx, r15w
movdqu xmmword [rsp + 0x68], xmm0
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x62], ax
mov eax, 0x17
jmp 0x40784f
cmp dword [rcx + 4], 2
jne 0x40785e
mov rax, qword [rcx + 0x20]
mov edx, dword [rax + 4]
test edx, edx
je 0x40785e
movzx ecx, r15w
mov dword [rsp + 0x64], edx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x62], ax
mov eax, 2
mov rcx, qword [rbp + 0x478]
mov r12d, esi
mov word [rsp + 0x60], ax
call qword [sym.imp.WS2_32.dll_FreeAddrInfoW]
cmp r12d, esi
jb 0x407904
mov ebx, r13d
mov r13d, dword [rbp + 0x488]
mov r9, qword [rbp + 0x490]
lea r15, [rsp + 0x60]
movsxd rax, ebx
mov r8d, r13d
imul rcx, rax, 0x1c
add r15, rcx
mov rcx, rdi
mov rdx, r15
call fcn.00407024
test al, al
jne 0x4078ab
add ebx, esi
cmp ebx, r12d
jl 0x407877
jmp 0x407946
movups xmm0, xmmword [r15]
mov eax, dword [r15 + 0x18]
movsd xmm1, qword [r15 + 0x10]
mov rbx, qword [rdi + 0x450]
movups xmmword [rdi + 0x10], xmm0
movsd qword [rdi + 0x20], xmm1
mov dword [rdi + 0x28], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount64]
lea r8, str._I64u__s_connected
mov qword [rsp + 0x20], r14
add rax, rbx
lea rdx, str.Socket
mov qword [rdi + 0x458], rax
lea rcx, [0x004e0f30]
mov r9, qword [rdi + 8]
call fcn.004573dc
jmp 0x40743c
xor r12d, r12d
lea rcx, str.address_resolve_failed
mov edx, 0xff
sub rcx, rbx
lea rax, [rdx + 0x7ffffeff]
test rax, rax
je 0x407937
movzx eax, word [rcx + rbx]
test ax, ax
je 0x407937
mov word [rbx], ax
add rbx, 2
sub rdx, rsi
jne 0x407916
test rdx, rdx
lea rax, [rbx - 2]
cmovne rax, rbx
mov word [rax], r12w
xor al, al
mov rbx, qword [rsp + 0x570]
add rsp, 0x530
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret