Function at 0x50f6a0
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + eax*4 + 0x1a8]
push esi
mov esi, dword [ebx + 0x44c]
push edi
mov edi, dword [ebx]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], ecx
test esi, esi
je 0x510182
cmp dword [esi + 0x4018], 2
je 0x510182
and dword [ebx + 0x280], 0xff7fffff
jmp 0x50f6f0
cmp dword [esi + 0x4018], 0
jne 0x50f967
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push ebx
push edx
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
push edi
call fcn.004ed020
mov eax, dword [edi + 0x148]
push eax
call dword [0x592308]
add esp, 0x14
mov dword [edi + 0x148], 0
call fcn.00507e80
mov dword [ebp - 4], eax
test eax, eax
je 0x50ffbc
mov ecx, dword [ebp + 0x10]
push ebx
push ecx
push str._s:_d
call fcn.004f5310
add esp, 0xc
mov dword [ebp - 8], eax
test eax, eax
je 0x50ffb0
push 1
mov edx, eax
mov eax, dword [ebp + 8]
push edx
push str.CONNECT
push eax
call fcn.00507a40
mov ecx, dword [ebp - 8]
push ecx
mov ebx, eax
call dword [0x592308]
add esp, 0x14
test ebx, ebx
jne 0x50f940
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0xf0], 1
mov eax, 0x53fbbd
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 0x551e50
je 0x50f7a9
mov dword [ebp - 0x14], 0x5681b0
mov eax, dword [ecx + 0x280]
mov ebx, dword [ebp + 0x10]
shr eax, 9
and eax, 1
cmp ebx, dword [ecx + 0x9c]
je 0x50f7d1
push 0x3a
push ebx
call fcn.004be4d0
add esp, 8
neg eax
sbb eax, eax
neg eax
test eax, eax
je 0x50f7e1
mov ecx, 0x55f008
mov eax, 0x55f010
jmp 0x50f7e8
mov ecx, 0x53fbbd
mov eax, ecx
mov edx, dword [ebp + 0x14]
push edx
push ecx
push ebx
push eax
push str._s_s_s:_d
call fcn.004f5310
mov ebx, eax
add esp, 0x14
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x50ffc8
mov eax, dword [ebp + 8]
push str.Host
push eax
call fcn.005073b0
add esp, 8
test eax, eax
jne 0x50f837
push ebx
push str.Host:__s_r_n
call fcn.004f5310
add esp, 8
mov dword [ebp - 8], eax
test eax, eax
je 0x50ffe0
mov ebx, dword [ebp + 8]
push str.Proxy_Connection
push ebx
call fcn.005073b0
add esp, 8
test eax, eax
jne 0x50f853
mov dword [ebp - 0xc], str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent
push ebx
call fcn.005073b0
add esp, 8
test eax, eax
jne 0x50f876
cmp dword [edi + 0x9c4], eax
je 0x50f876
mov ecx, dword [ebx + 0x2d8]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebx + 0x2d4]
test ecx, ecx
jne 0x50f885
mov ecx, 0x53fbbd
mov eax, dword [ebp - 8]
test eax, eax
jne 0x50f891
mov eax, 0x53fbbd
mov edx, dword [ebp - 0xc]
push edx
mov edx, dword [ebp - 0x10]
push edx
push ecx
mov ecx, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
push ecx
lea edx, [ebp - 4]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push edx
call fcn.00508a10
add esp, 0x20
cmp dword [ebp - 8], 0
mov ebx, eax
je 0x50f8c9
mov eax, dword [ebp - 8]
push eax
call dword [0x592308]
add esp, 4
mov ecx, dword [ebp - 0x18]
push ecx
call dword [0x592308]
add esp, 4
test ebx, ebx
jne 0x50f927
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
push edx
push 1
push eax
call fcn.00508cc0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x50f927
lea ecx, [ebp - 4]
push 0x564988
push ecx
call fcn.00508a10
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x50f927
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push edx
push eax
lea eax, [edi + 0xfb8]
push eax
push ecx
lea edx, [ebp - 4]
push edx
call fcn.00507ec0
add esp, 0x14
mov ebx, eax
mov dword [ebp - 4], 0
test ebx, ebx
je 0x50f940
push str.Failed_sending_CONNECT_to_proxy
push edi
call fcn.004ed150
add esp, 8
lea eax, [ebp - 4]
push eax
call fcn.00507e90
add esp, 4
test ebx, ebx
jne 0x50ffff
mov dword [esi + 0x4000], ebx
mov ebx, dword [ebp + 8]
mov dword [esi + 0x4018], 1
push 1
push 0
push edi
call fcn.004f1a50
add esp, 0xc
test edx, edx
jl 0x510008
jg 0x50f986
test eax, eax
je 0x510008
mov ecx, dword [ebp + 0xc]
push ecx
push ebx
call fcn.004f26c0
add esp, 8
test eax, eax
je 0x510182
cmp dword [esi + 0x4004], 0
mov dword [ebp - 0x18], 0
je 0x50fa6a
nop
mov eax, dword [esi + 0x400c]
lea ecx, [esi + 0x4000]
cmp eax, ecx
jae 0x510022
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x1c]
push edx
push 1
push eax
mov eax, dword [ebp - 0x20]
push eax
push ecx
call fcn.004ece60
mov ebx, eax
add esp, 0x14
cmp ebx, 0x51
je 0x510182
mov edx, dword [ebp + 8]
push edx
call fcn.005113c0
add esp, 4
test eax, eax
jne 0x51003c
test ebx, ebx
jne 0x50fa5d
cmp dword [ebp - 0x1c], ebx
jle 0x50ff64
cmp dword [esi + 0x4004], 1
jle 0x50fb7b
mov eax, dword [esi + 0x4010]
mov ecx, dword [esi + 0x4014]
mov edx, eax
or edx, ecx
mov dword [esi + 0x400c], esi
je 0x50fb31
sub eax, 1
sbb ecx, ebx
mov dword [esi + 0x4010], eax
mov dword [esi + 0x4014], ecx
test ecx, ecx
jl 0x50fa53
jg 0x50ff52
test eax, eax
ja 0x50ff52
mov dword [esi + 0x4018], 2
mov dword [esi + 0x4004], 0
mov ebx, dword [ebp + 8]
push ebx
call fcn.005113c0
add esp, 4
test eax, eax
jne 0x51003c
cmp dword [ebp - 0x18], eax
jne 0x510030
mov eax, 0x51eb851f
imul dword [edi + 0xf9c]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 2
je 0x50fabf
push ebx
call fcn.005087d0
add esp, 4
test eax, eax
jne 0x510184
test byte [ebx + 0x280], 1
je 0x50fabf
or dword [esi + 0x401c], 2
xor ecx, ecx
test byte [esi + 0x401c], 2
je 0x50fad6
cmp dword [edi + 0x148], ecx
jne 0x510048
cmp dword [edi + 0x148], ecx
je 0x51006c
cmp dword [esi + 0x4018], 2
jne 0x50fb20
mov eax, dword [ebx + 0x44c]
and dword [eax + 0x401c], 0xfffffffd
mov dword [eax + 0x4018], ecx
mov dword [eax + 0x4004], 1
mov dword [eax + 0x4008], eax
mov dword [eax + 0x400c], eax
mov dword [eax + 0x4010], ecx
mov dword [eax + 0x4014], ecx
cmp dword [edi + 0x148], ecx
jne 0x50f6f0
jmp 0x51006c
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x14]
push eax
push 1
push esi
push ecx
mov dword [ebp - 0x14], 0
call fcn.00516d50
add esp, 0x10
cmp eax, 0xffffffff
jne 0x50ff52
push str.chunk_reading_DONE_n
push edi
call fcn.004ed020
add esp, 8
mov dword [esi + 0x4004], 0
mov dword [esi + 0x4018], 2
jmp 0x50ff52
inc dword [esi + 0x4000]
mov eax, dword [esi + 0x400c]
cmp byte [eax], 0xa
mov ecx, dword [esi + 0x4000]
je 0x50fb9e
inc eax
mov dword [esi + 0x400c], eax
jmp 0x50ff52
test dword [edi + 0xa8c], 0x4000000
je 0x50fbbd
mov edx, dword [esi + 0x4008]
push ecx
push edx
push 1
push edi
call fcn.004ecf90
add esp, 0x10
test dword [edi + 0xa90], 0x40000
jne 0x50fc02
test dword [edi + 0xa8c], 0x200000
mov eax, 2
je 0x50fbdf
mov eax, 3
mov ecx, dword [esi + 0x4000]
mov edx, dword [esi + 0x4008]
push ecx
push edx
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.004ed620
add esp, 0x10
test eax, eax
jne 0x510184
mov eax, dword [esi + 0x4000]
cdq
add dword [edi + 0xfb0], eax
adc dword [edi + 0xfb4], edx
mov eax, dword [esi + 0x4000]
cdq
add dword [edi + 0xb0], eax
adc dword [edi + 0xb4], edx
mov eax, dword [esi + 0x4008]
mov cl, byte [eax]
cmp cl, 0xd
je 0x50fe78
cmp cl, 0xa
je 0x50fe78
mov ecx, dword [esi + 0x4000]
mov byte [eax + ecx], 0
mov edx, dword [esi + 0x4008]
push 0x11
push edx
push str.WWW_Authenticate:
call fcn.004f34c0
add esp, 0xc
test eax, eax
je 0x50fc73
mov eax, dword [edi + 0x108]
cmp eax, 0x191
je 0x50fc9a
mov eax, dword [esi + 0x4008]
push 0x13
push eax
push str.Proxy_authenticate:
call fcn.004f34c0
add esp, 0xc
test eax, eax
je 0x50fcef
mov eax, dword [edi + 0x108]
cmp eax, 0x197
jne 0x50fcef
mov edx, dword [esi + 0x4008]
xor ecx, ecx
cmp eax, 0x197
sete cl
push edx
mov dword [ebp - 0x14], ecx
call fcn.00507430
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x50ffbc
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
push ebx
push eax
push ecx
call fcn.00507b60
push ebx
mov dword [ebp - 0x14], eax
call dword [0x592308]
add esp, 0x10
cmp dword [ebp - 0x14], 0
je 0x50fe5d
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x4008]
push 0xf
push edx
push str.Content_Length:
call fcn.004f34c0
add esp, 0xc
test eax, eax
je 0x50fd5b
mov ecx, dword [edi + 0x108]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x50fd39
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push edi
call fcn.004ed020
add esp, 0xc
jmp 0x50fe5d
mov edx, dword [esi + 0x4008]
lea ecx, [esi + 0x4010]
push ecx
push 0xa
add edx, 0xf
push 0
push edx
call fcn.00515850
add esp, 0x10
jmp 0x50fe5d
mov eax, dword [esi + 0x4008]
push str.close
push str.Connection:
push eax
call fcn.005081c0
add esp, 0xc
test eax, eax
je 0x50fd84
or dword [esi + 0x401c], 2
jmp 0x50fe5d
mov ecx, dword [esi + 0x4008]
push 0x12
push ecx
push str.Transfer_Encoding:
call fcn.004f34c0
add esp, 0xc
test eax, eax
je 0x50fe0b
mov ecx, dword [edi + 0x108]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x50fdce
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
push edi
call fcn.004ed020
add esp, 0xc
jmp 0x50fe5d
mov ecx, dword [esi + 0x4008]
push str.chunked
push str.Transfer_Encoding:
push ecx
call fcn.005081c0
add esp, 0xc
test eax, eax
je 0x50fe5d
push str.CONNECT_responded_chunked_n
push edi
call fcn.004ed020
mov edx, dword [ebp + 8]
or dword [esi + 0x401c], 1
push edx
call fcn.00516d30
add esp, 0xc
jmp 0x50fe5d
mov eax, dword [esi + 0x4008]
push str.close
push str.Proxy_Connection:
push eax
call fcn.005081c0
add esp, 0xc
test eax, eax
je 0x50fe31
or dword [esi + 0x401c], 2
jmp 0x50fe5d
mov edx, dword [esi + 0x4008]
lea ebx, [edi + 0x108]
push ebx
lea ecx, [ebp - 0x24]
push ecx
push str.HTTP_1._d__d
push edx
call fcn.004be476
add esp, 0x10
cmp eax, 2
jne 0x50fe5d
mov eax, dword [ebx]
mov dword [edi + 0xf9c], eax
mov dword [esi + 0x4000], 0
mov dword [esi + 0x400c], esi
mov dword [esi + 0x4008], esi
jmp 0x50ff52
mov dword [esi + 0x400c], esi
cmp dword [edi + 0x108], 0x197
jne 0x50ff2f
test byte [edi + 0xf6c], 0x20
jne 0x50ff2f
mov eax, dword [esi + 0x4010]
mov ecx, dword [esi + 0x4014]
mov edx, eax
or edx, ecx
mov ebx, 2
mov dword [esi + 0x4004], ebx
je 0x50feca
push ecx
push eax
push str.Ignore__I64d_bytes_of_response_body_n
push edi
call fcn.004ed020
add esp, 0x10
jmp 0x50ff3e
test byte [esi + 0x401c], 1
je 0x50ff34
push str.Ignore_chunked_response_body_n
push edi
call fcn.004ed020
or dword [edi + 0x590], 8
mov eax, dword [esi + 0x4008]
inc eax
add esp, 8
cmp byte [eax], 0xa
jne 0x50fefa
mov dword [esi + 0x4008], eax
mov ecx, dword [esi + 0x4008]
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
push 1
inc ecx
push ecx
push edx
call fcn.00516d50
add esp, 0x10
cmp eax, 0xffffffff
jne 0x50ff3e
push str.chunk_reading_DONE_n
push edi
call fcn.004ed020
add esp, 8
mov dword [esi + 0x4018], ebx
jmp 0x50ff34
mov ebx, 2
mov dword [esi + 0x4004], 0
mov eax, dword [esi + 0x4010]
or eax, dword [esi + 0x4014]
jne 0x50ff52
mov dword [esi + 0x4018], ebx
cmp dword [esi + 0x4004], 0
jne 0x50f9b0
jmp 0x50fa67
cmp dword [edi + 0x5c0], 0
je 0x50ff96
cmp dword [edi + 0xd10], 0
je 0x50ff96
mov eax, dword [ebp + 8]
or dword [eax + 0x280], 0x800000
push str.Proxy_CONNECT_connection_closed_n
push edi
call fcn.004ed020
add esp, 8
jmp 0x50fa5d
push str.Proxy_CONNECT_aborted
push edi
mov dword [ebp - 0x18], 1
call fcn.004ed150
add esp, 8
jmp 0x50fa5d
lea edx, [ebp - 4]
push edx
call fcn.00507e90
add esp, 4
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 4]
push eax
call fcn.00507e90
add esp, 4
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [0x592308]
lea ecx, [ebp - 4]
push ecx
call fcn.00507e90
add esp, 8
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.004ed150
add esp, 8
pop edi
pop esi
mov eax, 0x1c
pop ebx
mov esp, ebp
pop ebp
ret
push str.CONNECT_response_too_large_
push edi
call fcn.004ed150
add esp, 8
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x2a
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
mov eax, dword [ebx + edx*4 + 0x1a8]
push eax
push ebx
call fcn.004f2500
mov ecx, dword [ebp + 0xc]
add esp, 8
mov dword [ebx + ecx*4 + 0x1a8], 0xffffffff
xor ecx, ecx
mov eax, 0x51eb851f
imul dword [edi + 0xf9c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
je 0x510134
test byte [esi + 0x401c], 2
je 0x5100bc
cmp dword [edi + 0x148], ecx
je 0x5100bc
or dword [ebx + 0x280], 0x800000
push str.Connect_me_again_please_n
push edi
call fcn.004ed020
add esp, 8
mov eax, ebx
call fcn.0050f670
jmp 0x5100fd
mov ecx, dword [edi + 0x148]
push ecx
call dword [0x592308]
push 2
push ebx
mov dword [edi + 0x148], 0
call fcn.004f2660
mov edx, dword [ebp + 0xc]
mov eax, dword [ebx + edx*4 + 0x1a8]
push eax
push ebx
call fcn.004f2500
mov ecx, dword [ebp + 0xc]
add esp, 0x14
mov dword [ebx + ecx*4 + 0x1a8], 0xffffffff
mov dword [esi + 0x4018], 0
test dword [ebx + 0x280], 0x800000
jne 0x510182
mov edx, dword [edi + 0x108]
push edx
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push edi
call fcn.004ed150
add esp, 0xc
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x4018], 2
mov eax, dword [ebx + 0x2d4]
push eax
call dword [0x592308]
mov dword [ebx + 0x2d4], 0
mov ecx, dword [edi + 0xf9c]
or dword [edi + 0xd14], 1
push ecx
push str.Proxy_replied__d_to_CONNECT_request_n
push edi
call fcn.004ed020
and dword [edi + 0x590], 0xfffffff7
add esp, 0x10
and dword [ebx + 0x280], 0xfffeffff
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret