Function at 0x518c40
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov ecx, dword [ebp + 8]
mov edx, 0x36ee80
push ebx
push esi
push edi
mov edi, dword [ecx]
xorps xmm0, xmm0
mov dword [ebp - 0x40], 0
movlpd qword [ebp - 0x3c], xmm0
mov eax, dword [edi + 0x19c]
test eax, eax
cmovne edx, eax
mov eax, dword [ebp + 0xc]
add eax, 0x32
mov dword [ebp - 0x30], edx
mov ebx, dword [ecx + eax*4]
lea eax, [ecx + eax*4]
mov dword [ebp - 0x44], eax
xor esi, esi
xor eax, eax
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x24], eax
mov dword [ecx + 0x188], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0xc], eax
cmp dword [ecx + 0x164], 0
jne 0x518e8e
movzx esi, word [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push str.Establish_HTTP_proxy_tunnel_to__s:_hu_n
push edi
call fcn.0050ffa0
mov eax, dword [edi + 0xd4]
add esp, 0x10
test eax, eax
je 0x518ce2
push eax
call dword [0x57c9d4]
add esp, 4
mov dword [edi + 0xd4], 0
call fcn.00518170
mov ebx, eax
test ebx, ebx
je 0x5193ea
push esi
push dword [ebp + 0x10]
push str._s:_hu
call fcn.00511860
add esp, 0xc
mov dword [ebp - 0x20], eax
test eax, eax
je 0x5193e0
push 1
push eax
push str.CONNECT
push dword [ebp + 8]
call fcn.00519550
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x518e64
mov ecx, dword [ebp + 8]
mov eax, 0x54dbb0
mov esi, 0x55de90
push str.Host:
push edi
cmp dword [ecx + 0xac], 1
mov ecx, 0x54dbb4
mov dword [ebp - 0x18], esi
cmovne eax, ecx
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x38], eax
call fcn.00518550
add esp, 8
test eax, eax
jne 0x518d7e
push dword [ebp - 0x20]
push str.Host:__s_r_n
call fcn.00511860
mov esi, eax
add esp, 8
mov dword [ebp - 0x18], esi
test esi, esi
je 0x5193b8
push str.Proxy_Connection:
push edi
call fcn.00518550
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
mov eax, 0x55de90
cmovne ecx, eax
push str.User_Agent:
push edi
mov dword [ebp - 8], ecx
call fcn.00518550
add esp, 0x10
test eax, eax
jne 0x518dc1
cmp dword [edi + 0x394], eax
je 0x518dc1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1a0]
mov dword [ebp - 0x1c], eax
push dword [ebp - 8]
mov eax, dword [ebp + 8]
mov ecx, 0x55de90
push dword [ebp - 0x1c]
mov eax, dword [eax + 0x19c]
test eax, eax
cmovne ecx, eax
movzx eax, word [ebp + 0x14]
push ecx
push esi
push dword [ebp - 0x38]
push eax
push dword [ebp + 0x10]
push str.CONNECT__s:_hu_HTTP__s_r_n_s_s_s_s
push ebx
call fcn.00518330
mov esi, eax
add esp, 0x24
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x518e0d
cmp byte [eax], 0
je 0x518e0d
push eax
call dword [0x57c9d4]
add esp, 4
test esi, esi
jne 0x518e50
push ebx
push dword [ebp + 8]
call fcn.005183a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x518e50
push 0x55b9d4
push ebx
call fcn.00518330
mov esi, eax
add esp, 8
test esi, esi
jne 0x518e50
push dword [ebp + 0xc]
push eax
lea eax, [edi + 0x867c]
push eax
push dword [ebp + 8]
push ebx
call fcn.00518180
add esp, 0x14
mov esi, eax
xor ebx, ebx
test esi, esi
je 0x518e64
push str.Failed_sending_CONNECT_to_proxy
push edi
call fcn.0050ff00
add esp, 8
push dword [ebp - 0x20]
call dword [0x57c9d4]
push ebx
call fcn.0050fbf0
add esp, 8
test esi, esi
jne 0x5193d7
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp - 0x2c]
mov dword [ecx + 0x164], 1
push dword [ecx + 0xbc]
push dword [ecx + 0xb8]
call fcn.005148a0
push edx
push eax
call fcn.00514830
mov ecx, dword [ebp - 0x30]
add esp, 0x10
sub ecx, eax
test ecx, ecx
jle 0x5194b5
cmp dword [edi + 0x508], 2
jne 0x518ed4
push 0
push 0xffffffffffffffff
push ebx
call fcn.0051b4a0
add esp, 0xc
test eax, eax
je 0x5194ac
mov ecx, dword [ebp + 8]
lea eax, [edi + 0x524]
mov dword [ebp - 0x18], eax
mov esi, eax
mov eax, 1
mov dword [ebp - 0x1c], 0
xor ebx, ebx
mov dword [ebp - 8], eax
mov dword [ecx + 0x164], 0
nop dword [eax]
test eax, eax
je 0x519357
cmp dword [ebp - 0x24], 0
jne 0x519466
push dword [ecx + 0xbc]
push dword [ecx + 0xb8]
call fcn.005148a0
push edx
push eax
call fcn.00514830
mov ecx, dword [ebp - 0x30]
add esp, 0x10
sub ecx, eax
test ecx, ecx
jle 0x519402
mov eax, 0x3e8
cmp ecx, eax
cmovl eax, ecx
push eax
push 0xffffffffffffffff
push dword [ebp - 0x2c]
call fcn.0051b4a0
add esp, 0xc
cmp eax, 0xffffffff
je 0x51931b
test eax, eax
je 0x519330
lea eax, [ebp - 0x14]
push eax
mov eax, 0x4000
sub eax, dword [ebp - 0x1c]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x2c]
push dword [ebp + 8]
call fcn.00510020
add esp, 0x14
cmp eax, 0x51
je 0x519344
test eax, eax
je 0x518f98
xor eax, eax
mov dword [ebp - 8], eax
jmp 0x519330
mov ecx, dword [ebp - 0x14]
test ecx, ecx
jg 0x518fd0
xor eax, eax
mov dword [ebp - 8], eax
cmp dword [edi + 0x120], eax
je 0x518fc6
cmp dword [edi + 0x85c4], eax
je 0x518fc6
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x188], 1
jmp 0x519333
push str.Proxy_CONNECT_aborted
jmp 0x519320
add dword [ebp - 0x1c], ecx
cmp dword [ebp - 8], 1
jle 0x519073
mov eax, dword [ebp - 0xc]
lea edx, [edi + 0x524]
or eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], edx
je 0x519028
mov eax, ecx
mov ecx, dword [ebp - 0xc]
cdq
sub ecx, eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
sbb eax, edx
mov dword [ebp - 0x10], eax
test eax, eax
jg 0x519330
jl 0x518f8e
test ecx, ecx
jne 0x519330
xor eax, eax
mov dword [ebp - 8], eax
jmp 0x519330
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push ecx
push edx
push dword [ebp + 8]
call fcn.00516710
add esp, 0x10
cmp eax, 0xffffffff
jne 0x51905d
push str.chunk_reading_DONE_n
push edi
call fcn.0050ffa0
add esp, 8
xor eax, eax
mov dword [ebp - 8], eax
jmp 0x519330
push dword [ebp - 0x20]
push str.Read__zd_bytes_of_chunk__continue_n
push edi
call fcn.0050ffa0
add esp, 0xc
jmp 0x519330
xor eax, eax
mov dword [ebp - 0x20], eax
test ecx, ecx
jle 0x519330
mov edx, dword [ebp - 0x18]
inc ebx
mov dword [ebp - 0x38], esi
cmp byte [edx], 0xa
jne 0x51922b
cmp dword [edi + 0x2d8], 0
je 0x5190a9
push dword [ebp + 8]
push ebx
push esi
push 1
push edi
call fcn.0050fe20
add esp, 0x14
xor eax, eax
cmp dword [edi + 0x2bc], eax
push ebx
setne al
push esi
add eax, 2
push eax
push dword [ebp + 8]
call fcn.0050fcc0
add esp, 0x10
test eax, eax
jne 0x5194c8
mov al, byte [esi]
cmp al, 0xd
je 0x519240
cmp al, 0xa
je 0x519240
mov cl, byte [ebx + esi]
lea eax, [ebx + esi]
push 0x11
push esi
push str.WWW_Authenticate:
mov dword [ebp - 0x38], eax
mov byte [ebp - 1], cl
mov byte [eax], 0
call fcn.00512e20
add esp, 0xc
test eax, eax
je 0x51910f
mov eax, dword [edi + 0x90]
cmp eax, 0x191
je 0x519130
push 0x13
push esi
push str.Proxy_authenticate:
call fcn.00512e20
add esp, 0xc
test eax, eax
je 0x51914a
mov eax, dword [edi + 0x90]
cmp eax, 0x197
jne 0x51914a
push esi
push eax
push dword [ebp + 8]
call fcn.00518900
add esp, 0xc
test eax, eax
jne 0x5194c8
jmp 0x519215
push 0xf
push esi
push str.Content_Length:
call fcn.00512e20
add esp, 0xc
test eax, eax
je 0x519179
push 0xa
push 0
add esi, 0xf
push esi
call fcn.004fa103
add esp, 0xc
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], edx
jmp 0x519215
push str.close
push str.Connection:
push esi
call fcn.005185a0
add esp, 0xc
test eax, eax
je 0x519199
mov dword [ebp - 0x28], 1
jmp 0x519215
push str.chunked
push str.Transfer_Encoding:
push esi
call fcn.005185a0
add esp, 0xc
test eax, eax
je 0x5191cf
push str.CONNECT_responded_chunked_n
push edi
call fcn.0050ffa0
push dword [ebp + 8]
mov dword [ebp - 0x34], 1
call fcn.005166f0
add esp, 0xc
jmp 0x519215
push str.close
push str.Proxy_Connection:
push esi
call fcn.005185a0
add esp, 0xc
test eax, eax
je 0x5191ef
mov dword [ebp - 0x28], 1
jmp 0x519215
lea ebx, [edi + 0x90]
push ebx
lea eax, [ebp - 0x40]
push eax
push str.HTTP_1._d__d
push esi
call fcn.00418050
add esp, 0x10
cmp eax, 2
jne 0x519215
mov eax, dword [ebx]
mov dword [edi + 0x8668], eax
mov eax, dword [ebp - 0x38]
xor ebx, ebx
mov edx, dword [ebp - 0x18]
mov cl, byte [ebp - 1]
mov byte [eax], cl
mov ecx, dword [ebp - 0x14]
lea esi, [edx + 1]
mov eax, dword [ebp - 0x20]
inc eax
inc edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x20], eax
cmp eax, ecx
jl 0x519083
jmp 0x519330
cmp dword [edi + 0x90], 0x197
lea eax, [edi + 0x524]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], eax
jne 0x518f8e
cmp dword [edi + 0x85d4], 0
jne 0x518f8e
mov ecx, dword [ebp - 0xc]
mov eax, ecx
mov edx, dword [ebp - 0x10]
or eax, edx
mov dword [ebp - 8], 2
je 0x51929b
push edx
push ecx
push str.Ignore__lld_bytes_of_response_body_n
push edi
call fcn.0050ffa0
mov eax, dword [ebp - 0x14]
add esp, 0x10
sub eax, dword [ebp - 0x20]
jmp 0x518ff7
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x518f8e
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x20]
push eax
push str._zd_bytes_of_chunk_left_n
push edi
mov dword [edi + 0xc8], 1
call fcn.0050ffa0
mov edx, dword [ebp - 0x20]
lea ecx, [ebp - 0x14]
mov al, byte [esi + 1]
inc esi
cmp al, 0xa
mov eax, dword [ebp - 0x14]
push ecx
cmovne esi, dword [ebp - 0x38]
lea ecx, [edx + 1]
cmovne ecx, edx
sub eax, ecx
push eax
lea eax, [esi + 1]
push eax
push dword [ebp + 8]
call fcn.00516710
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x519308
push str.chunk_reading_DONE_n
push edi
call fcn.0050ffa0
add esp, 8
xor eax, eax
mov dword [ebp - 8], eax
jmp 0x519330
push dword [ebp - 0x14]
push str.Read__zd_bytes_of_chunk__continue_n
push edi
call fcn.0050ffa0
add esp, 0xc
jmp 0x519330
push str.Proxy_CONNECT_aborted_due_to_select_poll_error
push edi
mov dword [ebp - 0x24], 1
call fcn.0050ff00
add esp, 8
mov ecx, dword [ebp + 8]
push ecx
call fcn.0051a610
add esp, 4
test eax, eax
jne 0x5193f6
cmp dword [ebp - 0x1c], 0x4000
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 8]
jb 0x518f00
cmp dword [ebp - 0x24], 0
jne 0x519466
cmp dword [edi + 0x8668], 0xc8
je 0x519393
push ecx
call fcn.00518740
add esp, 4
test eax, eax
jne 0x5194c8
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x130], eax
je 0x519393
mov esi, 1
mov dword [ebp - 0x28], esi
jmp 0x51939a
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x5193a3
cmp dword [edi + 0xd4], 0
jne 0x51941c
cmp dword [edi + 0xd4], 0
je 0x519430
mov ebx, dword [ebp - 0x2c]
jmp 0x518ca1
push ebx
call dword [0x57c9d4]
push dword [ebp - 0x20]
call dword [0x57c9d4]
add esp, 8
mov eax, 0x1b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [0x57c9d4]
add esp, 4
pop edi
pop esi
mov eax, 0x1b
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.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.0050ff00
add esp, 8
mov eax, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x44]
push dword [ebx]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp + 8]
mov dword [ebx], 0xffffffff
mov eax, dword [edi + 0x90]
cmp eax, 0xc8
je 0x519472
push eax
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push edi
call fcn.0050ff00
add esp, 0xc
test esi, esi
je 0x519466
cmp dword [edi + 0xd4], 0
je 0x519466
mov eax, dword [ebp + 8]
mov dword [eax + 0x188], 1
pop edi
pop esi
mov eax, 0x38
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ecx + 0x19c]
call fcn.0050fbf0
mov eax, dword [ebp + 8]
push str.Proxy_replied_OK_to_CONNECT_request_n
push edi
mov dword [eax + 0x19c], 0
mov dword [edi + 0x85c8], 1
call fcn.0050ffa0
add esp, 0xc
mov dword [edi + 0xc8], 0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push edi
call fcn.0050ff00
mov eax, 0x38
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret