Function at 0x10016020
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebx]
xor eax, eax
push edi
mov edi, dword [ebp + 0xc]
cmp dword [ebx + edi*4 + 0x740], 2
mov ecx, dword [ebx + edi*4 + 0x190]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], eax
je 0x10016a59
mov dword [ebx + 0x400], eax
cmp dword [ebx + edi*4 + 0x740], eax
jne 0x100162c0
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
push edi
push edx
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push esi
call fcn.10023160
mov eax, dword [esi + 0x10c]
push eax
call dword [0x1004b00c]
add esp, 0x14
mov dword [esi + 0x10c], 0
call fcn.10011f70
mov dword [ebp - 4], eax
test eax, eax
je 0x100168c1
mov ecx, dword [ebp + 0x10]
push edi
push ecx
push str._s:_hu
call sym.libcurl.dll_curl_maprintf
add esp, 0xc
mov dword [ebp - 0x10], eax
test eax, eax
je 0x100168b5
push 1
mov edx, eax
push edx
push str.CONNECT
push ebx
call fcn.10011ad0
mov edi, eax
mov eax, dword [ebp - 0x10]
push eax
call dword [0x1004b00c]
add esp, 0x14
test edi, edi
jne 0x1001629c
cmp dword [ebx + 0xe8], 1
mov eax, 0x1003e7d1
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x1c], 0x10040320
je 0x10016116
mov dword [ebp - 0x1c], 0x10040324
mov edi, dword [ebp + 0x10]
mov eax, dword [ebx + 0x3c0]
cmp edi, dword [ebx + 0x98]
je 0x10016139
push 0x3a
push edi
call dword [sym.imp.MSVCR100.dll_strchr]
add esp, 8
neg eax
sbb eax, eax
neg eax
test eax, eax
je 0x10016149
mov ecx, 0x100407d8
mov eax, 0x100407c4
jmp 0x10016150
mov ecx, 0x1003e7d1
mov eax, ecx
mov edx, dword [ebp + 0x14]
push edx
push ecx
push edi
push eax
push str._s_s_s:_hu
call sym.libcurl.dll_curl_maprintf
mov edi, eax
add esp, 0x14
mov dword [ebp - 0x20], edi
test edi, edi
je 0x100168cd
push str.Host:
push ebx
call fcn.100114d0
add esp, 8
test eax, eax
jne 0x1001619c
push edi
push str.Host:__s_r_n
call sym.libcurl.dll_curl_maprintf
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
je 0x100168e5
push str.Proxy_Connection:
push ebx
call fcn.100114d0
add esp, 8
test eax, eax
jne 0x100161b5
mov dword [ebp - 0xc], str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent:
push ebx
call fcn.100114d0
add esp, 8
test eax, eax
jne 0x100161d8
cmp dword [esi + 0x4ac], eax
je 0x100161d8
mov eax, dword [ebx + 0x458]
mov dword [ebp - 8], eax
mov ecx, dword [ebx + 0x454]
test ecx, ecx
jne 0x100161e7
mov ecx, 0x1003e7d1
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x100161f3
mov eax, 0x1003e7d1
mov edx, dword [ebp - 0xc]
push edx
mov edx, dword [ebp - 8]
push edx
mov edx, dword [ebp - 4]
push ecx
mov ecx, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
push ecx
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push edx
call fcn.10012920
add esp, 0x20
cmp dword [ebp - 0x10], 0
mov edi, eax
je 0x1001622b
mov eax, dword [ebp - 0x10]
push eax
call dword [0x1004b00c]
add esp, 4
mov ecx, dword [ebp - 0x20]
push ecx
call dword [0x1004b00c]
add esp, 4
test edi, edi
jne 0x10016283
mov edx, dword [ebp - 4]
push edx
push 1
push ebx
call fcn.10012a90
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x10016283
mov eax, dword [ebp - 4]
push 0x1003f054
push eax
call fcn.10012920
mov edi, eax
add esp, 8
test edi, edi
jne 0x10016283
mov ecx, dword [ebp + 0xc]
push ecx
push eax
mov eax, dword [ebp - 4]
lea edx, [esi + 0x48f8]
push edx
push ebx
push eax
call fcn.10011fb0
add esp, 0x14
mov edi, eax
mov dword [ebp - 4], 0
test edi, edi
je 0x1001629c
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.100231e0
add esp, 8
mov ecx, dword [ebp - 4]
push ecx
call fcn.10011f80
add esp, 4
test edi, edi
jne 0x10016904
mov edx, dword [ebp + 0xc]
mov dword [ebx + edx*4 + 0x740], 1
mov edi, edx
push 1
push 0
push esi
call fcn.10002050
add esp, 0xc
test edx, edx
jl 0x1001690d
jg 0x100162df
test eax, eax
je 0x1001690d
cmp dword [ebp + 0x18], 0
jne 0x100162f7
push edi
push ebx
call fcn.10002c50
add esp, 8
test eax, eax
je 0x10016a59
mov edi, dword [esi + 0x6e4]
xor eax, eax
mov dword [ebp - 0xc], 1
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], eax
nop
cmp dword [ebp - 0xc], 0
je 0x1001680e
push ebx
call fcn.10020e50
add esp, 4
test eax, eax
jne 0x10016927
mov eax, dword [esi + 0x6e4]
add eax, 0x4000
cmp dword [ebp - 4], eax
jae 0x10016933
push 1
push 0
push esi
call fcn.10002050
add esp, 0xc
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], edx
test edx, edx
jl 0x100167b7
jg 0x10016364
test eax, eax
jbe 0x100167b7
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x2c]
push ecx
push 1
push edx
push eax
push ebx
call fcn.10022ee0
add esp, 0x14
cmp eax, 0x51
jne 0x100163cb
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
jg 0x10016397
jl 0x10016392
cmp dword [ebp - 0x40], 0x3e8
jae 0x10016397
mov eax, dword [ebp - 0x40]
jmp 0x1001639e
mov eax, 0x3e8
xor ecx, ecx
push ecx
mov ecx, dword [ebp - 0x24]
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
call fcn.10022510
add esp, 0x14
cmp eax, 0xffffffff
je 0x100167cb
cmp dword [ebp - 0x10], 0x4000
jb 0x10016310
jmp 0x1001680e
test eax, eax
jne 0x1001680e
xor ecx, ecx
cmp dword [ebp - 0x2c], ecx
jle 0x100167d2
mov eax, 1
add dword [ebp - 0x10], eax
cmp dword [ebp - 0xc], eax
jle 0x10016466
mov eax, dword [ebp - 0x38]
or eax, dword [ebp - 0x34]
mov edx, dword [esi + 0x6e4]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edx
je 0x10016422
or eax, 0xffffffff
add dword [ebp - 0x38], eax
adc dword [ebp - 0x34], eax
js 0x1001680e
jg 0x10016310
cmp dword [ebp - 0x38], ecx
jbe 0x1001680e
jmp 0x10016310
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
push ecx
push 1
push edx
push ebx
call fcn.10015420
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10016310
push str.chunk_reading_DONE_n
push esi
call fcn.10023160
mov eax, dword [ebp + 0xc]
add esp, 8
mov dword [ebp - 0xc], 0
mov dword [ebx + eax*4 + 0x740], 2
jmp 0x10016310
mov edx, dword [ebp - 4]
add dword [ebp - 8], eax
cmp byte [edx], 0xa
je 0x10016479
add dword [ebp - 4], eax
jmp 0x100163b9
cmp dword [esi + 0x3c4], ecx
je 0x10016494
mov eax, dword [ebp - 8]
push ebx
push eax
push edi
push 1
push esi
call fcn.10023080
add esp, 0x14
xor ecx, ecx
cmp dword [esi + 0x560], ecx
jne 0x100164c7
mov eax, 2
cmp dword [esi + 0x3ac], ecx
je 0x100164ae
mov eax, 3
mov ecx, dword [ebp - 8]
push ecx
push edi
push eax
push ebx
call fcn.10023590
add esp, 0x10
test eax, eax
jne 0x10016a5b
xor ecx, ecx
mov eax, dword [ebp - 8]
add dword [esi + 0x48f4], eax
add dword [esi + 0x80], eax
mov al, byte [edi]
cmp al, 0xd
je 0x100166d0
cmp al, 0xa
je 0x100166d0
mov edx, dword [ebp - 8]
push 0x11
push edi
push str.WWW_Authenticate:
mov byte [edx + edi], 0
call sym.libcurl.dll_curl_strnequal
add esp, 0xc
test eax, eax
je 0x10016510
mov eax, dword [esi + 0xc8]
cmp eax, 0x191
je 0x10016531
push 0x13
push edi
push str.Proxy_authenticate:
call sym.libcurl.dll_curl_strnequal
add esp, 0xc
test eax, eax
je 0x10016576
mov eax, dword [esi + 0xc8]
cmp eax, 0x197
jne 0x10016576
xor ebx, ebx
cmp eax, 0x197
push edi
sete bl
call fcn.10011540
mov edi, eax
add esp, 4
test edi, edi
je 0x100168c1
mov eax, dword [ebp + 8]
push edi
push ebx
push eax
call fcn.10011be0
push edi
mov ebx, eax
call dword [0x1004b00c]
add esp, 0x10
test ebx, ebx
je 0x100166b8
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
push 0xf
push edi
push str.Content_Length:
call sym.libcurl.dll_curl_strnequal
add esp, 0xc
test eax, eax
je 0x100165d6
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 0x100165ba
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response_n
push esi
call fcn.10023160
add esp, 0xc
jmp 0x100166b8
push 0xa
push 0
add edi, 0xf
push edi
call dword [sym.imp.MSVCR100.dll__strtoi64]
add esp, 0xc
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
jmp 0x100166b8
push str.close
push str.Connection:
push edi
call fcn.10012230
add esp, 0xc
test eax, eax
je 0x100165f9
mov dword [ebp - 0x14], 1
jmp 0x100166b8
push 0x12
push edi
push str.Transfer_Encoding:
call sym.libcurl.dll_curl_strnequal
add esp, 0xc
test eax, eax
je 0x10016671
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 0x1001663a
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response_n
push esi
call fcn.10023160
add esp, 0xc
jmp 0x100166b8
push str.chunked
push str.Transfer_Encoding:
push edi
call fcn.10012230
add esp, 0xc
test eax, eax
je 0x100166b8
push str.CONNECT_responded_chunked_n
push esi
call fcn.10023160
mov ecx, dword [ebp + 8]
push ecx
mov dword [ebp - 0x28], 1
call fcn.10015400
add esp, 0xc
jmp 0x100166b8
push str.close
push str.Proxy_Connection:
push edi
call fcn.10012230
add esp, 0xc
test eax, eax
je 0x10016691
mov dword [ebp - 0x14], 1
jmp 0x100166b8
lea ebx, [esi + 0xc8]
push ebx
lea edx, [ebp - 0x30]
push edx
push str.HTTP_1._d__d
push edi
call dword [sym.imp.MSVCR100.dll_sscanf]
add esp, 0x10
cmp eax, 2
jne 0x100166b8
mov eax, dword [ebx]
mov dword [esi + 0x48e4], eax
mov edi, dword [esi + 0x6e4]
mov ebx, dword [ebp + 8]
mov dword [ebp - 8], 0
mov dword [ebp - 4], edi
jmp 0x100163b9
cmp dword [esi + 0xc8], 0x197
mov edx, dword [esi + 0x6e4]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edx
jne 0x100167a1
cmp dword [esi + 0x480c], ecx
jne 0x100167a1
mov eax, dword [ebp - 0x38]
or eax, dword [ebp - 0x34]
mov dword [ebp - 0xc], 2
je 0x10016730
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x38]
push ecx
push edx
push str.Ignore__I64d_bytes_of_response_body_n
push esi
call fcn.10023160
mov eax, dword [ebp + 0xc]
add esp, 0x10
mov dword [ebx + eax*4 + 0x740], 2
jmp 0x10016310
cmp dword [ebp - 0x28], ecx
je 0x100167a1
push str.Ignore_chunked_response_body_n
push esi
call fcn.10023160
add esp, 8
mov dword [esi + 0x100], 1
cmp byte [edi + 1], 0xa
jne 0x10016754
inc edi
lea eax, [ebp - 0x2c]
push eax
push 1
lea ecx, [edi + 1]
push ecx
push ebx
call fcn.10015420
add esp, 0x10
cmp eax, 0xffffffff
jne 0x100167a4
push str.chunk_reading_DONE_n
push esi
call fcn.10023160
mov edx, dword [ebp + 0xc]
mov eax, edx
mov dword [ebx + edx*4 + 0x740], 2
add esp, 8
mov dword [ebp - 0xc], 0
mov dword [ebx + eax*4 + 0x740], 2
jmp 0x10016310
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp + 0xc]
mov dword [ebx + eax*4 + 0x740], 2
jmp 0x10016310
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.100231e0
mov dword [ebp - 0x18], 2
jmp 0x1001680b
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
jmp 0x100167fe
cmp dword [esi + 0x158], ecx
je 0x100167f9
cmp dword [esi + 0x47fc], ecx
je 0x100167f9
push str.Proxy_CONNECT_connection_closed_n
push esi
mov dword [ebx + 0x400], 1
call fcn.10023160
jmp 0x1001680b
push str.Proxy_CONNECT_aborted
push esi
mov dword [ebp - 0x18], 1
call fcn.100231e0
add esp, 8
push ebx
call fcn.10020e50
add esp, 4
test eax, eax
jne 0x10016927
cmp dword [ebp - 0x18], eax
jne 0x1001691b
cmp dword [esi + 0x48e4], 0xc8
je 0x10016856
push ebx
call fcn.10012740
add esp, 4
test eax, eax
jne 0x10016a5b
cmp dword [ebx + 0x39c], eax
je 0x10016856
mov dword [ebp - 0x14], 1
jmp 0x1001685c
cmp dword [ebp - 0x14], 0
je 0x10016869
cmp dword [esi + 0x10c], 0
jne 0x1001694d
cmp dword [esi + 0x10c], 0
mov edi, dword [ebp + 0xc]
je 0x1001696c
cmp dword [ebx + edi*4 + 0x740], 2
jne 0x1001689e
push 0
push str.TUNNEL_STATE_switched_to:__d_n
push esi
mov dword [ebx + edi*4 + 0x740], 0
call fcn.10023160
add esp, 0xc
cmp dword [esi + 0x10c], 0
je 0x1001696c
mov edi, dword [ebp + 0xc]
xor eax, eax
jmp 0x10016063
mov ecx, dword [ebp - 4]
push ecx
call fcn.10011f80
add esp, 4
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
push edx
call fcn.10011f80
add esp, 4
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [0x1004b00c]
mov eax, dword [ebp - 4]
push eax
call fcn.10011f80
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.100231e0
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
push str.CONNECT_response_too_large_
push esi
call fcn.100231e0
add esp, 8
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebx + edi*4 + 0x190]
push ecx
push ebx
call fcn.10002ad0
add esp, 8
mov dword [ebx + edi*4 + 0x190], 0xffffffff
cmp dword [esi + 0xc8], 0xc8
je 0x10016a15
cmp dword [ebp - 0x14], 0
je 0x100169a5
cmp dword [esi + 0x10c], 0
je 0x100169a5
push str.Connect_me_again_please_n
push esi
mov dword [ebx + 0x400], 1
call fcn.10023160
add esp, 8
jmp 0x100169e0
mov edx, dword [esi + 0x10c]
push edx
call dword [0x1004b00c]
push 2
push ebx
mov dword [esi + 0x10c], 0
call fcn.10002c00
mov eax, dword [ebx + edi*4 + 0x190]
push eax
push ebx
call fcn.10002ad0
add esp, 0x14
mov dword [ebx + edi*4 + 0x190], 0xffffffff
mov dword [ebx + edi*4 + 0x740], 0
cmp dword [ebx + 0x400], 0
jne 0x10016a59
mov ecx, dword [esi + 0xc8]
push ecx
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.100231e0
add esp, 0xc
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebx + edi*4 + 0x740], 2
mov edx, dword [ebx + 0x454]
push edx
call dword [0x1004b00c]
xor edi, edi
push str.Proxy_replied_OK_to_CONNECT_request_n
mov dword [ebx + 0x454], edi
push esi
mov dword [esi + 0x4800], 1
call fcn.10023160
mov dword [esi + 0x100], edi
add esp, 0xc
mov dword [ebx + 0x3e4], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret