Function at 0x511fe0
Capabilities:
Check http status code

Disassembly:
sub esp, 0x38
mov eax, dword [esp + 0x40]
push ebx
mov ebx, dword [esp + 0x40]
mov ecx, dword [ebx + eax*4 + 0x154]
push ebp
xor ebp, ebp
cmp dword [ebx + eax*4 + 0x4bc], 2
push esi
mov esi, dword [ebx]
mov dword [esp + 0x38], ebp
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x28], ebp
jne 0x512028
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x38
ret
push edi
mov dword [ebx + 0x228], ebp
nop
cmp dword [ebx + eax*4 + 0x4bc], ebp
jne 0x512273
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
push edx
push eax
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push esi
call fcn.004f9100
mov ecx, dword [esi + 0x10c]
push ecx
call dword [0x582a8c]
add esp, 0x14
mov dword [esi + 0x10c], ebp
call fcn.0050d880
mov edi, eax
mov dword [esp + 0x24], edi
cmp edi, ebp
je 0x51291e
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
push edx
push eax
push str._s:_hu
call fcn.004fd640
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x5128da
push 1
push ebp
push str.CONNECT
push ebx
call fcn.0050d4e0
push ebp
mov edi, eax
call dword [0x582a8c]
add esp, 0x14
test edi, edi
jne 0x512247
mov edi, dword [esp + 0x4c]
cmp dword [edi + 0x138], 1
mov ebx, 0x55105b
mov dword [esp + 0x34], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], 0x545ef0
je 0x5120e8
mov dword [esp + 0x18], 0x545ef4
mov eax, dword [edi + 0x1ec]
mov ecx, 0x5420e0
test eax, eax
jne 0x51223d
mov ecx, ebx
mov eax, ebx
mov edx, dword [esp + 0x58]
push edx
push ecx
mov ecx, dword [esp + 0x5c]
push ecx
push eax
push str._s_s_s:_hu
call fcn.004fd640
mov ebp, eax
add esp, 0x14
test ebp, ebp
je 0x5128f0
push str.Host:
push edi
call fcn.0050cf70
add esp, 8
test eax, eax
jne 0x51214c
push ebp
push str.Host:__s_r_n
call fcn.004fd640
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x51290a
push str.Proxy_Connection:
push edi
call fcn.0050cf70
add esp, 8
test eax, eax
jne 0x512166
mov dword [esp + 0x34], str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent:
push edi
call fcn.0050cf70
add esp, 8
test eax, eax
jne 0x51218a
cmp dword [esi + 0x3f8], eax
je 0x51218a
mov edx, dword [edi + 0x260]
mov dword [esp + 0x20], edx
mov eax, dword [edi + 0x25c]
test eax, eax
jne 0x512199
mov eax, 0x55105b
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x28]
push edx
push eax
mov eax, dword [esp + 0x24]
push ebx
push eax
push ebp
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push ecx
call fcn.0050e180
add esp, 0x20
mov edi, eax
test ebx, ebx
je 0x5121d2
cmp byte [ebx], 0
je 0x5121d2
push ebx
call dword [0x582a8c]
add esp, 4
push ebp
call dword [0x582a8c]
add esp, 4
test edi, edi
jne 0x512227
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x4c]
push ebx
push 1
push ebp
call fcn.0050e270
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x512227
push 0x53ed48
push ebx
call fcn.0050e180
mov edi, eax
add esp, 8
test edi, edi
jne 0x512227
mov edx, dword [esp + 0x50]
push edx
push eax
lea eax, [esi + 0x874c]
push eax
push ebp
push ebx
call fcn.0050d8c0
add esp, 0x14
mov edi, eax
xor ebx, ebx
test edi, edi
je 0x51224b
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.004f9190
add esp, 8
jmp 0x51224b
mov eax, 0x5420c4
jmp 0x5120ff
mov ebx, dword [esp + 0x24]
push ebx
call fcn.0050d890
add esp, 4
test edi, edi
jne 0x51292b
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov dword [ecx + edx*4 + 0x4bc], 1
mov ebx, ecx
xor ebp, ebp
push 1
push ebp
push esi
call fcn.004fb1a0
add esp, 0xc
test eax, eax
jle 0x512935
cmp dword [esp + 0x5c], ebp
jne 0x5122a7
mov eax, dword [esp + 0x30]
push ebp
push 0xffffffffffffffff
push 0xffffffffffffffff
push eax
call fcn.004eef80
add esp, 0x10
test eax, eax
je 0x512a6b
lea eax, [esi + 0x5e4]
xor ebp, ebp
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], eax
mov edi, eax
mov dword [esp + 0x24], ebp
cmp dword [esp + 0x14], 0
je 0x512828
cmp dword [esp + 0x2c], 0
jne 0x512a1c
push 1
push 0
push esi
call fcn.004fb1a0
add esp, 0xc
test eax, eax
jle 0x5128bf
cmp eax, 0x3e8
jl 0x5122f8
mov eax, 0x3e8
mov ecx, dword [esp + 0x30]
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
call fcn.004eef80
add esp, 0x10
cmp eax, 0xffffffff
je 0x5127f3
test eax, eax
je 0x512809
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x34]
mov eax, 0x4000
sub eax, dword [esp + 0x28]
push eax
push ecx
push edx
push ebx
call fcn.004f8e80
add esp, 0x14
cmp eax, 0x51
je 0x51281a
xor ecx, ecx
cmp eax, ecx
je 0x512355
mov dword [esp + 0x14], ecx
jmp 0x512809
mov eax, dword [esp + 0x1c]
cmp eax, ecx
jg 0x512395
mov dword [esp + 0x14], ecx
cmp dword [esi + 0x158], ecx
je 0x51238b
cmp dword [esi + 0x8684], ecx
je 0x51238b
push str.Proxy_CONNECT_connection_closed_n
push esi
mov dword [ebx + 0x228], 1
call fcn.004f9100
jmp 0x512806
push str.Proxy_CONNECT_aborted
jmp 0x5127f8
add dword [esp + 0x24], eax
cmp dword [esp + 0x14], 1
jle 0x51244d
mov dword [esp + 0x24], ecx
lea ecx, [esi + 0x5e4]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x40]
or ecx, dword [esp + 0x44]
je 0x5123ed
cdq
sub dword [esp + 0x40], eax
mov eax, dword [esp + 0x44]
sbb eax, edx
mov dword [esp + 0x44], eax
test eax, eax
jg 0x512809
jl 0x5123e0
cmp dword [esp + 0x40], 0
ja 0x512809
mov dword [esp + 0x14], 0
jmp 0x512809
lea edx, [esp + 0x34]
push edx
push eax
mov eax, dword [esp + 0x20]
push eax
push ebx
mov dword [esp + 0x44], 0
call fcn.0051b3f0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x512435
push str.chunk_reading_DONE_n
push esi
call fcn.004f9100
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x1c], 0
mov dword [ebx + ecx*4 + 0x4bc], 2
jmp 0x512806
mov edx, dword [esp + 0x34]
push edx
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.004f9100
add esp, 0xc
jmp 0x512809
cmp eax, ecx
mov dword [esp + 0x20], ecx
jle 0x512809
jmp 0x512462
xor ecx, ecx
mov edx, dword [esp + 0x18]
inc ebp
cmp byte [edx], 0xa
mov dword [esp + 0x34], ebp
jne 0x51264d
cmp dword [esi + 0x334], ecx
je 0x51248a
push ebx
push ebp
push edi
push 1
push esi
call fcn.004f9010
add esp, 0x14
cmp dword [esi + 0x318], 0
mov eax, 2
je 0x51249d
mov eax, 3
push ebp
push edi
push eax
push ebx
call fcn.004f9650
add dword [esi + 0x8748], ebp
add dword [esi + 0x80], ebp
add esp, 0x10
test eax, eax
jne 0x512a6d
mov al, byte [edi]
cmp al, 0xd
je 0x512667
cmp al, 0xa
je 0x512667
mov al, byte [edi + ebp]
push 0x11
push edi
push str.WWW_Authenticate:
mov byte [esp + 0x1f], al
mov byte [edi + ebp], 0
call fcn.00512c40
add esp, 0xc
test eax, eax
je 0x5124fb
mov eax, dword [esi + 0xc8]
cmp eax, 0x191
je 0x51251c
push 0x13
push edi
push str.Proxy_authenticate:
call fcn.00512c40
add esp, 0xc
test eax, eax
je 0x512562
mov eax, dword [esi + 0xc8]
cmp eax, 0x197
jne 0x512562
xor ebx, ebx
cmp eax, 0x197
push edi
sete bl
call fcn.0050cfe0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x51291e
mov ecx, dword [esp + 0x4c]
push ebp
push ebx
push ecx
call fcn.0050d5f0
push ebp
mov ebx, eax
call dword [0x582a8c]
add esp, 0x10
test ebx, ebx
jne 0x512950
mov ebx, dword [esp + 0x4c]
jmp 0x512635
push 0xf
push edi
push str.Content_Length:
call fcn.00512c40
add esp, 0xc
test eax, eax
je 0x512593
push 0xa
lea edx, [edi + 0xf]
push 0
push edx
call fcn.004c9a59
add esp, 0xc
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
jmp 0x512639
push str.close
push str.Connection:
push edi
call fcn.0050db40
add esp, 0xc
test eax, eax
je 0x5125b7
mov dword [esp + 0x28], 1
jmp 0x512639
push str.chunked
push str.Transfer_Encoding:
push edi
call fcn.0050db40
add esp, 0xc
test eax, eax
je 0x5125ec
push str.CONNECT_responded_chunked_n
push esi
call fcn.004f9100
push ebx
mov dword [esp + 0x44], 1
call fcn.0051b3e0
add esp, 0xc
jmp 0x512639
push str.close
push str.Proxy_Connection:
push edi
call fcn.0050db40
add esp, 0xc
test eax, eax
je 0x51260d
mov dword [esp + 0x28], 1
jmp 0x512639
lea ebp, [esi + 0xc8]
push ebp
lea eax, [esp + 0x40]
push eax
push str.HTTP_1._d__d
push edi
call fcn.004ba920
add esp, 0x10
cmp eax, 2
jne 0x512635
mov ecx, dword [ebp]
mov dword [esi + 0x8738], ecx
mov ebp, dword [esp + 0x34]
mov dl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov byte [edi + ebp], dl
lea edi, [eax + 1]
mov eax, dword [esp + 0x1c]
xor ebp, ebp
mov ecx, dword [esp + 0x20]
inc dword [esp + 0x18]
inc ecx
cmp ecx, eax
mov dword [esp + 0x20], ecx
jl 0x512460
jmp 0x512809
xor ecx, ecx
cmp dword [esi + 0xc8], 0x197
lea eax, [esi + 0x5e4]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], eax
jne 0x5127b6
cmp dword [esi + 0x8694], ecx
jne 0x5127b6
mov edx, dword [esp + 0x40]
or edx, dword [esp + 0x44]
mov dword [esp + 0x14], 2
je 0x512705
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
push eax
push ecx
push str.Ignore__I64d_bytes_of_response_body_n
push esi
call fcn.004f9100
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x30]
add esp, 0x10
cdq
sub dword [esp + 0x40], eax
mov eax, dword [esp + 0x44]
sbb eax, edx
mov dword [esp + 0x44], eax
test eax, eax
jg 0x5127e2
jl 0x5126e9
cmp dword [esp + 0x40], 0
ja 0x5127e2
mov edx, dword [esp + 0x50]
mov dword [esp + 0x14], 0
mov dword [ebx + edx*4 + 0x4bc], 2
jmp 0x512809
cmp dword [esp + 0x38], ecx
je 0x5127a1
mov edx, dword [esp + 0x1c]
sub edx, dword [esp + 0x20]
mov dword [esi + 0x100], 1
push edx
push str._zd_bytes_of_chunk_left_n
push esi
call fcn.004f9100
add esp, 0xc
cmp byte [edi + 1], 0xa
jne 0x51273b
inc edi
inc dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
sub ecx, dword [esp + 0x20]
lea eax, [esp + 0x1c]
push eax
push ecx
lea edx, [edi + 1]
push edx
push ebx
call fcn.0051b3f0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x51278f
push str.chunk_reading_DONE_n
push esi
call fcn.004f9100
mov eax, dword [esp + 0x58]
mov edx, eax
mov dword [ebx + eax*4 + 0x4bc], 2
add esp, 8
mov dword [esp + 0x14], 0
mov dword [ebx + edx*4 + 0x4bc], 2
jmp 0x512809
mov ecx, dword [esp + 0x1c]
push ecx
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.004f9100
jmp 0x5127df
mov edx, dword [esp + 0x50]
mov dword [esp + 0x14], ecx
mov dword [ebx + edx*4 + 0x4bc], 2
jmp 0x512809
cmp dword [esi + 0x8738], 0xc8
mov dword [esp + 0x14], ecx
jne 0x5127e2
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x20]
dec eax
cmp eax, ecx
je 0x5127e2
push eax
push str.Proxy_CONNECT_followed_by__zd_bytes_of_opaque_data._Data_ignored__known_bug_39_
push esi
call fcn.004f9190
add esp, 0xc
mov edx, dword [esp + 0x50]
mov dword [ebx + edx*4 + 0x4bc], 2
jmp 0x512809
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push esi
mov dword [esp + 0x34], 1
call fcn.004f9190
add esp, 8
push ebx
call fcn.005137b0
add esp, 4
test eax, eax
jne 0x51295a
cmp dword [esp + 0x24], 0x4000
jb 0x5122c1
cmp dword [esp + 0x2c], 0
jne 0x512a1c
cmp dword [esi + 0x8738], 0xc8
je 0x512864
push ebx
call fcn.0050dfc0
xor ebp, ebp
add esp, 4
cmp eax, ebp
jne 0x512a6d
cmp dword [ebx + 0x1d4], ebp
je 0x512866
mov dword [esp + 0x28], 1
jmp 0x51286c
xor ebp, ebp
cmp dword [esp + 0x28], ebp
je 0x512878
cmp dword [esi + 0x10c], ebp
jne 0x512967
mov edi, dword [esp + 0x50]
cmp dword [esi + 0x10c], ebp
je 0x512987
cmp dword [ebx + edi*4 + 0x4bc], 2
jne 0x5128a8
push ebp
push str.TUNNEL_STATE_switched_to:__d_n
push esi
mov dword [ebx + edi*4 + 0x4bc], ebp
call fcn.004f9100
add esp, 0xc
cmp dword [esi + 0x10c], ebp
je 0x512987
mov eax, dword [esp + 0x50]
xor ebp, ebp
jmp 0x512030
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.004f9190
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x38
ret
push edi
call fcn.0050d890
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x38
ret
mov eax, dword [esp + 0x24]
push eax
call fcn.0050d890
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x38
ret
push ebp
call dword [0x582a8c]
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0050d890
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x38
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.004f9190
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x38
ret
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x38
ret
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x38
ret
mov edi, dword [esp + 0x50]
mov edx, dword [ebx + edi*4 + 0x154]
push edx
push ebx
call fcn.004fbb70
add esp, 8
mov dword [ebx + edi*4 + 0x154], 0xffffffff
cmp dword [esi + 0xc8], 0xc8
je 0x512a29
cmp dword [esp + 0x28], ebp
je 0x5129bf
cmp dword [esi + 0x10c], ebp
je 0x5129bf
push str.Connect_me_again_please_n
push esi
mov dword [ebx + 0x228], 1
call fcn.004f9100
add esp, 8
jmp 0x5129f8
mov eax, dword [esi + 0x10c]
push eax
call dword [0x582a8c]
mov dword [esi + 0x10c], ebp
mov dword [ebx + 0x1d4], 1
mov ecx, dword [ebx + edi*4 + 0x154]
push ecx
push ebx
call fcn.004fbb70
add esp, 0xc
mov dword [ebx + edi*4 + 0x154], 0xffffffff
mov dword [ebx + edi*4 + 0x4bc], ebp
cmp dword [ebx + 0x228], ebp
jne 0x512a6b
mov edx, dword [esi + 0xc8]
push edx
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.004f9190
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x38
ret
mov dword [ebx + edi*4 + 0x4bc], 2
mov eax, dword [ebx + 0x25c]
push eax
call dword [0x582a8c]
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [ebx + 0x25c], ebp
push esi
mov dword [esi + 0x8688], 1
call fcn.004f9100
mov dword [esi + 0x100], ebp
add esp, 0xc
mov dword [ebx + 0x210], ebp
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret