Function at 0x5251c0
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
add eax, 0x52
push edi
mov dword [ebp - 0x24], 0
mov ebx, dword [esi + 0xc]
push ebx
mov dword [ebp - 4], ebx
mov edi, dword [ebx + 0x3a8]
lea eax, [ebx + eax*4]
mov dword [ebp - 0xc], eax
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
call fcn.00525b30
add esp, 4
test al, al
jne 0x525a42
mov byte [ebx + 0x244], al
nop word [eax + eax]
cmp dword [edi + 0x20], 0
jne 0x5253c2
push dword [ebp + 0x14]
mov dword [ebp - 8], 0
push dword [ebp + 0x10]
mov dword [ebp - 0x10], 0
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
push esi
call fcn.00515c40
push dword [esi + 0x128]
call dword [0x6b3e00]
lea eax, [ebp - 0x3c]
mov dword [esi + 0x128], 0
push 0x100000
push eax
call fcn.0050c850
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ebx
push esi
call fcn.00525a80
add esp, 0x34
test eax, eax
jne 0x525a44
push 1
push dword [ebp - 8]
push eax
push str.CONNECT
push ebx
push esi
call fcn.0051fdb0
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x525392
mov ecx, dword [ebp - 4]
mov edx, 0x6483f0
push str.Proxy_Connection
mov eax, 0x6483f4
mov ebx, 0x69f778
push ecx
cmp dword [ecx + 0xb8], 1
push esi
cmovne eax, edx
mov dword [ebp - 0x1c], eax
call fcn.0051e200
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent
push dword [ebp - 4]
mov eax, ebx
cmovne ecx, eax
push esi
mov dword [ebp - 0x18], ecx
call fcn.0051e200
add esp, 0x18
test eax, eax
jne 0x5252f9
cmp dword [esi + 0x5ac], eax
je 0x5252f9
mov ebx, dword [esi + 0xcb8]
push dword [ebp - 0x18]
mov eax, dword [esi + 0xcb4]
mov ecx, 0x69f778
test eax, eax
push ebx
cmovne ecx, eax
mov eax, 0x69f778
push ecx
mov ecx, dword [ebp - 0x10]
test ecx, ecx
cmovne eax, ecx
push eax
push dword [ebp - 0x1c]
lea eax, [ebp - 0x3c]
push dword [ebp - 8]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push eax
call fcn.0050c7f0
mov ebx, eax
add esp, 0x20
test ebx, ebx
jne 0x525384
lea eax, [ebp - 0x3c]
push eax
push 1
push esi
call fcn.0051db20
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x525384
lea eax, [ebp - 0x3c]
push 0x646c70
push eax
call fcn.0050c7c0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x525384
push dword [ebp + 0xc]
push eax
push eax
lea eax, [esi + 0xd50]
push eax
lea eax, [ebp - 0x3c]
push esi
push eax
call fcn.0051df80
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x525392
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.00515b80
add esp, 8
push dword [ebp - 0x10]
call dword [0x6b3e00]
push dword [ebp - 8]
call dword [0x6b3e00]
lea eax, [ebp - 0x3c]
push eax
call fcn.0050c820
add esp, 0xc
test ebx, ebx
jne 0x525901
mov ebx, dword [ebp - 4]
mov dword [edi + 0x20], 1
push 1
push 0
push esi
call fcn.00517220
add esp, 0xc
test edx, edx
jl 0x525a57
jg 0x5253e1
test eax, eax
je 0x525a57
push dword [ebp + 0xc]
push ebx
call fcn.00516570
add esp, 8
test al, al
je 0x525a42
cmp dword [edi + 0x10], 0
mov dword [ebp - 8], 0
je 0x52548b
lea eax, [ebp - 0x14]
push eax
push 1
lea eax, [ebp + 0xb]
push eax
push dword [ebp - 0x20]
push esi
call fcn.00515d00
mov ebx, eax
add esp, 0x14
cmp ebx, 0x51
je 0x525a42
push esi
call fcn.00523dd0
add esp, 4
test eax, eax
jne 0x525a4b
test ebx, ebx
jne 0x525481
cmp dword [ebp - 0x14], ebx
jle 0x52589e
cmp dword [edi + 0x10], 2
jne 0x525558
mov ecx, dword [edi + 0x18]
mov eax, ecx
mov edx, dword [edi + 0x1c]
or eax, edx
je 0x525517
sub ecx, 1
mov dword [edi + 0x18], ecx
sbb edx, ebx
mov dword [edi + 0x1c], edx
js 0x52547a
jg 0x52588f
test ecx, ecx
jne 0x52588f
mov dword [edi + 0x20], 2
mov dword [edi + 0x10], 0
mov ebx, dword [ebp - 4]
push esi
call fcn.00523dd0
add esp, 4
test eax, eax
jne 0x525a4b
cmp dword [ebp - 8], eax
jne 0x525924
mov eax, dword [esi + 0xd34]
sub eax, 0xc8
cmp eax, 0x64
jb 0x5254d2
push esi
call fcn.0051e410
add esp, 4
test eax, eax
jne 0x525a44
cmp byte [ebx + 0x245], al
je 0x5254d2
mov byte [edi + 0x25], 1
cmp byte [edi + 0x25], 0
je 0x5254e5
cmp dword [esi + 0x128], 0
jne 0x525930
mov eax, dword [esi + 0x128]
test eax, eax
je 0x525948
cmp dword [edi + 0x20], 2
jne 0x52550a
push 1
push esi
call fcn.00525d60
mov eax, dword [esi + 0x128]
add esp, 8
test eax, eax
jne 0x525210
jmp 0x525948
lea eax, [ebp - 0x28]
mov dword [ebp - 0x1c], 0
push eax
lea eax, [ebp - 0x1c]
push eax
push 1
lea eax, [ebp + 0xb]
push eax
push esi
call fcn.00543390
add esp, 0x14
cmp eax, 0xffffffff
jne 0x52588f
push str.chunk_reading_DONE_n
push esi
call fcn.00515c40
add esp, 8
mov dword [edi + 0x10], 0
jmp 0x525888
push 1
lea eax, [ebp + 0xb]
push eax
push edi
call fcn.0050c810
add esp, 0xc
test eax, eax
jne 0x525916
cmp byte [ebp + 0xb], 0xa
jne 0x52588f
push edi
call fcn.0050c890
push edi
mov ebx, eax
call fcn.0050c880
push eax
push ebx
push 1
push esi
mov dword [ebp - 0x10], eax
call fcn.00515af0
add esp, 0x18
cmp byte [esi + 0x705], 0
jne 0x5255c4
push dword [ebp - 0x10]
xor eax, eax
cmp byte [esi + 0x6ed], al
push ebx
setne al
add eax, 2
push eax
push esi
call fcn.00515ac0
add esp, 0x10
test eax, eax
jne 0x525a44
mov eax, dword [ebp - 0x10]
cdq
add dword [esi + 0xd48], eax
adc dword [esi + 0xd4c], edx
mov al, byte [ebx]
cmp al, 0xd
je 0x5257db
cmp al, 0xa
je 0x5257db
push 0x11
push ebx
push str.WWW_Authenticate:
call fcn.0051ab40
add esp, 0xc
test eax, eax
je 0x52560a
mov eax, dword [esi + 0xf0]
mov dword [ebp - 0x10], eax
cmp eax, 0x191
je 0x52562e
push 0x13
push ebx
push str.Proxy_authenticate:
call fcn.0051ab40
add esp, 0xc
test eax, eax
je 0x52567c
mov eax, dword [esi + 0xf0]
mov dword [ebp - 0x10], eax
cmp eax, 0x197
jne 0x52567c
push ebx
call fcn.0051e340
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x52590a
cmp dword [ebp - 0x10], 0x197
push ebx
sete cl
movzx ecx, cl
push ecx
push esi
call fcn.0051fb40
push ebx
mov dword [ebp - 0x1c], eax
call dword [0x6b3e00]
mov eax, dword [ebp - 0x1c]
add esp, 0x10
test eax, eax
jne 0x525a44
push edi
call fcn.0050c8a0
add esp, 4
jmp 0x52588f
push 0xf
push ebx
push str.Content_Length:
call fcn.0051ab40
add esp, 0xc
test eax, eax
je 0x5256e0
mov ecx, dword [esi + 0xf0]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x5256be
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push esi
call fcn.00515c40
add esp, 0xc
push edi
call fcn.0050c8a0
add esp, 4
jmp 0x52588f
lea eax, [edi + 0x18]
push eax
push 0xa
lea eax, [ebx + 0xf]
push 0
push eax
call fcn.005273f0
add esp, 0x10
push edi
call fcn.0050c8a0
add esp, 4
jmp 0x52588f
push str.close
push str.Connection:
push ebx
call fcn.0051e280
add esp, 0xc
test al, al
jne 0x5257c9
push 0x12
push ebx
push str.Transfer_Encoding:
call fcn.0051ab40
add esp, 0xc
test eax, eax
je 0x52577a
mov ecx, dword [esi + 0xf0]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x52573d
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
push esi
call fcn.00515c40
add esp, 0xc
push edi
call fcn.0050c8a0
add esp, 4
jmp 0x52588f
push str.chunked
push str.Transfer_Encoding:
push ebx
call fcn.0051e280
add esp, 0xc
test al, al
je 0x5257cd
push str.CONNECT_responded_chunked_n
push esi
call fcn.00515c40
push esi
mov byte [edi + 0x24], 1
call fcn.00543360
add esp, 0xc
push edi
call fcn.0050c8a0
add esp, 4
jmp 0x52588f
push str.close
push str.Proxy_Connection:
push ebx
call fcn.0051e280
add esp, 0xc
test al, al
jne 0x5257c9
lea eax, [esi + 0xf0]
push eax
lea eax, [ebp - 0x24]
push eax
push str.HTTP_1._d__d
push ebx
call fcn.004ad334
add esp, 0x10
cmp eax, 2
jne 0x5257cd
mov eax, dword [esi + 0xf0]
push edi
mov dword [esi + 0xd34], eax
call fcn.0050c8a0
add esp, 4
jmp 0x52588f
mov byte [edi + 0x25], 1
push edi
call fcn.0050c8a0
add esp, 4
jmp 0x52588f
cmp dword [esi + 0xf0], 0x197
jne 0x525879
cmp byte [esi + 0xcf1], 0
jne 0x525879
mov edx, dword [edi + 0x18]
mov eax, edx
mov ecx, dword [edi + 0x1c]
or eax, ecx
mov dword [edi + 0x10], 2
je 0x525827
push ecx
push edx
push str.Ignore__I64d_bytes_of_response_body_n
push esi
call fcn.00515c40
add esp, 0x10
cmp dword [edi + 0x10], 0
jne 0x525406
jmp 0x525880
cmp byte [edi + 0x24], 0
je 0x525879
push str.Ignore_chunked_response_body_n
push esi
call fcn.00515c40
lea eax, [ebx + 1]
mov byte [esi + 0x13f], 1
cmp byte [eax], 0xa
cmove ebx, eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x14]
push eax
push 1
lea eax, [ebx + 1]
push eax
push esi
call fcn.00543390
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x52581b
push str.chunk_reading_DONE_n
push esi
call fcn.00515c40
add esp, 8
mov dword [edi + 0x20], 2
mov dword [edi + 0x10], 0
mov eax, dword [edi + 0x18]
or eax, dword [edi + 0x1c]
jne 0x52588f
mov dword [edi + 0x20], 2
cmp dword [edi + 0x10], 0
jne 0x525406
jmp 0x525488
cmp dword [esi + 0x170], 0
je 0x5258dd
cmp dword [esi + 0x9a8], 0
je 0x5258dd
cmp dword [esi + 0xcb4], 0
je 0x5258dd
mov ebx, dword [ebp - 4]
push str.Proxy_CONNECT_connection_closed_n
push esi
mov byte [ebx + 0x244], 1
call fcn.00515c40
add esp, 8
mov dword [edi + 0x10], 0
jmp 0x52548b
push str.Proxy_CONNECT_aborted
push esi
mov dword [ebp - 8], 1
call fcn.00515b80
mov ebx, dword [ebp - 4]
add esp, 8
mov dword [edi + 0x10], 0
jmp 0x52548b
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
push str.CONNECT_response_too_large_
push esi
call fcn.00515b80
add esp, 8
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
push dword [eax]
push ebx
push esi
call fcn.005164f0
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov dword [eax], 0xffffffff
mov eax, dword [esi + 0xd34]
sub eax, 0xc8
cmp eax, 0x64
jb 0x5259f4
cmp byte [edi + 0x25], 0
je 0x525988
cmp dword [esi + 0x128], 0
je 0x525988
push str.Connect_me_again_please_n
push esi
mov byte [ebx + 0x244], 1
call fcn.00515c40
push esi
call fcn.00525d30
add esp, 0xc
jmp 0x5259be
push dword [esi + 0x128]
call dword [0x6b3e00]
push 2
push ebx
mov dword [esi + 0x128], 0
call fcn.00516620
mov eax, dword [ebp - 0xc]
push dword [eax]
push ebx
push esi
call fcn.005164f0
mov eax, dword [ebp - 0xc]
add esp, 0x18
mov dword [eax], 0xffffffff
mov dword [edi + 0x20], 0
cmp byte [ebx + 0x244], 0
jne 0x525a42
push edi
call fcn.0050c820
push dword [esi + 0xf0]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.00515b80
add esp, 0x10
mov eax, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x20], 2
push dword [esi + 0xcb4]
call dword [0x6b3e00]
push dword [esi + 0xd34]
mov dword [esi + 0xcb4], 0
push str.Proxy_replied__d_to_CONNECT_request_n
push esi
mov word [esi + 0x9ac], 1
call fcn.00515c40
mov byte [esi + 0x13f], 0
push edi
mov byte [ebx + 0x252], 0
call fcn.0050c820
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x2a
pop ebx
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.00515b80
add esp, 8
mov eax, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret