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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
mov ebx, ecx
mov dword [ebp - 0x2c], edx
lea ecx, [edx + 0x114]
mov dword [ebp - 8], ebx
lea ecx, [ebx + ecx*4]
mov dword [ebp - 0x48], 0
push esi
mov eax, dword [ebx + edx*4 + 0x154]
xorps xmm0, xmm0
mov esi, dword [ebx]
mov dword [ebp - 0x44], eax
xor al, al
cmp dword [ecx], 2
push edi
movlpd qword [ebp - 0x40], xmm0
mov byte [ebp - 1], 0
mov byte [ebp - 2], al
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x14], ecx
je 0x100316ec
mov byte [ebx + 0x1d6], al
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x18], eax
cmp dword [ecx], 0
mov edi, dword [ebp + 0xc]
jne 0x10030daf
push edi
push dword [ebp + 8]
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push esi
call fcn.10010cc0
mov eax, dword [esi + 0x104]
add esp, 0x10
test eax, eax
je 0x10030bcf
push eax
call dword [0x1005f678]
add esp, 4
mov dword [esi + 0x104], 0
push 0xc
push 1
call dword [0x1005f674]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x10031544
push edi
push dword [ebp + 8]
push str._s:_hu
call fcn.1001e260
add esp, 0xc
mov dword [ebp - 0x38], eax
test eax, eax
je 0x1003153a
mov ecx, dword [ebp - 8]
mov edx, str.CONNECT
push 1
push eax
call fcn.10017220
push dword [ebp - 0x38]
mov edi, eax
call dword [0x1005f678]
add esp, 0xc
test edi, edi
jne 0x10031567
mov ecx, dword [ebp - 8]
mov edx, 0x10057690
push dword [ebp + 0xc]
mov eax, 0x10057694
mov edi, 0x10055f06
mov dword [ebp - 0x28], edi
cmp dword [ecx + 0x138], 1
mov cl, byte [ecx + 0x1c6]
cmovne eax, edx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x20], eax
test cl, cl
mov edx, edi
mov eax, 0x100562f4
cmove eax, edx
push eax
push dword [ebp + 8]
mov eax, 0x100562f8
cmove eax, edx
push eax
push str._s_s_s:_hu
call fcn.1001e260
add esp, 0x14
mov dword [ebp - 0x30], eax
test eax, eax
je 0x1003153a
mov ecx, dword [ebp - 8]
mov edx, str.Host:
call fcn.10016b20
test eax, eax
jne 0x10030cb5
push dword [ebp - 0x30]
push str.Host:__s_r_n
call fcn.1001e260
mov edi, eax
add esp, 8
mov dword [ebp - 0x28], edi
test edi, edi
je 0x1003152e
mov ecx, dword [ebp - 8]
mov edx, str.Proxy_Connection:
call fcn.10016b20
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
mov eax, 0x10055f06
mov edx, str.User_Agent:
cmovne ecx, eax
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 8]
call fcn.10016b20
test eax, eax
jne 0x10030cf9
cmp dword [esi + 0x364], eax
je 0x10030cf9
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x204]
mov dword [ebp - 0x38], eax
push dword [ebp - 0x24]
mov eax, dword [ebp - 8]
mov ecx, 0x10055f06
push dword [ebp - 0x38]
mov eax, dword [eax + 0x200]
test eax, eax
cmovne ecx, eax
push ecx
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x30]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push ebx
call fcn.10017920
mov edi, eax
add esp, 0x20
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x10030d40
cmp byte [eax], 0
je 0x10030d40
push eax
call dword [0x1005f678]
add esp, 4
push dword [ebp - 0x30]
call dword [0x1005f678]
add esp, 4
test edi, edi
jne 0x10031550
mov ecx, dword [ebp - 8]
mov dl, 1
push ebx
call fcn.10017e20
mov edi, eax
add esp, 4
test edi, edi
jne 0x10031550
push 0x10056c9c
push ebx
call fcn.10017920
mov edi, eax
add esp, 8
test edi, edi
jne 0x10031550
push dword [ebp - 0x2c]
mov edx, dword [ebp - 8]
mov ecx, ebx
push eax
lea eax, [esi + 0x8684]
push eax
call fcn.10017620
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x10031550
mov eax, dword [ebp - 0x14]
mov dword [eax], 1
mov edx, dword [esi + 0x1c8]
xor eax, eax
mov ecx, 0x493e0
test edx, edx
mov dword [ebp - 0x28], ecx
mov ecx, 1
cmovg eax, ecx
mov ecx, dword [esi + 0x1cc]
test ecx, ecx
jle 0x10030dd6
or eax, 2
dec eax
je 0x10030df0
dec eax
je 0x10030deb
dec eax
jne 0x10030df3
cmp edx, ecx
mov eax, ecx
cmovl eax, edx
mov dword [ebp - 0x28], eax
jmp 0x10030df3
mov dword [ebp - 0x28], ecx
jmp 0x10030df3
mov dword [ebp - 0x28], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov edi, dword [esi + 0x4a8]
mov eax, 0x10624dd3
mul ecx
mov ebx, edx
shr ebx, 6
imul eax, ebx, 0x3e8
sub edi, ebx
sub ecx, eax
mov eax, 0x10624dd3
imul ecx, ecx, 0x3e8
sub ecx, dword [esi + 0x4ac]
imul ecx
imul eax, edi, 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub eax, ecx
mov ecx, dword [ebp - 0x28]
add ecx, eax
je 0x100316f5
test ecx, ecx
jle 0x100316f5
mov ecx, dword [ebp - 0x44]
or edx, 0xffffffff
push 0
push 0xffffffffffffffff
call fcn.100104f0
add esp, 8
test eax, eax
je 0x100316ec
lea edi, [esi + 0x544]
xor eax, eax
mov ecx, 1
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x38], eax
test ecx, ecx
je 0x1003146a
cmp dword [ebp - 0x34], 0
jne 0x10031703
mov edi, dword [esi + 0x1c8]
xor eax, eax
mov edx, dword [esi + 0x1cc]
mov ecx, 0x493e0
test edi, edi
mov dword [ebp - 0x28], ecx
mov ecx, 1
cmovg eax, ecx
test edx, edx
jle 0x10030ebe
or eax, 2
dec eax
je 0x10030ed8
dec eax
je 0x10030ed3
dec eax
jne 0x10030edb
cmp edi, edx
mov ecx, edx
cmovl ecx, edi
mov dword [ebp - 0x28], ecx
jmp 0x10030edb
mov dword [ebp - 0x28], edx
jmp 0x10030edb
mov dword [ebp - 0x28], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov edi, dword [esi + 0x4a8]
mov eax, 0x10624dd3
mul ecx
mov ebx, edx
shr ebx, 6
imul eax, ebx, 0x3e8
sub edi, ebx
sub ecx, eax
mov eax, 0x10624dd3
imul ecx, ecx, 0x3e8
sub ecx, dword [esi + 0x4ac]
imul ecx
imul eax, edi, 0x3e8
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub eax, ecx
mov ecx, dword [ebp - 0x28]
add ecx, eax
je 0x100316f5
test ecx, ecx
jle 0x100316f5
mov ebx, dword [ebp - 0x44]
mov eax, 0x3e8
cmp ecx, eax
cmovl eax, ecx
or edx, 0xffffffff
push eax
push 0xffffffffffffffff
mov ecx, ebx
call fcn.100104f0
add esp, 8
cmp eax, 0xffffffff
je 0x10031431
mov edi, dword [ebp - 0xc]
test eax, eax
je 0x1003134c
lea eax, [ebp - 0x3c]
mov edx, ebx
mov ebx, dword [ebp - 8]
mov ecx, ebx
push eax
mov eax, 0x4000
sub eax, edi
push eax
push dword [ebp - 0x20]
call fcn.10011440
add esp, 0xc
cmp eax, 0x51
je 0x1003145b
test eax, eax
je 0x10030f9f
mov dword [ebp - 0x10], 0
jmp 0x1003144c
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x28], ecx
test ecx, ecx
jg 0x10030ff6
cmp dword [esi + 0x140], 0
mov dword [ebp - 0x10], 0
je 0x10030fdc
cmp dword [esi + 0x85dc], 0
je 0x10030fdc
push str.Proxy_CONNECT_connection_closed
push esi
mov byte [ebx + 0x1d6], 1
call fcn.10010cc0
add esp, 8
jmp 0x1003144c
push str.Proxy_CONNECT_aborted
push esi
mov dword [ebp - 0x34], 1
call fcn.10010d80
add esp, 8
jmp 0x1003144c
add edi, ecx
xor eax, eax
cmp dword [ebp - 0x10], 1
mov dword [ebp - 0xc], edi
jle 0x1003109f
mov dword [ebp - 0xc], eax
lea edi, [esi + 0x544]
mov eax, dword [ebp - 0x18]
or eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edi
je 0x1003104c
mov edi, dword [ebp - 0x18]
mov eax, ecx
cdq
sub edi, eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edi
sbb eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jg 0x10031449
jl 0x10031040
test edi, edi
jne 0x10031449
mov dword [ebp - 0x10], 0
jmp 0x10031449
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0
push eax
push ecx
mov edx, edi
mov ecx, ebx
call fcn.10032f10
add esp, 8
cmp eax, 0xffffffff
jne 0x10031089
push str.chunk_reading_DONE_n
push esi
call fcn.10010cc0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], 0
mov dword [eax], 2
jmp 0x10031446
push dword [ebp - 0x28]
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.10010cc0
add esp, 0xc
jmp 0x10031449
mov dword [ebp - 0x24], eax
test ecx, ecx
jle 0x1003144c
mov edi, dword [ebp - 0x38]
mov edx, dword [ebp - 0x20]
inc edi
cmp byte [edx], 0xa
mov dword [ebp - 0x38], edi
jne 0x100312b8
cmp byte [esi + 0x2d0], 0
je 0x100310dd
push ebx
mov ebx, dword [ebp - 0x30]
mov edx, 1
push edi
push ebx
mov ecx, esi
call fcn.100115c0
add esp, 0xc
jmp 0x100310e0
mov ebx, dword [ebp - 0x30]
cmp byte [esi + 0x2c4], 0
mov eax, 3
mov ecx, dword [ebp - 8]
mov edx, 2
push edi
cmovne edx, eax
push ebx
call fcn.10011290
add dword [esi + 0x8680], edi
add esp, 8
add dword [esi + 0x80], edi
test eax, eax
jne 0x10031708
mov al, byte [ebx]
cmp al, 0xd
je 0x100312cd
cmp al, 0xa
je 0x100312cd
mov cl, byte [edi + ebx]
lea eax, [edi + ebx]
mov byte [ebp - 4], cl
mov edx, ebx
push 0x11
mov ecx, str.WWW_Authenticate:
mov dword [ebp - 0x38], eax
mov byte [eax], 0
call fcn.1002cd00
add esp, 4
test eax, eax
je 0x10031158
mov eax, dword [esi + 0xc8]
cmp eax, 0x191
je 0x1003117a
push 0x13
mov edx, ebx
mov ecx, str.Proxy_authenticate:
call fcn.1002cd00
add esp, 4
test eax, eax
je 0x100311c0
mov eax, dword [esi + 0xc8]
cmp eax, 0x197
jne 0x100311c0
cmp eax, 0x197
mov ecx, ebx
sete byte [ebp - 3]
call fcn.10016bf0
mov edi, eax
test edi, edi
je 0x10031544
mov dl, byte [ebp - 3]
mov ecx, dword [ebp - 8]
push edi
call fcn.100173d0
add esp, 4
mov ebx, eax
push edi
call dword [0x1005f678]
add esp, 4
test ebx, ebx
je 0x10031299
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xf
mov edx, ebx
mov ecx, str.Content_Length:
call fcn.1002cd00
add esp, 4
test eax, eax
je 0x100311f0
push 0xa
lea eax, [ebx + 0xf]
push 0
push eax
call fcn.10044e0b
add esp, 0xc
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], edx
jmp 0x10031299
push str.close
mov edx, str.Connection:
mov ecx, ebx
call fcn.10017a80
add esp, 4
test al, al
je 0x10031211
mov byte [ebp - 1], 1
jmp 0x10031299
push str.chunked
mov edx, str.Transfer_Encoding:
mov ecx, ebx
call fcn.10017a80
add esp, 4
test al, al
je 0x10031255
push str.CONNECT_responded_chunked_n
push esi
call fcn.10010cc0
mov ebx, dword [ebp - 8]
add esp, 8
mov byte [ebp - 2], 1
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x30], 0
mov dword [ebx + 0x20], 0
jmp 0x1003129c
push str.close
mov edx, str.Proxy_Connection:
mov ecx, ebx
call fcn.10017a80
add esp, 4
test al, al
je 0x10031273
mov byte [ebp - 1], 1
jmp 0x10031299
lea edi, [esi + 0xc8]
push edi
lea eax, [ebp - 0x48]
push eax
push str.HTTP_1._d__d
push ebx
call fcn.10046116
add esp, 0x10
cmp eax, 2
jne 0x10031299
mov eax, dword [edi]
mov dword [esi + 0x8670], eax
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x38]
xor edi, edi
mov edx, dword [ebp - 0x20]
mov cl, byte [ebp - 4]
mov dword [ebp - 0x38], edi
mov byte [eax], cl
mov ecx, dword [ebp - 0x28]
lea eax, [edx + 1]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x24]
inc eax
inc edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x24], eax
cmp eax, ecx
jl 0x100310b0
jmp 0x10031449
xor edi, edi
lea eax, [esi + 0x544]
cmp dword [esi + 0xc8], 0x197
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x20], eax
jne 0x100313f2
cmp byte [esi + 0x85e4], 0
jne 0x100313f2
mov edi, dword [ebp - 0x18]
mov eax, edi
mov ecx, dword [ebp - 0x1c]
or eax, ecx
mov dword [ebp - 0x10], 2
je 0x10031354
push ecx
push edi
push str.Ignore__I64d_bytes_of_response_body_n
push esi
call fcn.10010cc0
mov eax, dword [ebp - 0x28]
add esp, 0x10
sub eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
cdq
sub edi, eax
mov dword [ebp - 0x18], edi
sbb ecx, edx
mov dword [ebp - 0x1c], ecx
test ecx, ecx
jg 0x10031340
jl 0x10031339
test edi, edi
jne 0x10031340
mov dword [ebp - 0x10], 0
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
mov dword [eax], 2
mov ebx, dword [ebp - 8]
jmp 0x1003144c
mov al, byte [ebp - 2]
test al, al
je 0x10031339
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x24]
sub eax, edi
push eax
push str._zd_bytes_of_chunk_left_n
push esi
mov byte [esi + 0xfd], 1
call fcn.10010cc0
add esp, 0xc
cmp byte [ebx + 1], 0xa
jne 0x10031384
inc ebx
inc edi
mov dword [ebp - 0x30], ebx
mov ecx, dword [ebp - 8]
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x28]
lea edx, [ebx + 1]
sub eax, edi
push eax
call fcn.10032f10
add esp, 8
cmp eax, 0xffffffff
jne 0x100313d0
push str.chunk_reading_DONE_n
push esi
call fcn.10010cc0
mov edi, dword [ebp - 0x14]
add esp, 8
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x10], 0
mov dword [edi], 2
mov edi, dword [ebp - 0xc]
mov dword [eax], 2
jmp 0x1003144c
push dword [ebp - 0x3c]
push str.Read__zd_bytes_of_chunk__continue_n
push esi
call fcn.10010cc0
mov eax, dword [ebp - 0x14]
add esp, 0xc
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 8]
mov dword [eax], 2
jmp 0x1003144c
xor eax, eax
cmp dword [esi + 0x8670], 0xc8
mov dword [ebp - 0x10], eax
jne 0x10031343
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x24]
dec eax
je 0x10031343
push eax
push str.Proxy_CONNECT_followed_by__zd_bytes_of_opaque_data._Data_ignored__known_bug_39_
push esi
call fcn.10010d80
mov eax, dword [ebp - 0x14]
add esp, 0xc
mov ebx, dword [ebp - 8]
mov dword [eax], 2
jmp 0x1003144c
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push esi
mov dword [ebp - 0x34], 1
call fcn.10010d80
mov ebx, dword [ebp - 8]
add esp, 8
mov edi, dword [ebp - 0xc]
mov ecx, ebx
call fcn.1001b090
test eax, eax
jne 0x1003157a
mov ecx, dword [ebp - 0x10]
cmp edi, 0x4000
jb 0x10030e85
cmp dword [ebp - 0x34], 0
jne 0x10031703
cmp dword [esi + 0x8670], 0xc8
mov ebx, dword [ebp - 8]
je 0x100314a0
mov ecx, ebx
call fcn.10016f60
test eax, eax
jne 0x10031708
cmp byte [ebx + 0x1c0], al
je 0x100314a0
mov byte [ebp - 1], 1
jmp 0x100314a6
cmp byte [ebp - 1], 0
je 0x100314b3
cmp dword [esi + 0x104], 0
jne 0x10031586
cmp dword [esi + 0x104], 0
mov ecx, dword [ebp - 0x14]
je 0x100314ea
cmp dword [ecx], 2
jne 0x100314dd
push 0
push str.TUNNEL_STATE_switched_to:__d_n
push esi
mov dword [ecx], 0
call fcn.10010cc0
mov ecx, dword [ebp - 0x14]
add esp, 0xc
cmp dword [esi + 0x104], 0
jne 0x10030b93
mov edi, dword [ebp - 0x2c]
cmp dword [esi + 0xc8], 0xc8
je 0x10031698
cmp byte [ebp - 1], 0
je 0x100315ee
cmp dword [esi + 0x104], 0
je 0x100315ee
push str.Connect_me_again_please_n
push esi
mov byte [ebx + 0x1d6], 1
call fcn.10010cc0
add esp, 8
jmp 0x10031657
push dword [ebp - 0x30]
call dword [0x1005f678]
add esp, 4
push ebx
call dword [0x1005f678]
add esp, 4
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.10010d80
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [0x1005f678]
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebx + eax*4 + 0x154]
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x100315af
cmp edi, dword [ebx + 0x158]
jne 0x100315d2
cmp byte [ebx + 0x165], 0
je 0x100315d2
mov byte [ebx + 0x165], 0
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, edi
mov ecx, ebx
call fcn.10007340
mov edi, dword [ebp - 0x2c]
mov dword [ebx + edi*4 + 0x154], 0xffffffff
jmp 0x100314ed
push edi
push dword [ebx + 0x3c]
call eax
mov edi, dword [ebp - 0x2c]
add esp, 8
mov dword [ebx + edi*4 + 0x154], 0xffffffff
jmp 0x100314ed
mov eax, dword [esi + 0x104]
test eax, eax
je 0x1003160c
push eax
call dword [0x1005f678]
add esp, 4
mov dword [esi + 0x104], 0
mov eax, dword [ebx + 0x38]
mov byte [ebx + 0x1c0], 1
mov edi, dword [ebx + edi*4 + 0x154]
test eax, eax
je 0x10031639
cmp edi, dword [ebx + 0x158]
jne 0x1003168d
cmp byte [ebx + 0x165], 0
je 0x1003168d
mov byte [ebx + 0x165], 0
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, edi
mov ecx, ebx
call fcn.10007340
mov eax, dword [ebp - 0x2c]
mov dword [ebx + eax*4 + 0x154], 0xffffffff
mov eax, dword [ebp - 0x14]
mov dword [eax], 0
cmp byte [ebx + 0x1d6], 0
jne 0x100316ec
push dword [esi + 0xc8]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.10010d80
add esp, 0xc
mov eax, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push dword [ebx + 0x3c]
call eax
add esp, 8
jmp 0x10031649
mov eax, dword [ebp - 0x14]
mov dword [eax], 2
mov eax, dword [ebx + 0x200]
test eax, eax
je 0x100316bf
push eax
call dword [0x1005f678]
add esp, 4
mov dword [ebx + 0x200], 0
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [ebx + 0x200], 0
push esi
mov byte [esi + 0x85e0], 1
call fcn.10010cc0
mov byte [esi + 0xfd], 0
add esp, 8
mov byte [ebx + 0x1cf], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.10010d80
add esp, 8
mov eax, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret