Function at 0x502340
Capabilities:
Check http status code

Disassembly:
sub esp, 0x30
mov eax, dword [esp + 0x38]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x40]
lea ecx, [eax + 0x52]
push edi
mov dword [esp + 0x34], 0
mov edi, dword [esi + 0xc]
mov dword [esp + 0x10], edi
mov ebp, dword [edi + eax*4 + 0x148]
lea ecx, [edi + ecx*4]
mov ebx, dword [edi + 0x4e0]
mov eax, dword [esi + 0x134]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x502dca
cmp dword [ebx + 0x1f0], 2
jge 0x502dca
mov byte [edi + 0x25c], 0
nop
cmp dword [ebx + 0x1f0], 0
jne 0x5025c6
push dword [esp + 0x50]
lea ebp, [ebx + 0x1cc]
push dword [esp + 0x50]
push str.Establish_HTTP_proxy_tunnel_to__s:_d
push esi
call fcn.004fd800
push dword [esi + 0x128]
call dword [0x6d3004]
push 0x100000
push ebp
mov dword [esi + 0x128], 0
call fcn.004f43a0
mov ebp, dword [esp + 0x68]
add esp, 0x1c
mov cl, byte [edi + 0x264]
mov dword [esp + 0x18], 0
cmp ebp, dword [edi + 0x64]
je 0x502411
push 0x3a
push ebp
call fcn.005b31b0
add esp, 8
test eax, eax
setne cl
push dword [esp + 0x50]
test cl, cl
mov edx, 0x627e3e
mov eax, 0x633204
cmove eax, edx
push eax
mov eax, str.___:
push ebp
cmove eax, edx
push eax
push str._s_s_s:_d
call fcn.0050e780
mov ebp, eax
add esp, 0x14
test ebp, ebp
je 0x502c14
push str.Host
push edi
push esi
call fcn.00508380
add esp, 0xc
test eax, eax
jne 0x502473
push ebp
push str.Host:__s_r_n
call fcn.0050e780
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
je 0x502c0a
push 1
push ebp
push 0
push str.CONNECT
push edi
push esi
call fcn.0050a250
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x502598
mov ecx, dword [esp + 0x10]
mov edx, 0x600904
push str.Proxy_Connection
mov eax, 0x600900
mov edi, 0x627e3e
push ecx
cmp dword [ecx + 0xb8], 1
push esi
cmovne eax, edx
mov dword [esp + 0x38], eax
call fcn.00508380
test eax, eax
mov ecx, str.Proxy_Connection:_Keep_Alive_r_n
push str.User_Agent
push dword [esp + 0x20]
mov eax, edi
cmovne ecx, eax
push esi
mov dword [esp + 0x40], ecx
call fcn.00508380
add esp, 0x18
test eax, eax
jne 0x5024f2
cmp dword [esi + 0x5c4], eax
je 0x5024f2
mov edi, dword [esi + 0xcc0]
push dword [esp + 0x28]
mov eax, dword [esi + 0xcbc]
mov edx, 0x627e3e
test eax, eax
mov ecx, edx
push edi
cmovne ecx, eax
mov eax, edx
push ecx
mov ecx, dword [esp + 0x24]
test ecx, ecx
cmovne eax, ecx
push eax
push dword [esp + 0x3c]
lea eax, [ebx + 0x1cc]
push ebp
push str.CONNECT__s_HTTP__s_r_n_s_s_s_s
push eax
call fcn.004f4340
mov edi, eax
add esp, 0x20
test edi, edi
jne 0x50258a
lea eax, [ebx + 0x1cc]
push eax
push 1
push esi
call fcn.00507c90
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x50258a
lea eax, [ebx + 0x1cc]
push 0x636264
push eax
call fcn.004f4310
mov edi, eax
add esp, 8
test edi, edi
jne 0x50258a
push dword [esp + 0x48]
push eax
push eax
lea eax, [esi + 0xd58]
push eax
lea eax, [ebx + 0x1cc]
push esi
push eax
call fcn.005080f0
mov edi, eax
add esp, 0x18
test edi, edi
je 0x502598
push str.Failed_sending_CONNECT_to_proxy
push esi
call fcn.004fd730
add esp, 8
push dword [esp + 0x18]
call dword [0x6d3004]
push ebp
call dword [0x6d3004]
add esp, 8
test edi, edi
jne 0x502c21
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov dword [ebx + 0x1f0], 1
push 1
push 0
push esi
call fcn.004fed10
add esp, 0xc
test edx, edx
jl 0x502de1
jg 0x5025e5
test eax, eax
je 0x502de1
push dword [esp + 0x48]
push edi
call fcn.004fe070
mov ecx, dword [esp + 0x24]
add esp, 8
test al, al
jne 0x502607
cmp dword [ecx + 0x1a0], 0
je 0x502dca
cmp dword [ecx + 0x1a0], 1
jne 0x502662
mov eax, dword [ebx + 0x1dc]
test eax, eax
jne 0x502c2b
mov eax, dword [esi + 0x900]
mov dword [esi + 0x130], eax
lea eax, [esp + 0x30]
push eax
push dword [esi + 0x4e4]
push esi
call fcn.00503210
add esp, 0xc
test eax, eax
jne 0x502dcc
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
mov dword [ebx + 0x1dc], eax
test eax, eax
jne 0x502c2b
mov dword [ecx + 0x1a0], eax
cmp dword [ebx + 0x1e0], 0
mov dword [esp + 0x18], 0
je 0x502b30
lea eax, [esp + 0x20]
push eax
push 1
lea eax, [esp + 0x4c]
push eax
push ebp
push esi
call fcn.004fd890
mov edi, eax
add esp, 0x14
cmp edi, 0x51
je 0x502dca
push esi
call fcn.0050c0f0
add esp, 4
test eax, eax
jne 0x502dd4
test edi, edi
jne 0x502b1c
cmp dword [esp + 0x20], edi
jle 0x502ab5
cmp dword [ebx + 0x1e0], 2
jne 0x50276e
mov ecx, dword [ebx + 0x1e8]
mov eax, ecx
mov edx, dword [ebx + 0x1ec]
or eax, edx
je 0x50271c
sub ecx, 1
mov dword [ebx + 0x1e8], ecx
sbb edx, edi
mov dword [ebx + 0x1ec], edx
js 0x5026fb
jg 0x5029be
test ecx, ecx
jne 0x5029be
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x18]
mov dword [ebx + 0x1e0], 0
mov dword [ebx + 0x1f0], 2
jmp 0x502b32
lea eax, [esp + 0x38]
mov dword [esp + 0x2c], 0
push eax
lea eax, [esp + 0x30]
push eax
push 1
lea eax, [esp + 0x50]
push eax
push esi
call fcn.0052af40
add esp, 0x14
cmp eax, 0xffffffff
jne 0x5029be
push str.chunk_reading_DONE
push esi
call fcn.004fd800
add esp, 8
mov dword [ebx + 0x1e0], 0
mov dword [ebx + 0x1f0], 2
jmp 0x5029be
push 1
lea eax, [esp + 0x48]
push eax
lea ebp, [ebx + 0x1bc]
push ebp
call fcn.004f4360
add esp, 0xc
test eax, eax
jne 0x502c7d
cmp byte [esp + 0x44], 0xa
jne 0x5029ba
push ebp
call fcn.004f43d0
push ebp
mov edi, eax
call fcn.004f43c0
mov ebp, eax
push ebp
push edi
push 1
push esi
call fcn.004fd6a0
add esp, 0x18
cmp byte [esi + 0x726], 0
jne 0x5027df
xor eax, eax
cmp byte [esi + 0x70d], al
push ebp
setne al
push edi
add eax, 2
push eax
push esi
call fcn.004fd690
add esp, 0x10
test eax, eax
jne 0x502dcc
mov eax, ebp
cdq
add dword [esi + 0xd50], eax
adc dword [esi + 0xd54], edx
mov al, byte [edi]
cmp al, 0xd
je 0x5029d8
cmp al, 0xa
je 0x5029d8
push 0x11
push edi
push str.WWW_Authenticate:
call fcn.00501d60
add esp, 0xc
test eax, eax
je 0x502822
mov ebp, dword [esi + 0xf0]
cmp ebp, 0x191
je 0x502844
push 0x13
push edi
push str.Proxy_authenticate:
call fcn.00501d60
add esp, 0xc
test eax, eax
je 0x502889
mov ebp, dword [esi + 0xf0]
cmp ebp, 0x197
jne 0x502889
push edi
call fcn.005084c0
mov edi, eax
add esp, 4
test edi, edi
je 0x502c14
cmp ebp, 0x197
push edi
sete cl
movzx ecx, cl
push ecx
push esi
call fcn.00509ea0
push edi
mov ebp, eax
call dword [0x6d3004]
add esp, 0x10
test ebp, ebp
je 0x5029ab
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x30
ret
push 0xf
push edi
push str.Content_Length:
call fcn.00501d60
add esp, 0xc
test eax, eax
je 0x5028de
mov ecx, dword [esi + 0xf0]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x5028c2
push ecx
push str.Ignoring_Content_Length_in_CONNECT__03d_response
push esi
call fcn.004fd800
add esp, 0xc
jmp 0x5029ab
lea eax, [ebx + 0x1e8]
push eax
push 0xa
lea eax, [edi + 0xf]
push 0
push eax
call fcn.00510c10
add esp, 0x10
jmp 0x5029ab
push 0x642a58
push str.Connection:
push edi
call fcn.00508400
add esp, 0xc
test al, al
jne 0x5029a4
push 0x12
push edi
push str.Transfer_Encoding:
call fcn.00501d60
add esp, 0xc
test eax, eax
je 0x502963
mov ecx, dword [esi + 0xf0]
lea eax, [ecx - 0xc8]
cmp eax, 0x64
jae 0x50292f
push ecx
push str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response
push esi
call fcn.004fd800
add esp, 0xc
jmp 0x5029ab
push str.chunked
push str.Transfer_Encoding:
push edi
call fcn.00508400
add esp, 0xc
test al, al
je 0x5029ab
push str.CONNECT_responded_chunked
push esi
call fcn.004fd800
push esi
mov byte [ebx + 0x1f4], 1
call fcn.0052af10
add esp, 0xc
jmp 0x5029ab
push 0x642a58
push str.Proxy_Connection:
push edi
call fcn.00508400
add esp, 0xc
test al, al
jne 0x5029a4
lea ebp, [esi + 0xf0]
push ebp
lea eax, [esp + 0x38]
push eax
push str.HTTP_1._d__d
push edi
call fcn.00404591
add esp, 0x10
cmp eax, 2
jne 0x5029ab
mov eax, dword [ebp]
mov dword [esi + 0xd3c], eax
jmp 0x5029ab
mov byte [ebx + 0x1f5], 1
lea eax, [ebx + 0x1bc]
push eax
call fcn.004f43e0
add esp, 4
mov ebp, dword [esp + 0x14]
cmp dword [ebx + 0x1e0], 0
jne 0x502677
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x18]
jmp 0x502b32
cmp dword [esi + 0xf0], 0x197
jne 0x502a86
cmp byte [esi + 0xcf9], 0
jne 0x502a86
mov edx, dword [ebx + 0x1e8]
mov eax, edx
mov ecx, dword [ebx + 0x1ec]
or eax, ecx
mov dword [ebx + 0x1e0], 2
je 0x502a2c
push ecx
push edx
push str.Ignore__I64d_bytes_of_response_body
push esi
call fcn.004fd800
add esp, 0x10
cmp dword [ebx + 0x1e0], 0
jne 0x5029ba
jmp 0x502a90
cmp byte [ebx + 0x1f4], 0
je 0x502a86
push str.Ignore_chunked_response_body
push esi
call fcn.004fd800
lea eax, [edi + 1]
mov byte [esi + 0x13f], 1
cmp byte [eax], 0xa
cmove edi, eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x2c]
push eax
push 1
lea eax, [edi + 1]
push eax
push esi
call fcn.0052af40
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x502a21
push str.chunk_reading_DONE
push esi
call fcn.004fd800
add esp, 8
mov dword [ebx + 0x1f0], 2
mov dword [ebx + 0x1e0], 0
mov eax, dword [ebx + 0x1e8]
or eax, dword [ebx + 0x1ec]
mov ebp, dword [esp + 0x14]
jne 0x5029be
mov dword [ebx + 0x1f0], 2
jmp 0x5029be
cmp dword [esi + 0x170], 0
je 0x502af9
cmp dword [esi + 0x9b0], 0
je 0x502af9
cmp dword [esi + 0xcbc], 0
je 0x502af9
mov edi, dword [esp + 0x10]
push str.Proxy_CONNECT_connection_closed
push esi
mov byte [edi + 0x25c], 1
call fcn.004fd800
mov ebp, dword [esp + 0x20]
add esp, 8
mov dword [ebx + 0x1e0], 0
jmp 0x502b32
push str.Proxy_CONNECT_aborted
push esi
mov ebp, 1
call fcn.004fd730
mov edi, dword [esp + 0x18]
add esp, 8
mov dword [ebx + 0x1e0], 0
jmp 0x502b32
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x18]
mov dword [ebx + 0x1e0], 0
jmp 0x502b32
xor ebp, ebp
push esi
call fcn.0050c0f0
add esp, 4
test eax, eax
jne 0x502dd4
test ebp, ebp
jne 0x502c8b
mov eax, dword [esi + 0xd3c]
sub eax, 0xc8
cmp eax, 0x64
jb 0x502b7b
push esi
call fcn.00508590
add esp, 4
test eax, eax
jne 0x502dcc
cmp byte [edi + 0x25d], al
je 0x502b7b
mov byte [ebx + 0x1f5], 1
cmp byte [ebx + 0x1f5], 0
je 0x502b91
cmp dword [esi + 0x128], 0
jne 0x502c98
mov eax, dword [esi + 0x128]
test eax, eax
je 0x502cb2
cmp dword [ebx + 0x1f0], 2
jne 0x502bf5
mov eax, dword [esi + 0xc]
mov edi, dword [eax + 0x4e0]
lea eax, [edi + 0x1bc]
push eax
call fcn.004f43e0
mov dword [edi + 0x1f0], 0
add esp, 4
mov dword [edi + 0x1e0], 1
mov dword [edi + 0x1e8], 0
mov dword [edi + 0x1ec], 0
mov byte [edi + 0x1f5], 0
mov eax, dword [esi + 0x128]
test eax, eax
je 0x502cb2
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
jmp 0x5023a0
push ebp
call dword [0x6d3004]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x30
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
lea ecx, [esp + 0x48]
push ecx
push eax
push dword [esi + 0x130]
push dword [edi + 0x2bc]
push esi
call fcn.004fdc60
mov ecx, eax
add esp, 0x14
test ecx, ecx
jne 0x502c63
push dword [esp + 0x48]
push dword [esi + 0x130]
push 2
push esi
call fcn.004fd6a0
add esp, 0x10
mov ecx, eax
mov eax, dword [esp + 0x48]
sub dword [ebx + 0x1dc], eax
add dword [esi + 0x130], eax
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
push str.CONNECT_response_too_large_
push esi
call fcn.004fd730
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x38
pop ebx
add esp, 0x30
ret
mov ebp, dword [esp + 0x24]
push dword [ebp]
push edi
push esi
call fcn.004fdff0
add esp, 0xc
mov dword [ebp], 0xffffffff
jmp 0x502cba
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x24]
mov eax, dword [esi + 0xd3c]
sub eax, 0xc8
cmp eax, 0x64
jb 0x502d73
cmp byte [ebx + 0x1f5], 0
je 0x502cfd
cmp dword [esi + 0x128], 0
je 0x502cfd
push str.Connect_me_again_please
push esi
mov byte [edi + 0x25c], 1
call fcn.004fd800
push esi
call fcn.00503040
add esp, 0xc
jmp 0x502d2f
push dword [esi + 0x128]
call dword [0x6d3004]
push 2
push edi
mov dword [esi + 0x128], 0
call fcn.004fe100
push dword [ebp]
push edi
push esi
call fcn.004fdff0
add esp, 0x18
mov dword [ebp], 0xffffffff
mov dword [ebx + 0x1f0], 0
cmp byte [edi + 0x25c], 0
jne 0x502dca
lea eax, [ebx + 0x1bc]
push eax
call fcn.004f4370
push dword [esi + 0xf0]
push str.Received_HTTP_code__d_from_proxy_after_CONNECT
push esi
call fcn.004fd730
add esp, 0x10
mov eax, 0x38
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov dword [ebx + 0x1f0], 2
push dword [esi + 0xcbc]
call dword [0x6d3004]
push dword [esi + 0xd3c]
mov dword [esi + 0xcbc], 0
push str.Proxy_replied__d_to_CONNECT_request
push esi
mov word [esi + 0x9b4], 1
call fcn.004fd800
lea eax, [ebx + 0x1bc]
mov byte [esi + 0x13f], 0
push eax
mov byte [edi + 0x26a], 0
call fcn.004f4370
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x30
ret
push str.Proxy_CONNECT_aborted_due_to_timeout
push esi
call fcn.004fd730
add esp, 8
mov eax, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret