Function at 0x521cc0
Capabilities:
Check http status code

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1c]
push edi
mov edi, dword [esp + 0x18]
push 0x11
push str.WWW_Authenticate:
push esi
call fcn.004f9a20
add esp, 0xc
test eax, eax
je 0x521cee
mov ebp, dword [edi + 0xd4]
cmp ebp, 0x191
je 0x521d10
push 0x13
push str.Proxy_authenticate:
push esi
call fcn.004f9a20
add esp, 0xc
test eax, eax
je 0x521d66
mov ebp, dword [edi + 0xd4]
cmp ebp, 0x197
jne 0x521d66
push esi
call fcn.004fe5b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x521d27
pop edi
pop esi
pop ebp
lea eax, [ebx + 0x1b]
pop ebx
ret
push esi
push str.CONNECT:_fwd_auth_header__s
push dword [esp + 0x1c]
push edi
call fcn.004f2de0
cmp ebp, 0x197
push ebx
sete al
movzx eax, al
push eax
push edi
call fcn.004ffab0
push ebx
mov esi, eax
call dword [0x580004]
add esp, 0x20
test esi, esi
je 0x521f04
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
push 0xf
push str.Content_Length:
push esi
call fcn.004f9a20
add esp, 0xc
test eax, eax
je 0x521dc0
mov ecx, dword [edi + 0xd4]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x521da1
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response
push edi
call fcn.004f2d10
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esp + 0x1c]
add eax, 0x70
push eax
push 0xa
lea eax, [esi + 0xf]
push 0
push eax
call fcn.00504ca0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push 5
push str.close
push 0xb
push str.Connection:
push esi
call fcn.004fe500
add esp, 0x14
test al, al
jne 0x521efc
push 0x12
push str.Transfer_Encoding:
push esi
call fcn.004f9a20
add esp, 0xc
test eax, eax
je 0x521e62
mov ecx, dword [edi + 0xd4]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x521e1a
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response
push edi
call fcn.004f2d10
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push 7
push str.chunked
push 0x12
push str.Transfer_Encoding:
push esi
call fcn.004fe500
add esp, 0x14
test al, al
je 0x521f04
push str.CONNECT_responded_chunked
push edi
call fcn.004f2d10
mov eax, dword [esp + 0x24]
push 1
mov byte [eax + 0x7c], 1
add eax, 0x30
push eax
push edi
call fcn.00527ea0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push 5
push str.close
push 0x11
push str.Proxy_Connection:
push esi
call fcn.004fe500
add esp, 0x14
test al, al
jne 0x521efc
push 7
push str.HTTP_1.
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x521f04
mov al, byte [esi + 7]
cmp al, 0x30
je 0x521e9d
cmp al, 0x31
jne 0x521f04
cmp byte [esi + 8], 0x20
jne 0x521f04
mov cl, byte [esi + 9]
mov al, cl
sub al, 0x30
cmp al, 9
ja 0x521f04
mov dl, byte [esi + 0xa]
mov al, dl
sub al, 0x30
cmp al, 9
ja 0x521f04
mov dh, byte [esi + 0xb]
mov al, dh
sub al, 0x30
cmp al, 9
ja 0x521f04
mov al, byte [esi + 0xc]
cmp al, 0x30
jl 0x521ecf
cmp al, 0x39
jle 0x521f04
movsx eax, cl
lea ecx, [eax + eax*4]
movsx eax, dl
lea eax, [eax + ecx*2]
lea ecx, [eax + eax*4]
movsx eax, dh
lea eax, [eax + ecx*2]
add eax, 0xffffeb30
mov dword [edi + 0xd4], eax
mov dword [edi + 0xd3c], eax
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esp + 0x1c]
mov byte [eax + 0x7d], 1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret