Function at 0x421b80
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 0x421baa
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 0x421dcd
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.0042d2e0
mov eax, dword [esi + 0xd4]
add esp, 0x10
cmp eax, ebx
je 0x421c0d
push eax
call dword [0x4ab4a8]
add esp, 4
mov dword [esi + 0xd4], ebx
push 0xc
push 1
call dword [0x4ab4b4]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x42231e
mov ecx, dword [ebp + 0x10]
push edi
push ecx
push str._s:_hu
call dword [0x4a3ab0]
add esp, 0xc
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x422314
mov esi, dword [ebp + 8]
push 1
mov edx, eax
push edx
push str.CONNECT
call fcn.0041ed10
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x421da0
mov eax, dword [ebp + 8]
cmp dword [eax + 0x110], 1
mov edi, 0x492821
mov esi, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], 0x494f1c
je 0x421c85
mov dword [ebp - 0x10], 0x494f20
mov ecx, dword [ebp - 0xc]
push str.Host:
push ecx
call fcn.0041e800
add esp, 8
test eax, eax
jne 0x421cb6
mov edx, dword [ebp - 0x1c]
push edx
push str.Host:__s_r_n
call dword [0x4a3ab0]
mov esi, eax
add esp, 8
test esi, esi
je 0x42232a
mov eax, dword [ebp - 0xc]
push str.Proxy_Connection:
push eax
call fcn.0041e800
add esp, 8
test eax, eax
jne 0x421cd2
mov dword [ebp - 0x14], str.Proxy_Connection:_Keep_Alive_r_n
mov ecx, dword [ebp - 0xc]
push str.User_Agent:
push ecx
call fcn.0041e800
add esp, 8
test eax, eax
jne 0x421cfb
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x394], eax
je 0x421cfb
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x20c]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x208]
test eax, eax
jne 0x421d0d
mov eax, 0x492821
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.0041f880
add esp, 0x24
mov edi, eax
test esi, esi
je 0x421d44
cmp byte [esi], 0
je 0x421d44
push esi
call dword [0x4ab4a8]
add esp, 4
test edi, edi
jne 0x421d89
mov esi, dword [ebp + 8]
push ebx
push esi
call fcn.0041f980
mov edi, eax
add esp, 8
test edi, edi
jne 0x421d89
push 0x493d2c
push ebx
call fcn.0041f880
mov edi, eax
add esp, 8
test edi, edi
jne 0x421d89
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.0041f0b0
add esp, 0x14
mov edi, eax
xor ebx, ebx
test edi, edi
je 0x421da0
mov ecx, dword [ebp - 0xc]
push str.Failed_sending_CONNECT_to_proxy
push ecx
call fcn.0042d360
add esp, 8
mov edx, dword [ebp - 0x1c]
push edx
call dword [0x4ab4a8]
push ebx
call sym.XiuMaster_v3.exe_curl_free
add esp, 8
test edi, edi
jne 0x42234a
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.004346d0
push edx
push eax
call fcn.00434700
mov ecx, dword [ebp - 0x28]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x422353
cmp dword [esi + 0x510], 2
jne 0x421e17
mov edx, dword [ebp - 0x2c]
push ebx
push 0xffffffffffffffff
push edx
call fcn.0042c900
add esp, 0xc
test eax, eax
je 0x422409
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 0x421e40
cmp dword [ebp - 8], 0
je 0x4222b1
cmp dword [ebp - 0x20], 0
jne 0x422361
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x120]
mov edx, dword [eax + 0x11c]
push ecx
push edx
call fcn.004346d0
push edx
push eax
call fcn.00434700
mov ecx, dword [ebp - 0x28]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x422353
cmp ecx, 0x3e8
jl 0x421e8e
mov ecx, 0x3e8
mov eax, dword [ebp - 0x2c]
push ecx
push 0xffffffffffffffff
push eax
call fcn.0042c900
add esp, 0xc
cmp eax, 0xffffffff
je 0x42227b
test eax, eax
je 0x422290
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.0042d000
add esp, 0x14
cmp eax, 0x51
je 0x4222a4
xor ecx, ecx
cmp eax, ecx
je 0x421ee6
mov dword [ebp - 8], ecx
jmp 0x422290
mov eax, dword [ebp - 0x18]
cmp eax, ecx
jg 0x421f1c
mov dword [ebp - 8], ecx
cmp dword [esi + 0x118], ecx
je 0x421f12
cmp dword [esi + 0x85cc], ecx
je 0x421f12
mov eax, dword [ebp + 8]
mov dword [eax + 0x1ec], 1
jmp 0x422290
push str.Proxy_CONNECT_aborted
jmp 0x422280
add dword [ebp - 0x1c], eax
cmp dword [ebp - 8], 1
jle 0x421fb5
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 0x421f66
cdq
sub dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
sbb eax, edx
mov dword [ebp - 0x40], eax
test eax, eax
jg 0x422290
jl 0x421f5a
cmp dword [ebp - 0x44], 0
ja 0x422290
mov dword [ebp - 8], 0
jmp 0x422290
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.004224c0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x421f9e
push str.chunk_reading_DONE_n
push esi
call fcn.0042d2e0
mov dword [ebp - 8], 0
jmp 0x42228d
mov ecx, dword [ebp - 0x14]
push ecx
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.0042d2e0
add esp, 0xc
jmp 0x422290
mov dword [ebp - 0x14], ecx
cmp eax, ecx
jle 0x422290
jmp 0x421fc4
xor ecx, ecx
mov edx, dword [ebp - 0x10]
inc ebx
cmp byte [edx], 0xa
mov dword [ebp - 0x30], ebx
jne 0x422177
cmp dword [esi + 0x2d8], ecx
je 0x421fed
mov eax, dword [ebp + 8]
push eax
push ebx
push edi
push 1
push esi
call fcn.0042d140
add esp, 0x14
cmp dword [esi + 0x2bc], 0
mov eax, 2
je 0x422000
mov eax, 3
mov ecx, dword [ebp + 8]
push ebx
push edi
push eax
push ecx
call fcn.0042d770
add esp, 0x10
test eax, eax
jne 0x42240b
mov al, byte [edi]
cmp al, 0xd
je 0x42218e
cmp al, 0xa
je 0x42218e
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.0042b900
add esp, 0xc
test eax, eax
je 0x422054
mov eax, dword [esi + 0x90]
cmp eax, 0x191
je 0x422075
push 0x13
push edi
push str.Proxy_authenticate:
call fcn.0042b900
add esp, 0xc
test eax, eax
je 0x422090
mov eax, dword [esi + 0x90]
cmp eax, 0x197
jne 0x422090
push edi
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.0041ee20
add esp, 0xc
test eax, eax
jne 0x42240b
jmp 0x422165
push 0xf
push edi
push str.Content_Length:
call fcn.0042b900
add esp, 0xc
test eax, eax
je 0x4220bf
push 0xa
lea ecx, [edi + 0xf]
push 0
push ecx
call fcn.0046dce5
add esp, 0xc
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], edx
jmp 0x422165
push str.close
push str.Connection:
push edi
call fcn.0041f320
add esp, 0xc
test eax, eax
je 0x4220e2
mov dword [ebp - 0x24], 1
jmp 0x422165
push str.chunked
push str.Transfer_Encoding:
push edi
call fcn.0041f320
add esp, 0xc
test eax, eax
je 0x422119
push str.CONNECT_responded_chunked_n
push esi
call fcn.0042d2e0
mov edx, dword [ebp + 8]
push edx
mov dword [ebp - 0x38], 1
call fcn.004224a0
add esp, 0xc
jmp 0x422165
push str.close
push str.Proxy_Connection:
push edi
call fcn.0041f320
add esp, 0xc
test eax, eax
je 0x422139
mov dword [ebp - 0x24], 1
jmp 0x422165
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.0046d333
add esp, 0x10
cmp eax, 2
jne 0x422162
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 0x421fc2
jmp 0x422290
mov ecx, dword [ebp - 0x34]
xor eax, eax
cmp dword [esi + 0x90], 0x197
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x10], ecx
jne 0x422276
cmp dword [esi + 0x85dc], eax
jne 0x422276
mov edx, dword [ebp - 0x44]
or edx, dword [ebp - 0x40]
mov dword [ebp - 8], 2
je 0x422210
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.0042d2e0
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 0x422290
jl 0x421f5a
cmp dword [ebp - 0x44], 0
ja 0x422290
mov dword [ebp - 8], 0
jmp 0x422290
cmp dword [ebp - 0x38], eax
je 0x422276
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.0042d2e0
add esp, 0xc
cmp byte [edi + 1], 0xa
jne 0x42223e
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.004224c0
add esp, 0x10
cmp eax, 0xffffffff
je 0x421f87
mov ecx, dword [ebp - 0x18]
push ecx
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.0042d2e0
add esp, 0xc
jmp 0x422290
mov dword [ebp - 8], eax
jmp 0x422290
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push esi
mov dword [ebp - 0x20], 1
call fcn.0042d360
add esp, 8
mov edx, dword [ebp + 8]
push edx
call fcn.0042afb0
add esp, 4
test eax, eax
jne 0x42236d
cmp dword [ebp - 0x1c], 0x4000
jb 0x421e40
cmp dword [ebp - 0x20], 0
jne 0x422361
cmp dword [esi + 0x8678], 0xc8
mov edi, dword [ebp + 8]
je 0x4222ed
push edi
call fcn.0041f6b0
add esp, 4
test eax, eax
jne 0x42240b
cmp dword [edi + 0x194], eax
je 0x4222ed
mov ebx, 1
mov dword [ebp - 0x24], ebx
jmp 0x4222f4
mov ebx, dword [ebp - 0x24]
test ebx, ebx
je 0x4222fd
cmp dword [esi + 0xd4], 0
jne 0x422379
cmp dword [esi + 0xd4], 0
je 0x422398
mov eax, dword [ebp + 8]
xor ebx, ebx
jmp 0x421bd0
push ebx
call dword [0x4ab4a8]
add esp, 4
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [0x4ab4a8]
mov eax, dword [ebp - 0x1c]
push eax
call dword [0x4ab4a8]
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.0042d360
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 0x4223d7
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.0042d360
add esp, 0xc
test ebx, ebx
je 0x4223cb
cmp dword [esi + 0xd4], 0
je 0x4223cb
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.XiuMaster_v3.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.0042d2e0
add esp, 0xc
mov dword [esi + 0xc8], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret