Function at 0x180059b50
Capabilities:
Check http status code

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x78
and dword [rbp + 0x48], 0
mov r12d, r9d
mov rbx, qword [rcx + 0x8a8]
mov r14, r8
mov rdi, qword [rcx]
mov rsi, rcx
movsxd r15, edx
mov qword [rbp - 0x20], r15
mov rax, qword [rcx + r15*8 + 0x240]
mov qword [rbp - 0x18], rax
test rbx, rbx
je 0x18005a5a1
cmp dword [rbx + 0x4020], 2
je 0x18005a5a1
btr dword [rcx + 0x3c4], 0x17
cmp dword [rbx + 0x4020], 0
jne 0x180059e57
mov r9d, r12d
lea rdx, str.Establish_HTTP_proxy_tunnel_to__s:_d_n
mov r8, r14
mov rcx, rdi
call fcn.18004cf4c
mov rcx, qword [rdi + 0x1e0]
call qword [fcn.18008628c]
and qword [rdi + 0x1e0], 0
call fcn.1800535c0
mov qword [rbp - 0x38], rax
test rax, rax
je 0x18005a43d
mov r8d, r12d
lea rcx, str._s:_d
mov rdx, r14
call fcn.18004f830
mov r15, rax
test rax, rax
je 0x18005a434
mov r9b, 1
lea rdx, str.CONNECT
mov r8, rax
mov rcx, rsi
call fcn.1800544b8
mov rcx, r15
mov r14d, eax
call qword [fcn.18008628c]
test r14d, r14d
jne 0x180059e2b
mov r14, qword [rbp + 0x58]
lea rax, [0x1800bb65c]
xor r12d, r12d
lea r13, [0x1800bb658]
cmp dword [rsi + 0x16c], 1
lea r15, [0x1800d5238]
mov qword [rbp - 0x30], r15
cmove r13, rax
mov eax, dword [rsi + 0x3c4]
shr eax, 9
and al, 1
cmp r14, qword [rsi + 0xd0]
je 0x180059c9c
lea edx, [r12 + 0x3a]
mov rcx, r14
call fcn.180085180
test rax, rax
setne al
test al, al
lea rcx, [0x1800d6d98]
mov eax, dword [rbp + 0x60]
mov r9, r15
cmovne r9, rcx
mov dword [rsp + 0x20], eax
lea rcx, str.___:
mov rdx, r15
cmovne rdx, rcx
mov r8, r14
lea rcx, str._s_s_s:_d
call fcn.18004f830
mov r15, rax
test rax, rax
je 0x18005a434
lea rdx, str.Host
mov rcx, rsi
call fcn.180053d1c
test rax, rax
jne 0x180059d0b
mov rdx, r15
lea rcx, str.Host:__s_r_n
call fcn.18004f830
mov r12, rax
test rax, rax
je 0x18005a42b
lea rdx, str.Proxy_Connection
mov rcx, rsi
call fcn.180053d1c
test rax, rax
lea r14, str.Proxy_Connection:_Keep_Alive_r_n
lea rax, [0x1800d5238]
mov rcx, rsi
lea rdx, str.User_Agent
cmovne r14, rax
call fcn.180053d1c
test rax, rax
jne 0x180059d57
cmp qword [rdi + 0xcf8], rax
je 0x180059d57
mov rax, qword [rsi + 0x430]
mov qword [rbp - 0x30], rax
mov rax, qword [rsi + 0x428]
lea rdx, [0x1800d5238]
test rax, rax
mov qword [rsp + 0x38], r14
mov rcx, rdx
mov r9, r13
cmovne rcx, rax
mov r8, r15
mov rax, rdx
test r12, r12
mov rdx, qword [rbp - 0x30]
mov qword [rsp + 0x30], rdx
cmovne rax, r12
mov qword [rsp + 0x28], rcx
lea rdx, str.CONNECT__s_HTTP__s_r_n_s_s_s_s
lea rcx, [rbp - 0x38]
mov qword [rsp + 0x20], rax
call fcn.180053808
mov r14d, eax
test r12, r12
je 0x180059db8
mov rcx, r12
call qword [fcn.18008628c]
mov rcx, r15
call qword [fcn.18008628c]
test r14d, r14d
jne 0x180059e12
mov r8, qword [rbp - 0x38]
mov dl, 1
mov rcx, rsi
call fcn.180053888
mov r14d, eax
test eax, eax
jne 0x180059e12
lea rdx, [0x1800b9f08]
lea rcx, [rbp - 0x38]
call fcn.180053808
mov r14d, eax
test eax, eax
jne 0x180059e12
mov eax, dword [rbp + 0x50]
lea r8, [rdi + 0x14e0]
xor r9d, r9d
mov dword [rsp + 0x20], eax
mov rdx, rsi
lea rcx, [rbp - 0x38]
call fcn.1800535d0
mov r14d, eax
and qword [rbp - 0x38], 0
test r14d, r14d
je 0x180059e2b
lea rdx, str.Failed_sending_CONNECT_to_proxy
mov rcx, rdi
call fcn.18004ce58
lea rcx, [rbp - 0x38]
call fcn.180053588
test r14d, r14d
jne 0x18005a0c3
mov r15d, dword [rbp + 0x50]
xor r14d, r14d
mov dword [rbx + 0x4000], r14d
mov dword [rbx + 0x4020], 1
jmp 0x180059e5a
xor r14d, r14d
mov r8b, 1
xor edx, edx
mov rcx, rdi
call fcn.18004e2f8
test rax, rax
jle 0x18005a5b4
mov edx, r15d
mov rcx, rsi
call fcn.18004d99c
test al, al
je 0x18005a5a1
mov r13d, r14d
cmp dword [rbx + 0x4004], r14d
je 0x18005a36c
lea r12, [rbx + 0x4000]
mov r8, qword [rbx + 0x4010]
cmp r8, r12
jae 0x18005a451
mov rdx, qword [rbp - 0x18]
lea rax, [rbp - 0x28]
mov r15d, 1
mov qword [rsp + 0x20], rax
mov r9d, r15d
mov rcx, rsi
call fcn.18004d03c
mov r14d, eax
cmp eax, 0x51
je 0x18005a5a1
mov rcx, rsi
call fcn.180058b48
test eax, eax
jne 0x18005a447
test r14d, r14d
jne 0x18005a35e
xor r14d, r14d
cmp qword [rbp - 0x28], r14
jle 0x18005a31f
cmp dword [rbx + 0x4004], r15d
jle 0x180059f72
mov rax, qword [rbx + 0x4018]
mov qword [rbx + 0x4010], rbx
test rax, rax
je 0x180059f38
dec rax
mov qword [rbx + 0x4018], rax
test rax, rax
jg 0x18005a311
mov dword [rbx + 0x4020], 2
jmp 0x18005a361
lea r9, [rbp - 0x30]
mov qword [rbp - 0x30], r14
mov r8, r15
mov rdx, rbx
mov rcx, rsi
call fcn.180072fe4
cmp eax, 0xffffffff
jne 0x18005a311
lea rdx, str.chunk_reading_DONE_n
mov rcx, rdi
call fcn.18004cf4c
mov dword [rbx + 0x4004], r14d
jmp 0x18005a307
mov rax, qword [rbx + 0x4010]
add dword [r12], r15d
cmp byte [rax], 0xa
je 0x180059f91
inc rax
mov qword [rbx + 0x4010], rax
jmp 0x18005a311
test dword [rdi + 0xe70], 0x4000000
je 0x180059fb3
movsxd r9, dword [r12]
mov edx, r15d
mov r8, qword [rbx + 0x4008]
mov rcx, rdi
call fcn.18004cd98
test dword [rdi + 0xe74], 0x80000
jne 0x180059fed
mov edx, dword [rdi + 0xe70]
mov rcx, rsi
movsxd r9, dword [r12]
and edx, 0x200000
mov r8, qword [rbx + 0x4008]
bts edx, 0x16
shr edx, 0x15
call fcn.18004cd80
test eax, eax
jne 0x18005a5a3
movsxd rax, dword [r12]
add qword [rdi + 0x14d8], rax
movsxd rax, dword [r12]
add qword [rdi + 0x120], rax
mov rcx, qword [rbx + 0x4008]
cmp byte [rcx], 0xd
je 0x18005a240
cmp byte [rcx], 0xa
je 0x18005a240
movsxd rax, dword [r12]
mov r8d, reloc.WS2_32.dll_recvfrom
mov byte [rax + rcx], r14b
lea rcx, str.WWW_Authenticate:
mov rdx, qword [rbx + 0x4008]
call fcn.180050af0
test eax, eax
je 0x18005a054
mov r14d, dword [rdi + 0x190]
cmp r14d, 0x191
je 0x18005a081
xor r14d, r14d
mov rdx, qword [rbx + 0x4008]
lea rcx, str.Proxy_authenticate:
mov r8d, reloc.WS2_32.dll_send
call fcn.180050af0
test eax, eax
je 0x18005a0ce
mov r14d, dword [rdi + 0x190]
cmp r14d, 0x197
jne 0x18005a0cb
mov rcx, qword [rbx + 0x4008]
call fcn.180053e6c
mov r15, rax
test rax, rax
je 0x18005a43d
cmp r14d, 0x197
mov r8, rax
mov rcx, rsi
sete dl
call fcn.180054234
mov rcx, r15
mov r14d, eax
call qword [fcn.18008628c]
test r14d, r14d
je 0x18005a226
mov eax, r14d
jmp 0x18005a5a3
xor r14d, r14d
mov rdx, qword [rbx + 0x4008]
lea rcx, str.Content_Length:
mov r8d, reloc.WS2_32.dll_ntohs
call fcn.180050af0
test eax, eax
je 0x18005a134
mov r8d, dword [rdi + 0x190]
lea eax, [r8 - 0xc8]
cmp eax, 0x64
jae 0x18005a112
lea rdx, str.Ignoring_Content_Length_in_CONNECT__03d_response_n
mov rcx, rdi
call fcn.18004cf4c
jmp 0x18005a229
mov rcx, qword [rbx + 0x4008]
lea r9, [rbx + 0x4018]
xor edx, edx
add rcx, 0xf
lea r8d, [rdx + 0xa]
call fcn.18005aff4
jmp 0x18005a229
mov rcx, qword [rbx + 0x4008]
lea r8, str.close
lea rdx, str.Connection:
call fcn.180053da0
test al, al
jne 0x18005a1ee
mov rdx, qword [rbx + 0x4008]
lea rcx, str.Transfer_Encoding:
mov r8d, reloc.WS2_32.dll_select
call fcn.180050af0
test eax, eax
je 0x18005a1d0
mov r8d, dword [rdi + 0x190]
lea eax, [r8 - 0xc8]
cmp eax, 0x64
jae 0x18005a192
lea rdx, str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
jmp 0x18005a105
mov rcx, qword [rbx + 0x4008]
lea r8, str.chunked
lea rdx, str.Transfer_Encoding:
call fcn.180053da0
test al, al
je 0x18005a229
lea rdx, str.CONNECT_responded_chunked_n
mov rcx, rdi
call fcn.18004cf4c
or dword [rbx + 0x4024], r15d
mov rcx, rsi
call fcn.180072fd8
jmp 0x18005a229
mov rcx, qword [rbx + 0x4008]
lea r8, str.close
lea rdx, str.Proxy_Connection:
call fcn.180053da0
test al, al
je 0x18005a1f7
or dword [rbx + 0x4024], 2
jmp 0x18005a229
mov rcx, qword [rbx + 0x4008]
lea r14, [rdi + 0x190]
mov r9, r14
lea r8, [rbp + 0x48]
lea rdx, str.HTTP_1._d__d
call fcn.1800235e0
cmp eax, 2
jne 0x18005a226
mov eax, dword [r14]
mov dword [rdi + 0x14c4], eax
xor r14d, r14d
mov dword [r12], r14d
mov qword [rbx + 0x4010], rbx
mov qword [rbx + 0x4008], rbx
jmp 0x18005a311
mov qword [rbx + 0x4010], rbx
cmp dword [rdi + 0x190], 0x197
jne 0x18005a2f7
test byte [rdi + 0x146c], 0x20
jne 0x18005a2f7
mov r8, qword [rbx + 0x4018]
mov dword [rbx + 0x4004], 2
test r8, r8
je 0x18005a28b
lea rdx, str.Ignore__I64d_bytes_of_response_body_n
mov rcx, rdi
call fcn.18004cf4c
jmp 0x18005a2fe
test byte [rbx + 0x4024], r15b
je 0x18005a2f7
lea rdx, str.Ignore_chunked_response_body_n
mov rcx, rdi
call fcn.18004cf4c
or dword [rdi + 0x670], 8
mov rax, qword [rbx + 0x4008]
inc rax
cmp byte [rax], 0xa
jne 0x18005a2c0
mov qword [rbx + 0x4008], rax
mov rdx, qword [rbx + 0x4008]
lea r9, [rbp - 0x28]
add rdx, r15
mov r8, r15
mov rcx, rsi
call fcn.180072fe4
cmp eax, 0xffffffff
jne 0x18005a2fe
lea rdx, str.chunk_reading_DONE_n
mov rcx, rdi
call fcn.18004cf4c
mov dword [rbx + 0x4020], 2
mov dword [rbx + 0x4004], r14d
cmp qword [rbx + 0x4018], r14
jne 0x18005a311
mov dword [rbx + 0x4020], 2
cmp dword [rbx + 0x4004], r14d
je 0x18005a368
jmp 0x180059e9a
cmp dword [rdi + 0x6c0], r14d
je 0x18005a34a
cmp dword [rdi + 0x1158], r14d
je 0x18005a34a
bts dword [rsi + 0x3c4], 0x17
lea rdx, str.Proxy_CONNECT_connection_closed_n
mov rcx, rdi
call fcn.18004cf4c
jmp 0x18005a361
lea rdx, str.Proxy_CONNECT_aborted
mov rcx, rdi
mov r13d, r15d
call fcn.18004ce58
jmp 0x18005a361
xor r14d, r14d
mov dword [rbx + 0x4004], r14d
mov r15d, dword [rbp + 0x50]
mov rcx, rsi
call fcn.180058b48
test eax, eax
jne 0x18005a447
test r13d, r13d
jne 0x18005a460
mov eax, dword [rdi + 0x14c4]
sub eax, 0xc8
cmp eax, 0x64
jb 0x18005a3b5
mov rcx, rsi
call fcn.180053f3c
test eax, eax
jne 0x18005a5a3
test byte [rsi + 0x3c4], 1
je 0x18005a3b5
or dword [rbx + 0x4024], 2
test byte [rbx + 0x4024], 2
je 0x18005a3cb
cmp qword [rdi + 0x1e0], r14
jne 0x18005a46a
cmp qword [rdi + 0x1e0], r14
je 0x18005a489
cmp dword [rbx + 0x4020], 2
jne 0x18005a415
mov rax, qword [rsi + 0x8a8]
and dword [rax + 0x4024], 0xfffffffd
mov dword [rax + 0x4020], r14d
mov dword [rax + 0x4004], 1
mov qword [rax + 0x4008], rax
mov qword [rax + 0x4010], rax
mov qword [rax + 0x4018], r14
cmp qword [rdi + 0x1e0], r14
je 0x18005a489
mov r14, qword [rbp + 0x58]
mov r12d, dword [rbp + 0x60]
jmp 0x180059bb9
mov rcx, r15
call qword [fcn.18008628c]
lea rcx, [rbp - 0x38]
call fcn.180053588
mov eax, 0x1b
jmp 0x18005a5a3
mov eax, 0x2a
jmp 0x18005a5a3
lea rdx, str.CONNECT_response_too_large_
mov rcx, rdi
call fcn.18004ce58
mov eax, gethostname
jmp 0x18005a5a3
mov r14, qword [rbp - 0x20]
mov rcx, rsi
mov rdx, qword [rsi + r14*8 + 0x240]
call fcn.18004d91c
or qword [rsi + r14*8 + 0x240], 0xffffffffffffffff
jmp 0x18005a48d
mov r14, qword [rbp - 0x20]
mov eax, dword [rdi + 0x14c4]
sub eax, 0xc8
cmp eax, 0x64
jb 0x18005a556
test byte [rbx + 0x4024], 2
je 0x18005a4ed
cmp qword [rdi + 0x1e0], 0
je 0x18005a4ed
bts dword [rsi + 0x3c4], 0x17
lea rdx, str.Connect_me_again_please_n
mov rcx, rdi
call fcn.18004cf4c
mov rax, qword [rsi + 0x8a8]
lea rdx, str.CONNECT_phase_completed__n
mov dword [rax + 0x4020], 2
mov rcx, qword [rsi]
call fcn.18004cf4c
jmp 0x18005a528
mov rcx, qword [rdi + 0x1e0]
call qword [fcn.18008628c]
and qword [rdi + 0x1e0], 0
mov edx, 2
mov rcx, rsi
call fcn.18004da48
mov rdx, qword [rsi + r14*8 + 0x240]
mov rcx, rsi
call fcn.18004d91c
or qword [rsi + r14*8 + 0x240], 0xffffffffffffffff
and dword [rbx + 0x4020], 0
test dword [rsi + 0x3c4], 0x800000
jne 0x18005a5a1
mov r8d, dword [rdi + 0x190]
lea rdx, str.Received_HTTP_code__d_from_proxy_after_CONNECT
mov rcx, rdi
call fcn.18004ce58
jmp 0x18005a460
mov dword [rbx + 0x4020], 2
mov rcx, qword [rsi + 0x428]
call qword [fcn.18008628c]
and qword [rsi + 0x428], 0
lea rdx, str.Proxy_replied__d_to_CONNECT_request_n
mov r8d, dword [rdi + 0x14c4]
mov rcx, rdi
or dword [rdi + 0x115c], 1
call fcn.18004cf4c
and dword [rdi + 0x670], 0xfffffff7
btr dword [rsi + 0x3c4], 0x10
xor eax, eax
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rdx, str.Proxy_CONNECT_aborted_due_to_timeout
mov rcx, rdi
call fcn.18004ce58
mov eax, 0x1c
jmp 0x18005a5a3