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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [eax]
xor ebx, ebx
mov dword [ebp - 0x3c], ebx
mov ecx, dword [esi + 0x194]
push edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x28], ecx
cmp ecx, ebx
jne 0x4219ea
mov dword [ebp - 0x28], 0x36ee80
mov ecx, dword [ebp + 0xc]
mov edx, dword [eax + ecx*4 + 0x12c]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x20], ebx
mov dword [eax + 0x1ec], ebx
lea esp, [esp]
cmp dword [eax + 0x1c8], ebx
jne 0x421c0d
movzx edi, word [ebp + 0x14]
mov eax, dword [ebp + 0x10]
push edi
push eax
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push esi
call fcn.0042d0e0
mov eax, dword [esi + 0xd4]
add esp, 0x10
cmp eax, ebx
je 0x421a4d
push eax
call dword [0x4944a8]
add esp, 4
mov dword [esi + 0xd4], ebx
push 0xc
push 1
call dword [0x4944b4]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x42215e
mov ecx, dword [ebp + 0x10]
push edi
push ecx
push str._s:_hu
call dword [0x48e09c]
add esp, 0xc
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x422154
mov esi, dword [ebp + 8]
push 1
mov edx, eax
push edx
push str.CONNECT
call fcn.0041eb20
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x421be0
mov eax, dword [ebp + 8]
cmp dword [eax + 0x110], 1
mov edi, 0x47e6f1
mov esi, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], 0x480dcc
je 0x421ac5
mov dword [ebp - 0x10], 0x480dd0
mov ecx, dword [ebp - 0xc]
push str.Host:
push ecx
call fcn.0041e610
add esp, 8
test eax, eax
jne 0x421af6
mov edx, dword [ebp - 0x1c]
push edx
push str.Host:__s_r_n
call dword [0x48e09c]
mov esi, eax
add esp, 8
test esi, esi
je 0x42216a
mov eax, dword [ebp - 0xc]
push str.Proxy_Connection:
push eax
call fcn.0041e610
add esp, 8
test eax, eax
jne 0x421b12
mov dword [ebp - 0x14], str.Proxy_Connection:_Keep_Alive_r_n
mov ecx, dword [ebp - 0xc]
push str.User_Agent:
push ecx
call fcn.0041e610
add esp, 8
test eax, eax
jne 0x421b3b
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x394], eax
je 0x421b3b
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x20c]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x208]
test eax, eax
jne 0x421b4d
mov eax, 0x47e6f1
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x10]
push edx
push edi
push eax
mov eax, dword [ebp - 0x10]
push esi
push eax
movzx eax, word [ebp + 0x14]
push eax
push ecx
push str.CONNECT__s:_hu_HTTP__s_r_n_s_s_s_s
push ebx
call fcn.0041f6b0
add esp, 0x24
mov edi, eax
test esi, esi
je 0x421b84
cmp byte [esi], 0
je 0x421b84
push esi
call dword [0x4944a8]
add esp, 4
test edi, edi
jne 0x421bc9
mov esi, dword [ebp + 8]
push ebx
push esi
call fcn.0041f7b0
mov edi, eax
add esp, 8
test edi, edi
jne 0x421bc9
push 0x47fbdc
push ebx
call fcn.0041f6b0
mov edi, eax
add esp, 8
test edi, edi
jne 0x421bc9
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, dword [ebp - 0xc]
add eax, 0x868c
push eax
push esi
push ebx
call fcn.0041eec0
add esp, 0x14
mov edi, eax
xor ebx, ebx
test edi, edi
je 0x421be0
mov ecx, dword [ebp - 0xc]
push str.Failed_sending_CONNECT_to_proxy
push ecx
call fcn.0042d160
add esp, 8
mov edx, dword [ebp - 0x1c]
push edx
call dword [0x4944a8]
push ebx
call sym.ali213_engine_v1.exe_curl_free
add esp, 8
test edi, edi
jne 0x42218a
mov eax, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
mov dword [eax + 0x1c8], 1
xor ebx, ebx
mov ecx, dword [eax + 0x120]
mov edx, dword [eax + 0x11c]
push ecx
push edx
call fcn.004344b0
push edx
push eax
call fcn.004344e0
mov ecx, dword [ebp - 0x28]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x422193
cmp dword [esi + 0x510], 2
jne 0x421c57
mov edx, dword [ebp - 0x2c]
push ebx
push 0xffffffffffffffff
push edx
call fcn.0042c700
add esp, 0xc
test eax, eax
je 0x422249
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c8], ebx
lea edi, [esi + 0x52c]
xor ebx, ebx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 8], 1
jmp 0x421c80
cmp dword [ebp - 8], 0
je 0x4220f1
cmp dword [ebp - 0x20], 0
jne 0x4221a1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x120]
mov edx, dword [eax + 0x11c]
push ecx
push edx
call fcn.004344b0
push edx
push eax
call fcn.004344e0
mov ecx, dword [ebp - 0x28]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x422193
cmp ecx, 0x3e8
jl 0x421cce
mov ecx, 0x3e8
mov eax, dword [ebp - 0x2c]
push ecx
push 0xffffffffffffffff
push eax
call fcn.0042c700
add esp, 0xc
cmp eax, 0xffffffff
je 0x4220bb
test eax, eax
je 0x4220d0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 0x2c]
mov edx, 0x4000
sub edx, dword [ebp - 0x1c]
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
call fcn.0042ce00
add esp, 0x14
cmp eax, 0x51
je 0x4220e4
xor ecx, ecx
cmp eax, ecx
je 0x421d26
mov dword [ebp - 8], ecx
jmp 0x4220d0
mov eax, dword [ebp - 0x18]
cmp eax, ecx
jg 0x421d5c
mov dword [ebp - 8], ecx
cmp dword [esi + 0x118], ecx
je 0x421d52
cmp dword [esi + 0x85cc], ecx
je 0x421d52
mov eax, dword [ebp + 8]
mov dword [eax + 0x1ec], 1
jmp 0x4220d0
push str.Proxy_CONNECT_aborted
jmp 0x4220c0
add dword [ebp - 0x1c], eax
cmp dword [ebp - 8], 1
jle 0x421df5
mov edx, dword [ebp - 0x44]
or edx, dword [ebp - 0x40]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x10], ecx
je 0x421da6
cdq
sub dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
sbb eax, edx
mov dword [ebp - 0x40], eax
test eax, eax
jg 0x4220d0
jl 0x421d9a
cmp dword [ebp - 0x44], 0
ja 0x4220d0
mov dword [ebp - 8], 0
jmp 0x4220d0
mov edx, dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
push ecx
push eax
mov eax, dword [ebp + 8]
push edx
push eax
mov dword [ebp - 0x14], 0
call fcn.00422300
add esp, 0x10
cmp eax, 0xffffffff
jne 0x421dde
push str.chunk_reading_DONE_n
push esi
call fcn.0042d0e0
mov dword [ebp - 8], 0
jmp 0x4220cd
mov ecx, dword [ebp - 0x14]
push ecx
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.0042d0e0
add esp, 0xc
jmp 0x4220d0
mov dword [ebp - 0x14], ecx
cmp eax, ecx
jle 0x4220d0
jmp 0x421e04
xor ecx, ecx
mov edx, dword [ebp - 0x10]
inc ebx
cmp byte [edx], 0xa
mov dword [ebp - 0x30], ebx
jne 0x421fb7
cmp dword [esi + 0x2d8], ecx
je 0x421e2d
mov eax, dword [ebp + 8]
push eax
push ebx
push edi
push 1
push esi
call fcn.0042cf40
add esp, 0x14
cmp dword [esi + 0x2bc], 0
mov eax, 2
je 0x421e40
mov eax, 3
mov ecx, dword [ebp + 8]
push ebx
push edi
push eax
push ecx
call fcn.0042d570
add esp, 0x10
test eax, eax
jne 0x42224b
mov al, byte [edi]
cmp al, 0xd
je 0x421fce
cmp al, 0xa
je 0x421fce
mov dl, byte [ebx + edi]
push 0x11
push edi
push str.WWW_Authenticate:
mov byte [ebp - 1], dl
mov byte [ebx + edi], 0
call fcn.0042b720
add esp, 0xc
test eax, eax
je 0x421e94
mov eax, dword [esi + 0x90]
cmp eax, 0x191
je 0x421eb5
push 0x13
push edi
push str.Proxy_authenticate:
call fcn.0042b720
add esp, 0xc
test eax, eax
je 0x421ed0
mov eax, dword [esi + 0x90]
cmp eax, 0x197
jne 0x421ed0
push edi
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.0041ec30
add esp, 0xc
test eax, eax
jne 0x42224b
jmp 0x421fa5
push 0xf
push edi
push str.Content_Length:
call fcn.0042b720
add esp, 0xc
test eax, eax
je 0x421eff
push 0xa
lea ecx, [edi + 0xf]
push 0
push ecx
call fcn.0045ec15
add esp, 0xc
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], edx
jmp 0x421fa5
push str.close
push str.Connection:
push edi
call fcn.0041f130
add esp, 0xc
test eax, eax
je 0x421f22
mov dword [ebp - 0x24], 1
jmp 0x421fa5
push str.chunked
push str.Transfer_Encoding:
push edi
call fcn.0041f130
add esp, 0xc
test eax, eax
je 0x421f59
push str.CONNECT_responded_chunked_n
push esi
call fcn.0042d0e0
mov edx, dword [ebp + 8]
push edx
mov dword [ebp - 0x38], 1
call fcn.004222e0
add esp, 0xc
jmp 0x421fa5
push str.close
push str.Proxy_Connection:
push edi
call fcn.0041f130
add esp, 0xc
test eax, eax
je 0x421f79
mov dword [ebp - 0x24], 1
jmp 0x421fa5
mov ebx, dword [ebp - 0xc]
lea esi, [ebx + 0x90]
push esi
lea eax, [ebp - 0x3c]
push eax
push str.HTTP_1._d__d
push edi
call fcn.0045e263
add esp, 0x10
cmp eax, 2
jne 0x421fa2
mov ecx, dword [esi]
mov dword [ebx + 0x8678], ecx
mov ebx, dword [ebp - 0x30]
mov dl, byte [ebp - 1]
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0xc]
mov byte [ebx + edi], dl
mov edi, dword [ebp - 0x10]
xor ebx, ebx
inc edi
mov ecx, dword [ebp - 0x14]
inc dword [ebp - 0x10]
inc ecx
mov dword [ebp - 0x14], ecx
cmp ecx, eax
jl 0x421e02
jmp 0x4220d0
mov ecx, dword [ebp - 0x34]
xor eax, eax
cmp dword [esi + 0x90], 0x197
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x10], ecx
jne 0x4220b6
cmp dword [esi + 0x85dc], eax
jne 0x4220b6
mov edx, dword [ebp - 0x44]
or edx, dword [ebp - 0x40]
mov dword [ebp - 8], 2
je 0x422050
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x44]
push eax
push ecx
push str.Ignore__lld_bytes_of_response_body_n
push esi
call fcn.0042d0e0
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x14]
add esp, 0x10
cdq
sub dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
sbb eax, edx
mov dword [ebp - 0x40], eax
test eax, eax
jg 0x4220d0
jl 0x421d9a
cmp dword [ebp - 0x44], 0
ja 0x4220d0
mov dword [ebp - 8], 0
jmp 0x4220d0
cmp dword [ebp - 0x38], eax
je 0x4220b6
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 0x14]
mov dword [esi + 0xc8], 1
push edx
push str._zd_bytes_of_chunk_left_n
push esi
call fcn.0042d0e0
add esp, 0xc
cmp byte [edi + 1], 0xa
jne 0x42207e
inc edi
inc dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp + 8]
push ecx
lea edx, [edi + 1]
push edx
push eax
call fcn.00422300
add esp, 0x10
cmp eax, 0xffffffff
je 0x421dc7
mov ecx, dword [ebp - 0x18]
push ecx
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.0042d0e0
add esp, 0xc
jmp 0x4220d0
mov dword [ebp - 8], eax
jmp 0x4220d0
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push esi
mov dword [ebp - 0x20], 1
call fcn.0042d160
add esp, 8
mov edx, dword [ebp + 8]
push edx
call fcn.0042add0
add esp, 4
test eax, eax
jne 0x4221ad
cmp dword [ebp - 0x1c], 0x4000
jb 0x421c80
cmp dword [ebp - 0x20], 0
jne 0x4221a1
cmp dword [esi + 0x8678], 0xc8
mov edi, dword [ebp + 8]
je 0x42212d
push edi
call fcn.0041f4e0
add esp, 4
test eax, eax
jne 0x42224b
cmp dword [edi + 0x194], eax
je 0x42212d
mov ebx, 1
mov dword [ebp - 0x24], ebx
jmp 0x422134
mov ebx, dword [ebp - 0x24]
test ebx, ebx
je 0x42213d
cmp dword [esi + 0xd4], 0
jne 0x4221b9
cmp dword [esi + 0xd4], 0
je 0x4221d8
mov eax, dword [ebp + 8]
xor ebx, ebx
jmp 0x421a10
push ebx
call dword [0x4944a8]
add esp, 4
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [0x4944a8]
mov eax, dword [ebp - 0x1c]
push eax
call dword [0x4944a8]
add esp, 8
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.0042d160
add esp, 8
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x2a
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov edx, dword [edi + ecx*4 + 0x12c]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp + 0xc]
mov dword [edi + eax*4 + 0x12c], 0xffffffff
mov eax, dword [esi + 0x90]
cmp eax, 0xc8
je 0x422217
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.0042d160
add esp, 0xc
test ebx, ebx
je 0x42220b
cmp dword [esi + 0xd4], 0
je 0x42220b
mov dword [edi + 0x1ec], 1
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 0x208]
push ecx
call sym.ali213_engine_v1.exe_curl_free
xor ebx, ebx
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [edi + 0x208], ebx
push esi
mov dword [esi + 0x85d0], 1
call fcn.0042d0e0
add esp, 0xc
mov dword [esi + 0xc8], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret