Function at 0x51c470
Capabilities:
Check http status code

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x30]
push ebp
mov ebp, dword [esp + 0x30]
lea eax, [ebx*4 + 0x1b8]
add eax, ebp
push esi
mov esi, dword [ebp + 0x588]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + ebx*4 + 0x1b8]
push edi
mov edi, dword [ebp]
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], eax
test esi, esi
je 0x51cf37
cmp dword [esi + 0x4018], 2
je 0x51cf37
and dword [ebp + 0x2a4], 0xff7fffff
jmp 0x51c4d0
cmp dword [esi + 0x4018], 0
jne 0x51c753
push dword [esp + 0x44]
mov ebx, dword [esp + 0x44]
push ebx
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
push edi
call fcn.00517d30
push dword [edi + 0x150]
call dword [0x5ca754]
add esp, 0x14
mov dword [edi + 0x150], 0
call fcn.005226f0
mov dword [esp + 0x10], eax
test eax, eax
je 0x51cdd0
push dword [esp + 0x44]
push ebx
push str._s:_d
call fcn.0051a8d0
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x51cdc3
push 1
push ebp
push str.CONNECT
push dword [esp + 0x44]
call fcn.00523550
push ebp
mov ebx, eax
call dword [0x5ca754]
add esp, 0x14
test ebx, ebx
jne 0x51c726
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x40]
xor ebp, ebp
cmp dword [edx + 0xf0], 1
mov ecx, 0x5afc88
mov eax, 0x55aeb0
cmovne eax, ecx
mov ecx, dword [edx + 0x2a4]
shr ecx, 9
and ecx, 1
mov dword [esp + 0x14], 0x55a670
mov dword [esp + 0x24], eax
cmp ebx, dword [edx + 0x9c]
je 0x51c5ae
push 0x3a
push ebx
call dword [sym.imp.MSVCR110.dll_strchr]
add esp, 8
mov ecx, eax
neg ecx
sbb ecx, ecx
neg ecx
push dword [esp + 0x44]
test ecx, ecx
mov edx, 0x55a670
mov eax, 0x586dac
cmove eax, edx
push eax
mov eax, 0x5af300
push ebx
cmove eax, edx
push eax
push str._s_s_s:_d
call fcn.0051a8d0
mov ebx, eax
add esp, 0x14
mov dword [esp + 0x28], ebx
test ebx, ebx
je 0x51cdc3
push str.Host
push dword [esp + 0x3c]
call fcn.00522e30
add esp, 8
test eax, eax
jne 0x51c614
push ebx
push str.Host:__s_r_n
call fcn.0051a8d0
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x51cd98
push str.Proxy_Connection
push dword [esp + 0x3c]
call fcn.00522e30
test eax, eax
mov eax, 0x55a670
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent
push dword [esp + 0x44]
cmovne ecx, eax
mov dword [esp + 0x30], ecx
call fcn.00522e30
add esp, 0x10
test eax, eax
jne 0x51c660
cmp dword [edi + 0x9d4], eax
je 0x51c660
mov eax, dword [esp + 0x38]
mov eax, dword [eax + 0x2f8]
mov dword [esp + 0x14], eax
push dword [esp + 0x20]
mov eax, dword [esp + 0x3c]
push dword [esp + 0x18]
mov eax, dword [eax + 0x2f4]
test eax, eax
mov edx, 0x55a670
mov ecx, edx
cmovne ecx, eax
push ecx
mov eax, edx
test ebp, ebp
cmovne eax, ebp
push eax
push dword [esp + 0x34]
lea eax, [esp + 0x24]
push ebx
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push eax
call fcn.00522940
add esp, 0x20
mov ebx, eax
test ebp, ebp
je 0x51c6ae
push ebp
call dword [0x5ca754]
add esp, 4
push dword [esp + 0x28]
call dword [0x5ca754]
add esp, 4
test ebx, ebx
jne 0x51c70c
push dword [esp + 0x10]
mov ebp, dword [esp + 0x3c]
push 1
push ebp
call fcn.005229b0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x51c70c
lea eax, [esp + 0x10]
push 0x55e214
push eax
call fcn.00522940
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x51c70c
push dword [esp + 0x3c]
push eax
lea eax, [edi + 0xfd0]
push eax
lea eax, [esp + 0x1c]
push ebp
push eax
call fcn.00522700
add esp, 0x14
mov ebx, eax
mov dword [esp + 0x10], 0
test ebx, ebx
je 0x51c726
push str.Failed_sending_CONNECT_to_proxy
push edi
call fcn.00517c40
add esp, 8
lea eax, [esp + 0x10]
push eax
call fcn.005226c0
add esp, 4
test ebx, ebx
jne 0x51cdb9
mov ebp, dword [esp + 0x38]
mov dword [esi + 0x4000], ebx
mov ebx, dword [esp + 0x3c]
mov dword [esi + 0x4018], 1
push 1
push 0
push edi
call fcn.00519150
add esp, 0xc
test edx, edx
jl 0x51cf41
jg 0x51c772
test eax, eax
je 0x51cf41
push ebx
push ebp
call fcn.005186b0
add esp, 8
test eax, eax
je 0x51cf37
xor ebx, ebx
mov dword [esp + 0x14], ebx
cmp dword [esi + 0x4004], ebx
je 0x51cc62
lea ebx, [esi + 0x4000]
lea esp, [esp]
mov eax, dword [esi + 0x400c]
cmp eax, ebx
jae 0x51cdf4
lea ecx, [esp + 0x18]
push ecx
push 1
push eax
push dword [esp + 0x38]
push ebp
call fcn.00517e10
mov ebx, eax
add esp, 0x14
cmp ebx, 0x51
je 0x51cf37
push ebp
call fcn.005261b0
add esp, 4
test eax, eax
jne 0x51cde7
test ebx, ebx
jne 0x51cc54
cmp dword [esp + 0x18], ebx
jle 0x51cd39
cmp dword [esi + 0x4004], 1
jle 0x51c893
mov ecx, dword [esi + 0x4010]
mov edx, dword [esi + 0x4014]
mov eax, ecx
or eax, edx
mov dword [esi + 0x400c], esi
je 0x51c851
sub ecx, 1
sbb edx, ebx
mov dword [esi + 0x4010], ecx
mov dword [esi + 0x4014], edx
test edx, edx
jl 0x51cc4a
jg 0x51c839
test ecx, ecx
jbe 0x51cc4a
lea ebx, [esi + 0x4000]
cmp dword [esi + 0x4004], 0
jne 0x51c7a0
jmp 0x51cc5e
lea eax, [esp + 0x28]
push eax
push 1
push esi
push ebp
mov dword [esp + 0x38], 0
call fcn.00540db0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x51c839
push str.chunk_reading_DONE_n
push edi
call fcn.00517d30
add esp, 8
mov dword [esi + 0x4004], 0
mov dword [esi + 0x4018], 2
jmp 0x51c839
mov eax, dword [esi + 0x400c]
inc dword [esi + 0x4000]
cmp byte [eax], 0xa
lea ebx, [esi + 0x4000]
je 0x51c8b3
inc eax
mov dword [esi + 0x400c], eax
jmp 0x51c83f
test dword [edi + 0xa9c], 0x40000000
je 0x51c8d2
push dword [ebx]
push dword [esi + 0x4008]
push 1
push edi
call fcn.00517bb0
add esp, 0x10
test dword [edi + 0xaa0], 0x40000
jne 0x51c90f
push dword [ebx]
test dword [edi + 0xa9c], 0x2000000
push dword [esi + 0x4008]
mov ecx, 3
mov eax, 2
cmovne eax, ecx
push eax
push ebp
call fcn.00517b80
add esp, 0x10
test eax, eax
jne 0x51cf39
mov eax, dword [ebx]
cdq
add dword [edi + 0xfc8], eax
adc dword [edi + 0xfcc], edx
mov eax, dword [ebx]
cdq
add dword [edi + 0xb8], eax
adc dword [edi + 0xbc], edx
mov ecx, dword [esi + 0x4008]
mov al, byte [ecx]
cmp al, 0xd
je 0x51cb69
cmp al, 0xa
je 0x51cb69
mov eax, dword [ebx]
push 0x11
mov byte [ecx + eax], 0
push dword [esi + 0x4008]
push str.WWW_Authenticate:
call fcn.0051bea0
add esp, 0xc
test eax, eax
je 0x51c971
mov eax, dword [edi + 0x110]
cmp eax, 0x191
je 0x51c997
push 0x13
push dword [esi + 0x4008]
push str.Proxy_authenticate:
call fcn.0051bea0
add esp, 0xc
test eax, eax
je 0x51c9e5
mov eax, dword [edi + 0x110]
cmp eax, 0x197
jne 0x51c9e5
push dword [esi + 0x4008]
xor ecx, ecx
cmp eax, 0x197
sete cl
mov dword [esp + 0x2c], ecx
call fcn.00522f80
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x51cdd0
push ebx
push dword [esp + 0x2c]
push ebp
call fcn.00523300
push ebx
mov ebp, eax
call dword [0x5ca754]
add esp, 0x10
test ebp, ebp
jne 0x51cddd
mov ebp, dword [esp + 0x38]
jmp 0x51cb4c
push 0xf
push dword [esi + 0x4008]
push str.Content_Length:
call fcn.0051bea0
add esp, 0xc
test eax, eax
je 0x51ca50
mov ecx, dword [edi + 0x110]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x51ca2e
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push edi
call fcn.00517d30
add esp, 0xc
jmp 0x51cb52
lea eax, [esi + 0x4010]
push eax
mov eax, dword [esi + 0x4008]
push 0xa
add eax, 0xf
push 0
push eax
call fcn.00527990
add esp, 0x10
jmp 0x51cb52
push str.close
push str.Connection:
push dword [esi + 0x4008]
call fcn.00522eb0
add esp, 0xc
test eax, eax
je 0x51ca78
or dword [esi + 0x401c], 2
jmp 0x51cb52
push 0x12
push dword [esi + 0x4008]
push str.Transfer_Encoding:
call fcn.0051bea0
add esp, 0xc
test eax, eax
je 0x51cafa
mov ecx, dword [edi + 0x110]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x51cac1
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
push edi
call fcn.00517d30
add esp, 0xc
jmp 0x51cb52
push str.chunked
push str.Transfer_Encoding:
push dword [esi + 0x4008]
call fcn.00522eb0
add esp, 0xc
test eax, eax
je 0x51cb52
push str.CONNECT_responded_chunked_n
push edi
call fcn.00517d30
or dword [esi + 0x401c], 1
push ebp
call fcn.00540d90
add esp, 0xc
jmp 0x51cb52
push str.close
push str.Proxy_Connection:
push dword [esi + 0x4008]
call fcn.00522eb0
add esp, 0xc
test eax, eax
je 0x51cb1f
or dword [esi + 0x401c], 2
jmp 0x51cb52
lea ebx, [edi + 0x110]
push ebx
lea eax, [esp + 0x34]
push eax
push str.HTTP_1._d__d
push dword [esi + 0x4008]
call dword [sym.imp.MSVCR110.dll_sscanf]
add esp, 0x10
cmp eax, 2
jne 0x51cb4c
mov eax, dword [ebx]
mov dword [edi + 0xfb4], eax
lea ebx, [esi + 0x4000]
mov dword [ebx], 0
mov dword [esi + 0x400c], esi
mov dword [esi + 0x4008], esi
jmp 0x51c83f
mov dword [esi + 0x400c], esi
cmp dword [edi + 0x110], 0x197
jne 0x51cc1f
test byte [edi + 0xf84], 0x20
jne 0x51cc1f
mov edx, dword [esi + 0x4010]
mov ecx, dword [esi + 0x4014]
mov eax, edx
or eax, ecx
mov dword [esi + 0x4004], 2
je 0x51cbba
push ecx
push edx
push str.Ignore__I64d_bytes_of_response_body_n
push edi
call fcn.00517d30
add esp, 0x10
jmp 0x51cc29
test byte [esi + 0x401c], 1
je 0x51cc1f
push str.Ignore_chunked_response_body_n
push edi
call fcn.00517d30
or dword [edi + 0x598], 8
mov eax, dword [esi + 0x4008]
inc eax
add esp, 8
cmp byte [eax], 0xa
jne 0x51cbea
mov dword [esi + 0x4008], eax
lea eax, [esp + 0x18]
push eax
mov eax, dword [esi + 0x4008]
push 1
inc eax
push eax
push ebp
call fcn.00540db0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x51cc29
push str.chunk_reading_DONE_n
push edi
call fcn.00517d30
add esp, 8
mov dword [esi + 0x4018], 2
mov dword [esi + 0x4004], 0
mov eax, dword [esi + 0x4010]
or eax, dword [esi + 0x4014]
jne 0x51c83f
mov dword [esi + 0x4018], 2
jmp 0x51c83f
mov dword [esi + 0x4018], 2
mov dword [esi + 0x4004], 0
mov ebx, dword [esp + 0x14]
push ebp
call fcn.005261b0
add esp, 4
test eax, eax
jne 0x51cde7
test ebx, ebx
jne 0x51ce02
mov eax, 0x51eb851f
imul dword [edi + 0xfb4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
je 0x51ccb6
push ebp
call fcn.00523040
add esp, 4
test eax, eax
jne 0x51cf39
test byte [ebp + 0x2a4], 1
je 0x51ccb6
or dword [esi + 0x401c], 2
test byte [esi + 0x401c], 2
je 0x51cccc
cmp dword [edi + 0x150], 0
jne 0x51ce0f
cmp dword [edi + 0x150], 0
je 0x51ce26
cmp dword [esi + 0x4018], 2
jne 0x51cd23
mov eax, dword [ebp + 0x588]
and dword [eax + 0x401c], 0xfffffffd
mov dword [eax + 0x4018], 0
mov dword [eax + 0x4004], 1
mov dword [eax + 0x4008], eax
mov dword [eax + 0x400c], eax
mov dword [eax + 0x4010], 0
mov dword [eax + 0x4014], 0
cmp dword [edi + 0x150], 0
je 0x51ce26
mov ebx, dword [esp + 0x3c]
jmp 0x51c4d0
cmp dword [edi + 0x5c8], 0
je 0x51cd76
cmp dword [edi + 0xd00], 0
je 0x51cd76
or dword [ebp + 0x2a4], 0x800000
push str.Proxy_CONNECT_connection_closed_n
push edi
call fcn.00517d30
mov ebx, dword [esp + 0x1c]
add esp, 8
mov dword [esi + 0x4004], 0
jmp 0x51cc62
push str.Proxy_CONNECT_aborted
push edi
mov ebx, 1
call fcn.00517c40
add esp, 8
mov dword [esi + 0x4004], 0
jmp 0x51cc62
push ebx
call dword [0x5ca754]
lea eax, [esp + 0x14]
push eax
call fcn.005226c0
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x24
ret
lea eax, [esp + 0x10]
push eax
call fcn.005226c0
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x24
ret
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x24
ret
push str.CONNECT_response_too_large_
push edi
call fcn.00517c40
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x24
ret
mov ebx, dword [esp + 0x1c]
push dword [ebx]
push ebp
call fcn.00518630
add esp, 8
mov dword [ebx], 0xffffffff
jmp 0x51ce2a
mov ebx, dword [esp + 0x1c]
mov eax, 0x51eb851f
imul dword [edi + 0xfb4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
je 0x51cee0
test byte [esi + 0x401c], 2
je 0x51ce7a
cmp dword [edi + 0x150], 0
je 0x51ce7a
or dword [ebp + 0x2a4], 0x800000
push str.Connect_me_again_please_n
push edi
call fcn.00517d30
push ebp
call fcn.0051d1a0
add esp, 0xc
jmp 0x51cea9
push dword [edi + 0x150]
call dword [0x5ca754]
push 2
push ebp
mov dword [edi + 0x150], 0
call fcn.00518750
push dword [ebx]
push ebp
call fcn.00518630
add esp, 0x14
mov dword [ebx], 0xffffffff
mov dword [esi + 0x4018], 0
test dword [ebp + 0x2a4], 0x800000
jne 0x51cf37
push dword [edi + 0x110]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push edi
call fcn.00517c40
add esp, 0xc
mov eax, 0x38
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov dword [esi + 0x4018], 2
push dword [ebp + 0x2f4]
call dword [0x5ca754]
mov dword [ebp + 0x2f4], 0
mov eax, dword [edi + 0xd04]
push dword [edi + 0xfb4]
and eax, 0xfffffffd
or eax, 1
push str.Proxy_replied__d_to_CONNECT_request_n
push edi
mov dword [edi + 0xd04], eax
call fcn.00517d30
and dword [edi + 0x598], 0xfffffff7
add esp, 0x10
and dword [ebp + 0x2a4], 0xfffeffff
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.00517c40
add esp, 8
mov eax, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret