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

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x50]
mov ebp, dword [edi]
xor ebx, ebx
mov dword [esp + 0x40], ebx
mov eax, dword [ebp + 0x19c]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x34], eax
cmp eax, ebx
jne 0x101314dd
mov dword [esp + 0x34], 0x36ee80
mov eax, dword [esp + 0x54]
mov ecx, dword [edi + eax*4 + 0xc8]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x2c], ebx
mov dword [edi + 0x188], ebx
jmp 0x10131510
cmp dword [edi + 0x164], ebx
jne 0x10131709
mov eax, dword [ebp + 0xd4]
cmp eax, ebx
je 0x10131536
push eax
call dword [0x101c2cac]
add esp, 4
mov dword [ebp + 0xd4], ebx
push 0xc
push 1
call dword [0x101c2cb8]
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x10131c03
movzx eax, word [esp + 0x5c]
mov edx, dword [esp + 0x58]
push eax
push edx
push str._s:_hu
call fcn.101293f0
add esp, 0xc
mov dword [esp + 0x24], eax
cmp eax, ebx
je 0x10131bf9
push 1
push eax
push str.CONNECT
mov eax, edi
call fcn.1012f400
mov esi, eax
add esp, 0xc
cmp esi, ebx
jne 0x101316d7
mov eax, dword [esp + 0x50]
cmp dword [eax + 0xac], 1
mov edi, 0x101a58ac
mov ebx, edi
mov esi, edi
mov dword [esp + 0x20], 0x101a085c
je 0x101315b3
mov dword [esp + 0x20], 0x101a0860
mov ecx, dword [esp + 0x14]
push str.Host:
push ecx
call fcn.1012ef60
add esp, 8
test eax, eax
jne 0x101315e5
mov edx, dword [esp + 0x24]
push edx
push str.Host:__s_r_n
call fcn.101293f0
mov edi, eax
add esp, 8
test edi, edi
je 0x10131c10
mov eax, dword [esp + 0x14]
push str.Proxy_Connection:
push eax
call fcn.1012ef60
add esp, 8
test eax, eax
jne 0x10131600
mov ebx, str.Proxy_Connection:_Keep_Alive_r_n
mov ecx, dword [esp + 0x14]
push str.User_Agent:
push ecx
call fcn.1012ef60
add esp, 8
test eax, eax
jne 0x1013162c
mov edx, dword [esp + 0x14]
cmp dword [edx + 0x394], eax
je 0x1013162c
mov eax, dword [esp + 0x50]
mov esi, dword [eax + 0x1a0]
mov ecx, dword [esp + 0x50]
mov eax, dword [ecx + 0x19c]
test eax, eax
jne 0x1013163f
mov eax, 0x101a58ac
mov edx, dword [esp + 0x20]
push ebx
push esi
push eax
movzx eax, word [esp + 0x68]
push edi
push edx
push eax
mov eax, dword [esp + 0x70]
push eax
push str.CONNECT__s:_hu_HTTP__s_r_n_s_s_s_s
push ebp
call fcn.1012fdd0
add esp, 0x24
mov esi, eax
test edi, edi
je 0x10131676
cmp byte [edi], 0
je 0x10131676
push edi
call dword [0x101c2cac]
add esp, 4
test esi, esi
jne 0x101316bf
mov edi, dword [esp + 0x50]
push ebp
push edi
call fcn.1012fed0
mov esi, eax
add esp, 8
test esi, esi
jne 0x101316bf
push 0x101a70e0
push ebp
call fcn.1012fdd0
mov esi, eax
add esp, 8
test esi, esi
jne 0x101316bf
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x14]
push ecx
push eax
add edx, 0x867c
push edx
push edi
push ebp
call fcn.1012f740
add esp, 0x14
mov esi, eax
xor ebp, ebp
test esi, esi
je 0x101316d7
mov eax, dword [esp + 0x14]
push str.Failed_sending_CONNECT_to_proxy
push eax
call fcn.101274f0
add esp, 8
mov ecx, dword [esp + 0x24]
push ecx
call dword [0x101c2cac]
push ebp
call fcn.101265a0
add esp, 8
test esi, esi
jne 0x10131c32
mov edx, dword [esp + 0x50]
mov ebp, dword [esp + 0x14]
mov dword [edx + 0x164], 1
mov edi, edx
xor ebx, ebx
mov eax, dword [edi + 0xbc]
mov ecx, dword [edi + 0xb8]
push eax
push ecx
call fcn.10132df0
push edx
push eax
call fcn.10132e20
mov edx, dword [esp + 0x44]
sub edx, eax
add esp, 0x10
test edx, edx
jle 0x10131c3c
cmp dword [ebp + 0x508], 2
jne 0x10131755
mov eax, dword [esp + 0x38]
push ebx
push 0xffffffffffffffff
push eax
call fcn.10131f00
add esp, 0xc
test eax, eax
je 0x10131ce8
xor ecx, ecx
lea eax, [ebp + 0x524]
mov ebx, eax
mov dword [edi + 0x164], ecx
mov dword [esp + 0x24], ebx
mov esi, ebx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], 1
jmp 0x10131780
cmp dword [esp + 0x10], 0
je 0x10131b99
cmp dword [esp + 0x2c], 0
jne 0x10131c4a
mov ecx, dword [edi + 0xbc]
mov edx, dword [edi + 0xb8]
push ecx
push edx
call fcn.10132df0
push edx
push eax
call fcn.10132e20
mov ecx, dword [esp + 0x44]
sub ecx, eax
add esp, 0x10
test ecx, ecx
jle 0x10131c3c
cmp ecx, 0x3e8
jl 0x101317ce
mov ecx, 0x3e8
mov eax, dword [esp + 0x38]
push ecx
push 0xffffffffffffffff
push eax
call fcn.10131f00
add esp, 0xc
cmp eax, 0xffffffff
je 0x10131b64
test eax, eax
je 0x10131b7a
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x28]
push ecx
mov edx, 0x4000
sub edx, dword [esp + 0x24]
push edx
push ebx
push eax
push edi
call fcn.10127220
add esp, 0x14
cmp eax, 0x51
je 0x10131b8b
xor ecx, ecx
cmp eax, ecx
je 0x10131825
mov dword [esp + 0x10], ecx
jmp 0x10131b7a
mov eax, dword [esp + 0x28]
cmp eax, ecx
jg 0x1013185a
mov dword [esp + 0x10], ecx
cmp dword [ebp + 0x120], ecx
je 0x10131850
cmp dword [ebp + 0x85c4], ecx
je 0x10131850
mov dword [edi + 0x188], 1
jmp 0x10131b7a
push str.Proxy_CONNECT_aborted
jmp 0x10131b69
add dword [esp + 0x20], eax
cmp dword [esp + 0x10], 1
jle 0x101318de
mov dword [esp + 0x20], ecx
lea ecx, [ebp + 0x524]
mov ebx, ecx
mov ecx, dword [esp + 0x44]
or ecx, dword [esp + 0x48]
mov dword [esp + 0x24], ebx
je 0x101318b0
cdq
sub dword [esp + 0x44], eax
mov eax, dword [esp + 0x48]
sbb eax, edx
mov dword [esp + 0x48], eax
test eax, eax
jg 0x10131b7a
jl 0x101318a3
cmp dword [esp + 0x44], 0
ja 0x10131b7a
mov dword [esp + 0x10], 0
jmp 0x10131b7a
lea edx, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x24], 0
push ebx
push edi
call fcn.10134730
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10131b7a
mov dword [esp + 0x10], 0
jmp 0x10131b7a
cmp eax, ecx
mov dword [esp + 0x1c], ecx
jle 0x10131b7a
jmp 0x101318f2
xor ecx, ecx
inc dword [esp + 0x18]
cmp byte [ebx], 0xa
jne 0x10131aa1
cmp dword [ebp + 0x2d8], ecx
je 0x10131919
mov eax, dword [esp + 0x18]
push edi
push eax
push esi
push 1
push ebp
call fcn.10127360
add esp, 0x14
cmp dword [ebp + 0x2bc], 0
mov eax, 2
je 0x1013192c
mov eax, 3
mov ecx, dword [esp + 0x18]
push ecx
push esi
push eax
push edi
call fcn.10127650
add esp, 0x10
test eax, eax
jne 0x10131cea
mov al, byte [esi]
cmp al, 0xd
je 0x10131abc
cmp al, 0xa
je 0x10131abc
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.10133a40
add esp, 0xc
test eax, eax
je 0x10131982
mov eax, dword [ebp + 0x90]
cmp eax, 0x191
je 0x101319a3
push 0x13
push esi
push str.Proxy_authenticate:
call fcn.10133a40
add esp, 0xc
test eax, eax
je 0x101319bb
mov eax, dword [ebp + 0x90]
cmp eax, 0x197
jne 0x101319bb
push esi
push eax
push edi
call fcn.1012f500
add esp, 0xc
test eax, eax
jne 0x10131cea
jmp 0x10131a83
push 0xf
push esi
push str.Content_Length:
call fcn.10133a40
add esp, 0xc
test eax, eax
je 0x101319ec
push 0xa
lea edx, [esi + 0xf]
push 0
push edx
call fcn.10146b16
add esp, 0xc
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
jmp 0x10131a83
push str.close
push str.Connection:
push esi
call fcn.1012f9c0
add esp, 0xc
test eax, eax
je 0x10131a0d
mov dword [esp + 0x30], 1
jmp 0x10131a83
push str.chunked
push str.Transfer_Encoding:
push esi
call fcn.1012f9c0
add esp, 0xc
test eax, eax
je 0x10131a37
push edi
mov dword [esp + 0x40], 1
call fcn.10134710
add esp, 4
jmp 0x10131a83
push str.close
push str.Proxy_Connection:
push esi
call fcn.1012f9c0
add esp, 0xc
test eax, eax
je 0x10131a58
mov dword [esp + 0x30], 1
jmp 0x10131a83
lea edi, [ebp + 0x90]
push edi
lea eax, [esp + 0x44]
push eax
push str.HTTP_1._d__d
push esi
call fcn.10140536
add esp, 0x10
cmp eax, 2
jne 0x10131a7f
mov ecx, dword [edi]
mov dword [ebp + 0x8668], ecx
mov edi, dword [esp + 0x50]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
mov byte [edx + esi], bl
mov ebx, dword [esp + 0x24]
lea esi, [eax + 1]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], 0
mov ecx, dword [esp + 0x1c]
inc ecx
inc ebx
cmp ecx, eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ecx
jl 0x101318f0
jmp 0x10131b7a
lea eax, [ebp + 0x524]
xor edx, edx
cmp dword [ebp + 0x90], 0x197
mov ebx, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ebx
jne 0x10131b5e
cmp dword [ebp + 0x85d4], edx
jne 0x10131b5e
mov ecx, dword [esp + 0x44]
mov eax, ecx
or eax, dword [esp + 0x48]
mov dword [esp + 0x10], 2
je 0x10131b2b
mov eax, dword [esp + 0x28]
sub eax, dword [esp + 0x1c]
cdq
sub ecx, eax
mov eax, dword [esp + 0x48]
sbb eax, edx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], eax
test eax, eax
jg 0x10131b7a
jl 0x101318d1
test ecx, ecx
ja 0x10131b7a
mov dword [esp + 0x10], 0
jmp 0x10131b7a
cmp dword [esp + 0x3c], edx
je 0x10131b5e
mov eax, 1
mov dword [ebp + 0xc8], eax
cmp byte [esi + 1], 0xa
jne 0x10131b47
inc esi
add dword [esp + 0x1c], eax
mov edx, dword [esp + 0x28]
sub edx, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
push edx
lea eax, [esi + 1]
push eax
jmp 0x101318bf
mov dword [esp + 0x10], edx
jmp 0x10131b7a
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push ebp
mov dword [esp + 0x34], 1
call fcn.101274f0
add esp, 8
push edi
call fcn.10133230
add esp, 4
test eax, eax
jne 0x10131c57
cmp dword [esp + 0x20], 0x4000
jb 0x10131780
cmp dword [esp + 0x2c], 0
jne 0x10131c4a
cmp dword [ebp + 0x8668], 0xc8
je 0x10131bd4
push edi
call fcn.1012fc10
add esp, 4
test eax, eax
jne 0x10131cea
cmp dword [edi + 0x130], eax
je 0x10131bd4
mov esi, 1
mov dword [esp + 0x30], esi
jmp 0x10131bdc
mov esi, dword [esp + 0x30]
test esi, esi
je 0x10131be5
cmp dword [ebp + 0xd4], 0
jne 0x10131c64
cmp dword [ebp + 0xd4], 0
je 0x10131c81
xor ebx, ebx
jmp 0x10131510
push ebp
call dword [0x101c2cac]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x3c
ret
push ebp
call dword [0x101c2cac]
mov ecx, dword [esp + 0x28]
push ecx
call dword [0x101c2cac]
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x3c
ret
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push ebp
call fcn.101274f0
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x3c
ret
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x3c
ret
mov ebx, dword [esp + 0x54]
mov edx, dword [edi + ebx*4 + 0xc8]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + ebx*4 + 0xc8], 0xffffffff
mov eax, dword [ebp + 0x90]
cmp eax, 0xc8
je 0x10131cc1
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push ebp
call fcn.101274f0
add esp, 0xc
test esi, esi
je 0x10131cb4
cmp dword [ebp + 0xd4], 0
je 0x10131cb4
mov dword [edi + 0x188], 1
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x3c
ret
mov eax, dword [edi + 0x19c]
push eax
call fcn.101265a0
add esp, 4
xor eax, eax
mov dword [edi + 0x19c], eax
mov dword [ebp + 0x85c8], 1
mov dword [ebp + 0xc8], eax
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret