Function at 0x4aed10
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x54], 0
mov ecx, 0x36ee80
mov dword [ebp - 0x10], edx
xorps xmm0, xmm0
mov dword [ebp - 8], edi
movlpd qword [ebp - 0x50], xmm0
mov ebx, dword [edi]
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebx + 0x220]
test eax, eax
cmovne ecx, eax
mov eax, dword [edi + edx*4 + 0x154]
mov dword [ebp - 0x44], ecx
xor esi, esi
mov dword [ebp - 0x48], eax
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x30], esi
cmp dword [edi + edx*4 + 0x5c0], 2
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x34], ecx
je 0x4af707
mov dword [edi + 0x2a4], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x14], eax
cmp dword [edi + edx*4 + 0x5c0], 0
je 0x4af4e9
lea eax, [ebx + 0x60c]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x4c], eax
mov esi, eax
mov dword [ebp - 0x28], eax
mov eax, 1
mov dword [ebp - 0x38], 0
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4af346
test ecx, ecx
jne 0x4af47f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov edi, dword [edi + 0x144]
mov eax, 0x10624dd3
mul ecx
mov ebx, edx
shr ebx, 6
imul eax, ebx, 0x3e8
sub edi, ebx
sub ecx, eax
mov eax, dword [ebp - 8]
imul ecx, ecx, 0x3e8
sub ecx, dword [eax + 0x148]
mov eax, 0x10624dd3
imul ecx
imul ecx, edi, 0x3e8
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
sub ecx, eax
add ecx, dword [ebp - 0x44]
test ecx, ecx
jle 0x4af3e5
mov edi, dword [ebp - 0x48]
mov eax, 0x3e8
cmp ecx, eax
cmovl eax, ecx
or edx, 0xffffffff
push eax
push 0xffffffffffffffff
mov ecx, edi
call fcn.004965b0
add esp, 8
cmp eax, 0xffffffff
je 0x4af30a
test eax, eax
je 0x4af321
mov ebx, dword [ebp - 0x28]
lea eax, [ebp - 0x3c]
push eax
mov eax, 0x4000
mov edx, edi
sub eax, dword [ebp - 0x24]
mov edi, dword [ebp - 8]
mov ecx, edi
push eax
push ebx
call fcn.00494760
add esp, 0xc
cmp eax, 0x51
je 0x4af333
test eax, eax
je 0x4aee81
mov dword [ebp - 0xc], 0
jmp 0x4af324
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], ecx
test ecx, ecx
jg 0x4aeecc
mov ebx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x198], eax
je 0x4aeeb2
cmp dword [ebx + 0x8ef4], eax
je 0x4aeeb2
mov dword [edi + 0x2a4], 1
jmp 0x4af324
push str.Proxy_CONNECT_aborted
push ebx
mov dword [ebp - 0x34], 1
call fcn.00494100
add esp, 8
jmp 0x4af324
add dword [ebp - 0x24], ecx
cmp dword [ebp - 0xc], 1
jle 0x4aef7c
mov eax, dword [ebp - 0x14]
or eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x4c]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], ebx
je 0x4aef1f
mov ebx, dword [ebp - 0x14]
mov eax, ecx
cdq
sub ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], ebx
sbb eax, edx
mov dword [ebp - 0x18], eax
test eax, eax
jg 0x4af324
jl 0x4aef13
test ebx, ebx
jne 0x4af324
mov dword [ebp - 0xc], 0
jmp 0x4af324
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
push eax
push ecx
mov edx, ebx
mov ecx, edi
call fcn.004cbb70
add esp, 8
cmp eax, 0xffffffff
jne 0x4aef64
push str.chunk_reading_DONE_n
push dword [ebp - 0x1c]
call fcn.00494040
add esp, 8
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + eax*4 + 0x5c0], 2
jmp 0x4af324
push dword [ebp - 0x2c]
push str.Read__zd_bytes_of_chunk__continue_n
push dword [ebp - 0x1c]
call fcn.00494040
add esp, 0xc
jmp 0x4af324
xor eax, eax
mov dword [ebp - 0x20], eax
test ecx, ecx
jle 0x4af324
mov edi, dword [ebp - 0x38]
nop dword [eax]
inc edi
cmp byte [ebx], 0xa
mov dword [ebp - 0x38], edi
jne 0x4af197
mov ebx, dword [ebp - 0x1c]
cmp dword [ebx + 0x36c], 0
je 0x4aefbe
mov eax, dword [ebp - 8]
mov edx, 1
push eax
push edi
push esi
mov ecx, ebx
call fcn.004948f0
add esp, 0xc
mov ecx, dword [ebp - 8]
xor edx, edx
cmp dword [ebx + 0x350], edx
push edi
setne dl
push esi
add edx, 2
call fcn.00494590
add dword [ebx + 0x8fb0], edi
add esp, 8
add dword [ebx + 0x80], edi
test eax, eax
jne 0x4af613
mov al, byte [esi]
cmp al, 0xd
je 0x4af1ac
cmp al, 0xa
je 0x4af1ac
mov cl, byte [edi + esi]
lea eax, [edi + esi]
mov byte [ebp - 1], cl
mov edx, esi
push 0x11
mov ecx, str.WWW_Authenticate:
mov dword [ebp - 0x38], eax
mov byte [eax], 0
call fcn.004c2fe0
add esp, 4
test eax, eax
je 0x4af031
mov edi, dword [ebx + 0xc8]
cmp edi, 0x191
je 0x4af056
push 0x13
mov edx, esi
lea edi, [ebx + 0xc8]
mov ecx, str.Proxy_authenticate:
call fcn.004c2fe0
add esp, 4
test eax, eax
je 0x4af0a1
mov edi, dword [edi]
cmp edi, 0x197
jne 0x4af09b
mov ecx, esi
call fcn.004a84a0
mov esi, eax
test esi, esi
je 0x4af60e
mov ecx, dword [ebp - 8]
xor edx, edx
cmp edi, 0x197
push esi
sete dl
call fcn.004a8ee0
add esp, 4
mov edi, eax
push esi
call dword [0x5c1c7c]
add esp, 4
test edi, edi
je 0x4af17e
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edi, [ebx + 0xc8]
push 0xf
mov edx, esi
mov ecx, str.Content_Length:
call fcn.004c2fe0
add esp, 4
test eax, eax
je 0x4af0d2
push 0xa
push 0
add esi, 0xf
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__strtoi64]
add esp, 0xc
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], edx
jmp 0x4af17e
push str.close
mov edx, str.Connection:
mov ecx, esi
call fcn.004a97b0
add esp, 4
test eax, eax
je 0x4af0f6
mov dword [ebp - 0x30], 1
jmp 0x4af17e
push str.chunked
mov edx, str.Transfer_Encoding:
mov ecx, esi
call fcn.004a97b0
add esp, 4
test eax, eax
je 0x4af13d
push str.CONNECT_responded_chunked_n
push ebx
call fcn.00494040
mov eax, dword [ebp - 8]
add esp, 8
mov dword [ebp - 0x40], 1
mov dword [eax + 0x1c], 0
mov dword [eax + 0x30], 0
mov dword [eax + 0x20], 0
jmp 0x4af17e
push str.close
mov edx, str.Proxy_Connection:
mov ecx, esi
call fcn.004a97b0
add esp, 4
test eax, eax
je 0x4af15e
mov dword [ebp - 0x30], 1
jmp 0x4af17e
push edi
lea eax, [ebp - 0x54]
push eax
push str.HTTP_1._d__d
push esi
call fcn.00476140
add esp, 0x10
cmp eax, 2
jne 0x4af17e
mov eax, dword [edi]
mov dword [ebx + 0x8fa0], eax
mov eax, dword [ebp - 0x38]
xor edi, edi
mov ebx, dword [ebp - 0x28]
mov cl, byte [ebp - 1]
mov dword [ebp - 0x38], edi
mov byte [eax], cl
mov ecx, dword [ebp - 0x2c]
lea esi, [ebx + 1]
mov eax, dword [ebp - 0x20]
inc eax
inc ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], eax
cmp eax, ecx
jl 0x4aef90
jmp 0x4af321
cmp dword [ebx + 0xc8], 0x197
lea eax, [ebx + 0x60c]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], eax
jne 0x4af2cc
cmp dword [ebx + 0x8f04], 0
jne 0x4af2cc
mov ecx, dword [ebp - 0x14]
mov eax, ecx
mov edx, dword [ebp - 0x18]
or eax, edx
mov dword [ebp - 0xc], 2
je 0x4af231
push edx
push ecx
push str.Ignore__I64d_bytes_of_response_body_n
push ebx
call fcn.00494040
mov eax, dword [ebp - 0x2c]
add esp, 0x10
sub eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x14]
cdq
sub ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], ebx
sbb eax, edx
mov dword [ebp - 0x18], eax
test eax, eax
jg 0x4af2f7
jl 0x4af225
test ebx, ebx
jne 0x4af2f7
mov dword [ebp - 0xc], 0
jmp 0x4af2f7
cmp dword [ebp - 0x40], 0
je 0x4af225
mov edi, dword [ebp - 0x2c]
mov eax, edi
sub eax, dword [ebp - 0x20]
push eax
push str._zd_bytes_of_chunk_left_n
push ebx
mov dword [ebx + 0x140], 1
call fcn.00494040
mov edx, dword [ebp - 0x20]
lea eax, [esi + 1]
add esp, 0xc
cmp byte [eax], 0xa
cmovne eax, esi
mov esi, eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [edx + 1]
cmovne eax, edx
sub edi, eax
lea edx, [esi + 1]
push edi
mov edi, dword [ebp - 8]
mov ecx, edi
call fcn.004cbb70
add esp, 8
cmp eax, 0xffffffff
jne 0x4af2ab
push str.chunk_reading_DONE_n
push ebx
call fcn.00494040
add esp, 8
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + eax*4 + 0x5c0], 2
jmp 0x4af324
push dword [ebp - 0x3c]
push str.Read__zd_bytes_of_chunk__continue_n
push ebx
call fcn.00494040
mov eax, dword [ebp - 0x10]
add esp, 0xc
mov dword [edi + eax*4 + 0x5c0], 2
jmp 0x4af324
xor eax, eax
cmp dword [ebx + 0x8fa0], 0xc8
mov dword [ebp - 0xc], eax
jne 0x4af2f7
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x20]
sub eax, 1
je 0x4af2f7
push eax
push str.Proxy_CONNECT_followed_by__zd_bytes_of_opaque_data._Data_ignored__known_bug_39_
push ebx
call fcn.00494100
add esp, 0xc
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov dword [edi + eax*4 + 0x5c0], 2
jmp 0x4af324
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push dword [ebp - 0x1c]
mov dword [ebp - 0x34], 1
call fcn.00494100
add esp, 8
mov edi, dword [ebp - 8]
mov ecx, edi
call fcn.004ad0e0
test eax, eax
jne 0x4af3d9
cmp dword [ebp - 0x24], 0x4000
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x34]
jb 0x4aedb3
test ecx, ecx
jne 0x4af47f
mov ebx, dword [ebp - 0x1c]
cmp dword [ebx + 0x8fa0], 0xc8
je 0x4af37e
mov ecx, edi
call fcn.004a88a0
test eax, eax
jne 0x4af613
cmp dword [edi + 0x24c], eax
je 0x4af37e
mov esi, 1
mov dword [ebp - 0x30], esi
jmp 0x4af385
mov esi, dword [ebp - 0x30]
test esi, esi
je 0x4af38e
cmp dword [ebx + 0x14c], 0
jne 0x4af401
mov eax, dword [ebx + 0x14c]
mov edx, dword [ebp - 0x10]
test eax, eax
je 0x4af420
cmp dword [edi + edx*4 + 0x5c0], 2
jne 0x4af3cd
push 0
push str.TUNNEL_STATE_switched_to:__d_n
push ebx
mov dword [edi + edx*4 + 0x5c0], 0
call fcn.00494040
mov eax, dword [ebx + 0x14c]
add esp, 0xc
mov edx, dword [ebp - 0x10]
test eax, eax
je 0x4af420
mov ecx, dword [ebp - 0x34]
jmp 0x4aed81
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push dword [ebp - 0x1c]
call fcn.00494100
add esp, 8
mov eax, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
mov ecx, edi
mov edx, dword [edi + eax*4 + 0x154]
call fcn.00496410
mov edx, dword [ebp - 0x10]
mov dword [edi + edx*4 + 0x154], 0xffffffff
mov eax, dword [ebx + 0xc8]
cmp eax, 0xc8
je 0x4af48b
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push ebx
call fcn.00494100
add esp, 0xc
test esi, esi
je 0x4af453
cmp dword [ebx + 0x14c], 0
je 0x4af453
mov dword [edi + 0x2a4], 1
mov eax, dword [ebx + 0x14c]
test eax, eax
je 0x4af471
push eax
call dword [0x5c1c7c]
add esp, 4
mov dword [ebx + 0x14c], 0
mov eax, dword [ebp - 0x10]
mov dword [edi + eax*4 + 0x5c0], 0
mov eax, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + edx*4 + 0x5c0], 2
mov eax, dword [edi + 0x2d4]
test eax, eax
je 0x4af4aa
push eax
call dword [0x5c1c7c]
add esp, 4
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [edi + 0x2d4], 0
push ebx
mov dword [ebx + 0x8ef8], 1
call fcn.00494040
add esp, 8
mov dword [ebx + 0x140], 0
mov dword [edi + 0x288], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
push esi
push dword [ebp + 8]
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push ebx
call fcn.00494040
mov eax, dword [ebx + 0x14c]
add esp, 0x10
test eax, eax
je 0x4af51c
push eax
call dword [0x5c1c7c]
add esp, 4
mov dword [ebx + 0x14c], 0
push 0xc
push 1
call dword [0x5c1c84]
add esp, 8
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4af60e
push esi
push dword [ebp + 8]
push str._s:_hu
call fcn.004a4250
add esp, 0xc
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x4af602
push 1
push eax
mov edx, str.CONNECT
mov ecx, edi
call fcn.004a8dd0
push dword [ebp - 0x4c]
mov esi, eax
call dword [0x5c1c7c]
add esp, 0xc
test esi, esi
jne 0x4af727
cmp dword [edi + 0x138], 1
mov ecx, 0x59bf34
push dword [ebp + 0xc]
mov eax, 0x59bf38
mov esi, 0x5950c6
cmovne eax, ecx
mov dword [ebp - 0x3c], esi
mov ecx, dword [edi + 0x264]
mov edx, esi
mov dword [ebp - 0x48], eax
test ecx, ecx
mov eax, 0x595128
mov dword [ebp - 0x40], esi
cmove eax, edx
push eax
push dword [ebp + 8]
mov eax, 0x595124
cmove eax, edx
push eax
push str._s_s_s:_hu
call fcn.004a4250
add esp, 0x14
mov dword [ebp - 0x34], eax
test eax, eax
je 0x4af602
mov edx, str.Host:
mov ecx, edi
call fcn.004a83d0
test eax, eax
jne 0x4af61a
push dword [ebp - 0x34]
push str.Host:__s_r_n
call fcn.004a4250
mov esi, eax
add esp, 8
mov dword [ebp - 0x3c], esi
test esi, esi
jne 0x4af61a
push dword [ebp - 0x34]
call dword [0x5c1c7c]
add esp, 4
push dword [ebp - 0x1c]
call dword [0x5c1c7c]
add esp, 4
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, str.Proxy_Connection:
mov ecx, edi
call fcn.004a83d0
test eax, eax
mov edx, str.Proxy_Connection:_Keep_Alive_r_n
mov ecx, 0x5950c6
cmove ecx, edx
mov edx, str.User_Agent:
mov dword [ebp - 0x4c], ecx
mov ecx, edi
call fcn.004a83d0
test eax, eax
jne 0x4af659
cmp dword [ebx + 0x42c], eax
je 0x4af659
mov eax, dword [edi + 0x2d8]
mov dword [ebp - 0x40], eax
push dword [ebp - 0x4c]
mov eax, dword [edi + 0x2d4]
mov ecx, 0x5950c6
push dword [ebp - 0x40]
test eax, eax
cmovne ecx, eax
push ecx
push esi
push dword [ebp - 0x48]
push dword [ebp - 0x34]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push dword [ebp - 0x1c]
call fcn.004a9670
mov esi, eax
add esp, 0x20
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x4af69f
cmp byte [eax], 0
je 0x4af69f
push eax
call dword [0x5c1c7c]
add esp, 4
push dword [ebp - 0x34]
call dword [0x5c1c7c]
add esp, 4
test esi, esi
jne 0x4af710
push dword [ebp - 0x1c]
lea edx, [esi + 1]
mov ecx, edi
call fcn.004a9c00
mov esi, eax
add esp, 4
test esi, esi
jne 0x4af710
push 0x595144
push dword [ebp - 0x1c]
call fcn.004a9670
mov esi, eax
add esp, 8
test esi, esi
jne 0x4af710
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
mov edx, edi
push eax
lea eax, [ebx + 0x8fb4]
push eax
call fcn.004a9380
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4af710
mov eax, dword [ebp - 0x10]
mov dword [edi + eax*4 + 0x5c0], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Failed_sending_CONNECT_to_proxy
push ebx
call fcn.00494100
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x1c]
call dword [0x5c1c7c]
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret