Function at 0x140040520
Capabilities:
Check http status code

Disassembly:
mov rax, rsp
mov dword [rax + 0x20], r9d
mov qword [rax + 0x18], r8
mov dword [rax + 0x10], edx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x78
mov rdi, qword [rcx]
mov r13, rcx
add rcx, 0x4c0
movsxd r14, edx
xor r12d, r12d
mov r15d, r9d
mov rsi, r8
mov dword [rax + 8], r12d
mov rbx, qword [r13 + 0xb08]
mov rbp, qword [r13 + r14*8 + 0x4c0]
lea rcx, [rcx + r14*8]
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x50], rbp
test rbx, rbx
je 0x140040fc7
cmp dword [rbx + 0x4020], 2
je 0x140040fc7
mov byte [r13 + 0x66b], r12b
nop word [rax + rax]
cmp dword [rbx + 0x4020], 0
jne 0x14004083b
mov r9d, r15d
lea rdx, str.Establish_HTTP_proxy_tunnel_to__s:_d_n
mov r8, rsi
mov rcx, rdi
call fcn.14003c320
mov rcx, qword [rdi + 0x1c8]
call qword [str.Tf_a_]
mov qword [rdi + 0x1c8], r12
call fcn.1400471a0
mov qword [rsp + 0x48], rax
test rax, rax
je 0x140040e71
mov r8d, r15d
lea rcx, str._s:_d
mov rdx, rsi
call fcn.14002aa50
mov rbp, rax
test rax, rax
je 0x140040e67
mov r9b, 1
lea rdx, str.CONNECT
mov r8, rax
mov rcx, r13
call fcn.140048200
mov rcx, rbp
mov esi, eax
call qword [str.Tf_a_]
test esi, esi
jne 0x140040813
cmp dword [r13 + 0x3dc], 1
lea rax, [0x14007ec18]
mov rsi, qword [rsp + 0xd0]
lea r15, [0x14007ec1c]
cmove r15, rax
lea rbp, [0x1400884e9]
mov r14, r12
movzx eax, byte [r13 + 0x65e]
mov r12, rbp
cmp rsi, qword [r13 + 0x340]
je 0x140040682
mov edx, Ordinal_60
mov rcx, rsi
call sub.VCRUNTIME140.dll_strchr
test rax, rax
setne al
test al, al
lea rcx, [0x14007e2e0]
lea rax, [0x14007e2e4]
mov r9, rbp
cmovne r9, rcx
mov rdx, rbp
cmovne rdx, rax
lea rcx, str._s_s_s:_d
mov eax, dword [rsp + 0xd8]
mov r8, rsi
mov dword [rsp + 0x20], eax
call fcn.14002aa50
mov rbp, rax
test rax, rax
je 0x140040e67
lea rdx, str.Host
mov rcx, r13
call fcn.140047990
test rax, rax
jne 0x1400406f5
mov rdx, rbp
lea rcx, str.Host:__s_r_n
call fcn.14002aa50
mov r14, rax
test rax, rax
je 0x140040e5e
lea rdx, str.Proxy_Connection
mov rcx, r13
call fcn.140047990
test rax, rax
lea rsi, str.Proxy_Connection:_Keep_Alive_r_n
lea rax, [0x1400884e9]
mov rcx, r13
lea rdx, str.User_Agent
cmovne rsi, rax
call fcn.140047990
test rax, rax
jne 0x14004073d
cmp qword [rdi + 0xd08], rax
je 0x14004073d
mov r12, qword [r13 + 0x6e0]
mov rax, qword [r13 + 0x6d8]
lea rdx, [0x1400884e9]
test rax, rax
mov qword [rsp + 0x38], rsi
mov rcx, rdx
mov qword [rsp + 0x30], r12
cmovne rcx, rax
mov r9, r15
mov rax, rdx
mov qword [rsp + 0x28], rcx
test r14, r14
lea rdx, str.CONNECT__s_HTTP__s_r_n_s_s_s_s
mov r8, rbp
lea rcx, [rsp + 0x48]
cmovne rax, r14
mov qword [rsp + 0x20], rax
call fcn.140047400
mov esi, eax
test r14, r14
je 0x14004079a
mov rcx, r14
call qword [str.Tf_a_]
mov rcx, rbp
call qword [str.Tf_a_]
test esi, esi
jne 0x1400407fb
mov r8, qword [rsp + 0x48]
mov dl, 1
mov rcx, r13
call fcn.1400474a0
mov esi, eax
test eax, eax
jne 0x1400407fb
lea rdx, [0x14007d878]
lea rcx, [rsp + 0x48]
call fcn.140047400
mov r14d, dword [rsp + 0xc8]
mov esi, eax
test eax, eax
jne 0x140040803
lea r8, [rdi + 0x1618]
mov dword [rsp + 0x20], r14d
xor r9d, r9d
lea rcx, [rsp + 0x48]
mov rdx, r13
call fcn.1400471b0
mov esi, eax
jmp 0x140040803
mov r14d, dword [rsp + 0xc8]
xor r12d, r12d
mov qword [rsp + 0x48], r12
test esi, esi
jne 0x140040e7b
lea rcx, [rsp + 0x48]
call fcn.140047160
test esi, esi
jne 0x140040e94
mov rbp, qword [rsp + 0x50]
mov dword [rbx + 0x4020], 1
mov dword [rbx + 0x4000], r12d
mov r8b, 1
xor edx, edx
mov rcx, rdi
call fcn.14003da20
test rax, rax
jle 0x140040fe1
mov edx, r14d
mov rcx, r13
call fcn.14003cea0
test al, al
je 0x140040fc7
cmp dword [rbx + 0x4004], 0
mov r15d, r12d
je 0x140040d64
lea r14, [rbx + 0x4000]
nop dword [rax + rax]
mov r8, qword [rbx + 0x4010]
cmp r8, r14
jae 0x140040e9b
lea rax, [rsp + 0x58]
mov r9d, 1
mov rdx, rbp
mov qword [rsp + 0x20], rax
mov rcx, r13
call fcn.14003c490
mov esi, eax
cmp eax, 0x51
je 0x140040fc7
mov rcx, r13
call fcn.14004ac80
test eax, eax
jne 0x140040fda
test esi, esi
jne 0x140040d55
cmp qword [rsp + 0x58], 0
jle 0x140040d15
cmp dword [rbx + 0x4004], 1
jle 0x140040961
mov rax, qword [rbx + 0x4018]
mov qword [rbx + 0x4010], rbx
test rax, rax
je 0x140040918
dec rax
mov qword [rbx + 0x4018], rax
test rax, rax
jg 0x140040d06
mov dword [rbx + 0x4020], 2
jmp 0x140040d55
lea rax, [rsp + 0x40]
mov qword [rsp + 0x68], r12
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r8d, 1
mov rdx, rbx
mov rcx, r13
call fcn.140067d20
cmp eax, 0xffffffff
jne 0x140040d06
lea rdx, str.chunk_reading_DONE_n
mov rcx, rdi
call fcn.14003c320
mov dword [rbx + 0x4004], r12d
jmp 0x140040cfc
mov ecx, dword [r14]
mov rax, qword [rbx + 0x4010]
inc ecx
mov dword [r14], ecx
cmp byte [rax], 0xa
je 0x140040984
inc rax
mov qword [rbx + 0x4010], rax
jmp 0x140040d06
cmp byte [rdi + 0xf1e], 0
je 0x1400409a4
mov r8, qword [rbx + 0x4008]
mov edx, 1
movsxd r9, ecx
mov rcx, rdi
call fcn.14003c0e0
cmp byte [rdi + 0xf32], 0
jne 0x1400409d7
cmp byte [rdi + 0xf19], 0
mov edx, r12d
movsxd r9, dword [r14]
mov rcx, r13
mov r8, qword [rbx + 0x4008]
setne dl
add edx, 2
call fcn.14003c0c0
test eax, eax
jne 0x140040fc9
movsxd rax, dword [r14]
add qword [rdi + 0x1610], rax
movsxd rax, dword [r14]
add qword [rdi + 0x108], rax
mov rcx, qword [rbx + 0x4008]
movzx eax, byte [rcx]
cmp al, 0xd
je 0x140040c25
cmp al, 0xa
je 0x140040c25
movsxd rax, dword [r14]
mov r8d, reloc.WS2_32.dll_recvfrom
mov byte [rax + rcx], 0
lea rcx, str.WWW_Authenticate:
mov rdx, qword [rbx + 0x4008]
call fcn.14003f600
test eax, eax
je 0x140040a37
mov esi, dword [rdi + 0x178]
cmp esi, 0x191
je 0x140040a62
mov rdx, qword [rbx + 0x4008]
lea rcx, str.Proxy_authenticate:
mov r8d, reloc.WS2_32.dll_send
call fcn.14003f600
test eax, eax
je 0x140040aab
mov esi, dword [rdi + 0x178]
cmp esi, 0x197
jne 0x140040aab
mov rcx, qword [rbx + 0x4008]
call fcn.140047b30
mov rbp, rax
test rax, rax
je 0x140040e71
cmp esi, 0x197
mov r8, rax
mov rcx, r13
sete dl
call fcn.140047f50
mov rcx, rbp
mov esi, eax
call qword [str.Tf_a_]
test esi, esi
jne 0x140040e94
mov rbp, qword [rsp + 0x50]
jmp 0x140040c0f
mov rdx, qword [rbx + 0x4008]
lea rcx, str.Content_Length:
mov r8d, reloc.WS2_32.dll_ntohs
call fcn.14003f600
test eax, eax
je 0x140040b11
mov r8d, dword [rdi + 0x178]
lea eax, [r8 - 0xc8]
cmp eax, 0x64
jae 0x140040aef
lea rdx, str.Ignoring_Content_Length_in_CONNECT__03d_response_n
mov rcx, rdi
call fcn.14003c320
jmp 0x140040c0f
mov rcx, qword [rbx + 0x4008]
lea r9, [rbx + 0x4018]
xor edx, edx
add rcx, 0xf
lea r8d, [rdx + 0xa]
call fcn.14004d240
jmp 0x140040c0f
mov rcx, qword [rbx + 0x4008]
lea r8, str.close
lea rdx, str.Connection:
call fcn.140047a40
test al, al
jne 0x140040c08
mov rdx, qword [rbx + 0x4008]
lea rcx, str.Transfer_Encoding:
mov r8d, reloc.WS2_32.dll_select
call fcn.14003f600
test eax, eax
je 0x140040bb5
mov r8d, dword [rdi + 0x178]
lea eax, [r8 - 0xc8]
cmp eax, 0x64
jae 0x140040b77
lea rdx, str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
mov rcx, rdi
call fcn.14003c320
jmp 0x140040c0f
mov rcx, qword [rbx + 0x4008]
lea r8, str.chunked
lea rdx, str.Transfer_Encoding:
call fcn.140047a40
test al, al
je 0x140040c0f
lea rdx, str.CONNECT_responded_chunked_n
mov rcx, rdi
call fcn.14003c320
mov rcx, r13
mov byte [rbx + 0x4024], 1
call fcn.140067d00
jmp 0x140040c0f
mov rcx, qword [rbx + 0x4008]
lea r8, str.close
lea rdx, str.Proxy_Connection:
call fcn.140047a40
test al, al
jne 0x140040c08
mov rcx, qword [rbx + 0x4008]
lea r9, [rdi + 0x178]
lea r8, [rsp + 0xc0]
lea rdx, str.HTTP_1._d__d
call fcn.140031400
cmp eax, 2
jne 0x140040c0f
mov eax, dword [rdi + 0x178]
mov dword [rdi + 0x15fc], eax
jmp 0x140040c0f
mov byte [rbx + 0x4025], 1
mov dword [r14], r12d
mov qword [rbx + 0x4010], rbx
mov qword [rbx + 0x4008], rbx
jmp 0x140040d06
mov qword [rbx + 0x4010], rbx
cmp dword [rdi + 0x178], 0x197
jne 0x140040ceb
cmp byte [rdi + 0x1599], 0
jne 0x140040ceb
mov r8, qword [rbx + 0x4018]
mov dword [rbx + 0x4004], 2
test r8, r8
je 0x140040c73
lea rdx, str.Ignore__I64d_bytes_of_response_body_n
mov rcx, rdi
call fcn.14003c320
jmp 0x140040cf2
cmp byte [rbx + 0x4024], 0
je 0x140040ceb
lea rdx, str.Ignore_chunked_response_body_n
mov rcx, rdi
call fcn.14003c320
mov byte [rdi + 0x65b], 1
mov rdx, qword [rbx + 0x4008]
cmp byte [rdx + 1], 0xa
lea rax, [rdx + 1]
jne 0x140040cad
mov qword [rbx + 0x4008], rax
mov rdx, rax
lea rax, [rsp + 0x44]
inc rdx
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r8d, 1
mov rcx, r13
call fcn.140067d20
cmp eax, 0xffffffff
jne 0x140040cf2
lea rdx, str.chunk_reading_DONE_n
mov rcx, rdi
call fcn.14003c320
mov dword [rbx + 0x4020], 2
mov dword [rbx + 0x4004], r12d
cmp qword [rbx + 0x4018], 0
jne 0x140040d06
mov dword [rbx + 0x4020], 2
cmp dword [rbx + 0x4004], 0
jne 0x140040880
jmp 0x140040d5c
cmp dword [rdi + 0x6b0], 0
je 0x140040d40
cmp dword [rdi + 0x1220], 0
je 0x140040d40
lea rdx, str.Proxy_CONNECT_connection_closed_n
mov byte [r13 + 0x66b], 1
mov rcx, rdi
call fcn.14003c320
jmp 0x140040d55
lea rdx, str.Proxy_CONNECT_aborted
mov rcx, rdi
mov r15d, 1
call fcn.14003c1a0
mov dword [rbx + 0x4004], r12d
mov r14d, dword [rsp + 0xc8]
mov rcx, r13
call fcn.14004ac80
test eax, eax
jne 0x140040fda
test r15d, r15d
jne 0x140040eaa
mov eax, dword [rdi + 0x15fc]
sub eax, 0xc8
cmp eax, 0x64
jb 0x140040dad
mov rcx, r13
call fcn.140047c40
test eax, eax
jne 0x140040fc9
cmp byte [r13 + 0x654], al
je 0x140040dad
mov byte [rbx + 0x4025], 1
cmp byte [rbx + 0x4025], 0
je 0x140040ddc
cmp qword [rdi + 0x1c8], 0
je 0x140040e3d
mov rsi, qword [rsp + 0x60]
mov rcx, r13
mov rdx, qword [rsi]
call fcn.14003ce00
mov qword [rsi], 0xffffffffffffffff
jmp 0x140040eb9
mov rax, qword [rdi + 0x1c8]
test rax, rax
je 0x140040eb4
cmp dword [rbx + 0x4020], 2
mov rsi, qword [rsp + 0xd0]
mov r15d, dword [rsp + 0xd8]
jne 0x1400405a0
mov rax, qword [r13 + 0xb08]
mov dword [rax + 0x4020], r12d
mov dword [rax + 0x4004], 1
mov qword [rax + 0x4008], rax
mov qword [rax + 0x4010], rax
mov qword [rax + 0x4018], r12
mov byte [rax + 0x4025], 0
mov rax, qword [rdi + 0x1c8]
test rax, rax
je 0x140040eb4
mov rsi, qword [rsp + 0xd0]
mov r15d, dword [rsp + 0xd8]
jmp 0x1400405a0
mov rcx, rbp
call qword [str.Tf_a_]
lea rcx, [rsp + 0x48]
call fcn.140047160
mov eax, reloc.WLDAP32.dll_Ordinal_27
jmp 0x140040fc9
lea rdx, str.Failed_sending_CONNECT_to_proxy
mov rcx, rdi
call fcn.14003c1a0
lea rcx, [rsp + 0x48]
call fcn.140047160
mov eax, esi
jmp 0x140040fc9
lea rdx, str.CONNECT_response_too_large_
mov rcx, rdi
call fcn.14003c1a0
mov eax, gethostname
jmp 0x140040fc9
mov rsi, qword [rsp + 0x60]
mov eax, dword [rdi + 0x15fc]
sub eax, 0xc8
cmp eax, 0x64
jb 0x140040f7b
cmp byte [rbx + 0x4025], 0
je 0x140040f1a
cmp qword [rdi + 0x1c8], 0
je 0x140040f1a
lea rdx, str.Connect_me_again_please_n
mov byte [r13 + 0x66b], 1
mov rcx, rdi
call fcn.14003c320
mov rax, qword [r13 + 0xb08]
lea rdx, str.CONNECT_phase_completed__n
mov dword [rax + 0x4020], 2
mov rcx, qword [r13]
call fcn.14003c320
jmp 0x140040f4d
mov rcx, qword [rdi + 0x1c8]
call qword [str.Tf_a_]
mov edx, 2
mov qword [rdi + 0x1c8], r12
mov rcx, r13
call fcn.14003cf60
mov rdx, qword [rsi]
mov rcx, r13
call fcn.14003ce00
mov qword [rsi], 0xffffffffffffffff
mov dword [rbx + 0x4020], r12d
cmp byte [r13 + 0x66b], 0
jne 0x140040fc7
mov r8d, dword [rdi + 0x178]
lea rdx, str.Received_HTTP_code__d_from_proxy_after_CONNECT
mov rcx, rdi
call fcn.14003c1a0
mov eax, gethostname
jmp 0x140040fc9
mov dword [rbx + 0x4020], 2
mov rcx, qword [r13 + 0x6d8]
call qword [str.Tf_a_]
mov qword [r13 + 0x6d8], r12
lea rdx, str.Proxy_replied__d_to_CONNECT_request_n
mov r8d, dword [rdi + 0x15fc]
mov rcx, rdi
mov word [rdi + 0x1224], 1
call fcn.14003c320
mov byte [rdi + 0x65b], 0
mov byte [r13 + 0x665], 0
xor eax, eax
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov eax, Ordinal_46
jmp 0x140040fc9
lea rdx, str.Proxy_CONNECT_aborted_due_to_timeout
mov rcx, rdi
call fcn.14003c1a0
mov eax, Ordinal_30
jmp 0x140040fc9