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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push edi
mov edi, dword [ebx]
mov dword [ebp - 0x3c], esi
mov eax, dword [edi + 0x194]
cmp eax, esi
mov dword [ebp - 0x2c], eax
jne 0x4a2c46
mov dword [ebp - 0x2c], 0x36ee80
mov eax, dword [ebp + 0xc]
lea eax, [ebx + eax*4 + 0x12c]
mov dword [ebp - 0x38], eax
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x24], esi
mov dword [ebx + 0x1ec], esi
cmp dword [ebx + 0x1c8], esi
jne 0x4a2e43
movzx eax, word [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push edi
call fcn.0049d6f3
lea esi, [edi + 0xd4]
mov eax, dword [esi]
add esp, 0x10
test eax, eax
je 0x4a2ca6
push eax
call dword [0x4e00a4]
and dword [esi], 0
pop ecx
call fcn.004a0528
test eax, eax
mov dword [ebp - 0x14], eax
je 0x4a3311
movzx eax, word [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push str._s:_hu
call fcn.0049f487
add esp, 0xc
test eax, eax
mov dword [ebp - 0x20], eax
je 0x4a3319
push 1
mov esi, ebx
call fcn.004a027d
mov esi, eax
test esi, esi
pop ecx
jne 0x4a2e19
mov eax, dword [ebp + 8]
cmp dword [eax + 0x110], 1
mov esi, 0x4b469b
mov ebx, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], 0x4b8b8c
je 0x4a2d11
mov dword [ebp - 0xc], 0x4c4aec
push str.Host:
push edi
call fcn.0049fe7a
test eax, eax
pop ecx
pop ecx
jne 0x4a2d3b
push dword [ebp - 0x20]
push str.Host:__s_r_n
call fcn.0049f487
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x4a3325
push str.Proxy_Connection:
push edi
call fcn.0049fe7a
test eax, eax
pop ecx
pop ecx
jne 0x4a2d53
mov dword [ebp - 0x1c], str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent:
push edi
call fcn.0049fe7a
test eax, eax
pop ecx
pop ecx
jne 0x4a2d78
cmp dword [edi + 0x394], eax
je 0x4a2d78
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x21c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x218]
test eax, eax
je 0x4a2d87
mov esi, eax
push dword [ebp - 0x1c]
movzx eax, word [ebp + 0x14]
push dword [ebp - 0x10]
push esi
push ebx
push dword [ebp - 0xc]
push eax
push dword [ebp + 0x10]
push str.CONNECT__s:_hu_HTTP__s_r_n_s_s_s_s
push dword [ebp - 0x14]
call fcn.004a0c08
add esp, 0x24
test ebx, ebx
mov esi, eax
je 0x4a2dbd
cmp byte [ebx], 0
je 0x4a2dbd
push ebx
call dword [0x4e00a4]
pop ecx
test esi, esi
jne 0x4a2e04
push dword [ebp - 0x14]
push dword [ebp + 8]
call fcn.004a0cd1
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x4a2e04
push 0x4bb408
push dword [ebp - 0x14]
call fcn.004a0c08
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x4a2e04
push dword [ebp + 0xc]
push eax
lea eax, [edi + 0x868c]
push eax
push dword [ebp + 8]
push dword [ebp - 0x14]
call fcn.004a0535
add esp, 0x14
mov esi, eax
and dword [ebp - 0x14], 0
test esi, esi
je 0x4a2e19
push str.Failed_sending_CONNECT_to_proxy
push edi
call fcn.0049d766
pop ecx
pop ecx
push dword [ebp - 0x20]
call dword [0x4e00a4]
push dword [ebp - 0x14]
call fcn.00495e38
test esi, esi
pop ecx
pop ecx
jne 0x4a333a
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c8], 1
mov ebx, eax
push dword [ebx + 0x120]
push dword [ebx + 0x11c]
call fcn.004a4ce2
push edx
push eax
call fcn.004a4cf8
mov ecx, dword [ebp - 0x2c]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x4a3341
cmp dword [edi + 0x510], 2
jne 0x4a2e8a
push esi
push 0xffffffffffffffff
push dword [ebp - 0x30]
call fcn.004a371a
add esp, 0xc
test eax, eax
je 0x4a33cc
lea eax, [edi + 0x52c]
mov dword [ebx + 0x1c8], esi
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], esi
je 0x4a32c3
cmp dword [ebp - 0x24], esi
jne 0x4a334e
push dword [ebx + 0x120]
push dword [ebx + 0x11c]
call fcn.004a4ce2
push edx
push eax
call fcn.004a4cf8
mov ecx, dword [ebp - 0x2c]
sub ecx, eax
add esp, 0x10
cmp ecx, esi
jle 0x4a32af
mov eax, 0x3e8
cmp ecx, eax
jl 0x4a2eee
mov ecx, eax
push ecx
push 0xffffffffffffffff
push dword [ebp - 0x30]
call fcn.004a371a
add esp, 0xc
cmp eax, 0xffffffff
je 0x4a327d
cmp eax, esi
je 0x4a3291
lea eax, [ebp - 0x18]
push eax
mov eax, 0x4000
sub eax, dword [ebp - 0x20]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x30]
push ebx
call fcn.0049d4c1
add esp, 0x14
cmp eax, 0x51
je 0x4a32a0
cmp eax, esi
jne 0x4a2fa3
mov ecx, dword [ebp - 0x18]
cmp ecx, esi
jg 0x4a2f69
cmp dword [edi + 0x118], esi
mov dword [ebp - 0xc], esi
je 0x4a2f5f
cmp dword [edi + 0x85cc], esi
je 0x4a2f5f
mov dword [ebx + 0x1ec], 1
jmp 0x4a3291
push str.Proxy_CONNECT_aborted
jmp 0x4a3282
add dword [ebp - 0x20], ecx
cmp dword [ebp - 0xc], 1
jle 0x4a2fed
lea eax, [edi + 0x52c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x44]
or eax, dword [ebp - 0x40]
mov dword [ebp - 0x20], esi
je 0x4a2fab
mov eax, ecx
cdq
sub dword [ebp - 0x44], eax
sbb dword [ebp - 0x40], edx
cmp dword [ebp - 0x40], esi
jg 0x4a3291
jl 0x4a2fa3
cmp dword [ebp - 0x44], esi
ja 0x4a3291
mov dword [ebp - 0xc], esi
jmp 0x4a3291
lea eax, [ebp - 0x14]
push eax
push ecx
push dword [ebp - 0x10]
mov dword [ebp - 0x14], esi
push ebx
call fcn.004a5fd9
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4a2fd7
push str.chunk_reading_DONE_n
push edi
call fcn.0049d6f3
mov dword [ebp - 0xc], esi
jmp 0x4a328f
push dword [ebp - 0x14]
push str.Read__zd_bytes_of_chunk__continue_n
push edi
call fcn.0049d6f3
add esp, 0xc
jmp 0x4a3291
cmp ecx, esi
mov dword [ebp - 0x14], esi
jle 0x4a3291
mov eax, dword [ebp - 0x10]
inc dword [ebp - 0x1c]
cmp byte [eax], 0xa
jne 0x4a31af
cmp dword [edi + 0x2d8], esi
je 0x4a3021
push ebx
push dword [ebp - 0x1c]
push dword [ebp - 8]
push 1
push edi
call fcn.0049d637
add esp, 0x14
cmp dword [edi + 0x2bc], esi
push 2
pop eax
je 0x4a302f
push 3
pop eax
push dword [ebp - 0x1c]
push dword [ebp - 8]
push eax
push ebx
call fcn.0049d91a
add esp, 0x10
cmp eax, esi
jne 0x4a33ce
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0xd
je 0x4a31c6
cmp al, 0xa
je 0x4a31c6
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x1c]
lea esi, [ecx + eax]
mov cl, byte [esi]
push 0x11
push eax
push str.WWW_Authenticate:
mov byte [ebp - 1], cl
mov byte [esi], 0
call fcn.004a595e
add esp, 0xc
test eax, eax
je 0x4a308e
mov eax, dword [edi + 0x90]
cmp eax, 0x191
je 0x4a30b1
push 0x13
push dword [ebp - 8]
push str.Proxy_authenticate:
call fcn.004a595e
add esp, 0xc
test eax, eax
je 0x4a30cb
mov eax, dword [edi + 0x90]
cmp eax, 0x197
jne 0x4a30cb
push dword [ebp - 8]
push eax
push ebx
call fcn.004a0362
add esp, 0xc
test eax, eax
jne 0x4a33ce
jmp 0x4a319a
push 0xf
push dword [ebp - 8]
push str.Content_Length:
call fcn.004a595e
add esp, 0xc
test eax, eax
je 0x4a3100
mov eax, dword [ebp - 8]
push 0xa
add eax, 0xf
push 0
push eax
call dword [sym.imp.MSVCR80.dll__strtoi64]
add esp, 0xc
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], edx
jmp 0x4a319a
push str.close
push str.Connection:
push dword [ebp - 8]
call fcn.004a0771
add esp, 0xc
test eax, eax
jne 0x4a3168
push str.chunked
push str.Transfer_Encoding:
push dword [ebp - 8]
call fcn.004a0771
add esp, 0xc
test eax, eax
je 0x4a314f
push str.CONNECT_responded_chunked_n
push edi
call fcn.0049d6f3
push ebx
mov dword [ebp - 0x34], 1
call fcn.004a5fc5
add esp, 0xc
jmp 0x4a319a
push str.close
push str.Proxy_Connection:
push dword [ebp - 8]
call fcn.004a0771
add esp, 0xc
test eax, eax
je 0x4a3171
mov dword [ebp - 0x28], 1
jmp 0x4a319a
lea ebx, [edi + 0x90]
push ebx
lea eax, [ebp - 0x3c]
push eax
push str.HTTP_1._d__d
push dword [ebp - 8]
call dword [sym.imp.MSVCR80.dll_sscanf]
add esp, 0x10
cmp eax, 2
jne 0x4a319a
mov eax, dword [ebx]
mov dword [edi + 0x8678], eax
mov al, byte [ebp - 1]
and dword [ebp - 0x1c], 0
mov ebx, dword [ebp + 8]
mov byte [esi], al
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 8], eax
xor esi, esi
inc dword [ebp - 0x10]
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
jl 0x4a2ff8
jmp 0x4a3291
cmp dword [edi + 0x90], 0x197
lea eax, [edi + 0x52c]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], eax
jne 0x4a2fa3
cmp dword [edi + 0x85dc], esi
jne 0x4a2fa3
mov eax, dword [ebp - 0x44]
or eax, dword [ebp - 0x40]
mov dword [ebp - 0xc], 2
je 0x4a321c
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push str.Ignore__lld_bytes_of_response_body_n
push edi
call fcn.0049d6f3
mov eax, dword [ebp - 0x18]
add esp, 0x10
sub eax, dword [ebp - 0x14]
jmp 0x4a2f88
cmp dword [ebp - 0x34], esi
je 0x4a2fa3
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x14]
mov dword [edi + 0xc8], 1
push eax
push str._zd_bytes_of_chunk_left_n
push edi
call fcn.0049d6f3
mov eax, dword [ebp - 8]
add esp, 0xc
inc eax
cmp byte [eax], 0xa
jne 0x4a3253
inc dword [ebp - 0x14]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 8]
inc eax
push eax
push ebx
call fcn.004a5fd9
add esp, 0x10
cmp eax, 0xffffffff
je 0x4a2fc4
push dword [ebp - 0x18]
jmp 0x4a2fda
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push edi
mov dword [ebp - 0x24], 1
call fcn.0049d766
pop ecx
pop ecx
push ebx
call fcn.004a51c9
test eax, eax
pop ecx
jne 0x4a3352
cmp dword [ebp - 0x20], 0x4000
jb 0x4a2ea9
jmp 0x4a32c3
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.0049d766
pop ecx
pop ecx
mov dword [ebp - 0x24], 2
cmp dword [ebp - 0x24], esi
jne 0x4a334e
cmp dword [edi + 0x8678], 0xc8
je 0x4a32f6
push ebx
call fcn.004a0a64
cmp eax, esi
pop ecx
jne 0x4a33ce
cmp dword [ebx + 0x194], esi
je 0x4a32f6
mov dword [ebp - 0x28], 1
cmp dword [ebp - 0x28], esi
je 0x4a3303
cmp dword [edi + 0xd4], esi
jne 0x4a3356
cmp dword [edi + 0xd4], esi
jne 0x4a2c6d
jmp 0x4a3367
push 0x1b
pop eax
jmp 0x4a33ce
push dword [ebp - 0x14]
call dword [0x4e00a4]
pop ecx
jmp 0x4a3311
push dword [ebp - 0x14]
call dword [0x4e00a4]
push dword [ebp - 0x20]
call dword [0x4e00a4]
pop ecx
jmp 0x4a3322
mov eax, esi
jmp 0x4a33ce
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.0049d766
pop ecx
pop ecx
push 0x38
jmp 0x4a3313
push 0x2a
jmp 0x4a3313
mov eax, dword [ebp - 0x38]
push dword [eax]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x38]
or dword [eax], 0xffffffff
mov eax, dword [edi + 0x90]
cmp eax, 0xc8
je 0x4a339c
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push edi
call fcn.0049d766
add esp, 0xc
cmp dword [ebp - 0x28], esi
je 0x4a334e
cmp dword [edi + 0xd4], esi
je 0x4a334e
mov dword [ebx + 0x1ec], 1
jmp 0x4a334e
lea esi, [ebx + 0x218]
push dword [esi]
call fcn.00495e38
and dword [esi], 0
mov dword [esp], str.Proxy_replied_OK_to_CONNECT_request_n
push edi
mov dword [edi + 0x85d0], 1
call fcn.0049d6f3
and dword [edi + 0xc8], 0
pop ecx
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret