Function at 0x10050450
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x1010d770]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
push ebx
mov ebx, edx
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0x44], ebx
mov ecx, dword [ebp - 0x44]
add ecx, 0x112
mov dword [ebp - 0x1c], esi
push edi
mov eax, dword [esi + ebx*4 + 0x154]
xor bl, bl
mov edi, dword [esi]
lea ecx, [esi + ecx*4]
mov dword [ebp - 0x50], eax
xor al, al
mov dword [ebp - 0x54], edx
cmp dword [ecx], 2
mov dword [ebp - 0x14], 0
movlpd qword [ebp - 0x5c], xmm0
mov byte [ebp - 0x15], bl
mov byte [ebp - 0x25], al
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x20], ecx
je 0x10050e21
mov byte [esi + 0x1d5], al
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x38], eax
nop
cmp dword [ecx], 0
jne 0x100506e9
push dword [ebp - 0x4c]
push edx
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push edi
call fcn.10033a30
push dword [edi + 0x104]
call dword [0x1010f540]
add esp, 0x14
mov dword [edi + 0x104], 0
call fcn.1003ab70
mov ebx, eax
test ebx, ebx
je 0x10050ce6
push dword [ebp - 0x4c]
push dword [ebp - 0x54]
push str._s:_hu
call fcn.10040c60
add esp, 0xc
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10050cdf
push 1
push eax
mov edx, str.CONNECT
mov ecx, esi
call fcn.1003a7c0
push dword [ebp - 0xc]
mov esi, eax
call dword [0x1010f540]
add esp, 0xc
test esi, esi
jne 0x100506d1
mov ecx, dword [ebp - 0x1c]
mov edx, 0x101030f8
push dword [ebp - 0x4c]
mov eax, 0x101030fc
mov esi, 0x10100995
mov dword [ebp - 0x2c], esi
cmp dword [ecx + 0x138], 1
mov cl, byte [ecx + 0x1c6]
cmovne eax, edx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x24], eax
test cl, cl
mov edx, esi
mov eax, 0x10101abc
cmove eax, edx
push eax
push dword [ebp - 0x54]
mov eax, 0x10101ac0
cmove eax, edx
push eax
push str._s_s_s:_hu
call fcn.10040c60
add esp, 0x14
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10050cdf
mov ecx, dword [ebp - 0x1c]
mov edx, str.Host:
call fcn.1003a070
test eax, eax
jne 0x100505e0
push dword [ebp - 0xc]
push str.Host:__s_r_n
call fcn.10040c60
mov esi, eax
add esp, 8
mov dword [ebp - 0x2c], esi
test esi, esi
je 0x10050cd3
mov ecx, dword [ebp - 0x1c]
mov edx, str.Proxy_Connection:
call fcn.1003a070
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
mov eax, 0x10100995
mov edx, str.User_Agent:
cmovne ecx, eax
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x1c]
call fcn.1003a070
test eax, eax
jne 0x10050624
cmp dword [edi + 0x364], eax
je 0x10050624
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x204]
mov dword [ebp - 0x34], eax
push dword [ebp - 0x30]
mov eax, dword [ebp - 0x1c]
mov ecx, 0x10100995
push dword [ebp - 0x34]
mov eax, dword [eax + 0x200]
test eax, eax
cmovne ecx, eax
push ecx
push esi
push dword [ebp - 0x24]
push dword [ebp - 0xc]
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push ebx
call fcn.1003ad50
mov esi, eax
add esp, 0x20
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x1005066b
cmp byte [eax], 0
je 0x1005066b
push eax
call dword [0x1010f540]
add esp, 4
push dword [ebp - 0xc]
call dword [0x1010f540]
add esp, 4
test esi, esi
jne 0x100506bd
mov ecx, dword [ebp - 0x1c]
mov dl, 1
push ebx
call fcn.1003b180
mov esi, eax
add esp, 4
test esi, esi
jne 0x100506bd
push 0x101018c8
push ebx
call fcn.1003ad50
mov esi, eax
add esp, 8
test esi, esi
jne 0x100506bd
push dword [ebp - 0x44]
mov edx, dword [ebp - 0x1c]
mov ecx, ebx
push eax
lea eax, [edi + 0x868c]
push eax
call fcn.1003aba0
add esp, 0xc
mov esi, eax
xor ebx, ebx
test esi, esi
je 0x100506d1
push str.Failed_sending_CONNECT_to_proxy
push edi
call fcn.10033ab0
add esp, 8
mov ecx, ebx
call fcn.1003ab80
test esi, esi
jne 0x10050cfc
mov eax, dword [ebp - 0x20]
mov dword [eax], 1
push 1
xor edx, edx
mov ecx, edi
call fcn.10030f50
add esp, 4
test eax, eax
jle 0x10050e34
cmp byte [ebp + 0x10], 0
jne 0x1005071f
mov ecx, dword [ebp - 0x50]
or edx, 0xffffffff
push 0
push 0xffffffffffffffff
call fcn.10033320
add esp, 8
test eax, eax
je 0x10050e21
lea eax, [edi + 0x544]
mov dword [ebp - 0x34], 0
mov ecx, 1
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x24], ecx
mov esi, eax
xor ebx, ebx
jmp 0x10050740
test ecx, ecx
je 0x10050c49
cmp dword [ebp - 0x48], 0
jne 0x10050e42
push 1
xor edx, edx
mov ecx, edi
call fcn.10030f50
mov ecx, eax
add esp, 4
test ecx, ecx
jle 0x10050e34
mov eax, 0x3e8
cmp ecx, eax
cmovl eax, ecx
mov ecx, dword [ebp - 0x50]
push eax
push 0xffffffffffffffff
or edx, 0xffffffff
call fcn.10033320
add esp, 8
cmp eax, 0xffffffff
je 0x10050c14
test eax, eax
je 0x10050c29
mov edx, dword [ebp - 0x50]
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
push eax
mov eax, 0x4000
sub eax, dword [ebp - 0x34]
push eax
push dword [ebp - 0x2c]
call fcn.10034090
add esp, 0xc
cmp eax, 0x51
je 0x10050c39
test eax, eax
je 0x100507cb
xor eax, eax
mov dword [ebp - 0x24], eax
jmp 0x10050c29
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
test ecx, ecx
jg 0x1005080e
xor eax, eax
mov dword [ebp - 0x24], eax
cmp dword [edi + 0x140], eax
je 0x10050804
cmp dword [edi + 0x85dc], eax
je 0x10050804
mov eax, dword [ebp - 0x1c]
push str.Proxy_CONNECT_connection_closed_n
push edi
mov byte [eax + 0x1d5], 1
call fcn.10033a30
jmp 0x10050c26
push str.Proxy_CONNECT_aborted
jmp 0x10050c19
add dword [ebp - 0x34], ecx
cmp dword [ebp - 0x24], 1
jle 0x100508b5
mov eax, dword [ebp - 0x38]
lea edx, [edi + 0x544]
or eax, dword [ebp - 0x3c]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], edx
je 0x10050862
mov eax, ecx
mov ecx, dword [ebp - 0x38]
cdq
sub ecx, eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x38], ecx
sbb eax, edx
mov dword [ebp - 0x3c], eax
test eax, eax
jg 0x10050c29
jl 0x10050858
test ecx, ecx
jne 0x10050c29
xor eax, eax
mov dword [ebp - 0x24], eax
jmp 0x10050c29
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push ecx
mov ecx, dword [ebp - 0x1c]
call fcn.10053b00
add esp, 8
cmp eax, 0xffffffff
jne 0x1005089f
push str.chunk_reading_DONE_n
push edi
call fcn.10033a30
add esp, 8
xor eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
mov dword [eax], 2
jmp 0x10050c29
push dword [ebp - 0xc]
push str.Read__zd_bytes_of_chunk__continue_n
push edi
call fcn.10033a30
add esp, 0xc
jmp 0x10050c29
xor eax, eax
mov dword [ebp - 0x30], eax
test ecx, ecx
jle 0x10050c29
mov edx, dword [ebp - 0x2c]
inc ebx
cmp byte [edx], 0xa
jne 0x10050ab0
cmp byte [edi + 0x2d0], 0
je 0x100508ec
push dword [ebp - 0x1c]
mov edx, 1
mov ecx, edi
push ebx
push esi
call fcn.10034240
add esp, 0xc
cmp byte [edi + 0x2c4], 0
mov eax, 3
mov ecx, dword [ebp - 0x1c]
mov edx, 2
push ebx
cmovne edx, eax
push esi
call fcn.10034020
add dword [edi + 0x8688], ebx
add esp, 8
add dword [edi + 0x80], ebx
test eax, eax
jne 0x10050e47
mov al, byte [esi]
cmp al, 0xd
je 0x10050ac5
cmp al, 0xa
je 0x10050ac5
mov cl, byte [ebx + esi]
lea eax, [ebx + esi]
mov byte [ebp - 0x3d], cl
mov edx, esi
push 0x11
mov ecx, str.WWW_Authenticate:
mov dword [ebp - 0x58], eax
mov byte [eax], 0
call fcn.1004d510
add esp, 4
test eax, eax
je 0x10050964
mov eax, dword [edi + 0xc8]
cmp eax, 0x191
je 0x10050986
push 0x13
mov edx, esi
mov ecx, str.Proxy_authenticate:
call fcn.1004d510
add esp, 4
test eax, eax
je 0x100509d4
mov eax, dword [edi + 0xc8]
cmp eax, 0x197
jne 0x100509d4
cmp eax, 0x197
mov ecx, esi
sete bl
call fcn.1003a0e0
mov esi, eax
test esi, esi
je 0x10050ce6
mov ecx, dword [ebp - 0x1c]
mov dl, bl
push esi
call fcn.1003a8c0
add esp, 4
mov ebx, eax
push esi
call dword [0x1010f540]
add esp, 4
test ebx, ebx
je 0x10050a9a
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1005cd0d
mov esp, ebp
pop ebp
ret
push 0xf
mov edx, esi
mov ecx, str.Content_Length:
call fcn.1004d510
add esp, 4
test eax, eax
je 0x10050a04
push 0xa
lea eax, [esi + 0xf]
push 0
push eax
call fcn.100620ab
add esp, 0xc
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], edx
jmp 0x10050a9a
push str.close
mov edx, str.Connection:
mov ecx, esi
call fcn.1003ae90
add esp, 4
test al, al
je 0x10050a22
mov byte [ebp - 0x15], 1
jmp 0x10050a9a
push str.chunked
mov edx, str.Transfer_Encoding:
mov ecx, esi
call fcn.1003ae90
add esp, 4
test al, al
je 0x10050a56
push str.CONNECT_responded_chunked_n
push edi
call fcn.10033a30
mov ecx, dword [ebp - 0x1c]
add esp, 8
mov byte [ebp - 0x25], 1
call fcn.10053ae0
jmp 0x10050a9a
push str.close
mov edx, str.Proxy_Connection:
mov ecx, esi
call fcn.1003ae90
add esp, 4
test al, al
je 0x10050a74
mov byte [ebp - 0x15], 1
jmp 0x10050a9a
lea ebx, [edi + 0xc8]
push ebx
lea eax, [ebp - 0x14]
push eax
push str.HTTP_1._d__d
push esi
call fcn.100602df
add esp, 0x10
cmp eax, 2
jne 0x10050a9a
mov eax, dword [ebx]
mov dword [edi + 0x8678], eax
mov eax, dword [ebp - 0x58]
xor ebx, ebx
mov edx, dword [ebp - 0x2c]
mov cl, byte [ebp - 0x3d]
mov byte [eax], cl
mov eax, dword [ebp - 0x30]
lea esi, [edx + 1]
mov ecx, dword [ebp - 0xc]
inc eax
inc edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x30], eax
cmp eax, ecx
jl 0x100508c5
jmp 0x10050c29
cmp dword [edi + 0xc8], 0x197
lea eax, [edi + 0x544]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], eax
jne 0x10050be0
cmp byte [edi + 0x85e4], 0
jne 0x10050be0
mov ecx, dword [ebp - 0x38]
mov eax, ecx
mov edx, dword [ebp - 0x3c]
or eax, edx
mov dword [ebp - 0x24], 2
je 0x10050b53
push edx
push ecx
push str.Ignore__I64d_bytes_of_response_body_n
push edi
call fcn.10033a30
mov eax, dword [ebp - 0xc]
add esp, 0x10
sub eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x38]
cdq
sub ecx, eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x38], ecx
sbb eax, edx
mov dword [ebp - 0x3c], eax
test eax, eax
jg 0x10050c09
jl 0x10050b3e
test ecx, ecx
jne 0x10050c09
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], 0
mov dword [eax], 2
jmp 0x10050c29
mov al, byte [ebp - 0x25]
test al, al
je 0x10050b3e
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x30]
push eax
push str._zd_bytes_of_chunk_left_n
push edi
mov byte [edi + 0xfd], 1
call fcn.10033a30
mov eax, dword [ebp - 0x30]
add esp, 0xc
cmp byte [esi + 1], 0xa
jne 0x10050b81
inc esi
inc eax
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0xc]
lea edx, [esi + 1]
sub ecx, eax
push ecx
mov ecx, dword [ebp - 0x1c]
call fcn.10053b00
add esp, 8
cmp eax, 0xffffffff
jne 0x10050bc4
push str.chunk_reading_DONE_n
push edi
call fcn.10033a30
mov eax, dword [ebp - 0x20]
add esp, 8
mov dword [ebp - 0x24], 0
mov dword [eax], 2
mov dword [eax], 2
jmp 0x10050c29
push dword [ebp - 0x10]
push str.Read__zd_bytes_of_chunk__continue_n
push edi
call fcn.10033a30
mov eax, dword [ebp - 0x20]
add esp, 0xc
mov dword [eax], 2
jmp 0x10050c29
xor eax, eax
cmp dword [edi + 0x8678], 0xc8
mov dword [ebp - 0x24], eax
jne 0x10050c09
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x30]
dec eax
je 0x10050c09
push eax
push str.Proxy_CONNECT_followed_by__zd_bytes_of_opaque_data._Data_ignored__known_bug_39_
push edi
call fcn.10033ab0
add esp, 0xc
mov eax, dword [ebp - 0x20]
mov dword [eax], 2
jmp 0x10050c29
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push edi
mov dword [ebp - 0x48], 1
call fcn.10033ab0
add esp, 8
mov ecx, dword [ebp - 0x1c]
call fcn.1003e470
test eax, eax
jne 0x10050d0f
cmp dword [ebp - 0x34], 0x4000
mov ecx, dword [ebp - 0x24]
jb 0x10050740
cmp dword [ebp - 0x48], 0
jne 0x10050e42
cmp dword [edi + 0x8678], 0xc8
mov esi, dword [ebp - 0x1c]
je 0x10050c80
mov ecx, esi
call fcn.1003a4e0
test eax, eax
jne 0x10050e47
cmp byte [esi + 0x1c0], al
je 0x10050c80
mov bl, 1
mov byte [ebp - 0x15], bl
jmp 0x10050c87
mov bl, byte [ebp - 0x15]
test bl, bl
je 0x10050c94
cmp dword [edi + 0x104], 0
jne 0x10050d25
cmp dword [edi + 0x104], 0
mov ecx, dword [ebp - 0x20]
je 0x10050d44
cmp dword [ecx], 2
jne 0x10050cc2
push 0
push str.TUNNEL_STATE_switched_to:__d_n
push edi
mov dword [ecx], 0
call fcn.10033a30
mov ecx, dword [ebp - 0x20]
add esp, 0xc
cmp dword [edi + 0x104], 0
je 0x10050d44
mov edx, dword [ebp - 0x54]
jmp 0x100504d0
push dword [ebp - 0xc]
call dword [0x1010f540]
add esp, 4
mov ecx, ebx
call fcn.1003ab80
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1005cd0d
mov esp, ebp
pop ebp
ret
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1005cd0d
mov esp, ebp
pop ebp
ret
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1005cd0d
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x44]
mov ecx, esi
mov edx, dword [esi + eax*4 + 0x154]
call fcn.10032300
mov eax, dword [ebp - 0x44]
mov dword [esi + eax*4 + 0x154], 0xffffffff
cmp dword [edi + 0xc8], 0xc8
je 0x10050ddc
test bl, bl
je 0x10050d78
cmp dword [edi + 0x104], 0
je 0x10050d78
push str.Connect_me_again_please_n
push edi
mov byte [esi + 0x1d5], 1
call fcn.10033a30
add esp, 8
jmp 0x10050db4
push dword [edi + 0x104]
call dword [0x1010f540]
mov ebx, dword [ebp - 0x44]
add esp, 4
mov dword [edi + 0x104], 0
mov ecx, esi
mov byte [esi + 0x1c0], 1
mov edx, dword [esi + ebx*4 + 0x154]
call fcn.10032300
mov dword [esi + ebx*4 + 0x154], 0xffffffff
mov eax, dword [ebp - 0x20]
mov dword [eax], 0
cmp byte [esi + 0x1d5], 0
jne 0x10050e21
push dword [edi + 0xc8]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push edi
call fcn.10033ab0
add esp, 0xc
jmp 0x10050e42
mov eax, dword [ebp - 0x20]
mov dword [eax], 2
push dword [esi + 0x200]
call dword [0x1010f540]
add esp, 4
mov dword [esi + 0x200], 0
mov byte [edi + 0x85e0], 1
push str.Proxy_replied_OK_to_CONNECT_request_n
push edi
call fcn.10033a30
mov byte [edi + 0xfd], 0
add esp, 8
mov byte [esi + 0x1cf], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1005cd0d
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.10033ab0
add esp, 8
mov eax, 0x38
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005cd0d
mov esp, ebp
pop ebp
ret