Function at 0x10016410
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 0x50], 0
push edi
mov edi, edx
mov dword [ebp - 0xc], ebx
xorps xmm0, xmm0
mov dword [ebp - 0x18], edi
mov esi, dword [ebx]
movlpd qword [ebp - 0x4c], xmm0
lea eax, [edi + 0x64]
mov byte [ebp - 5], 0
lea eax, [ebx + eax*4]
mov byte [ebp - 6], 0
lea ecx, [edi + 0x1a4]
mov dword [ebp - 0x40], eax
cmp dword [ebx + ecx*4], 2
lea ecx, [ebx + ecx*4]
mov eax, dword [ebx + edi*4 + 0x190]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x20], ecx
je 0x10016e34
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x4c]
mov byte [ebx + 0x37e], 0
mov dword [ebp - 0x30], eax
nop
cmp dword [ecx], 0
jne 0x100166c2
push dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push edi
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push esi
call fcn.10022fe0
push dword [esi + 0x104]
call dword [0x1006341c]
add esp, 0x14
mov dword [esi + 0x104], 0
call fcn.10012250
mov ebx, eax
test ebx, ebx
je 0x10016d13
push dword [ebp + 0xc]
push edi
push str._s:_hu
call sym.libcurl.dll_curl_maprintf
add esp, 0xc
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x10016d0c
mov ecx, dword [ebp - 0xc]
mov edx, str.CONNECT
push 1
push eax
call fcn.10011df0
push dword [ebp - 0x2c]
mov edi, eax
call dword [0x1006341c]
add esp, 0xc
test edi, edi
jne 0x100166a4
mov edx, dword [ebp - 0xc]
mov ecx, 0x100582b8
mov eax, 0x100582bc
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], 0x10056763
cmp dword [edx + 0xe8], 1
cmovne eax, ecx
mov cl, byte [edx + 0x36e]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 0x98]
je 0x1001654a
push 0x3a
push eax
call fcn.1003d070
add esp, 8
test eax, eax
setne cl
push dword [ebp + 0xc]
test cl, cl
mov edx, 0x10056763
mov eax, 0x10058488
cmove eax, edx
push eax
push dword [ebp + 8]
mov eax, 0x1005848c
cmove eax, edx
push eax
push str._s_s_s:_hu
call sym.libcurl.dll_curl_maprintf
add esp, 0x14
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x10016d0c
mov ecx, dword [ebp - 0xc]
mov edx, str.Host:
call fcn.10011610
test eax, eax
jne 0x100165af
push dword [ebp - 0x2c]
push str.Host:__s_r_n
call sym.libcurl.dll_curl_maprintf
mov edi, eax
add esp, 8
mov dword [ebp - 0x24], edi
test edi, edi
je 0x10016d00
mov ecx, dword [ebp - 0xc]
mov edx, str.Proxy_Connection:
call fcn.10011610
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
mov eax, 0x10056763
mov edx, str.User_Agent:
cmovne ecx, eax
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0xc]
call fcn.10011610
test eax, eax
jne 0x100165f3
cmp dword [esi + 0x410], eax
je 0x100165f3
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x3b8]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc]
mov edx, 0x10056763
push dword [ebp - 0x1c]
mov ecx, edx
push dword [ebp - 0x28]
mov eax, dword [eax + 0x3b4]
test eax, eax
cmovne ecx, eax
mov eax, edx
push ecx
test edi, edi
cmovne eax, edi
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x2c]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push ebx
call fcn.10012440
mov edi, eax
add esp, 0x20
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x1001663e
push eax
call dword [0x1006341c]
add esp, 4
push dword [ebp - 0x2c]
call dword [0x1006341c]
add esp, 4
test edi, edi
jne 0x10016690
mov ecx, dword [ebp - 0xc]
mov dl, 1
push ebx
call fcn.10012970
mov edi, eax
add esp, 4
test edi, edi
jne 0x10016690
push 0x1005710c
push ebx
call fcn.10012440
mov edi, eax
add esp, 8
test edi, edi
jne 0x10016690
push dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov ecx, ebx
push eax
lea eax, [esi + 0x4830]
push eax
call fcn.10012280
add esp, 0xc
mov edi, eax
xor ebx, ebx
test edi, edi
je 0x100166a4
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.10023060
add esp, 8
mov ecx, ebx
call fcn.10012260
test edi, edi
jne 0x10016d1f
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x18]
mov dword [eax], 1
push 1
xor edx, edx
mov ecx, esi
call fcn.10001f80
add esp, 4
test edx, edx
jl 0x10016e3d
jg 0x100166e2
test eax, eax
je 0x10016e3d
mov edx, edi
mov ecx, ebx
call fcn.10003470
test al, al
je 0x10016e34
mov edi, dword [esi + 0x63c]
xor eax, eax
mov edx, 1
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x10], edx
test edx, edx
je 0x10016ad4
mov ecx, ebx
call fcn.10021000
test eax, eax
jne 0x10016d32
mov eax, dword [esi + 0x63c]
add eax, 0x4000
cmp edi, eax
jae 0x10016d28
push 1
xor edx, edx
mov ecx, esi
call fcn.10001f80
mov ebx, edx
add esp, 4
mov edi, eax
test ebx, ebx
jl 0x10016c81
jg 0x10016761
test edi, edi
je 0x10016c81
mov edx, dword [ebp - 0x38]
lea eax, [ebp - 0x3c]
mov ecx, dword [ebp - 0xc]
push eax
push 1
push dword [ebp - 0x1c]
call fcn.10023690
add esp, 0xc
cmp eax, 0x51
jne 0x100167b5
test ebx, ebx
jg 0x1001678b
jl 0x10016792
cmp edi, 0x3e8
jb 0x10016792
mov edi, 0x3e8
xor ebx, ebx
mov ecx, dword [ebp - 0x38]
or edx, 0xffffffff
push ebx
push edi
push 0xffffffffffffffff
call fcn.100226c0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10016c16
mov edi, dword [ebp - 0x1c]
jmp 0x10016ac1
test eax, eax
jne 0x10016c9f
cmp dword [ebp - 0x3c], eax
jle 0x10016c34
inc dword [ebp - 0x28]
mov edx, dword [ebp - 0x10]
cmp edx, 1
jle 0x1001685c
mov ecx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x34]
mov edi, dword [esi + 0x63c]
mov dword [ebp - 0x28], eax
mov eax, ecx
or eax, ebx
mov dword [ebp - 0x1c], edi
je 0x10016811
add ecx, 0xffffffff
mov dword [ebp - 0x30], ecx
adc ebx, 0xffffffff
mov dword [ebp - 0x34], ebx
js 0x10016c9f
jg 0x10016809
test ecx, ecx
je 0x10016ca7
mov ebx, dword [ebp - 0xc]
jmp 0x10016713
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 0x48]
push eax
push 1
mov edx, edi
mov dword [ebp - 0x48], 0
mov ecx, ebx
call fcn.10015760
mov edx, dword [ebp - 0x10]
add esp, 8
cmp eax, 0xffffffff
jne 0x10016713
push str.chunk_reading_DONE_n
push esi
call fcn.10022fe0
mov eax, dword [ebp - 0x18]
add esp, 8
xor edx, edx
mov dword [ebx + eax*4 + 0x690], 2
jmp 0x10016710
mov edi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
inc ecx
mov dword [ebp - 0x24], ecx
cmp byte [edi], 0xa
je 0x10016874
inc edi
mov dword [ebp - 0x1c], edi
jmp 0x10016ac4
cmp byte [esi + 0x350], 0
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x2c]
je 0x10016898
push edi
push ecx
push ebx
mov edx, 1
mov ecx, esi
call fcn.10023820
mov ecx, dword [ebp - 0x24]
add esp, 0xc
cmp byte [esi + 0x4b8], 0
jne 0x100168cc
cmp byte [esi + 0x345], 0
mov eax, 3
push ecx
mov edx, 2
mov ecx, edi
cmovne edx, eax
push ebx
call fcn.10023620
add esp, 8
test eax, eax
jne 0x10016e50
mov ecx, dword [ebp - 0x24]
add dword [esi + 0x482c], ecx
add dword [esi + 0x80], ecx
mov al, byte [ebx]
cmp al, 0xd
je 0x10016b22
cmp al, 0xa
je 0x10016b22
push 0x11
push ebx
push str.WWW_Authenticate:
mov byte [ecx + ebx], 0
call sym.libcurl.dll_curl_strnequal
add esp, 0xc
test eax, eax
je 0x1001690f
mov eax, dword [esi + 0xc8]
cmp eax, 0x191
je 0x10016930
push 0x13
push ebx
push str.Proxy_authenticate:
call sym.libcurl.dll_curl_strnequal
add esp, 0xc
test eax, eax
je 0x10016975
mov eax, dword [esi + 0xc8]
cmp eax, 0x197
jne 0x10016975
mov ecx, dword [ebp - 0x2c]
cmp eax, 0x197
sete bl
call fcn.10011680
mov edi, eax
test edi, edi
je 0x10016d13
mov ecx, dword [ebp - 0xc]
mov dl, bl
push edi
call fcn.10011ef0
add esp, 4
mov ebx, eax
push edi
call dword [0x1006341c]
add esp, 4
test ebx, ebx
je 0x10016ab0
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xf
push ebx
push str.Content_Length:
call sym.libcurl.dll_curl_strnequal
add esp, 0xc
test eax, eax
je 0x100169d4
mov ecx, dword [esi + 0xc8]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x100169b9
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push esi
call fcn.10022fe0
add esp, 0xc
jmp 0x10016ab0
push 0xa
lea eax, [ebx + 0xf]
push 0
push eax
call fcn.1003d059
add esp, 0xc
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], edx
jmp 0x10016ab0
push str.close
mov edx, str.Connection:
mov ecx, ebx
call fcn.10012580
add esp, 4
test al, al
je 0x100169f5
mov byte [ebp - 5], 1
jmp 0x10016ab0
push 0x12
push ebx
push str.Transfer_Encoding:
call sym.libcurl.dll_curl_strnequal
add esp, 0xc
test eax, eax
je 0x10016a6c
mov ecx, dword [esi + 0xc8]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jne 0x10016a39
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
push esi
call fcn.10022fe0
add esp, 0xc
jmp 0x10016ab0
push str.chunked
mov edx, str.Transfer_Encoding:
mov ecx, ebx
call fcn.10012580
add esp, 4
test al, al
je 0x10016ab0
push str.CONNECT_responded_chunked_n
push esi
call fcn.10022fe0
add esp, 8
mov byte [ebp - 6], 1
mov ecx, edi
call fcn.10015740
jmp 0x10016ab0
push str.close
mov edx, str.Proxy_Connection:
mov ecx, ebx
call fcn.10012580
add esp, 4
test al, al
je 0x10016a8a
mov byte [ebp - 5], 1
jmp 0x10016ab0
lea edi, [esi + 0xc8]
push edi
lea eax, [ebp - 0x50]
push eax
push str.HTTP_1._d__d
push ebx
call fcn.1003bfc8
add esp, 0x10
cmp eax, 2
jne 0x10016ab0
mov eax, dword [edi]
mov dword [esi + 0x481c], eax
mov edi, dword [esi + 0x63c]
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x2c], edi
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 0x28], 0x4000
mov ebx, dword [ebp - 0xc]
jb 0x10016713
mov edi, dword [ebp - 0x14]
mov ecx, ebx
call fcn.10021000
test eax, eax
jne 0x10016d32
test edi, edi
jne 0x10016e4b
cmp dword [esi + 0x481c], 0xc8
je 0x10016cb2
mov ecx, ebx
call fcn.10011aa0
test eax, eax
jne 0x10016e50
cmp byte [ebx + 0x365], al
je 0x10016cb2
mov byte [ebp - 5], 1
jmp 0x10016cb8
cmp dword [esi + 0xc8], 0x197
mov edi, dword [esi + 0x63c]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], edi
jne 0x10016bfb
cmp byte [esi + 0x4754], 0
jne 0x10016bfb
mov ecx, dword [ebp - 0x30]
mov eax, ecx
mov edx, dword [ebp - 0x34]
or eax, edx
mov dword [ebp - 0x10], 2
je 0x10016b8b
push edx
push ecx
push str.Ignore__I64d_bytes_of_response_body_n
push esi
call fcn.10022fe0
mov ebx, dword [ebp - 0xc]
add esp, 0x10
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
mov dword [ebx + eax*4 + 0x690], 2
jmp 0x10016713
cmp byte [ebp - 6], 0
je 0x10016bfb
push str.Ignore_chunked_response_body_n
push esi
call fcn.10022fe0
lea eax, [ebx + 1]
mov byte [esi + 0xfd], 1
cmp byte [eax], 0xa
cmove ebx, eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x2c], ebx
push 1
lea edx, [ebx + 1]
mov ebx, dword [ebp - 0xc]
mov ecx, ebx
call fcn.10015760
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10016b75
push str.chunk_reading_DONE_n
push esi
call fcn.10022fe0
mov eax, dword [ebp - 0x18]
add esp, 8
xor edx, edx
mov dword [ebp - 0x10], edx
mov dword [ebx + eax*4 + 0x690], 2
mov dword [ebx + eax*4 + 0x690], 2
jmp 0x10016713
mov ebx, dword [ebp - 0xc]
xor edx, edx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], edx
mov dword [ebx + eax*4 + 0x690], 2
jmp 0x10016713
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
mov edi, 1
push esi
mov dword [ebp - 0x14], edi
call fcn.10023060
mov ebx, dword [ebp - 0xc]
add esp, 8
jmp 0x10016ad7
cmp dword [esi + 0x140], 0
je 0x10016c63
cmp dword [esi + 0x474c], 0
je 0x10016c63
mov ebx, dword [ebp - 0xc]
push str.Proxy_CONNECT_connection_closed_n
push esi
mov byte [ebx + 0x37e], 1
call fcn.10022fe0
add esp, 8
jmp 0x10016ad4
push str.Proxy_CONNECT_aborted
mov edi, 1
push esi
mov dword [ebp - 0x14], edi
call fcn.10023060
mov ebx, dword [ebp - 0xc]
add esp, 8
jmp 0x10016ad7
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.10023060
mov ebx, dword [ebp - 0xc]
mov edi, 2
add esp, 8
mov dword [ebp - 0x14], edi
jmp 0x10016ad7
mov ebx, dword [ebp - 0xc]
jmp 0x10016ad4
mov edi, dword [ebp - 0x14]
mov ebx, dword [ebp - 0xc]
jmp 0x10016ad7
cmp byte [ebp - 5], 0
je 0x10016cc1
cmp dword [esi + 0x104], 0
jne 0x10016d3e
cmp dword [esi + 0x104], 0
mov ecx, dword [ebp - 0x20]
je 0x10016d52
cmp dword [ecx], 2
jne 0x10016cef
push 0
push str.TUNNEL_STATE_switched_to:__d_n
push esi
mov dword [ecx], 0
call fcn.10022fe0
mov ecx, dword [ebp - 0x20]
add esp, 0xc
cmp dword [esi + 0x104], 0
je 0x10016d52
mov edi, dword [ebp - 0x18]
jmp 0x10016480
push dword [ebp - 0x2c]
call dword [0x1006341c]
add esp, 4
mov ecx, ebx
call fcn.10012260
mov eax, 0x1b
pop edi
pop esi
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.CONNECT_response_too_large_
jmp 0x10016e42
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x40]
mov ecx, ebx
mov edx, dword [edi]
call fcn.10003310
mov dword [edi], 0xffffffff
jmp 0x10016d55
mov edi, dword [ebp - 0x40]
cmp dword [esi + 0xc8], 0xc8
je 0x10016def
cmp byte [ebp - 5], 0
je 0x10016d8b
cmp dword [esi + 0x104], 0
je 0x10016d8b
push str.Connect_me_again_please_n
push esi
mov byte [ebx + 0x37e], 1
call fcn.10022fe0
add esp, 8
jmp 0x10016dbd
push dword [esi + 0x104]
call dword [0x1006341c]
add esp, 4
mov dword [esi + 0x104], 0
mov edx, 2
mov ecx, ebx
call fcn.10003420
mov edx, dword [edi]
call fcn.10003310
mov dword [edi], 0xffffffff
mov eax, dword [ebp - 0x20]
mov dword [eax], 0
cmp byte [ebx + 0x37e], 0
jne 0x10016e34
push dword [esi + 0xc8]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.10023060
add esp, 0xc
mov eax, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
mov dword [eax], 2
push dword [ebx + 0x3b4]
call dword [0x1006341c]
add esp, 4
mov dword [ebx + 0x3b4], 0
mov byte [esi + 0x4750], 1
push str.Proxy_replied_OK_to_CONNECT_request_n
push esi
call fcn.10022fe0
mov byte [esi + 0xfd], 0
add esp, 8
mov byte [ebx + 0x377], 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.10023060
add esp, 8
mov eax, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret