Function at 0x5be682
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x60
mov ebx, dword [ebp + 8]
mov eax, dword [0x7a8498]
xor eax, ebp
mov dword [esp + 0x58], eax
mov edi, dword [ebx + 0xc]
mov ecx, dword [edi + 0x4c8]
test ecx, ecx
mov dword [esp + 0x2c], edi
je 0x5bef6e
mov dword [esp + 0x54], 0
mov dword [esp + 0x10], edi
cmp dword [ecx + 0x20], 2
jne 0x5be6e6
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x4c8]
xor esi, esi
test eax, eax
je 0x5bf1d7
cmp dword [eax + 0x20], 2
je 0x5bf1d7
jmp 0x5bf1fe
mov edx, dword [ebp + 0xc]
mov eax, dword [esp + 0x10]
mov edx, dword [eax + edx*4 + 0x148]
mov dword [esp + 0x30], edx
mov byte [eax + 0x244], 0
lea eax, [ebx + 0xcf8]
mov dword [esp + 0x28], eax
lea eax, [ebx + 0xf0]
mov dword [esp + 0x18], eax
lea eax, [ecx + 0x18]
mov dword [esp + 0x1c], eax
lea edi, [esp + 0x3f]
mov dword [esp + 0xc], ecx
cmp dword [ecx + 0x20], 0
jne 0x5be986
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x40], xmm0
push dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
push edi
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
push ebx
call fcn.005ae893
add esp, 0x10
mov ecx, dword [fcn.00474d80]
mov esi, dword [ebx + 0x128]
call dword [section..00cfg]
push esi
call ecx
add esp, 4
mov dword [ebx + 0x128], 0
mov esi, edi
push 0x100000
lea eax, [esp + 0x44]
push eax
call fcn.005b12a8
add esp, 8
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x64], edi
je 0x5be79c
push 0x3a
push esi
call fcn.006cd120
add esp, 8
test eax, eax
setne al
jmp 0x5be7a2
mov al, byte [eax + 0x24c]
test al, al
mov eax, 0x6fbb6f
mov edx, 0x6facd8
cmove eax, edx
mov ecx, 0x6fbb6d
cmove ecx, edx
push dword [ebp + 0x14]
push eax
push esi
push ecx
push str._s_s_s:_d
call fcn.005bac36
add esp, 0x14
mov esi, 0x1b
test eax, eax
je 0x5bf1d4
mov ebx, eax
push str.Host
mov edi, dword [esp + 0x14]
push edi
mov eax, dword [ebp + 8]
push eax
call fcn.005bfd84
add esp, 0xc
xor ecx, ecx
test eax, eax
jne 0x5be80f
push ebx
push str.Host:__s_r_n
call fcn.005bac36
add esp, 8
mov ecx, eax
test eax, eax
je 0x5bf1bb
mov dword [esp + 0x14], ecx
push 1
push ebx
push 0
push str.CONNECT
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.005c03f8
add esp, 0x18
mov esi, eax
test eax, eax
jne 0x5be939
mov edi, dword [esp + 0x10]
cmp dword [edi + 0xb8], 1
mov ecx, 0x752758
mov eax, 0x752754
cmove ecx, eax
mov dword [esp + 0x24], ecx
push str.Proxy_Connection
push edi
push dword [ebp + 8]
call fcn.005bfd84
add esp, 0xc
test eax, eax
mov dword [esp + 0x20], 0x6facd8
mov esi, 0x6facd8
mov eax, str.Proxy_Connection:_Keep_Alive_r_n
cmove esi, eax
push str.User_Agent
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.005bfd84
add esp, 0xc
test eax, eax
je 0x5be894
mov ecx, dword [esp + 0x14]
jmp 0x5be8ab
cmp dword [edi + 0x5a0], 0
mov ecx, dword [esp + 0x14]
je 0x5be8ab
mov eax, dword [edi + 0xc88]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0xc84]
test eax, eax
mov edx, 0x6facd8
cmove eax, edx
test ecx, ecx
cmove ecx, edx
push esi
push dword [esp + 0x24]
push eax
push ecx
push dword [esp + 0x34]
push ebx
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
lea eax, [esp + 0x5c]
push eax
call fcn.005b13f2
add esp, 0x20
test eax, eax
jne 0x5be929
lea eax, [esp + 0x40]
push eax
push 1
push edi
call fcn.005c0f89
add esp, 0xc
test eax, eax
jne 0x5be929
push 0x75090a
lea eax, [esp + 0x44]
push eax
call fcn.005b13cd
add esp, 8
test eax, eax
jne 0x5be929
xor esi, esi
push dword [ebp + 0xc]
push esi
push esi
push dword [esp + 0x34]
push edi
lea eax, [esp + 0x54]
push eax
call fcn.005c0ab7
add esp, 0x18
test eax, eax
je 0x5be939
push str.Failed_sending_CONNECT_to_proxy
push edi
mov esi, eax
call fcn.005ae9f9
add esp, 8
mov ecx, dword [fcn.00474d80]
call dword [section..00cfg]
push dword [esp + 0x14]
call ecx
add esp, 4
mov ecx, dword [fcn.00474d80]
call dword [section..00cfg]
push ebx
call ecx
add esp, 4
lea eax, [esp + 0x40]
push eax
call fcn.005b12c0
add esp, 4
test esi, esi
mov ebx, edi
lea edi, [esp + 0x3f]
jne 0x5bf1d7
mov eax, dword [esp + 0xc]
mov dword [eax + 0x20], 1
push 1
xor eax, eax
push eax
push ebx
call fcn.005b43dc
add esp, 0xc
neg eax
mov eax, 0
sbb eax, edx
jge 0x5bf00b
push dword [ebp + 0xc]
push dword [esp + 0x14]
call fcn.005b5fa9
add esp, 8
test al, al
mov eax, dword [esp + 0xc]
je 0x5be6c3
mov dword [esp + 0x14], 0
cmp dword [eax + 0x10], 0
je 0x5beea2
mov dword [esp + 0x40], 0xffffffff
mov byte [esp + 0x3f], 0xff
lea eax, [esp + 0x40]
push eax
push 1
push edi
push dword [esp + 0x3c]
push ebx
call fcn.005af0fb
add esp, 0x14
cmp eax, 0x51
je 0x5be6c3
mov esi, eax
push ebx
call fcn.005b86e2
add esp, 4
test eax, eax
jne 0x5befe9
test esi, esi
jne 0x5bee97
cmp dword [esp + 0x40], 0
mov eax, dword [esp + 0xc]
jle 0x5bee44
cmp dword [eax + 0x10], 2
jne 0x5bea6f
mov edi, dword [esp + 0x1c]
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov edx, ecx
or edx, eax
je 0x5beb49
mov ebx, ecx
add ebx, 0xffffffff
mov esi, eax
adc esi, 0xffffffff
xor edx, edx
inc edx
cmp edx, ecx
mov ecx, 0
sbb ecx, eax
mov dword [edi], ebx
mov ebx, dword [ebp + 8]
mov dword [edi + 4], esi
mov ecx, dword [esp + 0xc]
lea edi, [esp + 0x3f]
jl 0x5becf3
jmp 0x5bef5b
push 1
push edi
push eax
call fcn.005b1304
add esp, 0xc
test eax, eax
jne 0x5beff3
cmp byte [esp + 0x3f], 0xa
mov ecx, dword [esp + 0xc]
jne 0x5becf3
push ecx
mov edi, ecx
call fcn.0053cb10
add esp, 4
mov esi, eax
push edi
call fcn.005407a0
add esp, 4
mov edi, eax
push eax
push esi
push 1
push ebx
call fcn.005ae961
add esp, 0x10
cmp byte [ebx + 0x6f5], 0
jne 0x5beae3
cmp byte [ebx + 0x6dc], 1
mov eax, 3
sbb eax, 0
push edi
push esi
push eax
push ebx
call fcn.005aef03
add esp, 0x10
test eax, eax
jne 0x5bf023
mov eax, edi
sar eax, 0x1f
add dword [ebx + 0xcf0], edi
adc dword [ebx + 0xcf4], eax
mov al, byte [esi]
cmp al, 0xd
mov edi, esi
je 0x5beb04
cmp al, 0xa
jne 0x5beba1
mov esi, edi
mov eax, dword [esp + 0x18]
cmp dword [eax], 0x197
mov ecx, dword [esp + 0xc]
lea edi, [esp + 0x3f]
jne 0x5beb27
cmp byte [ebx + 0xcc1], 0
je 0x5bec76
mov dword [ecx + 0x10], 0
mov edx, dword [esp + 0x1c]
mov eax, dword [edx]
or eax, dword [edx + 4]
jne 0x5becf3
mov dword [ecx + 0x20], 2
jmp 0x5becf3
mov dword [esp + 0x38], 0xffffffff
mov dword [esp + 0x34], 0
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x38]
push eax
push 1
lea edi, [esp + 0x4b]
push edi
push ebx
call fcn.00639d89
add esp, 0x14
cmp eax, 0xffffffff
jne 0x5beb98
push str.chunk_reading_DONE_n
push ebx
call fcn.005ae893
add esp, 8
mov eax, dword [esp + 0xc]
mov dword [eax + 0x10], 0
mov dword [eax + 0x20], 2
mov ecx, dword [esp + 0xc]
jmp 0x5becf3
push 0x11
push edi
push str.WWW_Authenticate:
call fcn.00621987
add esp, 0xc
test eax, eax
je 0x5bebc5
mov eax, dword [esp + 0x18]
cmp dword [eax], 0x191
jne 0x5bebc5
xor edx, edx
jmp 0x5bebe7
push 0x13
push edi
push str.Proxy_authenticate:
call fcn.00621987
add esp, 0xc
test eax, eax
je 0x5bec3a
mov dl, 1
mov eax, dword [esp + 0x18]
cmp dword [eax], 0x197
jne 0x5bec3a
mov esi, edx
push edi
call fcn.005bfded
add esp, 4
test eax, eax
je 0x5bf1cf
mov ebx, eax
mov eax, esi
movzx eax, al
push ebx
push eax
mov edi, dword [ebp + 8]
push edi
call fcn.005c0855
add esp, 0xc
mov esi, eax
mov ecx, dword [fcn.00474d80]
call dword [section..00cfg]
push ebx
mov ebx, edi
call ecx
add esp, 4
test esi, esi
mov ecx, dword [esp + 0xc]
lea edi, [esp + 0x3f]
je 0x5bece6
jmp 0x5bf1d7
push 0xf
push edi
push str.Content_Length:
call fcn.00621987
add esp, 0xc
test eax, eax
mov esi, edi
lea edi, [esp + 0x3f]
je 0x5beca9
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
lea ecx, [eax - 0xc8]
cmp ecx, 0x63
ja 0x5becce
push eax
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push ebx
call fcn.005ae893
add esp, 0xc
jmp 0x5bece2
mov dword [ecx + 0x10], 2
mov eax, dword [ecx + 0x18]
mov ecx, dword [ecx + 0x1c]
mov edx, eax
or edx, ecx
je 0x5bed03
push ecx
push eax
push str.Ignore__I64d_bytes_of_response_body_n
push ebx
call fcn.005ae893
add esp, 0x10
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx + 0x10]
test eax, eax
jne 0x5becf6
jmp 0x5beb2e
push str.close
push str.Connection:
push esi
call fcn.005c0e40
add esp, 0xc
test al, al
je 0x5bed7d
mov ecx, dword [esp + 0xc]
mov byte [ecx + 0x25], 1
jmp 0x5bece6
add esi, 0xf
push dword [esp + 0x1c]
push 0xa
push 0
push esi
call fcn.006379c4
add esp, 0x10
mov ecx, dword [esp + 0xc]
push ecx
call fcn.005b12ea
mov ecx, dword [esp + 0x10]
add esp, 4
mov eax, dword [ecx + 0x10]
test eax, eax
jne 0x5be9d0
jmp 0x5beea2
mov ecx, dword [esp + 0xc]
cmp byte [ecx + 0x24], 0
je 0x5beb27
mov dword [esp + 0x38], 0xffffffff
push str.Ignore_chunked_response_body_n
push ebx
call fcn.005ae893
add esp, 8
mov byte [ebx + 0x13f], 1
cmp byte [esi + 1], 0xa
lea eax, [esi + 1]
cmovne eax, esi
inc eax
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x44]
push ecx
push 1
push eax
push ebx
call fcn.00639d89
add esp, 0x14
cmp eax, 0xffffffff
jne 0x5bec99
push str.chunk_reading_DONE_n
push ebx
call fcn.005ae893
add esp, 8
mov eax, dword [esp + 0xc]
mov dword [eax + 0x10], 0
mov dword [eax + 0x20], 2
jmp 0x5bec99
push 0x12
push esi
push str.Transfer_Encoding:
call fcn.00621987
add esp, 0xc
test eax, eax
je 0x5bedad
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
lea ecx, [eax - 0xc8]
cmp ecx, 0x63
ja 0x5bedfd
push eax
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
jmp 0x5bec6b
push str.close
push str.Proxy_Connection:
push esi
call fcn.005c0e40
add esp, 0xc
test al, al
jne 0x5becc4
push dword [esp + 0x18]
lea eax, [esp + 0x58]
push eax
push str.HTTP_1._d__d
push esi
call fcn.0044a764
add esp, 0x10
cmp eax, 2
mov ecx, dword [esp + 0xc]
jne 0x5bece6
mov eax, dword [ebx + 0xf0]
mov dword [ebx + 0xcdc], eax
jmp 0x5bece6
push str.chunked
push str.Transfer_Encoding:
push esi
call fcn.005c0e40
add esp, 0xc
test al, al
mov ecx, dword [esp + 0xc]
je 0x5bece6
push str.CONNECT_responded_chunked_n
push ebx
call fcn.005ae893
add esp, 8
mov eax, dword [esp + 0xc]
mov byte [eax + 0x24], 1
push ebx
call fcn.00639d60
mov ecx, dword [esp + 0x10]
add esp, 4
jmp 0x5bece6
cmp dword [ebx + 0x170], 0
je 0x5bee82
cmp dword [ebx + 0x978], 0
je 0x5bee82
cmp dword [ebx + 0xc84], 0
je 0x5bee82
mov eax, dword [esp + 0x10]
mov byte [eax + 0x244], 1
push str.Proxy_CONNECT_connection_closed_n
push ebx
call fcn.005ae893
add esp, 8
mov dword [esp + 0x14], 0
jmp 0x5bee97
push str.Proxy_CONNECT_aborted
push ebx
call fcn.005ae9f9
add esp, 8
xor eax, eax
inc eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xc]
mov dword [eax + 0x10], 0
push ebx
call fcn.005b86e2
add esp, 4
test eax, eax
jne 0x5befe9
mov esi, 0x38
cmp dword [esp + 0x14], 0
jne 0x5bf1d7
mov eax, dword [ebx + 0xcdc]
mov ecx, 0xffffff38
add eax, ecx
cmp eax, 0x64
jb 0x5beef7
push ebx
call fcn.005bfeaa
add esp, 4
test eax, eax
jne 0x5bf023
mov eax, dword [esp + 0x10]
cmp byte [eax + 0x245], 0
jne 0x5bf02a
mov ecx, dword [esp + 0xc]
cmp byte [ecx + 0x25], 0
jne 0x5bf032
mov eax, dword [ebx + 0x128]
test eax, eax
je 0x5bf065
cmp dword [ecx + 0x20], 2
jne 0x5bef4e
mov eax, dword [ebx + 0xc]
mov ebx, dword [eax + 0x4c8]
push ebx
call fcn.005b12ea
mov ecx, dword [esp + 0x10]
add esp, 4
xor eax, eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x10], 1
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], eax
mov byte [ebx + 0x25], 0
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x128]
test eax, eax
jne 0x5be722
jmp 0x5bf065
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x20], 2
jmp 0x5beea2
mov ecx, dword [fcn.00474e10]
call dword [section..00cfg]
push 0x28
push 1
call ecx
add esp, 8
test eax, eax
je 0x5befdf
mov esi, eax
push str.allocate_connect_buffer__n
push ebx
call fcn.005ae893
add esp, 8
mov dword [edi + 0x4c8], esi
push 0x4000
push esi
call fcn.005b12a8
add esp, 8
xor eax, eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x10], 1
mov dword [esi + 0x1c], eax
mov dword [esi + 0x18], eax
mov byte [esi + 0x25], 0
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x10], ecx
mov ecx, dword [ecx + 0x4c8]
mov dword [esp + 0x54], eax
test ecx, ecx
jne 0x5be6bd
jmp 0x5be6c3
mov esi, 0x1b
jmp 0x5bf1fe
mov esi, 0x2a
jmp 0x5bf1d7
push str.CONNECT_response_too_large_
push ebx
call fcn.005ae9f9
add esp, 8
mov esi, 0x38
jmp 0x5bf1d7
push str.Proxy_CONNECT_aborted_due_to_timeout
push ebx
call fcn.005ae9f9
add esp, 8
mov esi, 0x1c
jmp 0x5bf1d7
mov esi, eax
jmp 0x5bf1d7
mov ecx, dword [esp + 0xc]
mov byte [ecx + 0x25], 1
cmp dword [ebx + 0x128], 0
je 0x5bf065
mov edi, dword [esp + 0x10]
mov eax, dword [ebp + 0xc]
push dword [edi + eax*4 + 0x148]
push edi
push ebx
call fcn.005b50d3
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov dword [edi + eax*4 + 0x148], 0xffffffff
mov eax, 0xffffff38
add eax, dword [ebx + 0xcdc]
cmp eax, 0x64
jae 0x5bf0dd
mov dword [ecx + 0x20], 2
mov edi, ecx
mov ecx, dword [fcn.00474d80]
mov esi, dword [ebx + 0xc84]
call dword [section..00cfg]
push esi
call ecx
add esp, 4
mov dword [ebx + 0xc84], 0
mov word [ebx + 0x97c], 1
push dword [ebx + 0xcdc]
push str.Proxy_replied__d_to_CONNECT_request_n
push ebx
call fcn.005ae893
add esp, 0xc
xor eax, eax
mov byte [ebx + 0x13f], al
mov ecx, dword [esp + 0x10]
mov byte [ecx + 0x252], al
push edi
call fcn.005b12c0
add esp, 4
jmp 0x5be6c3
cmp byte [ecx + 0x25], 0
mov ebx, dword [ebx + 0x128]
je 0x5bf134
test ebx, ebx
je 0x5bf132
mov edi, dword [esp + 0x10]
mov byte [edi + 0x244], 1
push str.Connect_me_again_please_n
mov ebx, dword [ebp + 8]
push ebx
call fcn.005ae893
add esp, 8
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 0x4c8]
mov dword [eax + 0x20], 2
push eax
call fcn.005b12c0
add esp, 4
push str.CONNECT_phase_completed__n
push ebx
call fcn.005ae893
add esp, 8
jmp 0x5bf184
xor ebx, ebx
mov ecx, dword [fcn.00474d80]
call dword [section..00cfg]
push ebx
call ecx
add esp, 4
mov ebx, dword [ebp + 8]
mov dword [ebx + 0x128], 0
push 2
mov edi, dword [esp + 0x14]
push edi
call fcn.005b5f67
add esp, 8
mov eax, dword [ebp + 0xc]
push dword [edi + eax*4 + 0x148]
push edi
push ebx
call fcn.005b50d3
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov dword [edi + eax*4 + 0x148], 0xffffffff
mov eax, dword [esp + 0xc]
mov dword [eax + 0x20], 0
cmp byte [edi + 0x244], 0
jne 0x5be6c3
push eax
call fcn.005b12c0
add esp, 4
push dword [ebx + 0xf0]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push ebx
call fcn.005ae9f9
add esp, 0xc
jmp 0x5bf1d7
mov ecx, dword [fcn.00474d80]
call dword [section..00cfg]
push ebx
call ecx
add esp, 4
jmp 0x5bf1d4
mov esi, 0x1b
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + 0x4c8]
mov dword [eax + 0x20], 2
push eax
call fcn.005b12c0
add esp, 4
push str.CONNECT_phase_completed__n
push ebx
call fcn.005ae893
add esp, 8
mov ecx, dword [esp + 0x58]
xor ecx, ebp
call fcn.006c9121
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret