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

Disassembly:
sub esp, 0x38
push ebx
mov ebx, dword [esp + 0x40]
push ebp
mov ebp, dword [ebx]
push esi
push edi
xor edi, edi
mov dword [esp + 0x3c], edi
mov eax, dword [ebp + 0x170]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x30], eax
cmp eax, edi
jne 0x437e2d
mov dword [esp + 0x30], 0x36ee80
mov eax, dword [esp + 0x50]
mov ecx, dword [ebx + eax*4 + 0xa0]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
mov dword [esp + 0x2c], edi
mov byte [ebx + 0x121], 0
cmp byte [ebx + 0x119], 0
mov ecx, dword [esp + 0x54]
mov ax, word [esp + 0x58]
jne 0x438068
cmp byte [ebx + 0x118], 0
movzx esi, ax
push esi
push ecx
je 0x437e84
push str.Establish_HTTP_proxy_tunnel_to__s:_d_n
jmp 0x437e89
push str.Establish_HTTP_proxy_to__s:_d_n
push ebp
call fcn.004261e0
mov eax, dword [ebp + 0xcc]
add esp, 0x10
cmp eax, edi
je 0x437eac
push eax
call dword [0x522148]
add esp, 4
mov dword [ebp + 0xcc], edi
push 0xc
call dword [0x522144]
mov edi, eax
add esp, 4
test edi, edi
je 0x4385f6
mov edx, dword [esp + 0x54]
xor eax, eax
push esi
mov dword [edi], eax
push edx
mov dword [edi + 4], eax
push str._s:_d
mov dword [edi + 8], eax
call fcn.00428a20
add esp, 0xc
mov dword [esp + 0x24], eax
test eax, eax
je 0x4385ec
push 1
push eax
push str.CONNECT
mov esi, ebx
call fcn.00435cd0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x438039
mov eax, dword [esp + 0x18]
mov esi, 0x5116e8
push eax
mov ebx, str.Host:
mov ebp, esi
mov dword [esp + 0x2c], esi
call fcn.00435a10
add esp, 4
test eax, eax
jne 0x437f43
mov ebx, dword [esp + 0x24]
push ebx
push str.Host:__s_r_n
call fcn.00428a20
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x438603
mov ecx, dword [esp + 0x18]
push ecx
mov ebx, str.Proxy_Connection:
call fcn.00435a10
add esp, 4
test eax, eax
jne 0x437f61
mov dword [esp + 0x28], str.Proxy_Connection:_Keep_Alive_r_n
mov edx, dword [esp + 0x18]
push edx
mov ebx, str.User_Agent:
call fcn.00435a10
add esp, 4
test eax, eax
jne 0x437f8e
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x2fc], 0
je 0x437f8e
mov ecx, dword [esp + 0x4c]
mov esi, dword [ecx + 0x134]
mov edx, dword [esp + 0x4c]
mov eax, dword [edx + 0x130]
test eax, eax
jne 0x437fa1
mov eax, 0x5116e8
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x54]
push ecx
push esi
push eax
movzx eax, word [esp + 0x64]
push ebp
push eax
push edx
push str.CONNECT__s:_d_HTTP_1.0_r_n_s_s_s_s
mov eax, edi
call fcn.00436890
add esp, 0x1c
mov esi, eax
test ebp, ebp
je 0x437fd9
cmp byte [ebp], 0
je 0x437fd9
push ebp
call dword [0x522148]
add esp, 4
test esi, esi
jne 0x438021
mov ebx, dword [esp + 0x4c]
push edi
call fcn.00436950
mov esi, eax
add esp, 4
test esi, esi
jne 0x438021
push 0x4ef2f8
mov eax, edi
call fcn.00436890
mov esi, eax
add esp, 4
test esi, esi
jne 0x438021
mov ecx, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x1c]
add eax, 0x853c
push eax
push edi
mov edi, ebx
call fcn.00436210
add esp, 0xc
mov esi, eax
xor edi, edi
test esi, esi
je 0x438039
mov ecx, dword [esp + 0x18]
push str.Failed_sending_CONNECT_to_proxy
push ecx
call fcn.00426270
add esp, 8
mov edx, dword [esp + 0x24]
push edx
call dword [0x522148]
push edi
call fcn.00429b40
add esp, 8
test esi, esi
jne 0x438621
mov eax, dword [esp + 0x4c]
mov ebp, dword [esp + 0x18]
mov byte [eax + 0x119], 1
mov ebx, eax
xor edi, edi
mov ecx, dword [ebx + 0x94]
mov edx, dword [ebx + 0x90]
push ecx
push edx
call fcn.00434980
push edx
push eax
call fcn.004349b0
mov ecx, dword [esp + 0x40]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x43862b
cmp dword [ebp + 0x418], 2
jne 0x4380b4
mov edx, dword [esp + 0x34]
push edi
push 0xffffffffffffffff
push edx
call fcn.0043dfb0
add esp, 0xc
test eax, eax
je 0x4386d7
xor edi, edi
lea esi, [ebp + 0x434]
mov byte [ebx + 0x119], 0
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], 1
jmp 0x4380e0
cmp dword [esp + 0x14], 0
je 0x438572
cmp dword [esp + 0x2c], 0
jne 0x438698
mov eax, dword [ebx + 0x94]
mov ecx, dword [ebx + 0x90]
push eax
push ecx
call fcn.00434980
push edx
push eax
call fcn.004349b0
mov ecx, dword [esp + 0x40]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x4385d1
cmp ecx, 0x3e8
jl 0x43812e
mov ecx, 0x3e8
mov edx, dword [esp + 0x34]
push ecx
push 0xffffffffffffffff
push edx
call fcn.0043dfb0
add esp, 0xc
cmp eax, 0xffffffff
je 0x43853b
test eax, eax
je 0x438551
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x38]
mov ecx, 0x4000
sub ecx, edi
push ecx
push edx
push eax
push ebx
call fcn.00425ee0
add esp, 0x14
test eax, eax
jl 0x438566
xor ecx, ecx
cmp eax, ecx
je 0x438186
mov dword [esp + 0x14], ecx
jmp 0x438551
mov eax, dword [esp + 0x20]
cmp eax, ecx
jg 0x4381b8
mov dword [esp + 0x14], ecx
cmp dword [ebp + 0x104], ecx
je 0x4381ae
cmp dword [ebp + 0x84cc], ecx
je 0x4381ae
mov byte [ebx + 0x121], 1
jmp 0x438551
push str.Proxy_CONNECT_aborted
jmp 0x438540
add edi, eax
cmp dword [esp + 0x14], 1
mov dword [esp + 0x28], edi
jle 0x438252
mov edi, dword [esp + 0x44]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x40]
mov edx, ecx
or edx, edi
je 0x438207
cdq
sub ecx, eax
sbb edi, edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edi
test edi, edi
jg 0x438551
jl 0x4381fa
test ecx, ecx
ja 0x438551
mov dword [esp + 0x14], 0
jmp 0x438551
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x38]
push ecx
push eax
push edx
xor edi, edi
push ebx
mov dword [esp + 0x48], edi
call fcn.004407b0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x43823a
push str.chunk_reading_DONE_n
push ebp
call fcn.004261e0
mov dword [esp + 0x1c], edi
jmp 0x43854e
mov eax, dword [esp + 0x38]
push eax
push str.Read__d_bytes_of_chunk__continue_n
push ebp
call fcn.004261e0
add esp, 0xc
jmp 0x438551
xor edi, edi
mov dword [esp + 0x38], edi
test eax, eax
jle 0x438551
mov ecx, 1
mov edx, dword [esp + 0x24]
add dword [esp + 0x1c], ecx
cmp byte [edx], 0xa
jne 0x438428
cmp byte [ebp + 0x25c], 0
je 0x438291
mov eax, dword [esp + 0x1c]
push ebx
push eax
push esi
push 1
push ebp
call fcn.00426050
add esp, 0x14
cmp byte [ebp + 0x250], 0
mov eax, 2
je 0x4382a4
mov eax, 3
mov ecx, dword [esp + 0x1c]
push ecx
push esi
push eax
push ebx
call fcn.004263d0
add esp, 0x10
test eax, eax
jne 0x4386d9
mov al, byte [esi]
cmp al, 0xd
je 0x43843f
cmp al, 0xa
je 0x43843f
mov eax, dword [esp + 0x1c]
mov bl, byte [eax + esi]
push 0x11
push esi
push str.WWW_Authenticate:
mov byte [eax + esi], 0
call fcn.00432720
add esp, 0xc
test eax, eax
je 0x4382fa
mov eax, dword [ebp + 0x90]
cmp eax, 0x191
je 0x43831b
push 0x13
push esi
push str.Proxy_authenticate:
call fcn.00432720
add esp, 0xc
test eax, eax
je 0x438337
mov eax, dword [ebp + 0x90]
cmp eax, 0x197
jne 0x438337
mov edx, dword [esp + 0x4c]
push esi
push eax
push edx
call fcn.00435f60
add esp, 0xc
test eax, eax
jne 0x4386d9
jmp 0x438401
push 0xf
push esi
push str.Content_Length:
call fcn.00432720
add esp, 0xc
test eax, eax
je 0x438368
push 0xa
lea eax, [esi + 0xf]
push 0
push eax
call fcn.004ac28e
add esp, 0xc
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
jmp 0x438401
push str.close
push str.Connection:
push esi
call fcn.00436470
add esp, 0xc
test al, al
je 0x438386
mov byte [esp + 0x12], 1
jmp 0x438401
push str.chunked
push str.Transfer_Encoding:
push esi
call fcn.00436470
add esp, 0xc
test al, al
je 0x4383bc
push str.CONNECT_responded_chunked_n
push ebp
call fcn.004261e0
mov ecx, dword [esp + 0x54]
push ecx
mov byte [esp + 0x1f], 1
call fcn.00440790
add esp, 0xc
jmp 0x438401
push str.close
push str.Proxy_Connection:
push esi
call fcn.00436470
add esp, 0xc
test al, al
je 0x4383da
mov byte [esp + 0x12], 1
jmp 0x438401
lea edi, [ebp + 0x90]
push edi
lea edx, [esp + 0x40]
push edx
push str.HTTP_1._d__d
push esi
call fcn.004a9fba
add esp, 0x10
cmp eax, 2
jne 0x438401
mov eax, dword [edi]
mov dword [ebp + 0x852c], eax
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x38]
mov byte [ecx + esi], bl
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x1c], 0
lea esi, [edx + 1]
mov ecx, 1
add dword [esp + 0x24], ecx
add edi, ecx
cmp edi, eax
mov dword [esp + 0x38], edi
jl 0x438265
jmp 0x438551
xor eax, eax
cmp dword [ebp + 0x90], 0x197
mov dword [esp + 0x28], eax
jne 0x438535
cmp byte [ebp + 0x84d4], al
jne 0x438535
mov ecx, dword [esp + 0x40]
or ecx, dword [esp + 0x44]
mov dword [esp + 0x14], 2
je 0x4384c2
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
push edx
push eax
push str.Ignore__lld_bytes_of_response_body_n
push ebp
call fcn.004261e0
mov eax, dword [esp + 0x30]
sub eax, edi
cdq
add esp, 0x10
sub dword [esp + 0x40], eax
mov eax, dword [esp + 0x44]
sbb eax, edx
mov dword [esp + 0x44], eax
test eax, eax
jg 0x438551
jl 0x4384b5
cmp dword [esp + 0x40], 0
ja 0x438551
mov dword [esp + 0x14], 0
jmp 0x438551
cmp byte [esp + 0x13], 0
je 0x438535
mov ecx, dword [esp + 0x20]
sub ecx, edi
push ecx
push str._d_bytes_of_chunk_left_n
push ebp
mov byte [ebp + 0xc5], 1
call fcn.004261e0
add esp, 0xc
cmp byte [esi + 1], 0xa
jne 0x4384ed
inc esi
inc edi
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x20]
push edx
sub eax, edi
push eax
lea ecx, [esi + 1]
push ecx
push ebx
call fcn.004407b0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x438520
push str.chunk_reading_DONE_n
push ebp
call fcn.004261e0
mov dword [esp + 0x1c], 0
jmp 0x43854e
mov edx, dword [esp + 0x20]
push edx
push str.Read__d_bytes_of_chunk__continue_n
push ebp
call fcn.004261e0
add esp, 0xc
jmp 0x438551
mov dword [esp + 0x14], eax
jmp 0x438551
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push ebp
mov dword [esp + 0x34], 1
call fcn.00426270
add esp, 8
push ebx
call fcn.004351f0
add esp, 4
test eax, eax
jne 0x43863b
mov edi, dword [esp + 0x28]
cmp edi, 0x4000
jb 0x4380e0
cmp dword [esp + 0x2c], 0
jne 0x438698
cmp dword [ebp + 0x852c], 0xc8
je 0x4385a9
push ebx
call fcn.004366f0
add esp, 4
test eax, eax
jne 0x4386d9
cmp byte [ebx + 0x10c], al
je 0x4385a9
mov byte [esp + 0x12], 1
jmp 0x4385b0
cmp byte [esp + 0x12], 0
je 0x4385bd
cmp dword [ebp + 0xcc], 0
jne 0x438648
cmp dword [ebp + 0xcc], 0
je 0x438665
xor edi, edi
jmp 0x437e59
push str.Proxy_CONNECT_aborted_due_to_timeout
push ebp
call fcn.00426270
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x38
ret
push edi
call dword [0x522148]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x38
ret
push edi
call dword [0x522148]
push ebx
call dword [0x522148]
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x38
ret
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push ebp
call fcn.00426270
add esp, 8
jmp 0x438665
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x38
ret
mov esi, dword [esp + 0x50]
mov eax, dword [ebx + esi*4 + 0xa0]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx + esi*4 + 0xa0], 0xffffffff
mov eax, dword [ebp + 0x90]
cmp eax, 0xc8
je 0x4386a5
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push ebp
call fcn.00426270
add esp, 0xc
cmp byte [esp + 0x12], 0
je 0x438698
cmp dword [ebp + 0xcc], 0
je 0x438698
mov byte [ebx + 0x121], 1
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x38
ret
mov ecx, dword [ebx + 0x130]
push ecx
call fcn.00429b40
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [ebx + 0x130], 0
push ebp
mov byte [ebp + 0x84d0], 1
call fcn.004261e0
add esp, 0xc
mov byte [ebp + 0xc5], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret