Function at 0x5001b0
Capabilities:
Check http status code

Disassembly:
sub esp, 0x38
mov ecx, dword [esp + 0x40]
xor al, al
push ebx
push ebp
mov ebp, dword [esp + 0x44]
xor bl, bl
push esi
xorps xmm0, xmm0
mov dword [esp + 0x40], 0
push edi
mov esi, dword [ebp + ecx*4 + 0x168]
lea ecx, [ecx*4 + 0x4a0]
mov edi, dword [ebp]
add ecx, ebp
mov dword [esp + 0x34], esi
movlpd qword [esp + 0x3c], xmm0
mov byte [esp + 0x11], bl
cmp dword [ecx], 2
mov byte [esp + 0x12], al
mov dword [esp + 0x30], 0
mov dword [esp + 0x14], ecx
je 0x500c22
mov byte [ebp + 0x230], al
mov eax, dword [esp + 0x40]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x20], eax
mov edi, edi
cmp dword [ecx], 0
jne 0x500470
push dword [esp + 0x58]
mov ebp, dword [esp + 0x58]
push ebp
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push edi
call fcn.004ddf80
push dword [edi + 0x144]
call dword [0x563b64]
add esp, 0x14
mov dword [edi + 0x144], 0
call fcn.004e6190
mov ebx, eax
test ebx, ebx
je 0x500ae4
push dword [esp + 0x58]
push ebp
push str._s:_hu
call fcn.004dffc0
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x500adb
push 1
push ebp
push str.CONNECT
push dword [esp + 0x58]
call fcn.004e6cb0
push ebp
mov esi, eax
call dword [0x563b64]
add esp, 0x14
test esi, esi
jne 0x50044d
mov edx, dword [esp + 0x4c]
mov ecx, 0x54c0a0
mov esi, dword [esp + 0x54]
mov eax, 0x54c0a4
mov ebp, 0x5599fc
mov dword [esp + 0x2c], ebp
cmp dword [edx + 0x14c], 1
cmovne eax, ecx
mov cl, byte [edx + 0x221]
mov dword [esp + 0x28], eax
cmp esi, dword [edx + 0x98]
je 0x5002ed
push 0x3a
push esi
call fcn.004ba840
add esp, 8
test eax, eax
setne cl
push dword [esp + 0x58]
test cl, cl
mov edx, 0x5599fc
mov eax, 0x5493b8
cmove eax, edx
push eax
mov eax, 0x5493b4
push esi
cmove eax, edx
push eax
push str._s_s_s:_hu
call fcn.004dffc0
mov esi, eax
add esp, 0x14
mov dword [esp + 0x18], esi
test esi, esi
je 0x500adb
push str.Host:
push dword [esp + 0x50]
call fcn.004e6700
add esp, 8
test eax, eax
jne 0x500353
push esi
push str.Host:__s_r_n
call fcn.004dffc0
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x500ab4
push str.Proxy_Connection:
push dword [esp + 0x50]
call fcn.004e6700
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
mov eax, 0x5599fc
push str.User_Agent:
push dword [esp + 0x58]
cmovne ecx, eax
mov dword [esp + 0x48], ecx
call fcn.004e6700
add esp, 0x10
test eax, eax
jne 0x50039f
cmp dword [edi + 0x3b0], eax
je 0x50039f
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 0x260]
mov dword [esp + 0x2c], eax
push dword [esp + 0x38]
mov eax, dword [esp + 0x50]
mov ecx, 0x5599fc
push dword [esp + 0x30]
mov eax, dword [eax + 0x25c]
test eax, eax
cmovne ecx, eax
push ecx
push ebp
push dword [esp + 0x38]
push esi
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push ebx
call fcn.004e6360
add esp, 0x20
mov esi, eax
test ebp, ebp
je 0x5003e6
cmp byte [ebp], 0
je 0x5003e6
push ebp
call dword [0x563b64]
add esp, 4
push dword [esp + 0x18]
call dword [0x563b64]
add esp, 4
test esi, esi
jne 0x500439
mov ebp, dword [esp + 0x4c]
push ebx
push 1
push ebp
call fcn.004e63d0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x500439
push 0x53ee18
push ebx
call fcn.004e6360
mov esi, eax
add esp, 8
test esi, esi
jne 0x500439
push dword [esp + 0x50]
push eax
lea eax, [edi + 0x872c]
push eax
push ebp
push ebx
call fcn.004e61a0
add esp, 0x14
mov esi, eax
xor ebx, ebx
test esi, esi
je 0x50044d
push str.Failed_sending_CONNECT_to_proxy
push edi
call fcn.004ddeb0
add esp, 8
push ebx
call fcn.004e6170
add esp, 4
test esi, esi
jne 0x500ad1
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x4c]
mov esi, dword [esp + 0x34]
mov dword [eax], 1
push 1
push 0
push edi
call fcn.004df0f0
add esp, 0xc
test eax, eax
jle 0x500c2c
cmp byte [esp + 0x5c], 0
jne 0x5004a3
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push esi
call fcn.004dd810
add esp, 0x10
test eax, eax
je 0x500c22
lea eax, [edi + 0x5c4]
mov dword [esp + 0x2c], 0
mov ecx, 1
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], ecx
mov esi, eax
xor ebx, ebx
test ecx, ecx
je 0x500890
cmp dword [esp + 0x30], 0
jne 0x500bd2
push 1
push 0
push edi
call fcn.004df0f0
mov ecx, eax
add esp, 0xc
test ecx, ecx
jle 0x500afe
mov eax, 0x3e8
cmp ecx, eax
cmovl eax, ecx
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [esp + 0x40]
call fcn.004dd810
add esp, 0x10
cmp eax, 0xffffffff
je 0x500a3e
test eax, eax
je 0x50086d
lea eax, [esp + 0x1c]
push eax
mov eax, 0x4000
sub eax, dword [esp + 0x30]
push eax
push dword [esp + 0x30]
push dword [esp + 0x40]
push ebp
call fcn.004de060
add esp, 0x14
cmp eax, 0x51
je 0x50087e
test eax, eax
je 0x500550
xor eax, eax
mov dword [esp + 0x18], eax
jmp 0x50086d
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jg 0x5005a3
xor eax, eax
mov dword [esp + 0x18], eax
cmp dword [edi + 0x180], eax
je 0x500588
cmp dword [edi + 0x8660], eax
je 0x500588
push str.Proxy_CONNECT_connection_closed_n
push edi
mov byte [ebp + 0x230], 1
call fcn.004ddf80
add esp, 8
jmp 0x50086d
push str.Proxy_CONNECT_aborted
push edi
mov dword [esp + 0x38], 1
call fcn.004ddeb0
add esp, 8
jmp 0x50086d
add dword [esp + 0x2c], ecx
cmp dword [esp + 0x18], 1
jle 0x500659
mov eax, dword [esp + 0x20]
lea edx, [edi + 0x5c4]
or eax, dword [esp + 0x24]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], edx
je 0x500602
mov eax, ecx
mov ecx, dword [esp + 0x20]
cdq
sub ecx, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], ecx
sbb eax, edx
mov dword [esp + 0x24], eax
test eax, eax
jg 0x50086d
jl 0x5005f7
test ecx, ecx
jne 0x50086d
xor eax, eax
mov dword [esp + 0x18], eax
jmp 0x50086d
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0
push eax
push ecx
push edx
push ebp
call fcn.005019d0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x500642
push str.chunk_reading_DONE_n
push edi
call fcn.004ddf80
add esp, 8
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
mov dword [eax], 2
jmp 0x50086d
push dword [esp + 0x38]
push str.Read__zd_bytes_of_chunk__continue_n
push edi
call fcn.004ddf80
add esp, 0xc
jmp 0x50086d
xor ebp, ebp
mov dword [esp + 0x38], ebp
test ecx, ecx
jle 0x500869
mov eax, dword [esp + 0x28]
jmp 0x500670
inc ebx
cmp byte [eax], 0xa
jne 0x500857
cmp byte [edi + 0x318], 0
je 0x500694
push dword [esp + 0x4c]
push ebx
push esi
push 1
push edi
call fcn.004dddc0
add esp, 0x14
cmp byte [edi + 0x30c], 0
mov ecx, 3
push ebx
mov eax, 2
cmovne eax, ecx
push esi
push eax
push dword [esp + 0x58]
call fcn.004ddd90
add dword [edi + 0x8728], ebx
add esp, 0x10
add dword [edi + 0x80], ebx
test eax, eax
jne 0x500c3f
mov al, byte [esi]
cmp al, 0xd
je 0x5008d3
cmp al, 0xa
je 0x5008d3
mov al, byte [ebx + esi]
lea ebp, [ebx + esi]
push 0x11
push esi
push str.WWW_Authenticate:
mov byte [esp + 0x1f], al
mov byte [ebp], 0
call fcn.004eaa70
add esp, 0xc
test eax, eax
je 0x50070c
mov eax, dword [edi + 0xc8]
cmp eax, 0x191
je 0x50072d
push 0x13
push esi
push str.Proxy_authenticate:
call fcn.004eaa70
add esp, 0xc
test eax, eax
je 0x500776
mov eax, dword [edi + 0xc8]
cmp eax, 0x197
jne 0x500776
cmp eax, 0x197
push esi
sete byte [esp + 0x40]
call fcn.004e68a0
mov esi, eax
add esp, 4
test esi, esi
je 0x500ae4
push esi
push dword [esp + 0x40]
push dword [esp + 0x54]
call fcn.004e6b30
push esi
mov ebx, eax
call dword [0x563b64]
add esp, 0x10
test ebx, ebx
je 0x50083f
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x38
ret
push 0xf
push esi
push str.Content_Length:
call fcn.004eaa70
add esp, 0xc
test eax, eax
je 0x5007a7
push 0xa
push 0
add esi, 0xf
push esi
call fcn.004c875b
add esp, 0xc
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
jmp 0x50083f
push str.close
push str.Connection:
push esi
call fcn.004e67d0
add esp, 0xc
test al, al
je 0x5007c5
mov byte [esp + 0x11], 1
jmp 0x50083f
push str.chunked
push str.Transfer_Encoding:
push esi
call fcn.004e67d0
add esp, 0xc
test al, al
je 0x5007fa
push str.CONNECT_responded_chunked_n
push edi
call fcn.004ddf80
push dword [esp + 0x54]
mov byte [esp + 0x1e], 1
call fcn.005019b0
add esp, 0xc
jmp 0x50083f
push str.close
push str.Proxy_Connection:
push esi
call fcn.004e67d0
add esp, 0xc
test al, al
je 0x500818
mov byte [esp + 0x11], 1
jmp 0x50083f
lea ebx, [edi + 0xc8]
push ebx
lea eax, [esp + 0x48]
push eax
push str.HTTP_1._d__d
push esi
call fcn.004bb71d
add esp, 0x10
cmp eax, 2
jne 0x50083f
mov eax, dword [ebx]
mov dword [edi + 0x8718], eax
mov al, byte [esp + 0x13]
xor ebx, ebx
mov ecx, dword [esp + 0x1c]
mov byte [ebp], al
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x38]
lea esi, [eax + 1]
inc ebp
inc eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x38], ebp
cmp ebp, ecx
jl 0x500670
mov ebp, dword [esp + 0x4c]
push ebp
call fcn.004e8f00
add esp, 4
test eax, eax
jne 0x500af1
cmp dword [esp + 0x2c], 0x4000
mov ecx, dword [esp + 0x18]
jb 0x5004c2
cmp dword [esp + 0x30], 0
jne 0x500bd2
cmp dword [edi + 0x8718], 0xc8
je 0x500a59
push ebp
call fcn.004e6970
add esp, 4
test eax, eax
jne 0x500c3f
cmp byte [ebp + 0x219], al
je 0x500a59
mov bl, 1
mov byte [esp + 0x11], bl
jmp 0x500a61
cmp dword [edi + 0xc8], 0x197
lea eax, [edi + 0x5c4]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], eax
jne 0x500a05
cmp byte [edi + 0x8668], 0
jne 0x500a05
mov ecx, dword [esp + 0x20]
mov eax, ecx
mov edx, dword [esp + 0x24]
or eax, edx
mov dword [esp + 0x18], 2
je 0x50096c
push edx
push ecx
push str.Ignore__I64d_bytes_of_response_body_n
push edi
call fcn.004ddf80
mov eax, dword [esp + 0x2c]
add esp, 0x10
mov ecx, dword [esp + 0x20]
sub eax, ebp
cdq
sub ecx, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], ecx
sbb eax, edx
mov dword [esp + 0x24], eax
test eax, eax
jg 0x500a2f
jl 0x500955
test ecx, ecx
jne 0x500a2f
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], 0
mov dword [eax], 2
jmp 0x500869
mov al, byte [esp + 0x12]
test al, al
je 0x500955
mov eax, dword [esp + 0x1c]
sub eax, ebp
mov byte [edi + 0x13d], 1
push eax
push str._zd_bytes_of_chunk_left_n
push edi
call fcn.004ddf80
add esp, 0xc
cmp byte [esi + 1], 0xa
jne 0x500998
inc esi
inc ebp
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x20]
sub eax, ebp
push eax
lea eax, [esi + 1]
push eax
push dword [esp + 0x58]
call fcn.005019d0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x5009e4
push str.chunk_reading_DONE_n
push edi
call fcn.004ddf80
mov eax, dword [esp + 0x1c]
add esp, 8
mov dword [esp + 0x18], 0
mov dword [eax], 2
mov dword [eax], 2
jmp 0x500869
push dword [esp + 0x1c]
push str.Read__zd_bytes_of_chunk__continue_n
push edi
call fcn.004ddf80
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [eax], 2
jmp 0x500869
xor eax, eax
cmp dword [edi + 0x8718], 0xc8
mov dword [esp + 0x18], eax
jne 0x500a2f
mov eax, dword [esp + 0x1c]
sub eax, ebp
dec eax
je 0x500a2f
push eax
push str.Proxy_CONNECT_followed_by__zd_bytes_of_opaque_data._Data_ignored__known_bug_39_
push edi
call fcn.004ddeb0
add esp, 0xc
mov eax, dword [esp + 0x14]
mov dword [eax], 2
jmp 0x500869
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push edi
mov dword [esp + 0x38], 1
call fcn.004ddeb0
add esp, 8
jmp 0x50086d
mov bl, byte [esp + 0x11]
test bl, bl
je 0x500a6e
cmp dword [edi + 0x144], 0
jne 0x500b19
cmp dword [edi + 0x144], 0
mov ecx, dword [esp + 0x14]
je 0x500b3a
cmp dword [ecx], 2
jne 0x500a9e
push 0
push str.TUNNEL_STATE_switched_to:__d_n
push edi
mov dword [ecx], 0
call fcn.004ddf80
mov ecx, dword [esp + 0x20]
add esp, 0xc
cmp dword [edi + 0x144], 0
je 0x500b3a
mov esi, dword [esp + 0x34]
jmp 0x500220
push esi
call dword [0x563b64]
push ebx
call fcn.004e6170
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
push ebx
call fcn.004e6170
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x38
ret
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x38
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.004ddeb0
add esp, 8
mov eax, 0x38
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
mov esi, dword [esp + 0x50]
push dword [ebp + esi*4 + 0x168]
push ebp
call fcn.004de760
add esp, 8
mov dword [ebp + esi*4 + 0x168], 0xffffffff
jmp 0x500b3e
mov esi, dword [esp + 0x50]
cmp dword [edi + 0xc8], 0xc8
je 0x500bdf
test bl, bl
je 0x500b72
cmp dword [edi + 0x144], 0
je 0x500b72
push str.Connect_me_again_please_n
push edi
mov byte [ebp + 0x230], 1
call fcn.004ddf80
add esp, 8
jmp 0x500bab
push dword [edi + 0x144]
call dword [0x563b64]
push 2
push ebp
mov dword [edi + 0x144], 0
call fcn.004de7c0
push dword [ebp + esi*4 + 0x168]
push ebp
call fcn.004de760
add esp, 0x14
mov dword [ebp + esi*4 + 0x168], 0xffffffff
mov eax, dword [esp + 0x14]
mov dword [eax], 0
cmp byte [ebp + 0x230], 0
jne 0x500c22
push dword [edi + 0xc8]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push edi
call fcn.004ddeb0
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x38
ret
mov eax, dword [esp + 0x14]
mov dword [eax], 2
push dword [ebp + 0x25c]
call dword [0x563b64]
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [ebp + 0x25c], 0
push edi
mov byte [edi + 0x8664], 1
call fcn.004ddf80
mov byte [edi + 0x13d], 0
add esp, 0xc
mov byte [ebp + 0x22a], 0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x38
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.004ddeb0
mov eax, 0x38
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret