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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
and dword [ebp - 0x40], 0
mov ecx, 0x36ee80
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xorps xmm0, xmm0
movlpd qword [ebp - 0x34], xmm0
mov esi, dword [edi]
mov eax, dword [esi + 0x19c]
test eax, eax
cmovne ecx, eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x38], ecx
mov ebx, dword [edi + eax*4 + 0x130]
xor eax, eax
and dword [ebp - 0x24], eax
and dword [edi + 0x1f4], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x10], eax
cmp dword [edi + 0x1d0], 0
jne 0x4a3f8d
movzx eax, word [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push esi
call fcn.0048ff48
mov eax, dword [esi + 0xd4]
add esp, 0x10
test eax, eax
je 0x4a3de3
push eax
call fcn.004a7dd8
and dword [esi + 0xd4], 0
pop ecx
call fcn.00496139
mov ebx, eax
mov dword [ebp + 8], ebx
test ebx, ebx
je 0x4a44d5
movzx eax, word [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push str._s:_hu
call fcn.00485f2e
add esp, 0xc
mov dword [ebp - 0x30], eax
test eax, eax
je 0x4a44e3
push 1
push eax
push str.CONNECT
push edi
call fcn.0049691f
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4a3f61
cmp dword [edi + 0x114], 1
mov eax, 0x4ef864
mov ebx, eax
mov dword [ebp - 0x20], eax
mov ecx, 0x4dbbc4
mov dword [ebp - 0x1c], ebx
mov eax, 0x4d8958
cmovne eax, ecx
push str.Host:
push esi
mov dword [ebp - 8], eax
call fcn.00496552
pop ecx
pop ecx
test eax, eax
jne 0x4a3e81
push dword [ebp - 0x30]
push str.Host:__s_r_n
call fcn.00485f2e
mov ebx, eax
mov dword [ebp - 0x1c], ebx
pop ecx
pop ecx
test ebx, ebx
je 0x4a44c3
push str.Proxy_Connection:
push esi
call fcn.00496552
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
mov eax, 0x4ef864
cmovne ecx, eax
push str.User_Agent:
push esi
mov dword [ebp - 0xc], ecx
call fcn.00496552
add esp, 0x10
test eax, eax
jne 0x4a3ec1
cmp dword [esi + 0x3a0], eax
je 0x4a3ec1
mov eax, dword [edi + 0x228]
mov dword [ebp - 0x20], eax
push dword [ebp - 0xc]
mov eax, dword [edi + 0x224]
mov ecx, 0x4ef864
push dword [ebp - 0x20]
test eax, eax
cmovne ecx, eax
movzx eax, word [ebp + 0x14]
push ecx
push ebx
push dword [ebp - 8]
push eax
push dword [ebp + 0x10]
push str.CONNECT__s:_hu_HTTP__s_r_n_s_s_s_s
push dword [ebp + 8]
call fcn.004962e3
mov ebx, eax
add esp, 0x24
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4a3f09
cmp byte [eax], 0
je 0x4a3f09
push eax
call fcn.004a7dd8
pop ecx
test ebx, ebx
jne 0x4a3f4c
push dword [ebp + 8]
push edi
call fcn.00496344
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x4a3f4c
push 0x4effd4
push dword [ebp + 8]
call fcn.004962e3
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x4a3f4c
push dword [ebp + 0xc]
push eax
lea eax, [esi + 0x86a4]
push eax
push edi
push dword [ebp + 8]
call fcn.00496146
add esp, 0x14
mov ebx, eax
and dword [ebp + 8], 0
test ebx, ebx
je 0x4a3f61
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.0048feb2
pop ecx
pop ecx
push dword [ebp - 0x30]
call fcn.004a7dd8
mov eax, dword [ebp + 8]
pop ecx
test eax, eax
je 0x4a3f78
push eax
call fcn.004a7dd8
pop ecx
test ebx, ebx
jne 0x4a44dc
mov ebx, dword [ebp - 0x2c]
mov dword [edi + 0x1d0], 1
push dword [edi + 0x124]
push dword [edi + 0x120]
call fcn.00491b24
push edx
push eax
call fcn.00491ace
mov ecx, dword [ebp - 0x38]
add esp, 0x10
sub ecx, eax
test ecx, ecx
jle 0x4a4583
cmp dword [esi + 0x520], 2
jne 0x4a3fd3
push 0
push 0xffffffffffffffff
push ebx
call fcn.00498e75
add esp, 0xc
test eax, eax
je 0x4a457f
and dword [edi + 0x1d0], 0
lea eax, [esi + 0x53c]
and dword [ebp - 0x20], 0
xor edx, edx
xor ebx, ebx
mov dword [ebp - 0xc], eax
inc ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x4a4355
cmp dword [ebp - 0x24], 0
jne 0x4a4590
push dword [edi + 0x124]
push dword [edi + 0x120]
call fcn.00491b24
push edx
push eax
call fcn.00491ace
mov ecx, dword [ebp - 0x38]
add esp, 0x10
sub ecx, eax
test ecx, ecx
jle 0x4a448a
mov edx, 0x3e8
cmp ecx, edx
mov eax, edx
cmovl eax, ecx
push eax
push 0xffffffffffffffff
push dword [ebp - 0x2c]
call fcn.00498e75
add esp, 0xc
cmp eax, 0xffffffff
je 0x4a4480
test eax, eax
je 0x4a4339
lea eax, [ebp - 0x18]
push eax
mov eax, 0x4000
sub eax, dword [ebp - 0x20]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x2c]
push edi
call fcn.0048ffbd
add esp, 0x14
cmp eax, 0x51
je 0x4a4348
test eax, eax
jne 0x4a410f
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jg 0x4a40c7
xor ebx, ebx
mov dword [ebp - 8], ebx
cmp dword [esi + 0x118], ebx
je 0x4a40af
cmp dword [esi + 0x85dc], ebx
je 0x4a40af
inc eax
mov dword [edi + 0x1f4], eax
jmp 0x4a4339
push str.Proxy_CONNECT_aborted
xor eax, eax
inc eax
push esi
mov dword [ebp - 0x24], eax
call fcn.0048feb2
pop ecx
pop ecx
jmp 0x4a4339
add dword [ebp - 0x20], ecx
xor eax, eax
inc eax
cmp ebx, eax
jle 0x4a4156
mov eax, dword [ebp - 0x10]
lea edx, [esi + 0x53c]
and dword [ebp - 0x20], 0
or eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], edx
je 0x4a4119
mov eax, ecx
mov ecx, dword [ebp - 0x10]
cdq
sub ecx, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], ecx
sbb eax, edx
mov dword [ebp - 0x14], eax
test eax, eax
jg 0x4a4339
jl 0x4a410f
test ecx, ecx
jne 0x4a4339
xor ebx, ebx
mov dword [ebp - 8], ebx
jmp 0x4a4339
and dword [ebp + 8], 0
lea eax, [ebp + 8]
push eax
push ecx
push edx
push edi
call fcn.0049477c
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4a4140
push str.chunk_reading_DONE_n
push esi
call fcn.0048ff48
pop ecx
pop ecx
jmp 0x4a410f
push dword [ebp + 8]
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.0048ff48
add esp, 0xc
jmp 0x4a4339
xor ebx, ebx
mov dword [ebp - 0x30], ebx
test ecx, ecx
jle 0x4a4336
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x1c]
inc edx
cmp byte [eax], 0xa
mov dword [ebp - 0x1c], edx
jne 0x4a4326
cmp dword [esi + 0x2e4], 0
je 0x4a4194
push edi
push edx
push dword [ebp - 4]
xor eax, eax
inc eax
push eax
push esi
call fcn.0048fdec
mov edx, dword [ebp - 0x1c]
add esp, 0x14
cmp dword [esi + 0x2c8], 0
push 2
pop eax
push 3
pop ecx
push edx
push dword [ebp - 4]
cmovne eax, ecx
push eax
push edi
call fcn.0048fcb5
add esp, 0x10
test eax, eax
jne 0x4a4593
mov ecx, dword [ebp - 4]
mov al, byte [ecx]
cmp al, 0xd
je 0x4a4396
cmp al, 0xa
je 0x4a4396
mov edx, dword [ebp - 0x1c]
push 0x11
push ecx
push str.WWW_Authenticate:
mov al, byte [edx + ecx]
mov byte [ebp + 0xb], al
mov byte [edx + ecx], 0
call fcn.004917e0
add esp, 0xc
test eax, eax
je 0x4a41fd
mov eax, dword [esi + 0x90]
cmp eax, 0x191
je 0x4a4220
push 0x13
push dword [ebp - 4]
push str.Proxy_authenticate:
call fcn.004917e0
add esp, 0xc
test eax, eax
je 0x4a423a
mov eax, dword [esi + 0x90]
cmp eax, 0x197
jne 0x4a423a
push dword [ebp - 4]
push eax
push edi
call fcn.004967e7
add esp, 0xc
test eax, eax
jne 0x4a4593
jmp 0x4a4308
push 0xf
push dword [ebp - 4]
push str.Content_Length:
call fcn.004917e0
add esp, 0xc
test eax, eax
je 0x4a426e
mov eax, dword [ebp - 4]
push 0xa
add eax, 0xf
push 0
push eax
call fcn.004b1427
add esp, 0xc
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], edx
jmp 0x4a4308
push str.close
push str.Connection:
push dword [ebp - 4]
call fcn.00496594
add esp, 0xc
test eax, eax
jne 0x4a42d5
push str.chunked
push str.Transfer_Encoding:
push dword [ebp - 4]
call fcn.00496594
add esp, 0xc
test eax, eax
je 0x4a42bc
push str.CONNECT_responded_chunked_n
push esi
call fcn.0048ff48
xor eax, eax
inc eax
push edi
mov dword [ebp - 0x3c], eax
call fcn.00494765
add esp, 0xc
jmp 0x4a4308
push str.close
push str.Proxy_Connection:
push dword [ebp - 4]
call fcn.00496594
add esp, 0xc
test eax, eax
je 0x4a42dd
xor eax, eax
inc eax
mov dword [ebp - 0x28], eax
jmp 0x4a4308
lea ebx, [esi + 0x90]
push ebx
lea eax, [ebp - 0x40]
push eax
push str.HTTP_1._d__d
push dword [ebp - 4]
call fcn.004af48b
add esp, 0x10
cmp eax, 2
jne 0x4a4305
mov eax, dword [ebx]
mov dword [esi + 0x8690], eax
mov ebx, dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x1c]
mov al, byte [ebp + 0xb]
mov byte [edx + ecx], al
xor edx, edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], edx
inc eax
inc ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x30], ebx
cmp ebx, ecx
jl 0x4a4169
mov ebx, dword [ebp - 8]
push edi
call fcn.00498188
pop ecx
test eax, eax
jne 0x4a44eb
cmp dword [ebp - 0x20], 0x4000
jb 0x4a3ff5
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x4a4590
cmp dword [esi + 0x8690], 0xc8
je 0x4a44a2
push edi
call fcn.00496637
pop ecx
test eax, eax
jne 0x4a4593
cmp dword [edi + 0x198], eax
mov ebx, dword [ebp - 0x28]
push 1
pop eax
cmovne ebx, eax
mov dword [ebp - 0x28], ebx
jmp 0x4a44a5
and dword [ebp - 0x20], 0
lea eax, [esi + 0x53c]
cmp dword [esi + 0x90], 0x197
mov dword [ebp - 0xc], eax
jne 0x4a410f
cmp dword [esi + 0x85ec], 0
jne 0x4a410f
mov ecx, dword [ebp - 0x10]
mov eax, ecx
mov edx, dword [ebp - 0x14]
or eax, edx
mov dword [ebp - 8], 2
je 0x4a4414
push edx
push ecx
push str.Ignore__lld_bytes_of_response_body_n
push esi
call fcn.0048ff48
mov eax, dword [ebp - 0x18]
add esp, 0x10
mov ecx, dword [ebp - 0x10]
sub eax, ebx
cdq
sub ecx, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], ecx
sbb eax, edx
mov dword [ebp - 0x14], eax
test eax, eax
jg 0x4a4336
jl 0x4a410f
test ecx, ecx
jne 0x4a4336
jmp 0x4a410f
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x4a410f
xor eax, eax
inc eax
mov dword [esi + 0xc8], eax
mov eax, dword [ebp - 0x18]
sub eax, ebx
push eax
push str._zd_bytes_of_chunk_left_n
push esi
call fcn.0048ff48
mov eax, dword [ebp - 4]
add esp, 0xc
inc eax
cmp byte [eax], 0xa
jne 0x4a4449
mov dword [ebp - 4], eax
inc ebx
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x18]
sub eax, ebx
push eax
mov eax, dword [ebp - 4]
inc eax
push eax
push edi
call fcn.0049477c
add esp, 0x10
cmp eax, 0xffffffff
je 0x4a4131
push dword [ebp - 0x18]
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.0048ff48
add esp, 0xc
jmp 0x4a4336
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
jmp 0x4a40b4
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.0048feb2
pop ecx
pop ecx
push 2
pop eax
mov dword [ebp - 0x24], eax
jmp 0x4a4358
mov ebx, dword [ebp - 0x28]
test ebx, ebx
je 0x4a44b2
cmp dword [esi + 0xd4], 0
jne 0x4a44f2
cmp dword [esi + 0xd4], 0
je 0x4a450f
mov ebx, dword [ebp - 0x2c]
jmp 0x4a3da8
push dword [ebp + 8]
call fcn.004a7dd8
push dword [ebp - 0x30]
call fcn.004a7dd8
pop ecx
pop ecx
push 0x1b
jmp 0x4a4592
mov eax, ebx
jmp 0x4a4593
push ebx
call fcn.004a7dd8
jmp 0x4a44d4
push 0x2a
jmp 0x4a4592
mov eax, dword [ebp + 0xc]
push dword [edi + eax*4 + 0x130]
push edi
call fcn.004903d1
mov eax, dword [ebp + 0xc]
pop ecx
pop ecx
or dword [edi + eax*4 + 0x130], 0xffffffff
mov eax, dword [esi + 0x90]
cmp eax, 0xc8
je 0x4a4543
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.0048feb2
add esp, 0xc
test ebx, ebx
je 0x4a4590
cmp dword [esi + 0xd4], 0
je 0x4a4590
xor eax, eax
inc eax
mov dword [edi + 0x1f4], eax
jmp 0x4a4590
mov eax, dword [edi + 0x224]
test eax, eax
je 0x4a455b
push eax
call fcn.004a7dd8
and dword [edi + 0x224], 0
pop ecx
and dword [edi + 0x224], 0
xor eax, eax
inc eax
push str.Proxy_replied_OK_to_CONNECT_request_n
push esi
mov dword [esi + 0x85e0], eax
call fcn.0048ff48
and dword [esi + 0xc8], 0
pop ecx
pop ecx
xor eax, eax
jmp 0x4a4593
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.0048feb2
pop ecx
pop ecx
push 0x38
pop eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret