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

Disassembly:
sub esp, 0x34
push ebx
mov ebx, dword [esp + 0x3c]
push ebp
mov ebp, dword [ebx]
push esi
push edi
xor edi, edi
mov dword [esp + 0x38], edi
mov eax, dword [ebp + 0x170]
cmp eax, edi
mov dword [esp + 0x2c], eax
jne 0x10050a99
mov dword [esp + 0x2c], 0x36ee80
mov eax, dword [esp + 0x4c]
mov ecx, dword [ebx + eax*4 + 0xd4]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
mov dword [esp + 0x28], edi
mov byte [ebx + 0x13e], 0
jmp 0x10050ad0
cmp byte [ebx + 0x135], 0
jne 0x10050cd7
movzx esi, word [esp + 0x54]
mov edx, dword [esp + 0x50]
push esi
push edx
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
push ebp
call fcn.1004ce40
mov eax, dword [ebp + 0xcc]
add esp, 0x10
cmp eax, edi
je 0x10050b10
push eax
call dword [0x1008f004]
add esp, 4
mov dword [ebp + 0xcc], edi
call fcn.1004eda0
mov edi, eax
test edi, edi
mov dword [esp + 0x18], edi
je 0x10051288
mov eax, dword [esp + 0x50]
push esi
push eax
push str._s:_d
call fcn.1004e3a0
add esp, 0xc
test eax, eax
mov dword [esp + 0x14], eax
je 0x1005127e
push 1
push eax
push str.CONNECT
mov eax, ebx
call fcn.1004ea50
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10050ca8
mov ecx, dword [esp + 0x48]
cmp dword [ecx + 0xbc], 1
mov esi, 0x10084bea
mov edi, esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], 0x10084d28
je 0x10050b86
mov dword [esp + 0x20], 0x1007cc58
push ebp
mov ebx, str.Host:
call fcn.1004e560
add esp, 4
test eax, eax
jne 0x10050bb4
mov ebx, dword [esp + 0x14]
push ebx
push str.Host:__s_r_n
call fcn.1004e3a0
mov edi, eax
add esp, 8
test edi, edi
je 0x10051295
push ebp
mov ebx, str.Proxy_Connection:
call fcn.1004e560
add esp, 4
test eax, eax
jne 0x10050bce
mov dword [esp + 0x24], str.Proxy_Connection:_Keep_Alive_r_n
push ebp
mov ebx, str.User_Agent:
call fcn.1004e560
add esp, 4
test eax, eax
jne 0x10050bf2
cmp dword [ebp + 0x304], eax
je 0x10050bf2
mov edx, dword [esp + 0x48]
mov esi, dword [edx + 0x150]
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 0x14c]
test eax, eax
jne 0x10050c05
mov eax, 0x10084bea
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push ecx
push esi
push eax
movzx eax, word [esp + 0x60]
push edi
push edx
push eax
mov eax, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x34]
push str.CONNECT__s:_d_HTTP__s_r_n_s_s_s_s
call fcn.1004f410
add esp, 0x20
test edi, edi
mov esi, eax
je 0x10050c43
cmp byte [edi], 0
je 0x10050c43
push edi
call dword [0x1008f004]
add esp, 4
test esi, esi
jne 0x10050c8e
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x48]
push edi
call fcn.1004f4d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x10050c8e
push 0x10084b94
mov eax, edi
call fcn.1004f410
mov esi, eax
add esp, 4
test esi, esi
jne 0x10050c8e
push eax
lea ecx, [ebp + 0x8578]
push ecx
mov ecx, dword [esp + 0x54]
mov edx, edi
push edx
mov edi, ebx
call fcn.1004edb0
add esp, 0xc
mov esi, eax
test esi, esi
mov dword [esp + 0x18], 0
je 0x10050ca8
push str.Failed_sending_CONNECT_to_proxy
push ebp
call fcn.1004ced0
add esp, 8
mov eax, dword [esp + 0x14]
push eax
call dword [0x1008f004]
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.1004c680
add esp, 8
test esi, esi
jne 0x100512b7
mov edx, dword [esp + 0x48]
mov byte [edx + 0x135], 1
mov ebx, edx
xor edi, edi
mov eax, dword [ebx + 0xc8]
mov ecx, dword [ebx + 0xc4]
push eax
push ecx
call fcn.10051660
push edx
push eax
call fcn.10051690
mov edx, dword [esp + 0x3c]
sub edx, eax
add esp, 0x10
test edx, edx
jle 0x100512c1
cmp dword [ebp + 0x448], 2
jne 0x10050d23
mov eax, dword [esp + 0x30]
push edi
push 0xffffffffffffffff
push eax
call fcn.10051420
add esp, 0xc
test eax, eax
je 0x10051378
mov ecx, dword [esp + 0x48]
lea eax, [ebp + 0x464]
mov ebx, eax
xor edi, edi
mov byte [ecx + 0x135], 0
mov dword [esp + 0x20], ebx
mov esi, ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], 1
mov edi, edi
cmp dword [esp + 0x14], 0
je 0x10051217
cmp dword [esp + 0x28], 0
jne 0x100512cf
mov eax, dword [esp + 0x48]
mov edx, dword [eax + 0xc8]
mov eax, dword [eax + 0xc4]
push edx
push eax
call fcn.10051660
push edx
push eax
call fcn.10051690
mov ecx, dword [esp + 0x3c]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x100512c1
cmp ecx, 0x3e8
jl 0x10050da2
mov ecx, 0x3e8
push ecx
mov ecx, dword [esp + 0x34]
push 0xffffffffffffffff
push ecx
call fcn.10051420
add esp, 0xc
cmp eax, 0xffffffff
je 0x100511dc
test eax, eax
je 0x100511f2
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x4c]
mov eax, 0x4000
sub eax, edi
push eax
push ebx
push ecx
push edx
call fcn.1004cba0
add esp, 0x14
test eax, eax
jl 0x1005120b
xor ecx, ecx
cmp eax, ecx
je 0x10050dfa
mov dword [esp + 0x14], ecx
jmp 0x100511f2
mov eax, dword [esp + 0x1c]
cmp eax, ecx
jg 0x10050e30
cmp dword [ebp + 0x104], ecx
mov dword [esp + 0x14], ecx
je 0x10050e26
cmp dword [ebp + 0x84fc], ecx
je 0x10050e26
mov eax, dword [esp + 0x48]
mov byte [eax + 0x13e], 1
jmp 0x100511f2
push str.Proxy_CONNECT_aborted
jmp 0x100511e1
add edi, eax
cmp dword [esp + 0x14], 1
mov dword [esp + 0x24], edi
jle 0x10050ed6
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x24], ecx
lea ecx, [ebp + 0x464]
mov ebx, ecx
mov ecx, dword [esp + 0x40]
mov edx, edi
or edx, ecx
mov dword [esp + 0x20], ebx
je 0x10050e8b
cdq
sub edi, eax
sbb ecx, edx
test ecx, ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], ecx
jg 0x100511f2
jl 0x10050e7e
test edi, edi
ja 0x100511f2
mov dword [esp + 0x14], 0
jmp 0x100511f2
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x34]
push ecx
push eax
push ebx
xor edi, edi
push edx
mov dword [esp + 0x44], edi
call fcn.10052ce0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10050ebe
push str.chunk_reading_DONE_n
push ebp
call fcn.1004ce40
mov dword [esp + 0x1c], edi
jmp 0x100511ef
mov eax, dword [esp + 0x34]
push eax
push str.Read__d_bytes_of_chunk__continue_n
push ebp
call fcn.1004ce40
add esp, 0xc
jmp 0x100511f2
xor edi, edi
test eax, eax
mov dword [esp + 0x34], edi
jle 0x100511f2
jmp 0x10050ef0
add dword [esp + 0x18], 1
cmp byte [ebx], 0xa
jne 0x100510b3
cmp byte [ebp + 0x270], 0
je 0x10050f1d
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x18]
push ecx
push edx
push esi
push 1
push ebp
call fcn.1004cd50
add esp, 0x14
cmp byte [ebp + 0x263], 0
mov eax, 2
je 0x10050f30
mov eax, 3
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x48]
push ecx
push esi
push eax
push edx
call fcn.1004d020
add esp, 0x10
test eax, eax
jne 0x1005137a
mov al, byte [esi]
cmp al, 0xd
je 0x100510ce
cmp al, 0xa
je 0x100510ce
mov eax, dword [esp + 0x18]
mov bl, byte [eax + esi]
push 0x11
push esi
push str.WWW_Authenticate:
mov byte [eax + esi], 0
call fcn.100521f0
add esp, 0xc
test eax, eax
je 0x10050f8a
mov eax, dword [ebp + 0x90]
cmp eax, 0x191
je 0x10050fab
push 0x13
push esi
push str.Proxy_authenticate:
call fcn.100521f0
add esp, 0xc
test eax, eax
je 0x10050fc7
mov eax, dword [ebp + 0x90]
cmp eax, 0x197
jne 0x10050fc7
push esi
push eax
mov eax, dword [esp + 0x50]
push eax
call fcn.1004eb50
add esp, 0xc
test eax, eax
jne 0x1005137a
jmp 0x10051091
push 0xf
push esi
push 0x1007c790
call fcn.100521f0
add esp, 0xc
test eax, eax
je 0x10050ff8
push 0xa
lea ecx, [esi + 0xf]
push 0
push ecx
call fcn.1005b2c8
add esp, 0xc
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], edx
jmp 0x10051091
push str.close
push str.Connection:
push esi
call fcn.1004f010
add esp, 0xc
test al, al
je 0x10051016
mov byte [esp + 0x12], 1
jmp 0x10051091
push str.chunked
push str.Transfer_Encoding:
push esi
call fcn.1004f010
add esp, 0xc
test al, al
je 0x1005104c
push str.CONNECT_responded_chunked_n
push ebp
call fcn.1004ce40
mov edx, dword [esp + 0x50]
push edx
mov byte [esp + 0x1f], 1
call fcn.10052cc0
add esp, 0xc
jmp 0x10051091
push str.close
push str.Proxy_Connection:
push esi
call fcn.1004f010
add esp, 0xc
test al, al
je 0x1005106a
mov byte [esp + 0x12], 1
jmp 0x10051091
lea edi, [ebp + 0x90]
push edi
lea eax, [esp + 0x3c]
push eax
push str.HTTP_1._d__d
push esi
call fcn.10058f34
add esp, 0x10
cmp eax, 2
jne 0x10051091
mov ecx, dword [edi]
mov dword [ebp + 0x8564], ecx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x34]
mov byte [edx + esi], bl
mov ebx, dword [esp + 0x20]
lea esi, [eax + 1]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
add edi, 1
add ebx, 1
cmp edi, eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x34], edi
jl 0x10050ef0
jmp 0x100511f2
lea eax, [ebp + 0x464]
xor ecx, ecx
cmp dword [ebp + 0x90], 0x197
mov ebx, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], ebx
jne 0x10050df1
cmp byte [ebp + 0x8504], cl
jne 0x10050df1
mov edx, dword [esp + 0x3c]
or edx, dword [esp + 0x40]
mov dword [esp + 0x14], 2
je 0x1005115d
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
push eax
push ecx
push str.Ignore__lld_bytes_of_response_body_n
push ebp
call fcn.1004ce40
mov eax, dword [esp + 0x2c]
sub eax, edi
cdq
add esp, 0x10
sub dword [esp + 0x3c], eax
mov eax, dword [esp + 0x40]
sbb eax, edx
test eax, eax
mov dword [esp + 0x40], eax
jg 0x100511f2
jl 0x10051150
cmp dword [esp + 0x3c], 0
ja 0x100511f2
mov dword [esp + 0x14], 0
jmp 0x100511f2
cmp byte [esp + 0x13], 0
je 0x10050df1
mov edx, dword [esp + 0x1c]
sub edx, edi
push edx
push str._d_bytes_of_chunk_left_n
push ebp
mov byte [ebp + 0xc5], 1
call fcn.1004ce40
add esp, 0xc
cmp byte [esi + 1], 0xa
jne 0x10051190
add esi, 1
add edi, 1
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x4c]
sub ecx, edi
push ecx
lea edx, [esi + 1]
push edx
push eax
call fcn.10052ce0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x100511c7
push str.chunk_reading_DONE_n
push ebp
call fcn.1004ce40
mov dword [esp + 0x1c], 0
jmp 0x100511ef
mov ecx, dword [esp + 0x1c]
push ecx
push str.Read__d_bytes_of_chunk__continue_n
push ebp
call fcn.1004ce40
add esp, 0xc
jmp 0x100511f2
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push ebp
mov dword [esp + 0x30], 1
call fcn.1004ced0
add esp, 8
mov edx, dword [esp + 0x48]
push edx
call fcn.10051a70
add esp, 4
test eax, eax
jne 0x100512dc
mov edi, dword [esp + 0x24]
cmp edi, 0x4000
jb 0x10050d50
cmp dword [esp + 0x28], 0
jne 0x100512cf
cmp dword [ebp + 0x8564], 0xc8
mov esi, dword [esp + 0x48]
je 0x10051252
push esi
call fcn.1004f260
add esp, 4
test eax, eax
jne 0x1005137a
cmp byte [esi + 0x128], al
je 0x10051252
mov byte [esp + 0x12], 1
jmp 0x10051259
cmp byte [esp + 0x12], 0
je 0x10051266
cmp dword [ebp + 0xcc], 0
jne 0x100512e9
cmp dword [ebp + 0xcc], 0
je 0x10051306
mov ebx, dword [esp + 0x48]
xor edi, edi
jmp 0x10050ad0
push edi
call dword [0x1008f004]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x34
ret
mov eax, dword [esp + 0x18]
push eax
call dword [0x1008f004]
push ebx
call dword [0x1008f004]
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x34
ret
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push ebp
call fcn.1004ced0
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x34
ret
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x34
ret
mov edi, dword [esp + 0x4c]
mov ecx, dword [esi + edi*4 + 0xd4]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + edi*4 + 0xd4], 0xffffffff
mov eax, dword [ebp + 0x90]
cmp eax, 0xc8
je 0x10051346
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push ebp
call fcn.1004ced0
add esp, 0xc
cmp byte [esp + 0x12], 0
je 0x10051339
cmp dword [ebp + 0xcc], 0
je 0x10051339
mov byte [esi + 0x13e], 1
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x34
ret
mov edx, dword [esi + 0x14c]
push edx
call fcn.1004c680
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [esi + 0x14c], 0
push ebp
mov byte [ebp + 0x8500], 1
call fcn.1004ce40
add esp, 0xc
mov byte [ebp + 0xc5], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret