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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 8]
push ebx
push esi
xor edx, edx
push edi
mov edi, dword [eax]
mov dword [ebp - 0x30], edx
mov ecx, dword [edi + 0x170]
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x24], ecx
cmp ecx, edx
jne 0x4ba79a
mov dword [ebp - 0x24], 0x36ee80
mov ecx, dword [ebp + 0xc]
mov ecx, dword [eax + ecx*4 + 0xa4]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], edx
mov byte [ebp - 1], dl
mov byte [ebp - 2], dl
mov dword [ebp - 0x20], edx
mov byte [eax + 0x12d], dl
lea esp, [esp]
cmp byte [eax + 0x125], 0
jne 0x4ba9a5
movzx ebx, word [ebp + 0x14]
mov esi, dword [ebp + 0x10]
push ebx
push esi
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
push edi
call fcn.004ab130
mov eax, dword [edi + 0xcc]
add esp, 0x10
test eax, eax
je 0x4ba802
push eax
call dword [0x75f004]
add esp, 4
mov dword [edi + 0xcc], 0
call fcn.004b8b30
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4baf14
push ebx
push esi
push str._s:_d
call fcn.004aff00
mov ebx, eax
add esp, 0xc
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je 0x4baf07
mov esi, dword [ebp + 8]
push 1
push ebx
push str.CONNECT
call fcn.004b85c0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4ba97e
mov edx, dword [ebp - 0xc]
mov esi, 0x70d934
push edx
mov ebx, str.Host:
mov edi, esi
mov dword [ebp - 0x10], esi
call fcn.004b8210
add esp, 4
test eax, eax
jne 0x4ba885
mov ebx, dword [ebp - 0x1c]
push ebx
push str.Host:__s_r_n
call fcn.004aff00
mov edi, eax
add esp, 8
test edi, edi
je 0x4baf20
mov eax, dword [ebp - 0xc]
push eax
mov ebx, str.Proxy_Connection:
call fcn.004b8210
add esp, 4
test eax, eax
jne 0x4ba8a1
mov dword [ebp - 0x10], str.Proxy_Connection:_Keep_Alive_r_n
mov ecx, dword [ebp - 0xc]
push ecx
mov ebx, 0x694a40
call fcn.004b8210
add esp, 4
test eax, eax
jne 0x4ba8ca
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x304], eax
je 0x4ba8ca
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x140]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x13c]
test eax, eax
jne 0x4ba8dc
mov eax, 0x70d934
mov edx, dword [ebp - 0x10]
push edx
push esi
push eax
movzx eax, word [ebp + 0x14]
push edi
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x14]
push str.CONNECT__s:_d_HTTP_1.0_r_n_s_s_s_s
call fcn.004b9200
add esp, 0x1c
mov esi, eax
test edi, edi
je 0x4ba911
cmp byte [edi], 0
je 0x4ba911
push edi
call dword [0x75f004]
add esp, 4
test esi, esi
jne 0x4ba95c
mov edi, dword [ebp - 0x14]
mov ebx, dword [ebp + 8]
push edi
call fcn.004b92c0
mov esi, eax
add esp, 4
test esi, esi
jne 0x4ba95c
push 0x693c5c
mov eax, edi
call fcn.004b9200
mov esi, eax
add esp, 4
test esi, esi
jne 0x4ba95c
mov ecx, dword [ebp - 0xc]
push eax
add ecx, 0x855c
push ecx
mov ecx, dword [ebp + 0xc]
mov edx, edi
push edx
mov edi, ebx
call fcn.004b8b50
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x14], 0
test esi, esi
je 0x4ba978
mov eax, dword [ebp - 0xc]
push str.Failed_sending_CONNECT_to_proxy
push eax
call fcn.004ab1b0
add esp, 8
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x1c]
push ebx
call dword [0x75f004]
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.004a2820
add esp, 8
test esi, esi
jne 0x4baf40
mov edx, dword [ebp + 8]
mov byte [edx + 0x125], 1
mov eax, edx
mov ecx, dword [eax + 0x98]
mov edx, dword [eax + 0x94]
push ecx
push edx
call fcn.004be520
push edx
push eax
call fcn.004be550
mov ecx, dword [ebp - 0x24]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x4baf49
cmp dword [edi + 0x438], 2
jne 0x4ba9f0
mov edx, dword [ebp - 0x28]
push 0
push 0xffffffffffffffff
push edx
call fcn.004bb350
add esp, 0xc
test eax, eax
je 0x4baff7
mov eax, dword [ebp + 8]
mov byte [eax + 0x125], 0
lea eax, [edi + 0x454]
xor ebx, ebx
mov dword [ebp - 0x14], eax
mov esi, eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], 1
cmp dword [ebp - 8], 0
je 0x4bae8d
cmp dword [ebp - 0x20], 0
jne 0x4bafb6
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x98]
mov edx, dword [eax + 0x94]
push ecx
push edx
call fcn.004be520
push edx
push eax
call fcn.004be550
mov ecx, dword [ebp - 0x24]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x4baeed
cmp ecx, 0x3e8
jl 0x4baa62
mov ecx, 0x3e8
mov eax, dword [ebp - 0x28]
push ecx
push 0xffffffffffffffff
push eax
call fcn.004bb350
add esp, 0xc
cmp eax, 0xffffffff
je 0x4bae55
test eax, eax
je 0x4bae6a
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 0x28]
mov edx, 0x4000
sub edx, ebx
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
call fcn.004aae90
add esp, 0x14
test eax, eax
js 0x4bae81
xor ecx, ecx
cmp eax, ecx
je 0x4baab8
mov dword [ebp - 8], ecx
jmp 0x4bae6a
mov eax, dword [ebp - 0x18]
cmp eax, ecx
jg 0x4baaeb
mov dword [ebp - 8], ecx
cmp dword [edi + 0x104], ecx
je 0x4baae1
cmp dword [edi + 0x84ec], ecx
je 0x4baae1
mov eax, dword [ebp + 8]
mov byte [eax + 0x12d], 1
jmp 0x4bae6a
push str.Proxy_CONNECT_aborted
jmp 0x4bae5a
add ebx, eax
cmp dword [ebp - 8], 1
mov dword [ebp - 0x1c], ebx
jle 0x4bab80
mov edx, dword [ebp - 0x38]
or edx, dword [ebp - 0x34]
mov dword [ebp - 0x1c], ecx
lea ecx, [edi + 0x454]
mov dword [ebp - 0x14], ecx
je 0x4bab3a
cdq
sub dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x34]
sbb eax, edx
mov dword [ebp - 0x34], eax
test eax, eax
jg 0x4bae6a
jl 0x4bab2e
cmp dword [ebp - 0x38], 0
ja 0x4bae6a
mov dword [ebp - 8], 0
jmp 0x4bae6a
lea edx, [ebp - 0x2c]
push edx
push eax
mov eax, dword [ebp + 8]
push ecx
xor ebx, ebx
push eax
mov dword [ebp - 0x2c], ebx
call fcn.004c0790
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4bab69
push str.chunk_reading_DONE_n
push edi
call fcn.004ab130
mov dword [ebp - 8], ebx
jmp 0x4bae67
mov ecx, dword [ebp - 0x2c]
push ecx
push str.Read__d_bytes_of_chunk__continue_n
push edi
call fcn.004ab130
add esp, 0xc
jmp 0x4bae6a
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
test eax, eax
jle 0x4bae6a
mov ecx, 1
mov edx, dword [ebp - 0x14]
add dword [ebp - 0x10], ecx
cmp byte [edx], 0xa
jne 0x4bad49
cmp byte [edi + 0x264], 0
je 0x4babbe
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
push eax
push ecx
push esi
push 1
push edi
call fcn.004ab050
add esp, 0x14
cmp byte [edi + 0x258], 0
mov eax, 2
je 0x4babd1
mov eax, 3
mov edx, dword [ebp - 0x10]
push edx
push esi
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.004ab350
add esp, 0x10
test eax, eax
jne 0x4baff9
mov al, byte [esi]
cmp al, 0xd
je 0x4bad5e
cmp al, 0xa
je 0x4bad5e
mov eax, dword [ebp - 0x10]
mov cl, byte [eax + esi]
push 0x11
push esi
push str.WWW_Authenticate:
mov byte [ebp - 3], cl
mov byte [eax + esi], 0
call fcn.004ac270
add esp, 0xc
test eax, eax
je 0x4bac2b
mov eax, dword [edi + 0x90]
cmp eax, 0x191
je 0x4bac4c
push 0x13
push esi
push str.Proxy_authenticate:
call fcn.004ac270
add esp, 0xc
test eax, eax
je 0x4bac67
mov eax, dword [edi + 0x90]
cmp eax, 0x197
jne 0x4bac67
mov edx, dword [ebp + 8]
push esi
push eax
push edx
call fcn.004b8870
add esp, 0xc
test eax, eax
jne 0x4baff9
jmp 0x4bad2a
push 0xf
push esi
push 0x6914dc
call fcn.004ac270
add esp, 0xc
test eax, eax
je 0x4bac96
push 0xa
lea eax, [esi + 0xf]
push 0
push eax
call fcn.00591ae0
add esp, 0xc
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
jmp 0x4bad2a
push str.close
push str.Connection:
push esi
call fcn.004b8db0
add esp, 0xc
test al, al
je 0x4bacb3
mov byte [ebp - 1], 1
jmp 0x4bad2a
push str.chunked
push str.Transfer_Encoding:
push esi
call fcn.004b8db0
add esp, 0xc
test al, al
je 0x4bace7
push str.CONNECT_responded_chunked_n
push edi
call fcn.004ab130
mov ecx, dword [ebp + 8]
push ecx
mov byte [ebp - 2], 1
call fcn.004c0770
add esp, 0xc
jmp 0x4bad2a
push str.close
push str.Proxy_Connection:
push esi
call fcn.004b8db0
add esp, 0xc
test al, al
je 0x4bad04
mov byte [ebp - 1], 1
jmp 0x4bad2a
lea ebx, [edi + 0x90]
push ebx
lea edx, [ebp - 0x30]
push edx
push str.HTTP_1._d__d
push esi
call fcn.00590dac
add esp, 0x10
cmp eax, 2
jne 0x4bad2a
mov eax, dword [ebx]
mov dword [edi + 0x854c], eax
mov ecx, dword [ebp - 0x10]
mov dl, byte [ebp - 3]
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x2c]
mov byte [ecx + esi], dl
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x10], 0
inc esi
mov ecx, 1
add dword [ebp - 0x14], ecx
add ebx, ecx
mov dword [ebp - 0x2c], ebx
cmp ebx, eax
jl 0x4bab92
jmp 0x4bae6a
xor ecx, ecx
cmp dword [edi + 0x90], 0x197
lea eax, [edi + 0x454]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], eax
jne 0x4baab0
cmp byte [edi + 0x84f4], cl
jne 0x4baab0
mov edx, dword [ebp - 0x38]
or edx, dword [ebp - 0x34]
mov dword [ebp - 8], 2
je 0x4bade2
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
push eax
push ecx
push str.Ignore__lld_bytes_of_response_body_n
push edi
call fcn.004ab130
mov eax, dword [ebp - 0x18]
sub eax, ebx
cdq
add esp, 0x10
sub dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x34]
sbb eax, edx
mov dword [ebp - 0x34], eax
test eax, eax
jg 0x4bae6a
jl 0x4bab2e
cmp dword [ebp - 0x38], 0
ja 0x4bae6a
mov dword [ebp - 8], 0
jmp 0x4bae6a
cmp byte [ebp - 2], cl
je 0x4baab0
mov edx, dword [ebp - 0x18]
sub edx, ebx
push edx
push str._d_bytes_of_chunk_left_n
push edi
mov byte [edi + 0xc5], 1
call fcn.004ab130
add esp, 0xc
cmp byte [esi + 1], 0xa
jne 0x4bae0e
inc esi
inc ebx
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp + 8]
sub ecx, ebx
push ecx
lea edx, [esi + 1]
push edx
push eax
call fcn.004c0790
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4bae41
push str.chunk_reading_DONE_n
push edi
call fcn.004ab130
mov dword [ebp - 8], 0
jmp 0x4bae67
mov ecx, dword [ebp - 0x18]
push ecx
push str.Read__d_bytes_of_chunk__continue_n
push edi
call fcn.004ab130
add esp, 0xc
jmp 0x4bae6a
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push edi
mov dword [ebp - 0x20], 1
call fcn.004ab1b0
add esp, 8
mov edx, dword [ebp + 8]
push edx
call fcn.004ae590
add esp, 4
test eax, eax
jne 0x4baf59
mov ebx, dword [ebp - 0x1c]
cmp ebx, 0x4000
jb 0x4baa14
cmp dword [ebp - 0x20], 0
jne 0x4bafb6
cmp dword [edi + 0x854c], 0xc8
mov esi, dword [ebp + 8]
je 0x4baec5
push esi
call fcn.004b9040
add esp, 4
test eax, eax
jne 0x4baff9
cmp byte [esi + 0x118], al
je 0x4baec5
mov byte [ebp - 1], 1
jmp 0x4baecb
cmp byte [ebp - 1], 0
je 0x4baed8
cmp dword [edi + 0xcc], 0
jne 0x4baf65
cmp dword [edi + 0xcc], 0
je 0x4baf81
mov eax, dword [ebp + 8]
jmp 0x4ba7c0
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.004ab1b0
add esp, 8
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
push eax
call dword [0x75f004]
add esp, 4
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
push ecx
call dword [0x75f004]
push ebx
call dword [0x75f004]
add esp, 8
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.004ab1b0
add esp, 8
jmp 0x4baf81
pop edi
pop esi
mov eax, 0x2a
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0xc]
mov edx, dword [esi + ebx*4 + 0xa4]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + ebx*4 + 0xa4], 0xffffffff
mov eax, dword [edi + 0x90]
cmp eax, 0xc8
je 0x4bafc2
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push edi
call fcn.004ab1b0
add esp, 0xc
cmp byte [ebp - 1], 0
je 0x4bafb6
cmp dword [edi + 0xcc], 0
je 0x4bafb6
mov eax, dword [ebp + 8]
mov byte [eax + 0x12d], 1
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x13c]
push ecx
call fcn.004a2820
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [esi + 0x13c], 0
push edi
mov byte [edi + 0x84f0], 1
call fcn.004ab130
add esp, 0xc
mov byte [edi + 0xc5], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret