Function at 0x4c1600
Capabilities:
Check for time delay via gettickcount
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax]
push edi
xor edi, edi
mov dword [ebp - 0x34], edi
mov ecx, dword [ebx + 0x19c]
mov dword [ebp - 0x28], ecx
cmp ecx, edi
jne 0x4c1626
mov dword [ebp - 0x28], 0x36ee80
mov ecx, dword [ebp + 0xc]
cmp dword [eax + ecx*4 + 0x484], 2
mov edx, dword [eax + ecx*4 + 0x130]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x24], edi
jne 0x4c1654
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
mov dword [eax + 0x1f8], edi
mov esi, dword [ebp + 0x10]
cmp dword [eax + ecx*4 + 0x484], edi
jne 0x4c1879
movzx edi, word [ebp + 0x14]
push edi
push esi
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push ebx
call fcn.004a95e0
mov eax, dword [ebx + 0xd4]
add esp, 0x10
test eax, eax
je 0x4c169c
push eax
call fcn.004cb541
add esp, 4
mov dword [ebx + 0xd4], 0
call fcn.004bc130
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4c1f0f
push edi
push esi
push str._s:_hu
call fcn.004ac490
mov edi, eax
add esp, 0xc
test edi, edi
je 0x4c1ecd
mov eax, dword [ebp + 8]
push 1
push edi
push str.CONNECT
push eax
call fcn.004bbd50
push edi
mov esi, eax
call fcn.004cb541
add esp, 0x14
test esi, esi
jne 0x4c1e9e
mov esi, dword [ebp + 8]
cmp dword [esi + 0x114], 1
mov ecx, 0x50a79a
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], 0x504c00
je 0x4c1711
mov dword [ebp - 8], 0x504c04
mov eax, dword [esi + 0x1b8]
mov edx, 0x4f6264
test eax, eax
jne 0x4c1984
mov edx, ecx
mov eax, ecx
movzx ecx, word [ebp + 0x14]
push ecx
mov ecx, dword [ebp + 0x10]
push edx
push ecx
push eax
push str._s_s_s:_hu
call fcn.004ac490
mov edi, eax
add esp, 0x14
test edi, edi
je 0x4c1ee5
push str.Host:
push ebx
call fcn.004bb810
add esp, 8
test eax, eax
jne 0x4c1775
push edi
push str.Host:__s_r_n
call fcn.004ac490
add esp, 8
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4c1efd
push str.Proxy_Connection:
push ebx
call fcn.004bb810
add esp, 8
test eax, eax
jne 0x4c178e
mov dword [ebp - 0x18], str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent:
push ebx
call fcn.004bb810
add esp, 8
test eax, eax
jne 0x4c17b1
cmp dword [ebx + 0x3a4], eax
je 0x4c17b1
mov edx, dword [esi + 0x22c]
mov dword [ebp - 0xc], edx
mov eax, dword [esi + 0x228]
test eax, eax
jne 0x4c17c0
mov eax, 0x50a79a
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
push ecx
mov ecx, dword [ebp - 8]
push edx
mov edx, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x1c]
push eax
push ecx
push edi
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push edx
call fcn.004bca80
add esp, 0x20
cmp dword [ebp - 0x1c], 0
mov esi, eax
je 0x4c17fe
mov eax, dword [ebp - 0x1c]
cmp byte [eax], 0
je 0x4c17fe
mov ecx, eax
push ecx
call fcn.004cb541
add esp, 4
push edi
call fcn.004cb541
add esp, 4
test esi, esi
jne 0x4c1e87
mov edx, dword [ebp - 0x14]
mov edi, dword [ebp + 8]
push edx
push edi
call fcn.004bcb60
mov esi, eax
add esp, 8
test esi, esi
jne 0x4c1e87
mov eax, dword [ebp - 0x14]
push 0x4f574c
push eax
call fcn.004bca80
mov esi, eax
add esp, 8
test esi, esi
jne 0x4c1e87
mov ecx, dword [ebp + 0xc]
push ecx
push eax
mov eax, dword [ebp - 0x14]
lea edx, [ebx + 0x86c4]
push edx
push edi
push eax
call fcn.004bc140
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x4c1e87
mov ecx, dword [ebp + 0xc]
mov dword [edi + ecx*4 + 0x484], 1
mov eax, edi
xor edi, edi
mov edx, dword [eax + 0x124]
mov eax, dword [eax + 0x120]
push edx
push eax
call fcn.004adcc0
push edx
push eax
call fcn.004adcf0
mov ecx, dword [ebp - 0x28]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x4c1f1b
cmp dword [ebx + 0x540], 2
jne 0x4c18c5
mov edx, dword [ebp - 0x2c]
push edi
push 0xffffffffffffffff
push 0xffffffffffffffff
push edx
call fcn.004bf4d0
add esp, 0x10
test eax, eax
je 0x4c1ffa
mov edi, dword [ebp + 8]
lea eax, [ebx + 0x55c]
mov dword [ebp - 0xc], eax
mov esi, eax
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], 1
cmp dword [ebp - 8], 0
je 0x4c1ded
cmp dword [ebp - 0x24], 0
jne 0x4c1fa0
mov eax, dword [edi + 0x124]
mov ecx, dword [edi + 0x120]
push eax
push ecx
call fcn.004adcc0
push edx
push eax
call fcn.004adcf0
mov ecx, dword [ebp - 0x28]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x4c1eb3
cmp ecx, 0x3e8
jl 0x4c192d
mov ecx, 0x3e8
mov edx, dword [ebp - 0x2c]
push ecx
push 0xffffffffffffffff
push 0xffffffffffffffff
push edx
call fcn.004bf4d0
add esp, 0x10
cmp eax, 0xffffffff
je 0x4c1dba
test eax, eax
je 0x4c1dcf
mov edx, dword [ebp - 0xc]
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x2c]
mov ecx, 0x4000
sub ecx, dword [ebp - 0x1c]
push ecx
push edx
push eax
push edi
call fcn.004a9360
add esp, 0x14
cmp eax, 0x51
je 0x4c1de0
xor ecx, ecx
cmp eax, ecx
je 0x4c198e
mov dword [ebp - 8], ecx
jmp 0x4c1dcf
mov eax, 0x4f6260
jmp 0x4c1728
mov eax, dword [ebp - 0x10]
cmp eax, ecx
jg 0x4c19c1
mov dword [ebp - 8], ecx
cmp dword [ebx + 0x118], ecx
je 0x4c19b7
cmp dword [ebx + 0x85fc], ecx
je 0x4c19b7
mov dword [edi + 0x1f8], 1
jmp 0x4c1dcf
push str.Proxy_CONNECT_aborted
jmp 0x4c1dbf
add dword [ebp - 0x1c], eax
mov edx, 1
cmp dword [ebp - 8], edx
jle 0x4c1a6c
mov dword [ebp - 0x1c], ecx
lea ecx, [ebx + 0x55c]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0x3c]
or ecx, dword [ebp - 0x38]
je 0x4c1a12
cdq
sub dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x38]
sbb eax, edx
mov dword [ebp - 0x38], eax
test eax, eax
jg 0x4c1dcf
jl 0x4c1a06
cmp dword [ebp - 0x3c], 0
ja 0x4c1dcf
mov dword [ebp - 8], 0
jmp 0x4c1dcf
lea edx, [ebp - 0x14]
push edx
push eax
mov eax, dword [ebp - 0xc]
push eax
push edi
mov dword [ebp - 0x14], 0
call fcn.004c34b0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4c1a55
push str.chunk_reading_DONE_n
push ebx
call fcn.004a95e0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], 0
mov dword [edi + ecx*4 + 0x484], 2
jmp 0x4c1dcc
mov edx, dword [ebp - 0x14]
push edx
push str.Read__zd_bytes_of_chunk__continue_n
push ebx
call fcn.004a95e0
add esp, 0xc
jmp 0x4c1dcf
mov dword [ebp - 0x14], ecx
cmp eax, ecx
jle 0x4c1dcf
jmp 0x4c1a82
xor ecx, ecx
add dword [ebp - 0x18], edx
mov edx, dword [ebp - 0xc]
cmp byte [edx], 0xa
jne 0x4c1c30
cmp dword [ebx + 0x2e4], ecx
je 0x4c1aaa
mov eax, dword [ebp - 0x18]
push edi
push eax
push esi
push 1
push ebx
call fcn.004a9500
add esp, 0x14
cmp dword [ebx + 0x2c8], 0
mov eax, 2
je 0x4c1abd
mov eax, 3
mov ecx, dword [ebp - 0x18]
push ecx
push esi
push eax
push edi
call fcn.004a9930
add esp, 0x10
test eax, eax
jne 0x4c1ffc
mov al, byte [esi]
cmp al, 0xd
je 0x4c1c4d
cmp al, 0xa
je 0x4c1c4d
mov eax, dword [ebp - 0x18]
mov dl, byte [eax + esi]
push 0x11
push esi
push str.WWW_Authenticate:
mov byte [ebp - 1], dl
mov byte [eax + esi], 0
call fcn.004c21e0
add esp, 0xc
test eax, eax
je 0x4c1b14
mov eax, dword [ebx + 0x90]
cmp eax, 0x191
je 0x4c1b35
push 0x13
push esi
push str.Proxy_authenticate:
call fcn.004c21e0
add esp, 0xc
test eax, eax
je 0x4c1b4d
mov eax, dword [ebx + 0x90]
cmp eax, 0x197
jne 0x4c1b4d
push esi
push eax
push edi
call fcn.004bbe60
add esp, 0xc
test eax, eax
jne 0x4c1ffc
jmp 0x4c1c16
push 0xf
push esi
push str.Content_Length:
call fcn.004c21e0
add esp, 0xc
test eax, eax
je 0x4c1b7c
push 0xa
lea eax, [esi + 0xf]
push 0
push eax
call fcn.004d35c7
add esp, 0xc
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edx
jmp 0x4c1c16
push str.close
push str.Connection:
push esi
call fcn.004bc3d0
add esp, 0xc
test eax, eax
je 0x4c1b9c
mov dword [ebp - 0x20], 1
jmp 0x4c1c16
push str.chunked
push str.Transfer_Encoding:
push esi
call fcn.004bc3d0
add esp, 0xc
test eax, eax
je 0x4c1bd0
push str.CONNECT_responded_chunked_n
push ebx
call fcn.004a95e0
push edi
mov dword [ebp - 0x30], 1
call fcn.004c3490
add esp, 0xc
jmp 0x4c1c16
push str.close
push str.Proxy_Connection:
push esi
call fcn.004bc3d0
add esp, 0xc
test eax, eax
je 0x4c1bf0
mov dword [ebp - 0x20], 1
jmp 0x4c1c16
lea edi, [ebx + 0x90]
push edi
lea ecx, [ebp - 0x34]
push ecx
push str.HTTP_1._d__d
push esi
call fcn.004d30ca
add esp, 0x10
cmp eax, 2
jne 0x4c1c16
mov edx, dword [edi]
mov dword [ebx + 0x86b0], edx
mov al, byte [ebp - 1]
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp + 8]
mov byte [ecx + esi], al
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], 0
inc esi
mov ecx, dword [ebp - 0x14]
mov edx, 1
add dword [ebp - 0xc], edx
add ecx, edx
mov dword [ebp - 0x14], ecx
cmp ecx, eax
jl 0x4c1a80
jmp 0x4c1dcf
xor ecx, ecx
cmp dword [ebx + 0x90], 0x197
lea eax, [ebx + 0x55c]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0xc], eax
jne 0x4c1d81
cmp dword [ebx + 0x860c], ecx
jne 0x4c1d81
mov eax, dword [ebp - 0x3c]
or eax, dword [ebp - 0x38]
mov dword [ebp - 8], 2
je 0x4c1cdc
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
push ecx
push edx
push str.Ignore__lld_bytes_of_response_body_n
push ebx
call fcn.004a95e0
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x14]
add esp, 0x10
cdq
sub dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x38]
sbb eax, edx
mov dword [ebp - 0x38], eax
test eax, eax
jg 0x4c1daa
jl 0x4c1cc2
cmp dword [ebp - 0x3c], 0
ja 0x4c1daa
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], 0
mov dword [edi + eax*4 + 0x484], 2
jmp 0x4c1dcf
cmp dword [ebp - 0x30], ecx
je 0x4c1d6e
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x14]
mov dword [ebx + 0xc8], 1
push eax
push str._zd_bytes_of_chunk_left_n
push ebx
call fcn.004a95e0
add esp, 0xc
cmp byte [esi + 1], 0xa
jne 0x4c1d0e
inc esi
inc dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
push ecx
push edx
lea eax, [esi + 1]
push eax
push edi
call fcn.004c34b0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4c1d5d
push str.chunk_reading_DONE_n
push ebx
call fcn.004a95e0
mov ecx, dword [ebp + 0xc]
mov eax, ecx
mov dword [edi + ecx*4 + 0x484], 2
add esp, 8
mov dword [ebp - 8], 0
mov dword [edi + eax*4 + 0x484], 2
jmp 0x4c1dcf
mov edx, dword [ebp - 0x10]
push edx
push str.Read__zd_bytes_of_chunk__continue_n
push ebx
call fcn.004a95e0
jmp 0x4c1da7
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], ecx
mov dword [edi + eax*4 + 0x484], 2
jmp 0x4c1dcf
cmp dword [ebx + 0x86b0], 0xc8
mov dword [ebp - 8], ecx
jne 0x4c1daa
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x14]
dec eax
cmp eax, ecx
je 0x4c1daa
push eax
push str.Proxy_CONNECT_followed_by__zd_bytes_of_opaque_data._Data_ignored__known_bug_39_
push ebx
call fcn.004a9660
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov dword [edi + eax*4 + 0x484], 2
jmp 0x4c1dcf
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push ebx
mov dword [ebp - 0x24], 1
call fcn.004a9660
add esp, 8
push edi
call fcn.004c0e70
add esp, 4
test eax, eax
jne 0x4c1f35
cmp dword [ebp - 0x1c], 0x4000
jb 0x4c18e2
cmp dword [ebp - 0x24], 0
jne 0x4c1fa0
cmp dword [ebx + 0x86b0], 0xc8
je 0x4c1e25
push edi
call fcn.004bc8a0
add esp, 4
test eax, eax
jne 0x4c1ffc
cmp dword [edi + 0x1a0], eax
je 0x4c1e25
mov dword [ebp - 0x20], 1
jmp 0x4c1e2b
cmp dword [ebp - 0x20], 0
je 0x4c1e38
cmp dword [ebx + 0xd4], 0
jne 0x4c1f41
cmp dword [ebx + 0xd4], 0
mov esi, dword [ebp + 0xc]
je 0x4c1f60
cmp dword [edi + esi*4 + 0x484], 2
jne 0x4c1e6d
push 0
push str.TUNNEL_STATE_switched_to:__d_n
push ebx
mov dword [edi + esi*4 + 0x484], 0
call fcn.004a95e0
add esp, 0xc
cmp dword [ebx + 0xd4], 0
je 0x4c1f60
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
xor edi, edi
jmp 0x4c165b
push str.Failed_sending_CONNECT_to_proxy
push ebx
call fcn.004a9660
add esp, 8
mov eax, esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.004cb541
add esp, 4
mov eax, esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push ebx
call fcn.004a9660
add esp, 8
pop esi
pop edi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x14]
push edx
call fcn.004cb541
add esp, 4
pop esi
pop edi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
push eax
call fcn.004cb541
add esp, 4
pop esi
pop edi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.004cb541
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.004cb541
add esp, 8
pop esi
pop edi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push ebx
call fcn.004a9660
add esp, 8
pop esi
pop edi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
pop edi
mov eax, 0x2a
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
mov edx, dword [edi + esi*4 + 0x130]
push edx
push edi
call fcn.004aa420
add esp, 8
mov dword [edi + esi*4 + 0x130], 0xffffffff
mov eax, dword [ebx + 0x90]
cmp eax, 0xc8
je 0x4c1fac
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push ebx
call fcn.004a9660
add esp, 0xc
cmp dword [ebp - 0x20], 0
je 0x4c1f95
cmp dword [ebx + 0xd4], 0
je 0x4c1f95
mov dword [edi + 0x1f8], 1
mov dword [edi + esi*4 + 0x484], 0
pop esi
pop edi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + esi*4 + 0x484], 2
mov eax, dword [edi + 0x228]
test eax, eax
je 0x4c1fd4
push eax
call fcn.004cb541
add esp, 4
xor esi, esi
mov dword [edi + 0x228], esi
jmp 0x4c1fd6
xor esi, esi
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [edi + 0x228], esi
push ebx
mov dword [ebx + 0x8600], 1
call fcn.004a95e0
add esp, 8
mov dword [ebx + 0xc8], esi
xor eax, eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret