Function at 0x140084640
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push rbp
sub rsp, 0x650
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x5e0], rcx
mov dword [rbp + 0x5e8], edx
mov eax, r8d
mov byte [rbp + 0x5f0], al
cmp byte [rbp + 0x5f0], 0
je 0x1400846b0
mov rax, qword [rbp + 0x5e0]
mov rdx, qword [rax + 0x220]
mov rax, qword [rbp + 0x5e0]
mov rcx, qword [rax + 0x240]
lea rax, [rbp + 0x1c0]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.CONNECT__s:_s_HTTP_1.0_r_n_r_n
mov edx, 0x400
mov rcx, rax
call dbg.snprintf
jmp 0x140084712
mov rax, qword [rbp + 0x5e0]
mov r8, qword [rax + 0x220]
mov rax, qword [rbp + 0x5e0]
mov rcx, qword [rax + 0x240]
mov rax, qword [rbp + 0x5e0]
mov rdx, qword [rax + 0x220]
mov rax, qword [rbp + 0x5e0]
mov r9, qword [rax + 0x240]
lea rax, [rbp + 0x1c0]
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdx
lea r8, str.CONNECT__s:_s_HTTP_1.1_r_nHost:__s:_s_r_n_r_n
mov edx, 0x400
mov rcx, rax
call dbg.snprintf
mov rax, qword [0x14011bd40]
movzx eax, byte [rax]
test al, al
je 0x1400847ad
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x14008474e
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x14008474e
mov rax, qword [0x14011be10]
mov eax, dword [rax]
cmp eax, 3
jle 0x1400847ad
mov rax, qword [rbp + 0x5e0]
mov rdx, qword [rax + 0x250]
mov rax, qword [rbp + 0x5e0]
mov r8, qword [rax + 0x248]
lea rax, [rbp - 0x40]
lea rcx, [rbp + 0x1c0]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdx
mov r9, r8
lea r8, str.Sending_proxy__s:_s____s
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp - 0x40]
mov r8d, 0
mov rdx, rax
mov ecx, 4
call dbg._applog
lea rax, [rbp + 0x1c0]
mov rcx, rax
call sym.strlen
mov ecx, eax
mov eax, dword [rbp + 0x5e8]
cdqe
lea rdx, [rbp + 0x1c0]
mov r9d, 0
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_send]
call rax
mov eax, dword [rbp + 0x5e8]
cdqe
lea rdx, [rbp + 0x1c0]
mov r9d, 0
mov r8d, 0xc
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_recv]
call rax
mov dword [rbp + 0x5c8], eax
cmp dword [rbp + 0x5c8], 0
jg 0x1400848a2
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x140084845
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x140084845
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
jle 0x140084898
mov rax, qword [rbp + 0x5e0]
mov rdx, qword [rax + 0x250]
mov rax, qword [rbp + 0x5e0]
mov rcx, qword [rax + 0x248]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.Couldnt_read_from_proxy__s:_s_after_sending_CONNECT
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp - 0x40]
mov r8d, 0
mov rdx, rax
mov ecx, 1
call dbg._applog
mov eax, 0
jmp 0x140084c99
mov eax, dword [rbp + 0x5c8]
cdqe
mov byte [rbp + rax + 0x1c0], 0
mov rax, qword [0x14011bd40]
movzx eax, byte [rax]
test al, al
je 0x14008494d
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400848ee
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400848ee
mov rax, qword [0x14011be10]
mov eax, dword [rax]
cmp eax, 3
jle 0x14008494d
mov rax, qword [rbp + 0x5e0]
mov rdx, qword [rax + 0x250]
mov rax, qword [rbp + 0x5e0]
mov r8, qword [rax + 0x248]
lea rax, [rbp - 0x40]
lea rcx, [rbp + 0x1c0]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdx
mov r9, r8
lea r8, str.Received_from_proxy__s:_s____s
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp - 0x40]
mov r8d, 0
mov rdx, rax
mov ecx, 4
call dbg._applog
lea rax, [rbp + 0x1c0]
lea rdx, str.HTTP_1.1_200
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x140084a1b
lea rax, [rbp + 0x1c0]
lea rdx, str.HTTP_1.0_200
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x140084a1b
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400849b2
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400849b2
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
jle 0x140084a11
mov rax, qword [rbp + 0x5e0]
mov rdx, qword [rax + 0x250]
mov rax, qword [rbp + 0x5e0]
mov r8, qword [rax + 0x248]
lea rax, [rbp - 0x40]
lea rcx, [rbp + 0x1c0]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdx
mov r9, r8
lea r8, str.HTTP_Error_from_proxy__s:_s____s
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp - 0x40]
mov r8d, 0
mov rdx, rax
mov ecx, 1
call dbg._applog
mov eax, 0
jmp 0x140084c99
mov dword [rbp + 0x5cc], 0
jmp 0x140084aed
mov eax, dword [rbp + 0x5e8]
mov ecx, eax
call dbg.recv_byte
mov edx, eax
mov eax, dword [rbp + 0x5cc]
cdqe
mov byte [rbp + rax + 0x1c0], dl
mov eax, dword [rbp + 0x5cc]
cdqe
movzx eax, byte [rbp + rax + 0x1c0]
cmp al, 0xff
jne 0x140084ae6
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x140084a89
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x140084a89
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
jle 0x140084adc
mov rax, qword [rbp + 0x5e0]
mov rdx, qword [rax + 0x250]
mov rax, qword [rbp + 0x5e0]
mov rcx, qword [rax + 0x248]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.Couldnt_read_HTTP_byte_from_proxy__s:_s
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp - 0x40]
mov r8d, 0
mov rdx, rax
mov ecx, 1
call dbg._applog
mov eax, 0
jmp 0x140084c99
add dword [rbp + 0x5cc], 1
cmp dword [rbp + 0x5cc], 3
jle 0x140084a2a
jmp 0x140084be5
mov dword [rbp + 0x5cc], 0
jmp 0x140084b34
mov eax, dword [rbp + 0x5cc]
add eax, 1
cdqe
movzx edx, byte [rbp + rax + 0x1c0]
mov eax, dword [rbp + 0x5cc]
cdqe
mov byte [rbp + rax + 0x1c0], dl
add dword [rbp + 0x5cc], 1
cmp dword [rbp + 0x5cc], 2
jle 0x140084b0b
mov eax, dword [rbp + 0x5e8]
mov ecx, eax
call dbg.recv_byte
mov byte [rbp + 0x1c3], al
movzx eax, byte [rbp + 0x1c3]
cmp al, 0xff
jne 0x140084be5
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x140084b88
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x140084b88
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
jle 0x140084bdb
mov rax, qword [rbp + 0x5e0]
mov rdx, qword [rax + 0x250]
mov rax, qword [rbp + 0x5e0]
mov rcx, qword [rax + 0x248]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.Couldnt_read_HTTP_byte_from_proxy__s:_s
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp - 0x40]
mov r8d, 0
mov rdx, rax
mov ecx, 1
call dbg._applog
mov eax, 0
jmp 0x140084c99
lea rax, [rbp + 0x1c0]
mov r8d, 4
lea rdx, str._r_n_r_n
mov rcx, rax
call sym.strncmp
test eax, eax
jne 0x140084aff
mov rax, qword [0x14011bd40]
movzx eax, byte [rax]
test al, al
je 0x140084c94
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x140084c41
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x140084c41
mov rax, qword [0x14011be10]
mov eax, dword [rax]
cmp eax, 3
jle 0x140084c94
mov rax, qword [rbp + 0x5e0]
mov rdx, qword [rax + 0x250]
mov rax, qword [rbp + 0x5e0]
mov rcx, qword [rax + 0x248]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.Success_negotiating_with__s:_s_HTTP_proxy
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp - 0x40]
mov r8d, 0
mov rdx, rax
mov ecx, 4
call dbg._applog
mov eax, 1
add rsp, 0x650
pop rbp
ret