Function at 0x47ed10
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 0x47ed80
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 0x47ede2
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 [0x005149e0]
movzx eax, byte [rax]
test al, al
je 0x47ee7d
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x47ee1e
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x47ee1e
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
cmp eax, 3
jle 0x47ee7d
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 0x47ef72
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x47ef15
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x47ef15
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
test eax, eax
jle 0x47ef68
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 0x47f369
mov eax, dword [rbp + 0x5c8]
cdqe
mov byte [rbp + rax + 0x1c0], 0
mov rax, qword [0x005149e0]
movzx eax, byte [rax]
test al, al
je 0x47f01d
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x47efbe
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x47efbe
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
cmp eax, 3
jle 0x47f01d
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 0x47f0eb
lea rax, [rbp + 0x1c0]
lea rdx, str.HTTP_1.0_200
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x47f0eb
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x47f082
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x47f082
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
test eax, eax
jle 0x47f0e1
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 0x47f369
mov dword [rbp + 0x5cc], 0
jmp 0x47f1bd
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 0x47f1b6
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x47f159
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x47f159
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
test eax, eax
jle 0x47f1ac
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 0x47f369
add dword [rbp + 0x5cc], 1
cmp dword [rbp + 0x5cc], 3
jle 0x47f0fa
jmp 0x47f2b5
mov dword [rbp + 0x5cc], 0
jmp 0x47f204
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 0x47f1db
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 0x47f2b5
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x47f258
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x47f258
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
test eax, eax
jle 0x47f2ab
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 0x47f369
lea rax, [rbp + 0x1c0]
mov r8d, 4
lea rdx, str._r_n_r_n
mov rcx, rax
call sym.strncmp
test eax, eax
jne 0x47f1cf
mov rax, qword [0x005149e0]
movzx eax, byte [rax]
test al, al
je 0x47f364
mov rax, qword [0x00514e80]
movzx eax, byte [rax]
test al, al
jne 0x47f311
mov rax, qword [0x00514ac0]
movzx eax, byte [rax]
test al, al
jne 0x47f311
mov rax, qword [0x00514ab0]
mov eax, dword [rax]
cmp eax, 3
jle 0x47f364
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