Function at 0x59d690
Capabilities:
Check http status code

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x40
mov esi, ecx
mov eax, dword [0x7c3824]
xor eax, esp
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], 0
mov edi, dword [ecx + 0xc]
mov dword [esp + 0x18], edx
mov eax, dword [edi + edx*4 + 0x148]
mov dword [esp + 0x24], eax
mov ebp, dword [edi + 0x4e0]
xor ebx, ebx
push edi
call fcn.0059d490
add esp, 4
test al, al
jne 0x59e0dc
mov eax, dword [esi + 0x134]
mov dword [esp + 0x1c], eax
mov dword [esp + 4], edi
mov byte [edi + 0x25c], 0
lea eax, [ebp + 0x1cc]
mov dword [esp + 8], eax
lea eax, [esi + 0xd68]
mov dword [esp + 0x20], eax
lea eax, [ebp + 0x1bc]
mov dword [esp + 0x14], eax
lea eax, [esi + 0xf0]
mov dword [esp + 0xc], eax
lea ebx, [ebp + 0x1e8]
mov dword [esp], ebp
mov dword [esp + 0x10], ebx
jmp 0x59d738
test eax, eax
je 0x59e06c
cmp dword [ebp + 0x1f0], 0
jne 0x59d868
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov edi, dword [esp + 0x58]
push edi
mov ebx, dword [esp + 0x58]
push ebx
push str.Establish_HTTP_proxy_tunnel_to__s:_d
push esi
call fcn.0051ec50
add esp, 0x10
push dword [esi + 0x128]
call dword [0x7c3880]
add esp, 4
mov dword [esi + 0x128], 0
push 0x100000
push dword [esp + 0xc]
call fcn.00522f50
add esp, 8
mov ecx, esi
mov ebp, dword [esp + 4]
mov edx, ebp
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x38]
push eax
push edi
push ebx
call fcn.0059e1a0
add esp, 0x10
test eax, eax
jne 0x59dfc8
mov edi, dword [esp + 0x34]
push 1
push edi
push 0
push 0x66630b
push ebp
push esi
call fcn.00583630
add esp, 0x18
test eax, eax
je 0x59d7df
mov ebx, eax
mov ebp, dword [esp + 0x30]
jmp 0x59d83b
cmp dword [ebp + 0xb8], 1
mov eax, 0x66a97f
mov ecx, 0x66af2b
cmove eax, ecx
mov ecx, dword [esi + 0xccc]
test ecx, ecx
mov ebx, 0x672026
cmove ecx, ebx
mov ebp, dword [esp + 0x30]
test ebp, ebp
mov edx, ebp
cmove edx, ebx
push ecx
push edx
push eax
push edi
push str.CONNECT__s_HTTP__s_r_n_s_s
push dword [esp + 0x1c]
call fcn.005230f0
add esp, 0x18
mov ebx, eax
test eax, eax
je 0x59de14
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.0051ed60
add esp, 8
push ebp
call dword [0x7c3880]
add esp, 4
push edi
call dword [0x7c3880]
add esp, 4
test ebx, ebx
jne 0x59e0dc
mov ebp, dword [esp]
mov dword [ebp + 0x1f0], 1
mov ebx, dword [esp + 0x10]
push 1
push 0
push esi
call fcn.005289c0
add esp, 0xc
neg eax
mov eax, 0
sbb eax, edx
jge 0x59dfcf
push dword [esp + 0x18]
push dword [esp + 8]
call fcn.00529ec0
add esp, 8
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 0x1a0]
test al, al
jne 0x59d8aa
test ecx, ecx
je 0x59e0da
cmp ecx, 1
je 0x59d8d0
cmp dword [ebp + 0x1e0], 0
jne 0x59d948
jmp 0x59dec0
mov eax, dword [ebp + 0x1dc]
test eax, eax
jne 0x59dfe7
mov eax, dword [esi + 0x910]
mov dword [esi + 0x130], eax
lea eax, [esp + 0x34]
push eax
push dword [esi + 0x4ec]
push esi
call fcn.00587340
add esp, 0xc
test eax, eax
jne 0x59dfc8
mov eax, dword [esp + 0x34]
mov dword [ebp + 0x1dc], eax
test eax, eax
mov ebx, dword [esp + 0x10]
jne 0x59dfe7
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x1a0], 0
cmp dword [ebp + 0x1e0], 0
jne 0x59d948
jmp 0x59dec0
test eax, eax
je 0x59dec0
lea eax, [esp + 0x34]
push eax
push 1
lea eax, [esp + 0x37]
push eax
push dword [esp + 0x30]
push esi
call fcn.0051f4a0
add esp, 0x14
cmp eax, 0x51
je 0x59e0da
mov edi, eax
push esi
call fcn.00577ae0
add esp, 4
test eax, eax
jne 0x59dfa6
test edi, edi
jne 0x59ddab
cmp dword [esp + 0x34], 0
jle 0x59ddba
cmp dword [ebp + 0x1e0], 2
jne 0x59d9d0
mov ecx, dword [ebx]
mov eax, dword [ebx + 4]
mov edx, ecx
or edx, eax
je 0x59daae
mov edx, ecx
add edx, 0xffffffff
mov edi, eax
adc edi, 0xffffffff
mov dword [ebx], edx
mov dword [ebx + 4], edi
mov edx, 1
cmp edx, ecx
mov ecx, 0
sbb ecx, eax
jl 0x59dc60
jmp 0x59dea6
push 1
lea eax, [esp + 0x33]
push eax
push dword [esp + 0x1c]
call fcn.00522fc0
add esp, 0xc
test eax, eax
jne 0x59dfb0
cmp byte [esp + 0x2f], 0xa
jne 0x59dc60
mov edi, dword [esp + 0x14]
push edi
call fcn.00444790
add esp, 4
mov ebp, eax
push edi
call fcn.00523130
add esp, 4
mov edi, eax
push eax
push ebp
push 1
push esi
call fcn.0051ecd0
add esp, 0x10
cmp byte [esi + 0x736], 0
jne 0x59da49
cmp byte [esi + 0x71d], 1
mov eax, 3
sbb eax, 0
push edi
push ebp
push eax
push esi
call fcn.0051f270
add esp, 0x10
test eax, eax
jne 0x59dfc8
mov eax, edi
sar eax, 0x1f
add dword [esi + 0xd60], edi
adc dword [esi + 0xd64], eax
movzx eax, byte [ebp]
cmp al, 0xd
je 0x59da6a
cmp al, 0xa
jne 0x59db00
mov eax, dword [esp + 0xc]
cmp dword [eax], 0x197
mov ebx, dword [esp + 0x10]
jne 0x59da87
cmp byte [esi + 0xd09], 0
je 0x59dbc0
mov ebp, dword [esp]
mov dword [ebp + 0x1e0], 0
mov eax, dword [ebx]
or eax, dword [ebx + 4]
jne 0x59dc60
mov dword [ebp + 0x1f0], 2
jmp 0x59dc60
mov dword [esp + 0x28], 0
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x2c]
push eax
push 1
lea eax, [esp + 0x3b]
push eax
push esi
call fcn.005a1510
add esp, 0x14
cmp eax, 0xffffffff
jne 0x59dc60
push str.chunk_reading_DONE
push esi
call fcn.0051ec50
add esp, 8
mov dword [ebp + 0x1e0], 0
mov dword [ebp + 0x1f0], 2
jmp 0x59dc60
push 0x11
push ebp
push str.WWW_Authenticate:
call fcn.0052b1c0
add esp, 0xc
test eax, eax
je 0x59db24
mov eax, dword [esp + 0xc]
cmp dword [eax], 0x191
jne 0x59db24
xor ebx, ebx
jmp 0x59db46
push 0x13
push ebp
push str.Proxy_authenticate:
call fcn.0052b1c0
add esp, 0xc
test eax, eax
je 0x59db83
mov bl, 1
mov eax, dword [esp + 0xc]
cmp dword [eax], 0x197
jne 0x59db83
push ebp
call fcn.00583030
add esp, 4
test eax, eax
je 0x59e190
mov edi, eax
movzx eax, bl
push edi
push eax
push esi
call fcn.00583940
add esp, 0xc
mov ebx, eax
push edi
call dword [0x7c3880]
add esp, 4
test ebx, ebx
mov ebp, dword [esp]
je 0x59dc46
jmp 0x59e0dc
push 0xf
push ebp
push str.Content_Length:
call fcn.0052b1c0
add esp, 0xc
test eax, eax
je 0x59dc08
mov eax, dword [esp + 0xc]
mov eax, dword [eax]
lea ecx, [eax - 0xc8]
cmp ecx, 0x63
ja 0x59dc2f
push eax
push str.Ignoring_Content_Length_in_CONNECT__03d_response
push esi
call fcn.0051ec50
add esp, 0xc
jmp 0x59dc43
mov edi, dword [esp]
mov dword [edi + 0x1e0], 2
mov eax, dword [edi + 0x1e8]
mov ecx, dword [edi + 0x1ec]
mov edx, eax
or edx, ecx
je 0x59dc73
push ecx
push eax
push str.Ignore__I64d_bytes_of_response_body
push esi
call fcn.0051ec50
add esp, 0x10
mov ebp, edi
mov eax, dword [ebp + 0x1e0]
test eax, eax
jne 0x59d940
jmp 0x59da94
push str.close
push 0x668c6b
push ebp
call fcn.00584000
add esp, 0xc
test al, al
je 0x59dceb
mov ebp, dword [esp]
mov byte [ebp + 0x1f5], 1
jmp 0x59dc46
add ebp, 0xf
push dword [esp + 0x10]
push 0xa
push 0
push ebp
call fcn.005a03b0
add esp, 0x10
mov ebp, dword [esp]
push dword [esp + 0x14]
call fcn.00522fa0
add esp, 4
mov ebx, dword [esp + 0x10]
nop word cs:[eax + eax]
mov eax, dword [ebp + 0x1e0]
test eax, eax
jne 0x59d948
jmp 0x59dec0
cmp byte [edi + 0x1f4], 0
je 0x59da87
push str.Ignore_chunked_response_body
push esi
call fcn.0051ec50
add esp, 8
mov byte [esi + 0x13f], 1
cmp byte [ebp + 1], 0xa
lea eax, [ebp + 1]
cmovne eax, ebp
add eax, 1
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x38]
push ecx
push 1
push eax
push esi
call fcn.005a1510
add esp, 0x14
cmp eax, 0xffffffff
mov ebp, dword [esp]
jne 0x59dbf5
push str.chunk_reading_DONE
push esi
call fcn.0051ec50
add esp, 8
mov dword [ebp + 0x1e0], 0
mov dword [ebp + 0x1f0], 2
jmp 0x59dbf5
push 0x12
push ebp
push str.Transfer_Encoding:
call fcn.0052b1c0
add esp, 0xc
test eax, eax
je 0x59dd1b
mov eax, dword [esp + 0xc]
mov eax, dword [eax]
lea ecx, [eax - 0xc8]
cmp ecx, 0x63
ja 0x59dd6a
push eax
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response
jmp 0x59dbb2
push str.close
push str.Proxy_Connection:
push ebp
call fcn.00584000
add esp, 0xc
test al, al
jne 0x59dc23
push dword [esp + 0xc]
lea eax, [esp + 0x3c]
push eax
push str.HTTP_1._d__d
push ebp
call fcn.004b2e3b
add esp, 0x10
cmp eax, 2
mov ebp, dword [esp]
jne 0x59dc46
mov eax, dword [esi + 0xf0]
mov dword [esi + 0xd4c], eax
jmp 0x59dc46
push 0x66493b
push str.Transfer_Encoding:
push ebp
call fcn.00584000
add esp, 0xc
test al, al
mov ebp, dword [esp]
je 0x59dc46
push str.CONNECT_responded_chunked
push esi
call fcn.0051ec50
add esp, 8
mov byte [ebp + 0x1f4], 1
push esi
call fcn.005a14e0
add esp, 4
jmp 0x59dc46
mov dword [ebp + 0x1e0], 0
jmp 0x59dec0
cmp dword [esi + 0x170], 0
je 0x59ddf2
cmp dword [esi + 0x9c0], 0
je 0x59ddf2
cmp dword [esi + 0xccc], 0
je 0x59ddf2
mov eax, dword [esp + 4]
mov byte [eax + 0x25c], 1
push str.Proxy_CONNECT_connection_closed
push esi
call fcn.0051ec50
add esp, 8
xor edi, edi
jmp 0x59de05
push str.Proxy_CONNECT_aborted
push esi
call fcn.0051ed60
add esp, 8
mov edi, 1
mov dword [ebp + 0x1e0], 0
jmp 0x59dec2
push str.User_Agent
push dword [esp + 8]
push esi
call fcn.00582fc0
add esp, 0xc
test eax, eax
je 0x59df57
push str.Proxy_Connection
push dword [esp + 8]
push esi
call fcn.00582fc0
add esp, 0xc
test eax, eax
je 0x59df86
push dword [esp + 8]
push 1
push esi
call fcn.00584250
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x59d82d
push 0x671f33
push dword [esp + 0xc]
call fcn.005230a0
add esp, 8
mov ebx, eax
test eax, eax
jne 0x59d82d
push dword [esp + 0x18]
push 0
push 0
push dword [esp + 0x2c]
push esi
push dword [esp + 0x1c]
call fcn.00583c50
add esp, 0x18
mov ebx, eax
test eax, eax
jne 0x59d82d
xor ebx, ebx
jmp 0x59d83b
mov dword [ebp + 0x1e0], 0
mov dword [ebp + 0x1f0], 2
nop word [eax + eax]
xor edi, edi
push esi
call fcn.00577ae0
add esp, 4
test eax, eax
jne 0x59dfa6
mov ebx, 0x38
test edi, edi
jne 0x59e0dc
mov eax, dword [esi + 0xd4c]
mov ecx, 0xffffff38
add eax, ecx
cmp eax, 0x64
jb 0x59df14
push esi
call fcn.00583100
add esp, 4
test eax, eax
jne 0x59dfc8
mov eax, dword [esp + 4]
cmp byte [eax + 0x25d], 0
jne 0x59e038
cmp byte [ebp + 0x1f5], 0
jne 0x59e03f
mov eax, dword [esi + 0x128]
test eax, eax
mov ebx, dword [esp + 0x10]
je 0x59e06c
cmp dword [ebp + 0x1f0], 2
jne 0x59d730
mov ecx, esi
mov edx, 1
call fcn.0059d5a0
mov eax, dword [esi + 0x128]
jmp 0x59d730
mov eax, dword [esi + 0x5cc]
test eax, eax
je 0x59de2e
push eax
push str.User_Agent:__s_r_n
push dword [esp + 0x10]
call fcn.005230f0
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x59d82d
jmp 0x59de2e
push str.Proxy_Connection:_Keep_Alive_r_n
push dword [esp + 0xc]
call fcn.005230a0
add esp, 8
mov ebx, eax
test eax, eax
jne 0x59d82d
jmp 0x59de48
mov ebx, 0x2a
jmp 0x59e0dc
push str.CONNECT_response_too_large_
push esi
call fcn.0051ed60
add esp, 8
mov ebx, 0x38
jmp 0x59e0dc
mov ebx, eax
jmp 0x59e0dc
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.0051ed60
add esp, 8
mov ebx, 0x1c
jmp 0x59e0dc
lea ecx, [esp + 0x34]
push ecx
push eax
push dword [esi + 0x130]
mov eax, dword [esp + 0x10]
push dword [eax + 0x2bc]
push esi
call fcn.0051ee10
add esp, 0x14
mov ebx, eax
test eax, eax
jne 0x59e023
push dword [esp + 0x34]
push dword [esi + 0x130]
push 2
push esi
call fcn.0051ecd0
add esp, 0x10
mov ebx, eax
mov eax, dword [esp + 0x34]
sub dword [ebp + 0x1dc], eax
add dword [esi + 0x130], eax
jmp 0x59e0dc
mov byte [ebp + 0x1f5], 1
cmp dword [esi + 0x128], 0
je 0x59e06c
mov edi, dword [esp + 4]
mov ebx, dword [esp + 0x18]
push dword [edi + ebx*4 + 0x148]
push edi
push esi
call fcn.00529660
add esp, 0xc
mov dword [edi + ebx*4 + 0x148], 0xffffffff
mov eax, 0xffffff38
add eax, dword [esi + 0xd4c]
cmp eax, 0x64
jae 0x59e0f1
mov dword [ebp + 0x1f0], 2
push dword [esi + 0xccc]
call dword [0x7c3880]
add esp, 4
mov dword [esi + 0xccc], 0
mov word [esi + 0x9c4], 1
push dword [esi + 0xd4c]
push str.Proxy_replied__d_to_CONNECT_request
push esi
call fcn.0051ec50
add esp, 0xc
mov byte [esi + 0x13f], 0
mov eax, dword [esp + 4]
mov byte [eax + 0x26a], 0
push dword [esp + 0x14]
call fcn.00522f70
add esp, 4
xor ebx, ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.005db451
mov eax, ebx
add esp, 0x40
pop esi
pop edi
pop ebx
pop ebp
ret
cmp byte [ebp + 0x1f5], 0
mov eax, dword [esi + 0x128]
je 0x59e12a
test eax, eax
je 0x59e128
mov edi, dword [esp + 4]
mov byte [edi + 0x25c], 1
push str.Connect_me_again_please
push esi
call fcn.0051ec50
add esp, 8
push esi
call fcn.0059d4f0
add esp, 4
jmp 0x59e14d
xor eax, eax
push eax
call dword [0x7c3880]
add esp, 4
mov dword [esi + 0x128], 0
push 2
mov edi, dword [esp + 8]
push edi
call fcn.00529e60
add esp, 8
mov dword [ebp + 0x1f0], 0
xor ebx, ebx
cmp byte [edi + 0x25c], 0
jne 0x59e0dc
push dword [esp + 0x14]
call fcn.00522f70
add esp, 4
push dword [esi + 0xf0]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.0051ed60
add esp, 0xc
mov ebx, 0x38
jmp 0x59e0dc
mov ebx, 0x1b
jmp 0x59e0dc