Function at 0x52ce20
Capabilities:
Check http status code

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x40]
mov eax, dword [edi]
xor edx, edx
mov dword [esp + 0x30], edx
mov ecx, dword [eax + 0x98]
cmp ecx, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], ecx
jne 0x52ce4d
mov dword [esp + 0x24], 0xe10
mov ecx, dword [esp + 0x44]
mov ecx, dword [edi + ecx*4 + 0xa0]
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x4c]
push edx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x4c]
push ecx
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
push eax
call fcn.00521c20
add esp, 0x10
mov eax, dword [edi + 0x164]
test eax, eax
je 0x52ce9e
push eax
call dword [0x5ae5ec]
add esp, 4
mov dword [edi + 0x164], 0
push 0xc
call dword [0x5ae5e8]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x52d3b4
mov ecx, dword [esp + 0x4c]
xor edx, edx
mov dword [eax], edx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov edx, dword [esp + 0x48]
push ecx
push edx
push str._s:_d
call fcn.00520e70
add esp, 0xc
test eax, eax
mov dword [esp + 0x18], eax
je 0x52d3b4
push 1
push eax
push str.CONNECT
call fcn.0052b0f0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x52d017
mov eax, dword [esp + 0x10]
mov edi, 0x572aed
push eax
mov ebx, str.Host:
mov dword [esp + 0x48], edi
call fcn.0052ae40
add esp, 4
test eax, eax
jne 0x52cf36
mov ecx, dword [esp + 0x18]
push ecx
push str.Host:__s_r_n
call fcn.00520e70
mov edi, eax
add esp, 8
test edi, edi
jne 0x52cf36
mov esi, 0x1b
mov edx, dword [esp + 0x10]
push edx
mov ebx, str.Proxy_Connection:
call fcn.0052ae40
add esp, 4
test eax, eax
jne 0x52cf54
mov dword [esp + 0x44], str.Proxy_Connection:_Keep_Alive_r_n
test esi, esi
jne 0x52d005
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x5c]
test ecx, ecx
mov ebx, dword [esp + 0x40]
je 0x52cf73
mov ecx, dword [ebx + 0x148]
jmp 0x52cf78
mov ecx, 0x572aed
mov eax, dword [ebx + 0x144]
test eax, eax
jne 0x52cf87
mov eax, 0x572aed
mov edx, dword [esp + 0x44]
push edx
push ecx
mov ecx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x58]
push edi
push eax
push ecx
push str.CONNECT__s:_d_HTTP_1.0_r_n_s_s_s_s
mov eax, ebp
call fcn.0052bb10
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x52cfba
push ebp
push ebx
call fcn.0052bbd0
add esp, 8
mov esi, eax
test edi, edi
je 0x52cfcd
cmp byte [edi], 0
je 0x52cfcd
push edi
call dword [0x5ae5ec]
add esp, 4
test esi, esi
jne 0x52d005
push 0x572a6c
mov eax, ebp
call fcn.0052bb10
mov esi, eax
add esp, 4
test esi, esi
jne 0x52d005
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x40]
add edx, 0x839c
push edx
push eax
push ebp
call fcn.0052b5c0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x52d017
mov ecx, dword [esp + 0x10]
push str.Failed_sending_CONNECT_to_proxy
push ecx
call fcn.00521d00
add esp, 8
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
push edx
call dword [0x5ae5ec]
add esp, 4
test esi, esi
jne 0x52d3c1
lea ebx, [edi + 0x2ec]
xor ebp, ebp
mov dword [esp + 0x14], ebx
mov esi, ebx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x44], 1
jmp 0x52d051
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x44]
test eax, eax
je 0x52d365
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x52d3e7
mov eax, dword [esp + 0x40]
mov ecx, dword [eax + 0x94]
mov edx, dword [eax + 0x90]
push ecx
push edx
call fcn.005221e0
push edx
push eax
call fcn.00522210
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
mov ecx, dword [esp + 0x34]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x52d399
mov edx, dword [esp + 0x28]
push 0x3e8
push 0xffffffffffffffff
push edx
call fcn.00522050
add esp, 0xc
cmp eax, 0xffffffff
je 0x52d341
test eax, eax
je 0x52d357
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
mov ecx, 0x4000
sub ecx, eax
mov eax, dword [esp + 0x44]
push ecx
push ebx
push edx
push eax
call fcn.005219c0
add esp, 0x14
test eax, eax
jl 0x52d357
xor ecx, ecx
cmp eax, ecx
je 0x52d10b
mov dword [esp + 0x44], ecx
jmp 0x52d357
mov eax, dword [esp + 0x20]
cmp eax, ecx
jg 0x52d121
mov dword [esp + 0x44], ecx
push str.Proxy_CONNECT_aborted
jmp 0x52d346
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x44]
add ebx, eax
cmp edx, 1
mov dword [esp + 0x18], ebx
jle 0x52d166
mov ebx, dword [esp + 0x34]
cdq
sub ebx, eax
mov eax, dword [esp + 0x38]
sbb eax, edx
cmp eax, ecx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], eax
jg 0x52d357
jl 0x52d15d
mov eax, ebx
cmp eax, ecx
ja 0x52d357
mov dword [esp + 0x44], ecx
jmp 0x52d357
xor ebx, ebx
test eax, eax
mov dword [esp + 0x2c], ebx
jle 0x52d357
mov ecx, dword [esp + 0x14]
mov dl, byte [ecx]
inc ebp
cmp dl, 0xa
jne 0x52d2b1
mov al, byte [edi + 0x1a0]
test al, al
je 0x52d1a0
mov edx, dword [esp + 0x40]
push edx
push ebp
push esi
push 1
push edi
call fcn.00521a60
add esp, 0x14
mov cl, byte [edi + 0x190]
test cl, cl
mov eax, 2
je 0x52d1b4
mov eax, 3
push ebp
push esi
push eax
push edi
call fcn.00521ec0
add esp, 0x10
test eax, eax
jne 0x52d421
mov al, byte [esi]
cmp al, 0xd
je 0x52d2cc
cmp al, 0xa
je 0x52d2cc
mov bl, byte [esi + ebp]
push 0x11
push esi
push str.WWW_Authenticate:
mov byte [esi + ebp], 0
call fcn.0051fb90
mov edi, dword [esp + 0x4c]
add esp, 0xc
test eax, eax
je 0x52d206
mov eax, dword [edi + 0x1c0]
cmp eax, 0x191
je 0x52d227
push 0x13
push esi
push str.Proxy_authenticate:
call fcn.0051fb90
add esp, 0xc
test eax, eax
je 0x52d23c
mov eax, dword [edi + 0x1c0]
cmp eax, 0x197
jne 0x52d23c
push esi
push eax
push edi
call fcn.0052b340
add esp, 0xc
test eax, eax
jne 0x52d421
jmp 0x52d299
push 0xf
push esi
push str.Content_Length:
call fcn.0051fb90
add esp, 0xc
test eax, eax
je 0x52d26a
push 0xa
lea eax, [esi + 0xf]
push 0
push eax
call fcn.005406c8
add esp, 0xc
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
jmp 0x52d299
mov edi, dword [esp + 0x40]
add edi, 0x1c0
push edi
lea ecx, [esp + 0x34]
push ecx
push str.HTTP_1._d__d
push esi
call fcn.0053ecb1
add esp, 0x10
cmp eax, 2
jne 0x52d299
mov edx, dword [edi]
mov eax, dword [esp + 0x10]
mov dword [eax + 0x838c], edx
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov byte [esi + ebp], bl
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x2c]
xor ebp, ebp
lea esi, [ecx + 1]
mov ecx, dword [esp + 0x14]
inc ecx
inc ebx
cmp ebx, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x2c], ebx
jl 0x52d174
jmp 0x52d357
mov edx, dword [esp + 0x34]
or edx, dword [esp + 0x38]
je 0x52d337
mov eax, dword [esp + 0x40]
cmp dword [eax + 0x1c0], 0x197
jne 0x52d337
mov al, byte [edi + 0x8380]
test al, al
jne 0x52d337
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
push ecx
push edx
push str.Ignore__lld_bytes_of_response_body_n
push edi
mov dword [esp + 0x54], 2
call fcn.00521c20
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x44]
sub eax, ebx
cdq
add esp, 0x10
sub ecx, eax
mov eax, dword [esp + 0x38]
sbb eax, edx
test eax, eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
jg 0x52d357
jl 0x52d337
mov eax, ecx
test eax, eax
ja 0x52d357
mov dword [esp + 0x44], 0
jmp 0x52d357
push str.Proxy_CONNECT_aborted_due_to_select___error
push edi
mov dword [esp + 0x24], 1
call fcn.00521d00
add esp, 8
cmp dword [esp + 0x18], 0x4000
jb 0x52d04d
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x52d3e7
cmp dword [edi + 0x838c], 0xc8
mov esi, dword [esp + 0x40]
je 0x52d386
push esi
call fcn.0052b990
add esp, 4
mov eax, dword [esi + 0x164]
test eax, eax
je 0x52d3cb
mov edi, dword [esp + 0x40]
jmp 0x52ce80
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.00521d00
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x2c
ret
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x2c
ret
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
mov eax, dword [esi + 0x1c0]
cmp eax, 0xc8
je 0x52d3f4
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push edi
call fcn.00521d00
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x2c
ret
mov eax, dword [esi + 0x144]
push eax
call fcn.00518310
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [esi + 0x144], 0
push edi
mov byte [edi + 0x837c], 1
call fcn.00521c20
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret